diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-11-19 19:41:03 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-11-19 19:41:03 +0000 |
commit | 7ff058904c6bcffb8d2e0198d6a756faec8f8be4 (patch) | |
tree | aa4b7c3eadba9891253d38e9b5b7ba1c9b888291 | |
parent | 178d3290792a55fd96d6ba5d36f94a97ee2f5fb1 (diff) | |
download | wyslij-po-7ff058904c6bcffb8d2e0198d6a756faec8f8be4.tar.gz wyslij-po-7ff058904c6bcffb8d2e0198d6a756faec8f8be4.tar.bz2 |
* README-hacking: Mention GNU Mailutils.
* bootstrap.conf: Read options from .bootstrap
* configure.ac: Use AM_GNU_MAILUTILS.
* src/main.c: Support Mailutils CVS HEAD.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | README-hacking | 1 | ||||
-rw-r--r-- | bootstrap.conf | 5 | ||||
-rw-r--r-- | configure.ac | 33 | ||||
-rw-r--r-- | src/main.c | 16 |
5 files changed, 31 insertions, 31 deletions
@@ -1,3 +1,10 @@ +2007-11-19 Sergey Poznyakoff <gray@gnu.org.ua> + + * README-hacking: Mention GNU Mailutils. + * bootstrap.conf: Read options from .bootstrap + * configure.ac: Use AM_GNU_MAILUTILS. + * src/main.c: Support Mailutils CVS HEAD. + 2007-10-26 Sergey Poznyakoff <gray@gnu.org.ua> * bootstrap: Use Git to clone gnulib sources. Fallback to diff --git a/README-hacking b/README-hacking index 18b1f90..3004c77 100644 --- a/README-hacking +++ b/README-hacking @@ -11,6 +11,7 @@ sure that you have the latest stable version. - Autoconf <http://www.gnu.org/software/autoconf/> - Gnulib <http://www.gnu.org/software/gnulib/> - M4 <http://www.gnu.org/software/m4/> +- Mailutils <http://www.gnu.org/software/mailutils/> - Texinfo <http://www.gnu.org/software/texinfo> - Wget <http://www.gnu.org/software/wget> - Git <http://git.or.cz> or CVS <http://www.nongnu.org/cvs> diff --git a/bootstrap.conf b/bootstrap.conf index 6803f8d..275b1bb 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -17,6 +17,11 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. +if [ -r .bootstrap ]; then + echo "$0: Reading configuration file .bootstrap" + eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*" +fi + gnulib_mk=Makefile.am gnulib_name=libgnu diff --git a/configure.ac b/configure.ac index 4b30276..1d8053c 100644 --- a/configure.ac +++ b/configure.ac @@ -43,36 +43,11 @@ AC_TYPE_SIZE_T gl_INIT # Check for GNU Mailutils -AC_PATH_PROG(MU_CONFIG, mailutils-config, none, $PATH) -if test "$MU_CONFIG" = "none"; then - AC_MSG_ERROR(cannot find GNU Mailutils) -fi - -AC_SUBST(MAILUTILS_VERSION) -AC_SUBST(MAILUTILS_INCLUDES) -AC_SUBST(MAILUTILS_LIBS) -MAILUTILS_VERSION=`$MU_CONFIG --info version|sed s/.*=//` - -echo $MAILUTILS_VERSION | tr '.' ' ' | (read major minor patch -case $major.$minor in -0.*) AC_MSG_ERROR([Mailutils version too old; at least 1.2 is required]) - 1;; -1.2) if test ${patch:-0} -eq 0; then - AC_MSG_WARN([Mailutils version 1.2 detected. If you have not patched it +AM_GNU_MAILUTILS(1.2, auth mailer cfg argp, + [if test $MAILUTILS_VERSION_NUMBER -eq 1200; then + AC_MSG_WARN([Mailutils version 1.2 detected. If you have not patched it yet, apply the patch from http://savannah.gnu.org/patch/index.php?6062]) - fi;; -[1-9]*) ;; -*) AC_MSG_ERROR([Unrecognized Mailutils version ($MAILUTILS_VERSION)]) - ;; -esac) - -MAILUTILS_VERSION=`$MU_CONFIG --info version|sed 's/VERSION=//'` -case $MAILUTILS_VERSION in -0.*) AC_MSG_ERROR([Mailutils version too old; at least 1.0 is required]);; -1.1*) MAILUTILS_LIBS=`$MU_CONFIG --link auth`;; -*) MAILUTILS_LIBS=`$MU_CONFIG --link auth mailer`;; -esac -MAILUTILS_INCLUDES=`$MU_CONFIG --compile` + fi]) # Doc hints. # Select a rendition level: @@ -16,6 +16,11 @@ Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "wyslij-po.h" +#if MAILUTILS_VERSION_NUMBER < 1290 +# include <mailutils/argp.h> +#else +# include <mailutils/libargp.h> +#endif const char *program_version = "wyslij-po (" PACKAGE_STRING ")"; static char doc[] = "wyslij-po -- submit PO files to the Translation Project"; @@ -480,14 +485,21 @@ There is NO WARRANTY, to the extent permitted by law.\n\ int main (int argc, char **argv) { - int index; + int rc, index; mu_register_all_mailer_formats (); if (!program_invocation_short_name) program_invocation_short_name = argv[0]; argp_program_version_hook = version_out; mu_argp_init (program_version, "<" PACKAGE_BUGREPORT ">"); - mu_argp_parse (&argp, &argc, &argv, 0, capa, &index, NULL); +#if MAILUTILS_VERSION_NUMBER < 1290 + rc = mu_argp_parse (&argp, &argc, &argv, 0, capa, &index, NULL); +#else + rc = mu_app_init (&argp, capa, NULL, argc, argv, 0, &index, NULL); +#endif + if (rc) + exit (1); + mu_error_set_print (_error_printer); if (index == argc) |