From: Bruno Haible Date: Tue, 21 May 2002 18:31:18 +0000 (+0000) Subject: Make it possible to invoke AM_ICONV after AM_GNU_GETTEXT. X-Git-Tag: v0.11.3~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a560ff0ea4e5e12a43aaba3febc53b5d6447397;p=thirdparty%2Fgettext.git Make it possible to invoke AM_ICONV after AM_GNU_GETTEXT. --- diff --git a/m4/ChangeLog b/m4/ChangeLog index f233bf08b..8fec47a8e 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,12 @@ +2002-05-18 Bruno Haible + + Make it possible to invoke AM_ICONV after AM_GNU_GETTEXT. + * iconv.m4 (AM_ICONV_LINKFLAGS_BODY): New macro. + (AM_ICONV_LINK): Require it. + (AM_ICONV): Invoke AM_ICONV_LINK. Requiring it is not sufficient, + because gettext.m4 invokes it inside an 'if'. + * gettext.m4 (AM_GNU_GETTEXT): Require AM_ICONV_LINKFLAGS_BODY. + 2002-05-04 Bruno Haible * javacomp.m4 (gt_JAVACOMP): Ignore non-digits in the first line of diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 94bc26c8d..a65b03d46 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -1,4 +1,4 @@ -# gettext.m4 serial 14 (gettext-0.11.2) +# gettext.m4 serial 15 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -75,6 +75,21 @@ AC_DEFUN([AM_GNU_GETTEXT], AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, diff --git a/m4/iconv.m4 b/m4/iconv.m4 index f81e8b995..c5f357982 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,4 +1,4 @@ -# iconv.m4 serial AM3 (gettext-0.11) +# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -8,11 +8,8 @@ dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. -AC_DEFUN([AM_ICONV_LINK], +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) @@ -20,6 +17,16 @@ AC_DEFUN([AM_ICONV_LINK], dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use @@ -69,7 +76,7 @@ AC_DEFUN([AM_ICONV_LINK], AC_DEFUN([AM_ICONV], [ - AC_REQUIRE([AM_ICONV_LINK]) + AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [