From: Tollef Fog Heen Date: Tue, 19 Jun 2007 13:56:48 +0000 (+0200) Subject: * pkg.m4: Fix bug so it's possible to override variables in case X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e297a4b57f84aaf821c58b8c197656cfa7a02689;p=pkg-config * pkg.m4: Fix bug so it's possible to override variables in case pkg-config is not installed. --- diff --git a/ChangeLog b/ChangeLog index fb6ef22..0507840 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-19 Tollef Fog Heen + + * pkg.m4: Fix bug so it's possible to override variables in case + pkg-config is not installed. + 2007-06-18 Tollef Fog Heen * configure.in: Release 0.22 diff --git a/pkg.m4 b/pkg.m4 index 0048a3f..dd4d490 100644 --- 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