summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-07-20 17:53:01 +0100
committerEmil Velikov <[email protected]>2017-07-24 10:23:41 +0100
commit166852ee957ff25a1d14dcaa7512917343130fa4 (patch)
tree38164309bc370eeb4657caa266d3fa7ebf29870a /configure.ac
parentfeef47bb593306aee2854e9bd146543c44d68468 (diff)
configure.ac: rework wayland-protocols handling
At dist/distcheck time we need to ensure that all the files and their respective dependencies are handled. At the moment we'll bail out as the linux-dmabuf rules are guarded in a conditional. Move them outside of it and drop the sources from BUILT_SOURCES. Thus the files will be generated only as needed, which will happen only after the wayland-protocols dependency is enforced in configure.ac. v2: add dependency tracking for the header Cc: Andres Gomez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 2689fc55e85..2736fbf201b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1681,19 +1681,26 @@ if test "x$WAYLAND_SCANNER" = x; then
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
fi
+PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], [have_wayland_protocols=yes], [have_wayland_protocols=no])
+if test "x$have_wayland_protocols" = xyes; then
+ ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
+fi
+AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
+
# Do per platform setups and checks
platforms=`IFS=', '; echo $with_platforms`
for plat in $platforms; do
case "$plat" in
wayland)
- PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
- ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
+ PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
if test "x$WAYLAND_SCANNER" = "x:"; then
AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
fi
+ if test "x$have_wayland_protocols" = xno; then
+ AC_MSG_ERROR([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED is needed to compile the wayland platform])
+ fi
DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
;;