summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-05-30 15:56:42 +0000
committerYang Tse <yangsita@gmail.com>2009-05-30 15:56:42 +0000
commitcd5e6743f744503f357b0877d6b5bad96ae53d1f (patch)
treef3563d2fa9a6a0f4510f271e402e9fc276fe2f05 /configure.ac
parent2091fe530f7609830d96fd4eb3c45e341d1eeb8f (diff)
downloadcurl-cd5e6743f744503f357b0877d6b5bad96ae53d1f.tar.gz
Delegate c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 9 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 68cc8d292..16bb0f064 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2200,6 +2200,7 @@ fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
+aresembedded="unknown"
AC_MSG_CHECKING([whether to enable c-ares])
AC_ARG_ENABLE(ares,
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
@@ -2220,8 +2221,6 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
AC_SUBST(HAVE_ARES)
curl_ares_msg="enabled"
- LIBS="-lcares $LIBS"
-
dnl For backwards compatibility default to includes/lib in srcdir/ares
dnl If a value is specified it is assumed that the libs are in $val/lib
dnl and the includes are in $val/include. This is the default setup for
@@ -2232,16 +2231,15 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
AC_CONFIG_SUBDIRS(ares)
aresinc=`cd $srcdir/ares && pwd`
CPPFLAGS="$CPPFLAGS -I$aresinc"
-
- dnl the pwd= below cannot 'cd' into the ares dir to get the full
- dnl path to it, since it may not exist yet if we build outside of
- dnl the source tree
- pwd=`pwd`
- LDFLAGS="$LDFLAGS -L$pwd/ares"
+ dnl This c-ares library is an uninstalled libtool archive, so
+ dnl we delegate all the linking magic on libtool and automake.
+ else
+ LIBS="-lcares $LIBS"
fi
else
CPPFLAGS="$CPPFLAGS -I$enableval/include"
LDFLAGS="$LDFLAGS -L$enableval/lib"
+ LIBS="-lcares $LIBS"
fi
if test -z "$aresembedded"; then
@@ -2275,6 +2273,9 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
AC_MSG_RESULT(no)
)
+dnl set variable for use in automakefile(s)
+AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$aresembedded = xyes)
+
dnl ************************************************************
dnl disable verbose text strings
dnl