summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-01-21 13:25:44 +0000
committerBruno Haible <bruno@clisp.org>2009-06-22 01:04:50 +0200
commit6504af86ff4afa810c2cf96f96e801daa9861872 (patch)
treeba49414647a01c30aa1fbb27b726cec442d124b0 /m4
parentb174d83d34f7776981a95f08887098d1f539b063 (diff)
downloadexternal_gettext-6504af86ff4afa810c2cf96f96e801daa9861872.zip
external_gettext-6504af86ff4afa810c2cf96f96e801daa9861872.tar.gz
external_gettext-6504af86ff4afa810c2cf96f96e801daa9861872.tar.bz2
Don't check for ICONV_CONST if we don't need it.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog6
-rw-r--r--m4/gettext.m42
-rw-r--r--m4/iconv.m429
3 files changed, 25 insertions, 12 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 04163cf..1af7390 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,5 +1,11 @@
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
necessary for -lintl. Instead, use the $LIBICONV value determined by
the AM_ICONV macro.
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index b5f9f74..bd83f81 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -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
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index b8c733b..58b8a09 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -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)
])