]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't check for ICONV_CONST if we don't need it.
authorBruno Haible <bruno@clisp.org>
Mon, 21 Jan 2002 13:25:44 +0000 (13:25 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:04:50 +0000 (01:04 +0200)
m4/ChangeLog
m4/gettext.m4
m4/iconv.m4

index 04163cf3bfd70d4aa767f3c3a607105dfba36c61..1af739055a7e9f780e76f017a0368519bac66fc9 100644 (file)
@@ -1,3 +1,9 @@
+2002-01-19  Bruno Haible  <bruno@clisp.org>
+
+       * iconv.m4 (AM_ICONV_LINK): New macro, extracted from AM_ICONV.
+       (AM_ICONV): Call it.
+       * gettext.m4 (AM_GNU_GETTEXT): Call AM_ICONV_LINK instead of AM_ICONV.
+
 2002-01-19  Bruno Haible  <bruno@clisp.org>
 
        * gettext.m4 (AM_GNU_GETTEXT): Don't consider that -liconv is
index b5f9f7456ed63fb7b153cf1bfcd18f1b07a4137d..bd83f81d55dc1e43a2ec3fa3b0d38a465f915775 100644 (file)
@@ -124,7 +124,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
         if test "$gt_cv_func_gnugettext_libc" != "yes"; then
           dnl Sometimes libintl requires libiconv, so first search for libiconv.
           ifelse(gt_included_intl, yes, , [
-            AM_ICONV
+            AM_ICONV_LINK
           ])
           dnl Search for libintl and define LIBINTL and INCINTL accordingly.
           dnl Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) because that would
index b8c733b1fe8f5af27cc29edc97d9b052c9b9825d..58b8a093d05d2d5e92b43e3edaadddf75e29ad4f 100644 (file)
@@ -8,7 +8,7 @@ dnl the same distribution terms as the rest of that program.
 
 dnl From Bruno Haible.
 
-AC_DEFUN([AM_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).
@@ -51,6 +51,23 @@ AC_DEFUN([AM_ICONV],
   ])
   if test "$am_cv_func_iconv" = yes; then
     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AC_REQUIRE([AM_ICONV_LINK])
+  if test "$am_cv_func_iconv" = yes; then
     AC_MSG_CHECKING([for iconv declaration])
     AC_CACHE_VAL(am_cv_proto_iconv, [
       AC_TRY_COMPILE([
@@ -73,14 +90,4 @@ size_t iconv();
     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
       [Define as const if the declaration of iconv() needs const.])
   fi
-  if test "$am_cv_lib_iconv" = yes; then
-    AC_MSG_CHECKING([how to link with libiconv])
-    AC_MSG_RESULT([$LIBICONV])
-  else
-    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
-    dnl either.
-    CPPFLAGS="$am_save_CPPFLAGS"
-    LIBICONV=
-  fi
-  AC_SUBST(LIBICONV)
 ])