From: Kevin McCarthy Date: Mon, 17 Aug 2015 21:51:07 +0000 (-0700) Subject: Add idn to MUTTLIBS instead of LIBS (see #3638) X-Git-Tag: neomutt-20160307~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a4b0d54a9a1826c7e212f532baab8e0e8812712;p=neomutt Add idn to MUTTLIBS instead of LIBS (see #3638) Currently, -lidn is included while linking all the mutt binaries. Add it to MUTTLIBS instead so it's only used for the mutt linking. Also, add $LIBICONV to $LIBS before checking for some of the idna functions. On some sytems, there are apparently issues when using static linking. (Thanks to grarpamp for reporting). --- diff --git a/configure.ac b/configure.ac index 2855bd9a2..1a76cd751 100644 --- a/configure.ac +++ b/configure.ac @@ -1191,14 +1191,22 @@ if test "x$with_idn" != "xno"; then have_idna_h=yes break]) + mutt_save_LIBS="$LIBS" + LIBS= + AC_SEARCH_LIBS([stringprep_check_version], [idn], [ AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the GNU idn library]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o" + MUTTLIBS="$MUTTLIBS $LIBS" + + LIBS="$LIBS $LIBICONV" AC_CHECK_FUNCS(idna_to_unicode_utf8_from_utf8 idna_to_unicode_8z8z) AC_CHECK_FUNCS(idna_to_ascii_from_utf8 idna_to_ascii_8z) AC_CHECK_FUNCS(idna_to_ascii_lz idna_to_ascii_from_locale) ]) + LIBS="$mutt_save_LIBS" + if test "$with_idn" != auto; then if test $have_stringprep_h = no || test $have_idna_h = no || test $ac_cv_search_stringprep_check_version = no; then AC_MSG_ERROR([IDN was requested, but libidn was not usable on this system])