b91d92
From 2a4754a3a7cf60ecc36d83cbe50b8c337cb87632 Mon Sep 17 00:00:00 2001
b91d92
From: Kamil Dudka <kdudka@redhat.com>
b91d92
Date: Fri, 12 Apr 2013 12:04:05 +0200
b91d92
Subject: [PATCH] prevent multilib conflicts on the curl-config script
b91d92
b91d92
---
b91d92
 curl-config.in     |   21 +++------------------
b91d92
 docs/curl-config.1 |    4 +++-
b91d92
 libcurl.pc.in      |    1 +
b91d92
 3 files changed, 7 insertions(+), 19 deletions(-)
b91d92
b91d92
diff --git a/curl-config.in b/curl-config.in
b91d92
index 150004d..95d0759 100644
b91d92
--- a/curl-config.in
b91d92
+++ b/curl-config.in
b91d92
@@ -76,7 +76,7 @@ while test $# -gt 0; do
b91d92
         ;;
b91d92
 
b91d92
     --cc)
b91d92
-        echo "@CC@"
b91d92
+        echo "gcc"
b91d92
         ;;
b91d92
 
b91d92
     --prefix)
b91d92
@@ -143,32 +143,17 @@ while test $# -gt 0; do
b91d92
         ;;
b91d92
 
b91d92
     --libs)
b91d92
-        if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
b91d92
-           CURLLIBDIR="-L@libdir@ "
b91d92
-        else
b91d92
-           CURLLIBDIR=""
b91d92
-        fi
b91d92
-        if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
b91d92
-          echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
b91d92
-        else
b91d92
-          echo ${CURLLIBDIR}-lcurl
b91d92
-        fi
b91d92
+        echo -lcurl
b91d92
         ;;
b91d92
     --ssl-backends)
b91d92
         echo "@SSL_BACKENDS@"
b91d92
         ;;
b91d92
 
b91d92
     --static-libs)
b91d92
-        if test "X@ENABLE_STATIC@" != "Xno" ; then
b91d92
-          echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
b91d92
-        else
b91d92
-          echo "curl was built with static libraries disabled" >&2
b91d92
-          exit 1
b91d92
-        fi
b91d92
         ;;
b91d92
 
b91d92
     --configure)
b91d92
-        echo @CONFIGURE_OPTIONS@
b91d92
+        pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
b91d92
         ;;
b91d92
 
b91d92
     *)
b91d92
diff --git a/docs/curl-config.1 b/docs/curl-config.1
b91d92
index 14a9d2b..ffcc004 100644
b91d92
--- a/docs/curl-config.1
b91d92
+++ b/docs/curl-config.1
b91d92
@@ -70,7 +70,9 @@ no, one or several names. If more than one name, they will appear
b91d92
 comma-separated. (Added in 7.58.0)
b91d92
 .IP "--static-libs"
b91d92
 Shows the complete set of libs and other linker options you will need in order
b91d92
-to link your application with libcurl statically. (Added in 7.17.1)
b91d92
+to link your application with libcurl statically. Note that Fedora/RHEL libcurl
b91d92
+packages do not provide any static libraries, thus cannot be linked statically.
b91d92
+(Added in 7.17.1)
b91d92
 .IP "--version"
b91d92
 Outputs version information about the installed libcurl.
b91d92
 .IP "--vernum"
b91d92
diff --git a/libcurl.pc.in b/libcurl.pc.in
b91d92
index 2ba9c39..f8f8b00 100644
b91d92
--- a/libcurl.pc.in
b91d92
+++ b/libcurl.pc.in
b91d92
@@ -29,6 +29,7 @@ libdir=@libdir@
b91d92
 includedir=@includedir@
b91d92
 supported_protocols="@SUPPORT_PROTOCOLS@"
b91d92
 supported_features="@SUPPORT_FEATURES@"
b91d92
+configure_options=@CONFIGURE_OPTIONS@
b91d92
 
b91d92
 Name: libcurl
b91d92
 URL: https://curl.haxx.se/
b91d92
-- 
b91d92
2.5.0
b91d92