]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Remove shortcut check that doesn't work anymore because CPPFLAGS might have
authorBruno Haible <bruno@clisp.org>
Mon, 21 Jan 2002 13:20:51 +0000 (13:20 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:03:58 +0000 (01:03 +0200)
to be extended.

m4/ChangeLog
m4/gettext.m4

index f58480e6cf5c7d8fe5a59a34e2fd44686c53b45d..570eef76d21f5fa4466f6af6ddb96b3ece2006a8 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-19  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.m4 (AM_GNU_GETTEXT): Remove shortcut check for <libintl.h>.
+
 2002-01-18  Bruno Haible  <bruno@clisp.org>
 
        * gettext.m4 (AM_PO_SUBDIRS): Split preprocessing of POTFILES.in into
index 76e4afba69f61823e486f1cc41ee3807957c3396..15266265018844d9240339532cc1e6c4073fcf95 100644 (file)
@@ -116,45 +116,43 @@ AC_DEFUN([AM_GNU_GETTEXT],
         dnl Search for libintl and define LIBINTL and INCINTL accordingly.
         AC_LIB_LINKFLAGS_BODY([intl], [iconv])
 
-        AC_CHECK_HEADER(libintl.h,
-         [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
-           [AC_TRY_LINK([#include <libintl.h>
+        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+         [AC_TRY_LINK([#include <libintl.h>
 extern int _nl_msg_cat_cntr;],
-              [bindtextdomain ("", "");
+            [bindtextdomain ("", "");
 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
-              gt_cv_func_gnugettext_libc=yes,
-              gt_cv_func_gnugettext_libc=no)])
-
-          if test "$gt_cv_func_gnugettext_libc" != "yes"; then
-            ifelse(gt_included_intl, yes, , [
-              AM_ICONV
-            ])
-            AC_CACHE_CHECK([for GNU gettext in libintl],
-              gt_cv_func_gnugettext_libintl,
-             [gt_save_CPPFLAGS="$CPPFLAGS"
-              CPPFLAGS="$CPPFLAGS $INCINTL"
-              gt_save_LIBS="$LIBS"
-              LIBS="$LIBS $LIBINTL"
-              AC_TRY_LINK([#include <libintl.h>
+            gt_cv_func_gnugettext_libc=yes,
+            gt_cv_func_gnugettext_libc=no)])
+
+        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV
+          ])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            gt_cv_func_gnugettext_libintl,
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            AC_TRY_LINK([#include <libintl.h>
 extern int _nl_msg_cat_cntr;],
-                [bindtextdomain ("", "");
+              [bindtextdomain ("", "");
 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
-                gt_cv_func_gnugettext_libintl=yes,
-                gt_cv_func_gnugettext_libintl=no)
-              CPPFLAGS="$gt_save_CPPFLAGS"
-              LIBS="$gt_save_LIBS"])
-          fi
+              gt_cv_func_gnugettext_libintl=yes,
+              gt_cv_func_gnugettext_libintl=no)
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
 
-          dnl If an already present or preinstalled GNU gettext() is found,
-          dnl use it.  But if this macro is used in GNU gettext, and GNU
-          dnl gettext is already preinstalled in libintl, we update this
-          dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
-          if test "$gt_cv_func_gnugettext_libc" = "yes" \
-             || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
-                  && test "$PACKAGE" != gettext; }; then
-            gt_use_preinstalled_gnugettext=yes
-          fi
-         ])
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if test "$gt_cv_func_gnugettext_libc" = "yes" \
+           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+                && test "$PACKAGE" != gettext; }; then
+          gt_use_preinstalled_gnugettext=yes
+        fi
 
     ifelse(gt_included_intl, yes, [
         if test "$gt_use_preinstalled_gnugettext" != "yes"; then