]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Recognize Solaris xgettext/msgfmt.
authorBruno Haible <bruno@clisp.org>
Thu, 14 Jun 2001 18:22:24 +0000 (18:22 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Jun 2009 14:35:51 +0000 (16:35 +0200)
Support for autoconf-2.50.

m4/ChangeLog
m4/gettext.m4

index 57c30a9c965087073a6a6d3de78fa27546953625..b12ce8110ed6ae414dc3cae8e8b4a7a55555482c 100644 (file)
@@ -1,3 +1,14 @@
+2001-06-14  Bruno Haible  <haible@clisp.cons.org>
+
+       * gettext.m4 (AM_WITH_NLS): Add support for autoconf-2.50.
+
+2001-05-30  Bruno Haible  <haible@clisp.cons.org>
+
+       * gettext.m4 (AM_WITH_NLS): Look only for GNU msgfmt and GNU xgettext.
+       Set the variables to ":" if not found.
+       * progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no", not
+       the default value.
+
 2001-05-23  Bruno Haible  <haible@clisp.cons.org>
 
        * gettext-0.10.38 released.
index 05358c480c9d1645edf3add9e8417a31bdfdcddf..c54818941db839b1d3ebdfc7e821a5b1a0d5dad9 100644 (file)
@@ -6,7 +6,7 @@
 # but which still want to provide support for the GNU gettext functionality.
 # Please note that the actual code is *not* freely available.
 
-# serial 9
+# serial 10
 
 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
@@ -117,14 +117,14 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
             AC_CHECK_FUNCS(dcgettext)
             LIBS="$gt_save_LIBS"
 
+            dnl Search for GNU msgfmt in the PATH.
             AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-              [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-            if test "$MSGFMT" != "no"; then
-              AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-            fi
+              [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
+            AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
+            dnl Search for GNU xgettext in the PATH.
             AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-              [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+              [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
 
             CATOBJEXT=.gmo
           fi
@@ -141,10 +141,10 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
         dnl Mark actions used to generate GNU NLS library.
         INTLOBJS="\$(GETTOBJS)"
         AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+         [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
         AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
         AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+         [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
         AC_SUBST(MSGFMT)
        BUILD_INCLUDED_LIBINTL=yes
        USE_INCLUDED_LIBINTL=yes
@@ -153,11 +153,26 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
       fi
 
+      dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+      dnl Test whether we really found GNU msgfmt.
+      if test "$GMSGFMT" != ":"; then
+       dnl If it is no GNU msgfmt we define it as : so that the
+       dnl Makefiles still can work.
+       if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
+         : ;
+       else
+         AC_MSG_RESULT(
+           [found msgfmt program is not GNU msgfmt; ignore it])
+         GMSGFMT=":"
+       fi
+      fi
+
+      dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
       dnl Test whether we really found GNU xgettext.
       if test "$XGETTEXT" != ":"; then
        dnl If it is no GNU xgettext we define it as : so that the
        dnl Makefiles still can work.
-       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+       if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
          : ;
        else
          AC_MSG_RESULT(
@@ -181,6 +196,9 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+          # In autoconf-2.13 it is called $ac_given_srcdir.
+          # In autoconf-2.50 it is called $srcdir.
+          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
           case "$ac_given_srcdir" in
             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
             /*) top_srcdir="$ac_given_srcdir" ;;
@@ -188,9 +206,9 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
           esac
           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
             rm -f "$ac_dir/POTFILES"
-            echo creating "$ac_dir/POTFILES"
+            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
             sed -e "/^#/d" -e "/^[     ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
-            echo creating "$ac_dir/Makefile"
+            test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
           fi
           ;;