diff options
author | Bruno Haible <bruno@clisp.org> | 2002-01-21 13:25:44 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-22 01:04:50 +0200 |
commit | 6504af86ff4afa810c2cf96f96e801daa9861872 (patch) | |
tree | ba49414647a01c30aa1fbb27b726cec442d124b0 /m4/iconv.m4 | |
parent | b174d83d34f7776981a95f08887098d1f539b063 (diff) | |
download | external_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/iconv.m4')
-rw-r--r-- | m4/iconv.m4 | 29 |
1 files changed, 18 insertions, 11 deletions
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) ]) |