diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2016-05-04 16:48:15 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2016-06-03 00:20:43 +0800 |
commit | fe6280841dfaaee94e8664517420f351cd334c86 (patch) | |
tree | fe5ec7575ea5804e8e984f85d0a6c34835a61c3d | |
parent | 8838a50dc6ab4ba3bd04282248bd8f4e10d7bee2 (diff) |
Don't check WAYLAND_SCANNER if wayland isn't used or found
checking for WAYLAND... no
checking for LIBVA_WAYLAND_DEPS... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for WAYLAND_SCANNER... no
configure: error: Package requirements (wayland-scanner) were not met:
No package 'wayland-scanner' found
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
-rw-r--r-- | configure.ac | 19 | ||||
-rwxr-xr-x | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/wayland-drm.xml (renamed from src/wayland/wayland-drm.xml) | 0 | ||||
-rw-r--r-- | src/wayland/Makefile.am | 28 |
4 files changed, 16 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac index e9875a3..b3b1ce2 100644 --- a/configure.ac +++ b/configure.ac @@ -173,17 +173,21 @@ AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes") # Check for Wayland USE_WAYLAND="no" if test "$enable_wayland" = "yes"; then - PKG_CHECK_MODULES([WAYLAND], [wayland-client], [USE_WAYLAND="yes"], [:]) PKG_CHECK_MODULES([LIBVA_WAYLAND_DEPS], [libva-wayland], - [AC_DEFINE([HAVE_VA_WAYLAND], [1], [Defined to 1 if VA/Wayland API is enabled])], - [USE_WAYLAND="no"]) + [USE_WAYLAND="yes"], [:]) + + if test "$USE_WAYLAND" = "yes"; then + + WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client` + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],, + [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH]) + + AC_DEFINE([HAVE_VA_WAYLAND], [1], + [Defined to 1 if VA/Wayland API is enabled]) + fi fi AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes") -m4_ifdef([WAYLAND_SCANNER_RULES], - [WAYLAND_SCANNER_RULES(['$(top_builddir)/src/wayland'])], - [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)]) - AC_OUTPUT([ Makefile debian.upstream/Makefile @@ -203,7 +207,6 @@ AC_OUTPUT([ src/shaders/render/Makefile src/shaders/utils/Makefile src/shaders/vme/Makefile - src/wayland/Makefile ]) dnl Print summary diff --git a/src/Makefile.am b/src/Makefile.am index 93fb3e6..c95034c 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -209,9 +209,12 @@ EXTRA_DIST += Android.mk intel_version.h.in $(PKG_VERSION_FILE) # Wayland protocol protocol_source_h = wayland-drm-client-protocol.h i965_output_wayland.c: $(protocol_source_h) -@wayland_scanner_rules@ +%-client-protocol.h : %.xml + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ -DIST_SUBDIRS += wayland +EXTRA_DIST += \ + wayland-drm.xml \ + $(NULL) # Extra clean files so that maintainer-clean removes *everything* MAINTAINERCLEANFILES = Makefile.in config.h.in diff --git a/src/wayland/wayland-drm.xml b/src/wayland-drm.xml index 265d4f8..265d4f8 100644 --- a/src/wayland/wayland-drm.xml +++ b/src/wayland-drm.xml diff --git a/src/wayland/Makefile.am b/src/wayland/Makefile.am deleted file mode 100644 index 614d8a4..0000000 --- a/src/wayland/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2012 Intel Corporation. All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sub license, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice (including the -# next paragraph) shall be included in all copies or substantial portions -# of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -EXTRA_DIST = \ - wayland-drm.xml \ - $(NULL) - -# Extra clean files so that maintainer-clean removes *everything* -MAINTAINERCLEANFILES = Makefile.in |