From fd6513858928b05ddac41cc660b6006ffaac6f01 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 14 Jun 2010 17:29:21 +0100 Subject: [PATCH] build: Check for the XKB extension When compiling the X11 backends. --- README | 1 + configure.ac | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README b/README index 9d132fd77..a1666dff4 100644 --- a/README +++ b/README @@ -28,6 +28,7 @@ On X11, Clutter depends on the following extensions • XExt • XFixes • XInput 1.x (if --enable-xinput is passed to configure) + • XKB When running the OpenGL flavor, Clutter requires at least version 1.3 or 1.2 with the multitexturing extension. However to build Clutter diff --git a/configure.ac b/configure.ac index 1fb7e2be6..1bcf2924c 100644 --- a/configure.ac +++ b/configure.ac @@ -684,7 +684,7 @@ AS_IF([test "x$SUPPORT_XLIB" = "x1"], [yes], [ - AC_DEFINE(HAVE_XINPUT, 1, Use the XINPUT X extension) + AC_DEFINE(HAVE_XINPUT, 1, [Use the XINPUT X extension]) X11_LIBS="$X11_LIBS -lXi" X11_PC_FILES="$X11_PC_FILES xi" @@ -694,6 +694,23 @@ AS_IF([test "x$SUPPORT_XLIB" = "x1"], [], ) + # XKB + clutter_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $X11_CFLAGS" + + clutter_save_LIBS="$LIBS" + LIBS="$LIBS $X11_LIBS" + + have_xkb=no + AC_CHECK_FUNC([XkbQueryExtension], + [ + AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]) + have_xkb=yes + ]) + + CPPFLAGS="$clutter_save_CPPFLAGS" + LIBS="$clutter_save_LIBS" + x11_tests=yes BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES" FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS" @@ -1136,6 +1153,7 @@ fi if test "x$SUPPORT_XLIB" = "x1"; then echo " Enable XInput 1.0: ${xinput}" +echo " Enable XKB: ${have_xkb}" echo " Enable X11 tests: ${x11_tests}" fi