summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--curl-config.in7
2 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1a46fd9c2..49309e6f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3350,6 +3350,11 @@ dnl yes or no
ENABLE_SHARED="$enable_shared"
AC_SUBST(ENABLE_SHARED)
+dnl to let curl-config output the static libraries correctly
+ENABLE_STATIC="$enable_static"
+AC_SUBST(ENABLE_STATIC)
+
+
dnl
dnl For keeping supported features and protocols also in pkg-config file
dnl since it is more cross-compile friendly than curl-config
diff --git a/curl-config.in b/curl-config.in
index c95518d56..e0fa03c2d 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -155,7 +155,12 @@ while test $# -gt 0; do
;;
--static-libs)
- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_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
;;
--configure)