From f4e7b98fb25ff737af29908f3a2081cca9a73437 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Wed, 22 May 2024 13:00:08 +0200 Subject: [PATCH 1/2] prevent multilib conflicts on the curl-config script --- curl-config.in | 23 +++++------------------ docs/curl-config.md | 4 +++- libcurl.pc.in | 1 + 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/curl-config.in b/curl-config.in index 085bb1ef5..e4700260e 100644 --- a/curl-config.in +++ b/curl-config.in @@ -73,7 +73,7 @@ while test "$#" -gt 0; do ;; --cc) - echo '@CC@' + echo "gcc" ;; --prefix) @@ -153,16 +153,7 @@ while test "$#" -gt 0; do ;; --libs) - if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then - CURLLIBDIR="-L@libdir@ " - else - CURLLIBDIR="" - fi - if test "X@ENABLE_SHARED@" = "Xno"; then - echo "${CURLLIBDIR}-lcurl @LIBCURL_LIBS@" - else - echo "${CURLLIBDIR}-lcurl" - fi + echo -lcurl ;; --ssl-backends) @@ -170,16 +161,12 @@ while test "$#" -gt 0; do ;; --static-libs) - if test "X@ENABLE_STATIC@" != "Xno" ; then - echo "@libdir@/libcurl.@libext@" @LDFLAGS@ @LIBCURL_LIBS@ - else - echo 'curl was built with static libraries disabled' >&2 - exit 1 - fi + echo "curl was built with static libraries disabled" >&2 + exit 1 ;; --configure) - echo @CONFIGURE_OPTIONS@ + pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//' ;; *) diff --git a/docs/curl-config.md b/docs/curl-config.md index d82725082..a79f816e2 100644 --- a/docs/curl-config.md +++ b/docs/curl-config.md @@ -86,7 +86,9 @@ no, one or several names. If more than one name, they appear comma-separated. ## --static-libs Shows the complete set of libs and other linker options you need in order to -link your application with libcurl statically. (Added in 7.17.1) +link your application with libcurl statically. Note that Fedora/RHEL libcurl +packages do not provide any static libraries, thus cannot be linked statically. +(Added in 7.17.1) ## --version diff --git a/libcurl.pc.in b/libcurl.pc.in index 9db6b0f89..dcac6925a 100644 --- a/libcurl.pc.in +++ b/libcurl.pc.in @@ -31,6 +31,7 @@ libdir=@libdir@ includedir=@includedir@ supported_protocols="@SUPPORT_PROTOCOLS@" supported_features="@SUPPORT_FEATURES@" +configure_options=@CONFIGURE_OPTIONS@ Name: libcurl URL: https://curl.se/ -- 2.45.1