I integrated your comments in the attached patch.
Wouter
On Thu, Nov 22, 2012 at 09:06:27AM +0100, Dan Fandrich wrote:
> On Wed, Nov 21, 2012 at 05:17:39PM +0100, Wouter Van Rooy wrote:
> > When configuring curl with --disable-static and then running
> > curl-config --static-libs it still outputs the non-present libraries.
> >
> > Attached is a patch to fix this.
>
> The patch removes the non-present libraries, but outputting nothing is
> still (theoretically) a valid output. It should probably output an error
> message (to stderr) and exit with a nonzero return code in that case.
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
--- curl/curl-config.in.orig 2012-11-20 10:09:59.899288883 +0000
+++ curl/curl-config.in 2012-11-20 10:16:20.463354946 +0000
@@ -156,7 +155,12 @@
;;
--static-libs)
- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
+ if [ "@ENABLE_STATIC@" != no ]; then
+ echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
+ else
+ echo "curl was build with static libraries disabled" >&2
+ exit 1
+ fi
;;
--configure)
--- curl/configure.ac 2012-11-20 10:45:34.679698084 +0000
+++ curl/configure.ac 2012-11-20 10:42:05.967659506 +0000
@@ -3348,6 +3348,10 @@
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
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html