summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ham <rah@bash.sh>2009-05-25 12:22:13 +0200
committerArnaud Fontaine <arnau@debian.org>2010-11-14 20:04:44 +0900
commit336b19984d8d8e096a0d921bdbb7a9988412c235 (patch)
tree57b7b7c35181b5994a2a853e3471af37875a2012
parentd952d04cd3edfe0d2e019b753a79068502b2df0d (diff)
downloadutil-image-336b19984d8d8e096a0d921bdbb7a9988412c235.tar.gz
Add a check on xproto version libxcb was compiled with
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r--configure.ac21
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c5f79f4..e95d74f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,26 @@ AC_SUBST(xcbincludedir)
pkgconfigdir='${libdir}/pkgconfig'
AC_SUBST(pkgconfigdir)
-PKG_CHECK_MODULES(XCB, xcb >= 1.0)
+PKG_CHECK_MODULES(XCB, xcb >= 1.2)
+
+######
+# Check version of xcb-proto that xcb was compiled against
+######
+xcbproto_required=1.5
+
+# Moved from AX_COMPARE_VERSION to maintain proper output
+AC_PROG_AWK
+
+AC_MSG_CHECKING([whether libxcb was compiled against xcb-proto >= $xcbproto_required])
+xcbproto_version=`$PKG_CONFIG --variable=xcbproto_version xcb`
+AX_COMPARE_VERSION([$xcbproto_version],[ge],[$xcbproto_required], xcbproto_ok="yes", xcbproto_ok="no")
+AC_MSG_RESULT([$xcbproto_ok])
+
+if test $xcbproto_ok = no; then
+ AC_MSG_ERROR([libxcb was compiled against xcb-proto $xcbproto_version; it needs needs to be compiled against version $xcbproto_required or higher])
+fi
+
+
PKG_CHECK_MODULES(XCB_SHM, xcb-shm)
PKG_CHECK_MODULES(XCB_RENDER, xcb-render)
PKG_CHECK_MODULES(XPROTO, xproto >= 7.0.8)