57f6d9d
From 2a4754a3a7cf60ecc36d83cbe50b8c337cb87632 Mon Sep 17 00:00:00 2001
57f6d9d
From: Kamil Dudka <kdudka@redhat.com>
57f6d9d
Date: Fri, 12 Apr 2013 12:04:05 +0200
57f6d9d
Subject: [PATCH] prevent multilib conflicts on the curl-config script
57f6d9d
57f6d9d
---
104dece
 curl-config.in     |   21 +++------------------
eaba136
 docs/curl-config.1 |    4 +++-
eaba136
 libcurl.pc.in      |    1 +
104dece
 3 files changed, 7 insertions(+), 19 deletions(-)
972da71
014599c
diff --git a/curl-config.in b/curl-config.in
eaba136
index 150004d..95d0759 100644
014599c
--- a/curl-config.in
014599c
+++ b/curl-config.in
c9fa3c1
@@ -75,7 +75,7 @@ while test $# -gt 0; do
57f6d9d
         ;;
Ivana Varekova a88dcef
 
Ivana Varekova a88dcef
     --cc)
57f6d9d
-        echo "@CC@"
57f6d9d
+        echo "gcc"
57f6d9d
         ;;
Ivana Varekova a88dcef
 
Ivana Varekova a88dcef
     --prefix)
104dece
@@ -142,29 +142,14 @@ while test $# -gt 0; do
57f6d9d
         ;;
Ivana Varekova a88dcef
 
Ivana Varekova a88dcef
     --libs)
57f6d9d
-        if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
57f6d9d
-           CURLLIBDIR="-L@libdir@ "
57f6d9d
-        else
57f6d9d
-           CURLLIBDIR=""
57f6d9d
-        fi
57f6d9d
-        if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
57f6d9d
-          echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
57f6d9d
-        else
57f6d9d
-          echo ${CURLLIBDIR}-lcurl
57f6d9d
-        fi
88ed685
+        echo -lcurl
57f6d9d
         ;;
Ivana Varekova a88dcef
 
eaba136
     --static-libs)
c12a28f
-        if test "X@ENABLE_STATIC@" != "Xno" ; then
c12a28f
-          echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
c12a28f
-        else
c12a28f
-          echo "curl was built with static libraries disabled" >&2
c12a28f
-          exit 1
c12a28f
-        fi
57f6d9d
         ;;
eaba136
 
6d0277e
     --configure)
57f6d9d
-        echo @CONFIGURE_OPTIONS@
57f6d9d
+        pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
57f6d9d
         ;;
c3d8d1c
 
c3d8d1c
     *)
eaba136
diff --git a/docs/curl-config.1 b/docs/curl-config.1
57f6d9d
index 14a9d2b..ffcc004 100644
eaba136
--- a/docs/curl-config.1
eaba136
+++ b/docs/curl-config.1
57f6d9d
@@ -65,7 +65,9 @@ be listed using uppercase and are separated by newlines. There may be none,
eaba136
 one, or several protocols in the list. (Added in 7.13.0)
eaba136
 .IP "--static-libs"
eaba136
 Shows the complete set of libs and other linker options you will need in order
eaba136
-to link your application with libcurl statically. (Added in 7.17.1)
eaba136
+to link your application with libcurl statically. Note that Fedora/RHEL libcurl
eaba136
+packages do not provide any static libraries, thus cannot be linked statically.
eaba136
+(Added in 7.17.1)
eaba136
 .IP "--version"
eaba136
 Outputs version information about the installed libcurl.
eaba136
 .IP "--vernum"
eaba136
diff --git a/libcurl.pc.in b/libcurl.pc.in
eaba136
index 2ba9c39..f8f8b00 100644
c3d8d1c
--- a/libcurl.pc.in
c3d8d1c
+++ b/libcurl.pc.in
c3d8d1c
@@ -29,6 +29,7 @@ libdir=@libdir@
c3d8d1c
 includedir=@includedir@
c3d8d1c
 supported_protocols="@SUPPORT_PROTOCOLS@"
c3d8d1c
 supported_features="@SUPPORT_FEATURES@"
c3d8d1c
+configure_options=@CONFIGURE_OPTIONS@
c3d8d1c
 
c3d8d1c
 Name: libcurl
127274b
 URL: https://curl.haxx.se/
127274b
-- 
127274b
2.5.0
127274b