[PATCH] build: Fix build --disable-vala



From: Damien Lespiau <damien lespiau intel com>

This one is a bit tricky.

PKG_CHECK_MODULES requires PKG_PROG_PKG_CONFIG, see pkg.m4:

    AC_DEFUN([PKG_CHECK_MODULES],
    [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl

The expansion of the AC_REQUIRE is done only once, the first time m4
encounters PKG_CHECK_MODULES.

Now the real issue is that the first occurrence of PKG_CHECK_MODULES is
in the test:
    if test "x$enable_vala" != no;

which means PKG_PROG_PKG_CONFIG is not being executed when --disable-vala
is given on the command line and thus I have the following error at
configure time.

checking whether Vala plugin support is requested... no
[...]
checking for DEPS... configure: error:
configure: error: The pkg-config script could not be found or is too old.
Make sure itis in your PATH or set the PKG_CONFIG environment variable to
the full path to pkg-config.

The fix here is to add an explicit PKG_PROG_PKG_CONFIG unconditionally so
PKG_CHECK_MODULES always has what it needs.
---
 configure.ac |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index a8207b5..e565edd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ LT_PREREQ([2.2.6])
 LT_INIT
 
 AM_PROG_CC_C_O
+PKG_PROG_PKG_CONFIG
 
 AC_HEADER_STDC
 
-- 
1.7.2.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]