On Solaris/OpenIndiana there is a libidn, and the headers are in /usr/include/idn but they aren't exactly working like GNU libidn, it seems. So check for the existence of the headers, before assuming they are there (see the code, e.g. main.c, mutt_idna.h).
# HG changeset patch # User Fabian Groffen <grob...@gentoo.org> # Date 1356004284 -3600 # Branch HEAD # Node ID dd31846ebe2972cdeba90fbea16a980c2a8d0c70 # Parent 879c9516154c77027d385dfc15848b58d7fb2e7c configure: refine libidn test not to report false positive On Solaris/OpenIndiana there is a libidn, and the headers are in /usr/include/idn but they aren't exactly working like GNU libidn, it seems. So check for the existence of the headers, before assuming they are there (see the code, e.g. main.c, mutt_idna.h). diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1184,13 +1184,20 @@ if test "x$with_idn" != "xno"; then AC_MSG_ERROR([IDN requested but iconv is disabled or unavailable]) fi else - AC_SEARCH_LIBS([stringprep_check_version], [idn], [ - AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the `idn' library]) - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o" - ]) - 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) + gnuidnhdrs=yes + AC_CHECK_HEADERS([idna.h stringprep.h], , [gnuidnhdrs=no]) + # Solaris has idn/{idna,stringprep}.h and a libidn, but that isn't + # exactly working like the GNU one, so don't falsively assume idna.h + # and stringprep.h are there and working fine when we find a libidn + if test "x$gnuidnhdrs" != "xno"; then + AC_SEARCH_LIBS([stringprep_check_version], [idn], [ + AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the `idn' library]) + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o" + ]) + 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) + fi fi fi