summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-02-17 01:29:01 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-02-17 01:29:01 +0000
commita0a47f2767b6b17c6fdeeb2418e1371df25cbc6d (patch)
tree3f9f8004f16a7c1f5069a3e38ad60deac570e25f /configure.ac
parent213017e9cfea983a8b8e38c1a591e77dd2ecb85e (diff)
downloadcurl-a0a47f2767b6b17c6fdeeb2418e1371df25cbc6d.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 22 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5e6e15ed3..67feec7e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,11 @@ 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 \