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