[vlc-commits] configure: rationalize Wayland tests
Rémi Denis-Courmont
git at videolan.org
Sun Jan 29 14:36:58 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 29 15:08:58 2017 +0200| [f91f9ca9ca0b6c4da3926e0464cb45667ffffbbe] | committer: Rémi Denis-Courmont
configure: rationalize Wayland tests
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f91f9ca9ca0b6c4da3926e0464cb45667ffffbbe
---
configure.ac | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7050091..3a7805d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3124,37 +3124,35 @@ dnl
AC_ARG_ENABLE(wayland,
[AS_HELP_STRING([--enable-wayland], [Wayland support (default auto)])])
have_wayland="no"
-AC_ARG_VAR([WAYLAND_SCANNER], [Wayland scanner utility])
+have_wayland_egl="no"
AS_IF([test "${enable_wayland}" != "no"], [
- AC_MSG_CHECKING([for the Wayland scanner])
- AS_IF([test -z "$WAYLAND_SCANNER"], [
+ PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91], [
+ AC_MSG_CHECKING([for the Wayland scanner])
PKG_CHECK_EXISTS([wayland-scanner], [
WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
+ AC_MSG_RESULT([${WAYLAND_SCANNER}])
], [
- WAYLAND_SCANNER="wayland-scanner"
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors wayland-scanner)])
])
- ])
- AC_MSG_RESULT([$WAYLAND_SCANNER])
- PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91], [
have_wayland="yes"
- ], [
- AS_IF([test -n "${enable_wayland}"], [
- AC_MSG_ERROR([${WAYLAND_CLIENT_PKG_ERRORS}.])
- ])
- ])
- AS_IF([test "${have_egl}" = "yes"], [
- PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [
- have_wayland_egl="yes"
- ], [
- AS_IF([test -n "${enable_wayland}"], [
+ AS_IF([test "${have_egl}" = "yes"], [
+ PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [
+ have_wayland_egl="yes"
+ ], [
AC_MSG_ERROR([${WAYLAND_EGL_PKG_ERRORS}.])
])
])
+ ], [
+ AS_IF([test -n "${enable_wayland}"], [
+ AC_MSG_ERROR([${WAYLAND_CLIENT_PKG_ERRORS}.])
+ ])
])
])
+AC_SUBST([WAYLAND_SCANNER])
AM_CONDITIONAL([HAVE_WAYLAND], [test "${have_wayland}" = "yes"])
AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test "${have_wayland_egl}" = "yes"])
More information about the vlc-commits
mailing list