* pkg.m4: Fix bug so it's possible to override variables in case

pkg-config is not installed.
This commit is contained in:
Tollef Fog Heen 2007-06-19 15:56:48 +02:00
parent 5e137d3932
commit e297a4b57f
2 changed files with 13 additions and 10 deletions

View file

@ -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

18
pkg.m4
View file

@ -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