aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-12-10 13:37:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-12-10 13:37:00 +0000
commitd46a73541866b301891fa51ce0378b4e9371f3e3 (patch)
treedd00e9d2372c88b15b8351acbb81fd85d9eae22d /configure.ac
parent5a87203fe4bb012223669b9e01997e5b2a4285b0 (diff)
Dominick Meglio made --enable-ares support an option =PATH to specify a
root path to an installed ares.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 17 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index bf6dd35ee..d1aa3bbde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1026,11 +1026,10 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
AC_MSG_RESULT(no)
)
-ares="no"
AC_MSG_CHECKING([whether to enable ares])
AC_ARG_ENABLE(ares,
-AC_HELP_STRING([--enable-ares],[Enable using ares for name lookups])
-AC_HELP_STRING([--disable-ares],[Disable using ares for name lookups]),
+AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups])
+AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
@@ -1045,14 +1044,26 @@ AC_HELP_STRING([--disable-ares],[Disable using ares for name lookups]),
dnl substitute HAVE_ARES for curl-config and similar
HAVE_ARES="1"
AC_SUBST(HAVE_ARES)
- ares="yes"
+
+ LIBS="$LIBS -lares"
+
+ 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
+ dnl ares so it should not be a problem.
+ if test "x$enableval" = "xyes" ; then
+ aresdir=`cd $srcdir/ares && pwd`
+ CPPFLAGS="$CPPFLAGS -I$aresdir"
+ LDFLAGS="$LDFLAGS -L$aresdir"
+ else
+ CPPFLAGS="$CPPFLAGS -I$enableval/include"
+ LDFLAGS="$LDFLAGS -L$enableval/lib"
+ fi
;;
esac ],
AC_MSG_RESULT(no)
)
-AM_CONDITIONAL(ARES, test x$ares = xyes)
-
AC_CONFIG_FILES([Makefile \
docs/Makefile \
docs/examples/Makefile \