aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-01 10:26:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-01 10:26:59 +0000
commitc8d850dbad7fae0ecd6f8e96dcfbea4188f353e6 (patch)
treeef6491da3cd1afbbc2a3bc0154997dd3b5be6c2c
parent01ea3577445360940ee776f6863e676c53014d1d (diff)
Only check that the c-ares lib is valid if we don't use the "embedded"
directory. The provided ares dir is probably up-to-date, but more importantly it is often not built yet at the time when this configure script runs.
-rw-r--r--configure.ac20
1 files changed, 12 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index b265c75a1..0c6acff21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1254,6 +1254,7 @@ AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
dnl ares so it should not be a problem.
if test "x$enableval" = "xyes" ; then
if test -d "$srcdir/ares"; then
+ aresembedded="yes"
AC_CONFIG_SUBDIRS(ares)
aresinc=`cd $srcdir/ares && pwd`
CPPFLAGS="$CPPFLAGS -I$aresinc"
@@ -1269,9 +1270,12 @@ AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
LDFLAGS="$LDFLAGS -L$enableval/lib"
fi
- dnl verify that a sufficient c-ares is here
- AC_MSG_CHECKING([that c-ares is good and recent enough])
- AC_LINK_IFELSE( [
+ if test -z "$aresembedded"; then
+ dnl verify that a sufficient c-ares is here if we have pointed one
+ dnl out and don't use the "embedded" ares dir (in which case we don't
+ dnl check it because it might not have been built yet)
+ AC_MSG_CHECKING([that c-ares is good and recent enough])
+ AC_LINK_IFELSE( [
#include <ares.h>
/* provide a set of dummy functions in case c-ares was built with debug */
void curl_dofree() { }
@@ -1285,11 +1289,11 @@ int main(void)
return 0;
}
],
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([c-ares library defective or too old])
- )
-
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([c-ares library defective or too old])
+ )
+ fi
;;
esac ],
AC_MSG_RESULT(no)