mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 03:55:03 -05:00
Better separate the library dependencies into those required by libcurl
and those required by other components to avoid forcing unneeded dependencies into the target objects.
This commit is contained in:
parent
213017e9cf
commit
a0a47f2767
23
configure.ac
23
configure.ac
@ -90,6 +90,11 @@ dnl initialize all the info variables
|
||||
curl_verbose_msg="enabled (--disable-verbose)"
|
||||
curl_sspi_msg="no (--enable-sspi)"
|
||||
|
||||
dnl
|
||||
dnl Save anything in $LIBS for later
|
||||
dnl
|
||||
ALL_LIBS=$LIBS
|
||||
|
||||
dnl
|
||||
dnl Detect the canonical host and target build environment
|
||||
dnl
|
||||
@ -435,7 +440,7 @@ AC_ARG_ENABLE(libgcc,
|
||||
AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
LIBS="$LIBS -lgcc"
|
||||
ALL_LIBS="$ALL_LIBS -lgcc"
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
*) AC_MSG_RESULT(no)
|
||||
@ -1401,6 +1406,7 @@ else
|
||||
AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
|
||||
AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
|
||||
|
||||
CURL_LIBS="$CURL_LIBS -lz"
|
||||
LIBS="$LIBS -lz"
|
||||
|
||||
dnl replace 'HAVE_LIBZ' in the automake makefile.ams
|
||||
@ -2187,6 +2193,21 @@ if test "x$ws2" = "xyes"; then
|
||||
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl All the library dependencies put into $LIB apply to libcurl only.
|
||||
dnl Those in $CURL_LIBS apply to the curl command-line client only.
|
||||
dnl Those in $TEST_SERVER_LIBS apply to test servers (for simplicity, this
|
||||
dnl is currently the same as libcurl's libraries).
|
||||
dnl Those in $ALL_LIBS apply to all targets, including test targets.
|
||||
dnl
|
||||
LIBCURL_LIBS=$LIBS
|
||||
TEST_SERVER_LIBS=$LIBCURL_LIBS
|
||||
|
||||
AC_SUBST(LIBCURL_LIBS)
|
||||
AC_SUBST(CURL_LIBS)
|
||||
AC_SUBST(TEST_SERVER_LIBS)
|
||||
LIBS=$ALL_LIBS dnl LIBS is a magic variable
|
||||
|
||||
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
||||
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
|
@ -39,6 +39,7 @@ EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos \
|
||||
CLEANFILES = $(DSP) $(VCPROJ)
|
||||
|
||||
lib_LTLIBRARIES = libcurl.la
|
||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
|
||||
# we use srcdir/include for the static global include files
|
||||
# we use builddir/lib for the generated lib/config.h file to get found
|
||||
@ -89,7 +90,7 @@ if MIMPURE
|
||||
MIMPURE = -mimpure-text
|
||||
endif
|
||||
|
||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE)
|
||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE) $(LIBCURL_LIBS)
|
||||
|
||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||
include Makefile.inc
|
||||
|
@ -37,7 +37,7 @@ bin_PROGRAMS = curl
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
curl_LDADD = ../lib/libcurl.la
|
||||
curl_LDADD = ../lib/libcurl.la @CURL_LIBS@
|
||||
curl_DEPENDENCIES = ../lib/libcurl.la
|
||||
BUILT_SOURCES = hugehelp.c
|
||||
CLEANFILES = hugehelp.c
|
||||
|
@ -36,11 +36,19 @@ useful = getpart.c getpart.h $(top_srcdir)/lib/strequal.c \
|
||||
$(top_srcdir)/lib/memdebug.c $(top_srcdir)/lib/timeval.c
|
||||
|
||||
resolve_SOURCES= resolve.c util.c util.h $(useful)
|
||||
resolve_LDADD = @TEST_SERVER_LIBS@
|
||||
|
||||
sws_SOURCES= sws.c util.c util.h $(useful)
|
||||
sws_LDADD = @TEST_SERVER_LIBS@
|
||||
|
||||
sockfilt_SOURCES = sockfilt.c util.c util.h $(useful) \
|
||||
$(top_srcdir)/lib/inet_pton.c
|
||||
sockfilt_LDADD = @TEST_SERVER_LIBS@
|
||||
|
||||
getpart_SOURCES= testpart.c $(useful)
|
||||
|
||||
tftpd_SOURCES = tftpd.c util.c util.h $(useful) tftp.h
|
||||
tftpd_LDADD = @TEST_SERVER_LIBS@
|
||||
|
||||
extra_DIST = base64.pl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user