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

Kristian Høgsberg krh at bitplanet.net
Thu Apr 7 06:24:58 PDT 2011


On Wed, Apr 6, 2011 at 12:05 PM, Cyril Brulebois <kibi at debian.org> wrote:
> 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,'

The way I use the pkgconfig macros is pretty standard - I don't see
any other projects use this extra check...

Kristian

> 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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list