[PATCH v2] configure.ac: Fix compatibility for older pkg-config versions

Bryce Harrington bryce at osg.samsung.com
Thu Dec 3 15:13:25 PST 2015


On Thu, Dec 03, 2015 at 11:57:24PM +0100, Quentin Glidic wrote:
> On 03/12/2015 23:45, Bryce Harrington wrote:
> >noarch_pkgconfigdir is not available on oldish pkg-config's.  Among
> >other things this affects Wayland's nightly auto-build Ubuntu 14.04
> >PPAs.
> >
> >Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> >Cc: Pekka Paalanen <ppaalanen at gmail.com>
> >Cc: Quentin Glidic <sardemff7+wayland at sardemff7.net>
> >Cc: Peter Hutterer <peter.hutterer at who-t.net>
> >---
> >
> >Changes from v1
> >  - Document why the work around is needed and what obsoletes it.
> >  - Drop pkgconfigdir, which isn't strictly needed
> >
> >  compat.m4    | 12 ++++++++++++
> >  configure.ac |  2 ++
> >  2 files changed, 14 insertions(+)
> >  create mode 100644 compat.m4
> >
> >diff --git a/compat.m4 b/compat.m4
> >new file mode 100644
> >index 0000000..290ef03
> >--- /dev/null
> >+++ b/compat.m4
> >@@ -0,0 +1,12 @@
> >+dnl noarch_pkgconfigdir only available in pkg-config 0.27 and newer
> >+dnl http://lists.freedesktop.org/archives/pkg-config/2012-July/000875.html
> >+dnl Ubuntu 14.04 provides only pkg-config 0.26 so lacks this function.
> >+dnl
> >+dnl The Wayland project maintains automated builds for Ubuntu 14.04 in
> >+dnl a Launchpad PPA.  14.04 is a Long Term Support distro release, which
> >+dnl will reach EOL April 2019, however the Wayland PPA may stop targeting
> >+dnl it some time after the next LTS release (April 2016).
> >+m4_ifndef([PKG_NOARCH_INSTALLDIR], [AC_DEFUN([PKG_NOARCH_INSTALLDIR], [
> >+    noarch_pkgconfigdir='${datadir}'/pkgconfig
> >+    AC_SUBST([noarch_pkgconfigdir])
> >+])])
> >diff --git a/configure.ac b/configure.ac
> >index 93688d0..eeb95ef 100644
> >--- a/configure.ac
> >+++ b/configure.ac
> >@@ -11,6 +11,8 @@ AC_INIT([wayland-protocols],
> >          [wayland-protocols],
> >          [http://wayland.freedesktop.org/])
> >
> >+m4_include(compat.m4)
> >+
> 
> This is really unusual to include a m4 file directly. aclocal is
> supposed to manage that for you. Not sure if you needed it, but in
> that case, you are probably missing something else (maybe
> AC_CONFIG_MACRO_DIR is required when using extra m4 files).

Just putting compat.m4 in the dir and re-running autogen.sh did nothing
for me.  Googling a bit showed that others directly include the file,
but willing to try a different fix if you got one.

> >  AC_SUBST([WAYLAND_PROTOCOLS_VERSION], [wayland_protocols_version])
> >
> >  AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
> >
> 
> 
> -- 
> 
> Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list