From: Dan Fandrich Date: Wed, 14 Feb 2007 03:00:08 +0000 (+0000) Subject: Fixed the problem of curl-config --libs specifying unneeded libraries X-Git-Tag: curl-7_16_2~319 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9de4e5ebe44eee500c979ca6119f10deb1668ce1;p=thirdparty%2Fcurl.git Fixed the problem of curl-config --libs specifying unneeded libraries dependencies to applications. --- diff --git a/configure.ac b/configure.ac index 52efa51615..43cb2f8e4b 100644 --- a/configure.ac +++ b/configure.ac @@ -158,6 +158,15 @@ case $host in ;; esac +# Determine whether all dependent libraries must be specified when linking +if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" +then + REQUIRE_LIB_DEPS=no +else + REQUIRE_LIB_DEPS=yes +fi +AC_SUBST(REQUIRE_LIB_DEPS) + dnl The install stuff has already been taken care of by the automake stuff dnl AC_PROG_INSTALL AC_PROG_MAKE_SET diff --git a/curl-config.in b/curl-config.in index aaffda8209..9f4513969b 100644 --- a/curl-config.in +++ b/curl-config.in @@ -181,8 +181,12 @@ while test $# -gt 0; do ;; --libs) - echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@ - ;; + if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then + echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@ + else + echo -L@libdir@ -lcurl @LDFLAGS@ + fi + ;; *) echo "unknown option: $1"