]> err.no Git - pkg-config/commitdiff
* pkg.m4: Fix bug so it's possible to override variables in case
authorTollef Fog Heen <tfheen@err.no>
Tue, 19 Jun 2007 13:56:48 +0000 (15:56 +0200)
committerTollef Fog Heen <tfheen@err.no>
Tue, 19 Jun 2007 13:56:48 +0000 (15:56 +0200)
pkg-config is not installed.

ChangeLog
pkg.m4

index fb6ef223573e16475a4f3e9d858030cac2f01081..0507840959a4f45a09ed23ae42d9370543111629 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-19  Tollef Fog Heen  <tfheen@err.no>
+
+       * pkg.m4: Fix bug so it's possible to override variables in case
+       pkg-config is not installed.
+
 2007-06-18  Tollef Fog Heen  <tfheen@err.no>
 
        * configure.in: Release 0.22
diff --git a/pkg.m4 b/pkg.m4
index 0048a3fa0547ad4d0cb04bd961609b5a44c01697..dd4d4903fb512c052fa7ac0d5fcf19ed9a1ce28f 100644 (file)
--- a/pkg.m4
+++ b/pkg.m4
@@ -66,16 +66,14 @@ fi])
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG