Improve libcurl detection.
authorWerner Koch <wk@gnupg.org>
Tue, 6 Aug 2013 08:31:54 +0000 (10:31 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 7 Mar 2014 08:54:43 +0000 (09:54 +0100)
* m4/libcurl.m4: Do not use AC_PATH_PROG if --with-libcurl as been
given.  Suggested by John Marshall.
--

GnuPG-bug-id: 1510
(cherry picked from commit 110b52fffa77b339e6d59eba939408f7e87e7138)

m4/libcurl.m4

index 7d1dbd3..f6a631b 100644 (file)
@@ -71,7 +71,11 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
      if test -d "$_libcurl_with" ; then
         LIBCURL_CPPFLAGS="-I$withval/include"
         _libcurl_ldflags="-L$withval/lib"
-        AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
+        if test -x "$withval/bin/curl-config" ; then
+          _libcurl_config="$withval/bin/curl-config"
+        else
+          _libcurl_config=
+        fi
      else
        AC_PATH_PROG([_libcurl_config],[curl-config])
      fi