From: Bruno Haible Date: Mon, 21 Jan 2002 13:20:51 +0000 (+0000) Subject: Remove shortcut check that doesn't work anymore because CPPFLAGS might have X-Git-Tag: v0.11~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31381faa1d5db473212b404b8cb97dbf7bdb5152;p=thirdparty%2Fgettext.git Remove shortcut check that doesn't work anymore because CPPFLAGS might have to be extended. --- diff --git a/m4/ChangeLog b/m4/ChangeLog index f58480e6c..570eef76d 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2002-01-19 Bruno Haible + + * gettext.m4 (AM_GNU_GETTEXT): Remove shortcut check for . + 2002-01-18 Bruno Haible * gettext.m4 (AM_PO_SUBDIRS): Split preprocessing of POTFILES.in into diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 76e4afba6..152662650 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -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 + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include 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 + 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 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