From e297a4b57f84aaf821c58b8c197656cfa7a02689 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Tue, 19 Jun 2007 15:56:48 +0200 Subject: [PATCH] * pkg.m4: Fix bug so it's possible to override variables in case pkg-config is not installed. --- ChangeLog | 5 +++++ pkg.m4 | 18 ++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) 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 -- 2.39.5