aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac10
-rw-r--r--lib/Makefile.am8
-rw-r--r--src/Makefile.am10
-rw-r--r--tests/libtest/Makefile.am12
4 files changed, 9 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac
index 04aee8f3b..c71082886 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2201,6 +2201,8 @@ dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
aresembedded="unknown"
+configure_rundir=`pwd`
+embedded_ares_builddir="$configure_rundir/ares"
AC_MSG_CHECKING([whether to enable c-ares])
AC_ARG_ENABLE(ares,
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
@@ -2221,6 +2223,8 @@ 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
@@ -2229,17 +2233,13 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
if test -d "$srcdir/ares"; then
aresembedded="yes"
AC_CONFIG_SUBDIRS(ares)
- 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"
+ LDFLAGS="$LDFLAGS -L$embedded_ares_builddir"
fi
else
CPPFLAGS="$CPPFLAGS -I$enableval/include"
LDFLAGS="$LDFLAGS -L$enableval/lib"
- LIBS="-lcares $LIBS"
fi
if test -z "$aresembedded"; then
diff --git a/lib/Makefile.am b/lib/Makefile.am
index bc775d7b4..34c2b72c3 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -110,12 +110,6 @@ if MIMPURE
MIMPURE = -mimpure-text
endif
-if USE_EMBEDDED_ARES
-EMBEDDEDARES = ../ares/libcares.la
-else
-EMBEDDEDARES =
-endif
-
libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
# Makefile.inc provides the CSOURCES and HHEADERS defines
@@ -123,8 +117,6 @@ include Makefile.inc
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
-libcurl_la_LIBADD = $(EMBEDDEDARES)
-
WIN32SOURCES = $(CSOURCES)
WIN32HEADERS = $(HHEADERS) config-win32.h
diff --git a/src/Makefile.am b/src/Makefile.am
index b76aad104..ea648a001 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -45,14 +45,8 @@ bin_PROGRAMS = curl
include Makefile.inc
-if USE_EMBEDDED_ARES
-EMBEDDEDARES = ../ares/libcares.la
-else
-EMBEDDEDARES =
-endif
-
-curl_LDADD = ../lib/libcurl.la $(EMBEDDEDARES) @CURL_LIBS@
-curl_DEPENDENCIES = ../lib/libcurl.la $(EMBEDDEDARES)
+curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
+curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
BUILT_SOURCES = hugehelp.c
CLEANFILES = hugehelp.c
# Use the C locale to ensure that only ASCII characters appear in the
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index a4ce4b14e..c5b8762cf 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -48,20 +48,12 @@ INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/lib
endif
-LIBDIR = $(top_builddir)/lib
-
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
test1022.pl Makefile.inc
-if USE_EMBEDDED_ARES
-EMBEDDEDARES = $(top_builddir)/ares/libcares.la
-else
-EMBEDDEDARES =
-endif
-
# Dependencies (may need to be overriden)
-LDADD = $(LIBDIR)/libcurl.la $(EMBEDDEDARES)
-DEPENDENCIES = $(LIBDIR)/libcurl.la $(EMBEDDEDARES)
+LDADD = $(top_builddir)/lib/libcurl.la
+DEPENDENCIES = $(top_builddir)/lib/libcurl.la
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
include Makefile.inc