]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make it possible to invoke AM_ICONV after AM_GNU_GETTEXT.
authorBruno Haible <bruno@clisp.org>
Tue, 21 May 2002 18:31:18 +0000 (18:31 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:07:58 +0000 (12:07 +0200)
m4/ChangeLog
m4/gettext.m4
m4/iconv.m4

index f233bf08bdd988f3fecb691c690010dec649840d..8fec47a8ecba63cc427466375c307c1eacb874f7 100644 (file)
@@ -1,3 +1,12 @@
+2002-05-18  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        * javacomp.m4 (gt_JAVACOMP): Ignore non-digits in the first line of
index 94bc26c8d25c6f143023780db74b5d482c8aaff1..a65b03d4662a1c428d566d903da89e713e2da4d4 100644 (file)
@@ -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,
index f81e8b995f69122fd2995942dc86fbfdfdd94c6a..c5f3579827e7527ce83b60c2049c0b644bb6cb01 100644 (file)
@@ -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, [