aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-06-04 04:13:39 +0000
committerYang Tse <yangsita@gmail.com>2009-06-04 04:13:39 +0000
commit13fdb9d8a56deff52eb16bce6b78e6710a42958a (patch)
tree65a10baf856c67c1f1ec7f1464e6d6ec37193e3f
parent52b2bc4109e890094901140614880f6a5c5aa8be (diff)
c-ares embbeded builds header include paths fully defined in makefiles
-rw-r--r--configure.ac4
-rw-r--r--lib/Makefile.am7
-rw-r--r--tests/libtest/Makefile.am11
-rw-r--r--tests/server/Makefile.am7
4 files changed, 27 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a7065e361..04aee8f3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2229,10 +2229,10 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
if test -d "$srcdir/ares"; then
aresembedded="yes"
AC_CONFIG_SUBDIRS(ares)
- aresinc=`cd $srcdir/ares && pwd`
- CPPFLAGS="$CPPFLAGS -I$aresinc"
dnl This c-ares library is an uninstalled libtool archive, so
dnl we delegate all the linking magic on libtool and automake.
+ dnl Since c-ares has installable configured header files, path
+ dnl inclusion is fully done in makefiles for in-tree builds.
else
LIBS="-lcares $LIBS"
fi
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ec1905745..1089c5f6d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -57,12 +57,19 @@ LIBCURL_LIBS = @LIBCURL_LIBS@
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
+if USE_EMBEDDED_ARES
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_builddir)/ares \
-I$(top_srcdir)/ares
+else
+INCLUDES = -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib
+endif
if SONAME_BUMP
#
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 228ae6b49..a4ce4b14e 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -31,11 +31,22 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/config.h file
# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
+# $(top_srcdir)/ares is for in-tree c-ares's external include files
+if USE_EMBEDDED_ARES
+INCLUDES = -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/ares \
+ -I$(top_srcdir)/ares
+else
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib
+endif
LIBDIR = $(top_builddir)/lib
diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am
index 7c520ae04..c8863c265 100644
--- a/tests/server/Makefile.am
+++ b/tests/server/Makefile.am
@@ -34,12 +34,19 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
+if USE_EMBEDDED_ARES
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_builddir)/ares \
-I$(top_srcdir)/ares
+else
+INCLUDES = -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib
+endif
# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD)
include Makefile.inc