]> code.delx.au - pulseaudio/commitdiff
Move the safety check about pkg-config in bootstrap.sh.
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Thu, 22 Jan 2009 15:52:41 +0000 (16:52 +0100)
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Thu, 22 Jan 2009 15:52:41 +0000 (16:52 +0100)
Don't check twice for pkg-config during configure, since the undefined
macro would be possibly caused on a different system.

bootstrap.sh
configure.ac

index 6698f68b6e3eceda2d093290e55e774b30fc1925..4ca2b339e36c59f2a2bd3ad8dd0abd18f564281b 100755 (executable)
@@ -40,6 +40,15 @@ run_versioned() {
 
 set -ex
 
+# We check for this here, because if pkg-config is not found in the
+# system, it's likely that the pkg.m4 macro file is also not present,
+# which will make PKG_PROG_PKG_CONFIG be undefined and the generated
+# configure file faulty.
+if ! pkg-config --version &>/dev/null; then
+    echo "pkg-config is required to bootstrap this program" &>/dev/null
+    exit 1
+fi
+
 if [ "x$1" = "xam" ] ; then
     run_versioned automake "$VERSION" -a -c --foreign
     ./config.status
index 2b378c1b9fdf60acc70ae0fbc02c57bf07974d7d..11f98764cfb209a4941cdc539c985d75732908df 100644 (file)
@@ -462,14 +462,6 @@ AC_SUBST(pulselocaledir)
 
 #### pkg-config ####
 
-# Check for pkg-config manually first, as if its not installed the
-# PKG_PROG_PKG_CONFIG macro won't be defined.
-AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
-
-if test x"$have_pkg_config" = "xno"; then
-    AC_MSG_ERROR(pkg-config is required to install this program)
-fi
-
 PKG_PROG_PKG_CONFIG
 
 #### X11 (optional) ####