]> granicus.if.org Git - curl/commitdiff
build: Fix support for PKG_CONFIG
authorJay Satiro <raysatiro@yahoo.com>
Sat, 24 Oct 2015 07:31:57 +0000 (03:31 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 24 Oct 2015 07:31:57 +0000 (03:31 -0400)
- Allow the user to use PKG_CONFIG but not PKGCONFIG.

Background:

Last week in 14d5a86 a change was made to allow the user to set the
PKGCONFIG variable. Today in 72d99f2 I supplemented that to allow the
more common PKG_CONFIG as an alternative if PKGCONFIG is not set.

Neither of those changes worked as expected because PKGCONFIG is
occasionally reset in configure and by the CURL_CHECK_PKGCONFIG macro.
Instead in this commit I take the approach that the user may set
PKG_CONFIG only.

acinclude.m4

index cff4d645ccba79e9968300f903f4d476551ac8ea..5a760132e9a6d1190e471fa1ba329b28bacb95b2 100644 (file)
@@ -3052,12 +3052,9 @@ dnl Optionally PKG_CONFIG_LIBDIR may be given as $pcdir.
 dnl
 
 AC_DEFUN([CURL_CHECK_PKGCONFIG], [
-
-    if test -z "$PKGCONFIG"; then
+    if test -n "$PKG_CONFIG"; then
       PKGCONFIG="$PKG_CONFIG"
-    fi
-
-    if test -z "$PKGCONFIG"; then
+    else
       AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no],
         [$PATH:/usr/bin:/usr/local/bin])
     fi