diff options
author | Michael Elkins <me@sigpipe.org> | 2013-01-22 02:02:00 +0000 |
---|---|---|
committer | Michael Elkins <me@sigpipe.org> | 2013-01-22 02:02:00 +0000 |
commit | e3a244a05728dd63f5e72005fe1c500410703ad8 (patch) | |
tree | 20c21789772d67deec27d106de42b642d8109ed1 /configure.ac | |
parent | 7436291112f12d182f1d4145ac9c4fd9e7761739 (diff) |
remove PKG_CHECK_MODULE() check and always use AC_CHECK_HEADERS()
only check for <idn/idna.h> when <idna.h> isn't found
closes #3626
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac index 5afd6e71..1b6e0107 100644 --- a/configure.ac +++ b/configure.ac @@ -1163,31 +1163,28 @@ if test "x$with_idn" != "xno"; then AC_MSG_ERROR([IDN requested but iconv is disabled or unavailable]) fi else - have_libidn=no - if test "$with_idn" = auto || test "$with_idn" = yes; then - PKG_CHECK_MODULES([gnuidn], [libidn], - [CFLAGS="$CFLAGS $gnuidn_CFLAGS" - LIBS="$LIBS $gnuidn_LIBS" - have_libidn=yes], - []) dnl empty block inhibits default action of aborting with an error - fi - dnl Solaris 11 has /usr/include/idn - AC_CHECK_HEADERS(stringprep.h idn/stringprep.h idna.h idn/idna.h) - - if test $have_libidn = no; then - dnl libidn was not registered with pkg-config or user specified alternative path - AC_SEARCH_LIBS([stringprep_check_version], [idn], [have_libidn=yes]) - fi - - if test $have_libidn = yes; then - AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the GNU 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) - elif test "$with_idn" != auto; then + have_stringprep_h=no + AC_CHECK_HEADERS([stringprep.h idn/stringprep.h], [ + have_stringprep_h=yes + break]) + have_idna_h=no + AC_CHECK_HEADERS([idna.h idn/idna.h], [ + have_idna_h=yes + break]) + + 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" + 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) + ]) + + 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]) + fi fi fi fi |