changeset: 6482:c0180991c352
user: Kevin McCarthy <[email protected]>
date: Mon Aug 17 14:51:07 2015 -0700
link: http://dev.mutt.org/hg/mutt/rev/c0180991c352
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).
diffs (26 lines):
diff -r 356443232291 -r c0180991c352 configure.ac
--- a/configure.ac Mon Aug 17 12:31:40 2015 -0700
+++ b/configure.ac Mon Aug 17 14:51:07 2015 -0700
@@ -1191,14 +1191,22 @@
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])