[Xcb] [PATCH xcb-util-image 1/2] Don't try to build test_xcb_image_shm if SHM isn't available
Jon TURNEY
jon.turney at dronecode.org.uk
Thu Jan 5 13:01:50 PST 2012
Don't try to build test_xcb_image_shm if SHM isn't available (for example, on MinGW)
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
configure.ac | 2 ++
image/Makefile.am | 6 +++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5a53b5c..ce3cdee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,8 @@ AM_MAINTAINER_MODE
XCB_UTIL_COMMON([1.4], [1.6])
+AC_CHECK_HEADERS([sys/shm.h])
+AM_CONDITIONAL(HAVE_SHM, test x$ac_cv_header_sys_shm_h = xyes)
PKG_CHECK_MODULES(XCB_SHM, xcb-shm)
PKG_CHECK_MODULES(XPROTO, xproto >= 7.0.8)
PKG_CHECK_MODULES(XCB_UTIL, xcb-util)
diff --git a/image/Makefile.am b/image/Makefile.am
index 1f7beed..f6a67ff 100644
--- a/image/Makefile.am
+++ b/image/Makefile.am
@@ -17,7 +17,11 @@ pkgconfig_DATA = xcb-image.pc
EXTRA_DIST=xcb-image.pc.in
-noinst_PROGRAMS = test_xcb_image test_xcb_image_shm test_formats test_bitmap
+noinst_PROGRAMS = test_xcb_image test_formats test_bitmap
+
+if HAVE_SHM
+noinst_PROGRAMS += test_xcb_image_shm
+endif
check_PROGRAMS = test_swap
--
1.7.5.1
More information about the Xcb
mailing list