configure.ac: Fix dependencies checking
authorJavier Jardón <javier.jardon@codethink.co.uk>
Mon, 23 May 2011 13:26:38 +0000 (14:26 +0100)
committerJavier Jardón <javier.jardon@codethink.co.uk>
Mon, 23 May 2011 13:26:38 +0000 (14:26 +0100)
The pkg-config command is discovered through a separate macro,
PKG_PROG_PKG_CONFIG that takes care of identifying the presence (and version)
of pkg-config itself. This macro is called through AC_REQUIRE
so that is expanded before PKG_CHECK_MODULES.

If we have the first call to PKG_CHECK_MODULES inside a bash conditional block,
the expansion of PKG_PROG_PKG_CONFIG will also be conditional,
so the previous code will fail to work.

configure.ac

index 606cc23..ec91abf 100644 (file)
@@ -13,6 +13,8 @@ AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects tar-pax no-dist-gzip dist-xz
 AM_SILENT_RULES([yes])
 AM_MAINTAINER_MODE([enable])
 
+PKG_PROG_PKG_CONFIG([0.24])
+
 # Platform checks
 AC_CANONICAL_HOST
 
@@ -80,14 +82,9 @@ PKG_CHECK_MODULES(moonshot,[
         glib-2.0 >= 2.24
         gobject-2.0 >= 2.24
         gtk+-2.0 >= 2.20
-        $IPC
+        $IPC_MODULE
 ])
 
-PKG_CHECK_MODULES(IPC, $IPC_MODULE)
-
-moonshot_CFLAGS="$moonshot_CFLAGS $IPC_CFLAGS"
-moonshot_LIBS="$moonshot_LIBS $IPC_LIBS"
-
 # i18n stuff
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.17])