summaryrefslogtreecommitdiffstats
path: root/m4/iconv.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:35 +0000
commit2ed1dcfa30b3967f7d6df74fba78ce23ed065497 (patch)
tree8ff5a74b07bf976cd88df2460e1c9cafb27f050a /m4/iconv.m4
parentReleasing progress-linux version 5.6.1+really5.4.5-1~progress7.99u1. (diff)
downloadxz-utils-2ed1dcfa30b3967f7d6df74fba78ce23ed065497.tar.xz
xz-utils-2ed1dcfa30b3967f7d6df74fba78ce23ed065497.zip
Merging upstream version 5.6.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/iconv.m4')
-rw-r--r--m4/iconv.m438
1 files changed, 24 insertions, 14 deletions
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 0005795..2a7edd3 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,5 +1,5 @@
-# iconv.m4 serial 24
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation,
+# iconv.m4 serial 27
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,7 @@ AC_DEFUN([AM_ICONV_LINK],
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
+ gl_saved_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
@@ -55,7 +55,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);]])],
[am_cv_func_iconv=yes])
if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
+ gl_saved_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -68,14 +68,14 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);]])],
[am_cv_lib_iconv=yes]
[am_cv_func_iconv=yes])
- LIBS="$am_save_LIBS"
+ LIBS="$gl_saved_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
dnl Solaris 10.
- am_save_LIBS="$LIBS"
+ gl_saved_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
@@ -205,7 +205,7 @@ AC_DEFUN([AM_ICONV_LINK],
esac])
test "$am_cv_func_iconv_works" = no || break
done
- LIBS="$am_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
@@ -224,7 +224,7 @@ AC_DEFUN([AM_ICONV_LINK],
else
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
@@ -234,12 +234,6 @@ AC_DEFUN([AM_ICONV_LINK],
dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
-dnl This is tricky because of the way 'aclocal' is implemented:
-dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
-dnl Otherwise aclocal's initial scan pass would miss the macro definition.
-dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
-dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
-dnl warnings.
AC_DEFUN_ONCE([AM_ICONV],
[
AM_ICONV_LINK
@@ -280,4 +274,20 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
ICONV_CONST="const"
fi
])
+
+ dnl A summary result, for those packages which want to print a summary at the
+ dnl end of the configuration.
+ if test "$am_func_iconv" = yes; then
+ if test -n "$LIBICONV"; then
+ am_cv_func_iconv_summary='yes, in libiconv'
+ else
+ am_cv_func_iconv_summary='yes, in libc'
+ fi
+ else
+ if test "$am_cv_func_iconv" = yes; then
+ am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
+ else
+ am_cv_func_iconv_summary='no, consider installing GNU libiconv'
+ fi
+ fi
])