[PATCH] 2.0.20 configure cannot find curl-config when --with-libcurl=PATH

John Marshall john.marshall at riverwillow.com.au
Mon Jun 10 07:46:10 CEST 2013

During a libcurl-related debugging exercise following an upgrade from
2.0.19 to 2.0.20, I discovered that configure was not finding and using
the installed /usr/local/bin/curl-config.  I was passing
--with-libcurl=/usr/local to configure.  config.log was showing failure
to discover curl-config but success finding libcurl:

  configure:9445: checking for /usr/local/bin/curl-config
  configure:9478: result: no
  configure:9595: checking whether libcurl is usable
  configure:9628: cc -o conftest -O -pipe -march=pentium4 -I/usr/local/include  -I/usr/local/include  -L/usr/local/lib conftest.c -L/usr/local/lib -lcurl  >&5
  configure:9628: $? = 0
  configure:9642: result: yes

Passing a bare --with-libcurl to configure worked:
  configure:9486: checking for curl-config
  configure:9504: found /usr/local/bin/curl-config
  configure:9516: result: /usr/local/bin/curl-config
  configure:9527: checking for the version of libcurl
  configure:9534: result: 7.24.0
  configure:9541: checking for libcurl >= version 7.10
  configure:9554: result: yes

Looking at the configure script, it was passing a fully-qualified
pathname for curl-config (instead of just the program name) to
AC_PATH_PROG, which will never work.  The following patch against the
STABLE-BRANCH-2-0 m4/libcurl.m4 yields what I believe to be the intended

  configure:9522: checking for the version of libcurl
  configure:9529: result: 7.24.0
  configure:9536: checking for libcurl >= version 7.10
  configure:9549: result: yes

diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
index fe9809e..dca20e3 100644
--- a/m4/libcurl.m4
+++ b/m4/libcurl.m4
@@ -75,7 +75,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
      if test -d "$_libcurl_with" ; then
-        AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
+        _libcurl_config="$withval/bin/curl-config"

John Marshall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: </pipermail/attachments/20130610/96998744/attachment.sig>

More information about the Gnupg-devel mailing list