mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
Delegate c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.
This commit is contained in:
parent
2091fe530f
commit
cd5e6743f7
17
configure.ac
17
configure.ac
@ -2200,6 +2200,7 @@ fi
|
|||||||
dnl set variable for use in automakefile(s)
|
dnl set variable for use in automakefile(s)
|
||||||
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
||||||
|
|
||||||
|
aresembedded="unknown"
|
||||||
AC_MSG_CHECKING([whether to enable c-ares])
|
AC_MSG_CHECKING([whether to enable c-ares])
|
||||||
AC_ARG_ENABLE(ares,
|
AC_ARG_ENABLE(ares,
|
||||||
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
|
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)
|
AC_SUBST(HAVE_ARES)
|
||||||
curl_ares_msg="enabled"
|
curl_ares_msg="enabled"
|
||||||
|
|
||||||
LIBS="-lcares $LIBS"
|
|
||||||
|
|
||||||
dnl For backwards compatibility default to includes/lib in srcdir/ares
|
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 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 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)
|
AC_CONFIG_SUBDIRS(ares)
|
||||||
aresinc=`cd $srcdir/ares && pwd`
|
aresinc=`cd $srcdir/ares && pwd`
|
||||||
CPPFLAGS="$CPPFLAGS -I$aresinc"
|
CPPFLAGS="$CPPFLAGS -I$aresinc"
|
||||||
|
dnl This c-ares library is an uninstalled libtool archive, so
|
||||||
dnl the pwd= below cannot 'cd' into the ares dir to get the full
|
dnl we delegate all the linking magic on libtool and automake.
|
||||||
dnl path to it, since it may not exist yet if we build outside of
|
else
|
||||||
dnl the source tree
|
LIBS="-lcares $LIBS"
|
||||||
pwd=`pwd`
|
|
||||||
LDFLAGS="$LDFLAGS -L$pwd/ares"
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
CPPFLAGS="$CPPFLAGS -I$enableval/include"
|
CPPFLAGS="$CPPFLAGS -I$enableval/include"
|
||||||
LDFLAGS="$LDFLAGS -L$enableval/lib"
|
LDFLAGS="$LDFLAGS -L$enableval/lib"
|
||||||
|
LIBS="-lcares $LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$aresembedded"; then
|
if test -z "$aresembedded"; then
|
||||||
@ -2275,6 +2273,9 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dnl set variable for use in automakefile(s)
|
||||||
|
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$aresembedded = xyes)
|
||||||
|
|
||||||
dnl ************************************************************
|
dnl ************************************************************
|
||||||
dnl disable verbose text strings
|
dnl disable verbose text strings
|
||||||
dnl
|
dnl
|
||||||
|
@ -103,6 +103,12 @@ if MIMPURE
|
|||||||
MIMPURE = -mimpure-text
|
MIMPURE = -mimpure-text
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_EMBEDDED_ARES
|
||||||
|
EMBEDDEDARES = ../ares/libcares.la
|
||||||
|
else
|
||||||
|
EMBEDDEDARES =
|
||||||
|
endif
|
||||||
|
|
||||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
|
libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
|
||||||
|
|
||||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||||
@ -110,6 +116,8 @@ include Makefile.inc
|
|||||||
|
|
||||||
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
||||||
|
|
||||||
|
libcurl_la_LIBADD = $(EMBEDDEDARES)
|
||||||
|
|
||||||
WIN32SOURCES = $(CSOURCES)
|
WIN32SOURCES = $(CSOURCES)
|
||||||
WIN32HEADERS = $(HHEADERS) config-win32.h
|
WIN32HEADERS = $(HHEADERS) config-win32.h
|
||||||
|
|
||||||
|
@ -45,8 +45,14 @@ bin_PROGRAMS = curl
|
|||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
curl_LDADD = ../lib/libcurl.la @CURL_LIBS@
|
if USE_EMBEDDED_ARES
|
||||||
curl_DEPENDENCIES = ../lib/libcurl.la
|
EMBEDDEDARES = ../ares/libcares.la
|
||||||
|
else
|
||||||
|
EMBEDDEDARES =
|
||||||
|
endif
|
||||||
|
|
||||||
|
curl_LDADD = ../lib/libcurl.la $(EMBEDDEDARES) @CURL_LIBS@
|
||||||
|
curl_DEPENDENCIES = ../lib/libcurl.la $(EMBEDDEDARES)
|
||||||
BUILT_SOURCES = hugehelp.c
|
BUILT_SOURCES = hugehelp.c
|
||||||
CLEANFILES = hugehelp.c
|
CLEANFILES = hugehelp.c
|
||||||
# Use the C locale to ensure that only ASCII characters appear in the
|
# Use the C locale to ensure that only ASCII characters appear in the
|
||||||
|
@ -42,9 +42,15 @@ LIBDIR = $(top_builddir)/lib
|
|||||||
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
|
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
|
||||||
test1022.pl Makefile.inc
|
test1022.pl Makefile.inc
|
||||||
|
|
||||||
|
if USE_EMBEDDED_ARES
|
||||||
|
EMBEDDEDARES = $(top_builddir)/ares/libcares.la
|
||||||
|
else
|
||||||
|
EMBEDDEDARES =
|
||||||
|
endif
|
||||||
|
|
||||||
# Dependencies (may need to be overriden)
|
# Dependencies (may need to be overriden)
|
||||||
LDADD = $(LIBDIR)/libcurl.la
|
LDADD = $(LIBDIR)/libcurl.la $(EMBEDDEDARES)
|
||||||
DEPENDENCIES = $(LIBDIR)/libcurl.la
|
DEPENDENCIES = $(LIBDIR)/libcurl.la $(EMBEDDEDARES)
|
||||||
|
|
||||||
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
|
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user