summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-01-05 21:01:50 +0000
committerArnaud Fontaine <arnau@debian.org>2012-05-22 17:19:18 +0900
commit98ca67376f87854b1b9308ac948d16a890e5088b (patch)
tree57dbac56010b829380cd4a8124982d564b51a7e3
parent51ba72634a3fdaaddacf917373cc44b1bf53829d (diff)
downloadutil-image-98ca67376f87854b1b9308ac948d16a890e5088b.tar.gz
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@dronecode.org.uk> Reviewed-by: Arnaud Fontaine <arnau@debian.org>
-rw-r--r--configure.ac2
-rw-r--r--image/Makefile.am6
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