aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-05 08:45:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-05 08:45:13 +0000
commit19a568a98378c9afb31b3993ad68b4be58d8e434 (patch)
treeed1a4bcc5d1adc8e03bcd69c1f36e27c0f61b216 /configure.ac
parent70c3f6a8ddf5d2d358544e38fcadd8d4c1581e29 (diff)
make the given path to --with-libidn override any other installation
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 22 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index b1e60b94b..3bd5f6c6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -953,23 +953,28 @@ case "$LIBIDN" in
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
- AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
- [
- dnl if there was a given path, try it
- nolibidn="true"
- if test "x$LIBIDN" != "xyes"; then
- nolibidn="" dnl reset to test again
- oldLDFLAGS=$LDFLAGS
- oldCPPFLAGS=$CPPFLAGS
- LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
- CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
- AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
- nolibidn="true"
- LDFLAGS=$oldLDFLAGS
- CPPFLAGS=$oldCPPFLAGS)
- fi
- ])
- if test "x$nolibidn" != "xtrue"; then
+
+ idn=""
+ dnl if there is a given path, check that FIRST
+ if test "x$LIBIDN" != "xyes"; then
+ oldLDFLAGS=$LDFLAGS
+ oldCPPFLAGS=$CPPFLAGS
+ LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
+ CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
+ idn="yes"
+ AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
+ idn=""
+ LDFLAGS=$oldLDFLAGS
+ CPPFLAGS=$oldCPPFLAGS)
+ fi
+
+ if test "x$idn" != "xyes"; then
+ dnl check with default paths
+ AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
+ idn="")
+ fi
+
+ if test "x$idn" = "xyes"; then
curl_idn_msg="enabled"
dnl different versions of libidn have different setups of these:
AC_CHECK_FUNCS( idn_free idna_strerror )