diff options
author | Arnaud Fontaine <arnau@debian.org> | 2010-08-08 22:09:26 +0100 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2010-08-09 01:05:21 +0100 |
commit | 28c561b3dd5729ffa511cfb3727dfff36477d80a (patch) | |
tree | 7afb3f32a89ee4346c2bb2d6e0b3aeb05e158074 | |
parent | 309b691da4d7a3c7e72f1b8a71c1fc18a7039cea (diff) |
Add XORG_XCB_UTIL_COMMON which defines default options for xcb-util libraries.
-rw-r--r-- | xorg-macros.m4.in | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 479a022..4c1243a 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1143,3 +1143,42 @@ fi AC_SUBST(GNU_M4) ]) # XORG_CHECK_GNU_M4 + +# XORG_XCB_UTIL_COMMON(xcb-required-version, xcb-proto-required-version) +# ---------------------------------------------------------------------- +# Minimum version: 1.11.0 +# +# Defines default options for xcb-util libraries. +# +AC_DEFUN([XORG_XCB_UTIL_COMMON], [ +m4_ifndef([AX_COMPARE_VERSION], + [m4_fatal([could not find AX_COMPARE_VERSION in macros search path])]) + +AC_REQUIRE([AC_PROG_LIBTOOL]) + +# Define header files and pkgconfig paths +xcbincludedir='${includedir}/xcb' +AC_SUBST(xcbincludedir) +pkgconfigdir='${libdir}/pkgconfig' +AC_SUBST(pkgconfigdir) + +# Check xcb version +PKG_CHECK_MODULES(XCB, xcb >= [$1]) + +# Check version of xcb-proto that xcb was compiled against +xcbproto_required=[$2] + +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 to be compiled against version $xcbproto_required or higher]) +fi + +XORG_DEFAULT_OPTIONS +XORG_ENABLE_DEVEL_DOCS +XORG_WITH_DOXYGEN +]) # XORG_XCB_UTIL_COMMON |