cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] curl-config: only provide libraries with --libs

From: Dave Reisner <d_at_falconindy.com>
Date: Mon, 27 Feb 2012 13:51:41 -0500

In line with the manpage, curl-config --libs should only provide the necessary
library flags for the linker in order to compile software with libcurl. Also
with this change, we match what the pkg-config file provides.

---
To be honest, I'm not sure if this intended or not, but it seems odd to me
that curl-config --libs would show the flags that curl was compiled with, e.g.
$ curl-config --libs
-lcurl -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu
This is called by the m4 macro, and all you should get out of the macro in
this case is the -lcurl, similar to pkg-config:
$ pkg-config --libs libcurl
-lcurl
dave
 curl-config.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/curl-config.in b/curl-config.in
index 150004d..3d02a03 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -142,9 +142,9 @@ while test $# -gt 0; do
 	   CURLLIBDIR=""
 	fi
 	if test "X_at_REQUIRE_LIB_DEPS@" = "Xyes"; then
-	  echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
+	  echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@ @LIBS@
 	else
-	  echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
+	  echo ${CURLLIBDIR}-lcurl @LIBS@
 	fi
 	;;
 
-- 
1.7.9.2
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-27