| 1 |
# XCB_UTIL_COMMON(xcb-required-version, xcb-proto-required-version) |
| 2 |
# ----------------------------------------------------------------- |
| 3 |
# |
| 4 |
# Defines default options for xcb-util libraries. xorg/util/macros >= |
| 5 |
# 1.16.0 is required for cross-platform compiler flags and to build |
| 6 |
# library documentation. |
| 7 |
# |
| 8 |
AC_DEFUN([XCB_UTIL_COMMON], [ |
| 9 |
m4_ifndef([AX_COMPARE_VERSION], |
| 10 |
[m4_fatal([could not find AX_COMPARE_VERSION in macros search path])]) |
| 11 |
|
| 12 |
AC_REQUIRE([AC_PROG_LIBTOOL]) |
| 13 |
|
| 14 |
# Define header files and pkgconfig paths |
| 15 |
xcbincludedir='${includedir}/xcb' |
| 16 |
AC_SUBST(xcbincludedir) |
| 17 |
pkgconfigdir='${libdir}/pkgconfig' |
| 18 |
AC_SUBST(pkgconfigdir) |
| 19 |
|
| 20 |
# Check xcb version |
| 21 |
PKG_CHECK_MODULES(XCB, xcb >= [$1]) |
| 22 |
|
| 23 |
# Check version of xcb-proto that xcb was compiled against |
| 24 |
xcbproto_required=[$2] |
| 25 |
|
| 26 |
AC_MSG_CHECKING([whether libxcb was compiled against xcb-proto >= $xcbproto_required]) |
| 27 |
xcbproto_version=`$PKG_CONFIG --variable=xcbproto_version xcb` |
| 28 |
AX_COMPARE_VERSION([$xcbproto_version],[ge],[$xcbproto_required], xcbproto_ok="yes", |
| 29 |
xcbproto_ok="no") |
| 30 |
AC_MSG_RESULT([$xcbproto_ok]) |
| 31 |
|
| 32 |
if test $xcbproto_ok = no; then |
| 33 |
AC_MSG_ERROR([libxcb was compiled against xcb-proto $xcbproto_version; it needs to be compiled against version $xcbproto_required or higher]) |
| 34 |
fi |
| 35 |
|
| 36 |
# Call macros from Xorg util-macros |
| 37 |
m4_ifndef([XORG_MACROS_VERSION], |
| 38 |
[m4_fatal([must install xorg-macros 1.16.0 or later before running autoconf/autogen])]) |
| 39 |
|
| 40 |
XORG_MACROS_VERSION([1.16.0]) |
| 41 |
XORG_DEFAULT_OPTIONS |
| 42 |
XORG_ENABLE_DEVEL_DOCS |
| 43 |
XORG_WITH_DOXYGEN |
| 44 |
]) # XCB_UTIL_COMMON |