[PATCH:wayland-demos 1/2] Make sure pkg-config is available when autoreconfing.

Cyril Brulebois kibi at debian.org
Wed Apr 6 09:05:39 PDT 2011


If pkg-config isn't available, autoreconf -vfi will succeed, but
./configure will break badly:
| ./configure: line 3424: syntax error near unexpected token `PKG_CHECK_MODULES'
| ./configure: line 3424: `PKG_CHECK_MODULES(COMPOSITOR,'

Fix that by checking the PKG_PROG_CONFIG macro is available when
autoreconf is run, resulting in the following output if pkg-config is
missing:
| $ ./autogen.sh
| autoreconf: Entering directory `.'
| autoreconf: configure.ac: not using Gettext
| autoreconf: running: aclocal --force
| configure.ac:18: error: pkg-config macros not found
| configure.ac:18: the top level
| autom4te: /usr/bin/m4 failed with exit status: 1
| aclocal: /usr/bin/autom4te failed with exit status: 1
| autoreconf: aclocal failed with exit status: 1

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 configure.ac |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

The same applies to the wayland repository.

---

diff --git a/configure.ac b/configure.ac
index 567d95b..f90d1e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@ AM_SILENT_RULES([yes])
 AC_PROG_CC
 AC_PROG_RANLIB
 
+m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config macros not found])])
 PKG_PROG_PKG_CONFIG()
 
 PKG_CHECK_MODULES(COMPOSITOR,
-- 
1.7.4.1



More information about the wayland-devel mailing list