summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2024-10-29 13:15:12 +0800
committerKevin McCarthy <kevin@8t8.us>2024-11-02 11:13:26 +0800
commita5bd98212d8dab1e76867b72bac205000393dd14 (patch)
tree41f541d574d15b7192d701ae5856c32ac42a1d38
parent0af8a6fcdbe8550bababd51c4da1772c75f77912 (diff)
Fix configure.ac AM_ICONV result checking.stablekevin/489-stable-iconv-build-bug
--disable-iconv seeds the cache value variable, $am_cv_func_iconv, to "no" to skip the test and disable iconv. However, the result of an existing and *working* AM_ICONV test is stored in $am_func_iconv. The call to AC_DEFINE(HAVE_ICONV) depends on that variable. Mutt was improperly checking $am_cv_func_iconv below. In the event of an existing but broken iconv, this would result in HAVE_ICONV being undefined, but mutt_idna.o being added to MUTT_LIB_OBJECTS. This would cause both the stub functions in mutt_idna.h and the full functions in mutt_idna.c to be defined, giving a compilation error. Thanks to @juanitotc for the bug report and helping to test the fix.
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 2e38c49f..0435f05b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1272,7 +1272,7 @@ AC_ARG_ENABLE(iconv, AS_HELP_STRING([--disable-iconv],[Disable iconv support]),
AM_GNU_GETTEXT([external])
AM_ICONV
-if test "$am_cv_func_iconv" != "yes"
+if test "$am_func_iconv" != "yes"
then
AC_MSG_WARN([Configuring without iconv support. See INSTALL for details])
else
@@ -1356,7 +1356,7 @@ dnl -- IDN depends on iconv
dnl mutt_idna.c will perform charset transformations (for smtputf8
dnl support) as long as at least iconv is installed. If there is no
dnl iconv, then it doesn't need to be included in the build.
-if test "$am_cv_func_iconv" = yes; then
+if test "$am_func_iconv" = yes; then
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o"
fi
@@ -1391,7 +1391,7 @@ AC_ARG_WITH(idn2, AS_HELP_STRING([--with-idn2=@<:@PFX@:>@],[Use GNU libidn2 for
[with_idn2=no])
if test "x$with_idn" != "xno"; then
- if test "$am_cv_func_iconv" != "yes"; then
+ if test "$am_func_iconv" != "yes"; then
if test "$with_idn" != "auto"; then
AC_MSG_ERROR([IDN requested but iconv is disabled or unavailable])
fi
@@ -1431,7 +1431,7 @@ fi
dnl idna2
if test "x$with_idn2" != "xno"; then
- if test "$am_cv_func_iconv" != "yes"; then
+ if test "$am_func_iconv" != "yes"; then
AC_MSG_ERROR([IDN2 requested but iconv is disabled or unavailable])
else
dnl Solaris 11 has /usr/include/idn