summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index ff0da8e..a9c2d1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,9 +42,13 @@ AC_PATH_XTRA
AH_TEMPLATE(HAVE_XKEYBOARD, [XKEYBOARD extension build environment present])
AH_TEMPLATE(HAVE_LIBXINERAMA, [XINERAMA extension build environment present])
if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
- AC_CHECK_LIB(X11, XkbSelectEvents,
- [AC_DEFINE(HAVE_XKEYBOARD)], ,
- $X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
+ AC_CHECK_HEADER(X11/XKBlib.h, HAVE_XKBLIB_H="true",
+ HAVE_XKBLIB_H="false", [#include <X11/Xlib.h>])
+ if test $HAVE_XKBLIB_H = "true"; then
+ AC_CHECK_LIB(X11, XkbSelectEvents,
+ [AC_DEFINE(HAVE_XKEYBOARD)], ,
+ $X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
+ fi
AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
X_PRELIBS="$X_PRELIBS -lXinerama"
[AC_DEFINE(HAVE_LIBXINERAMA)], ,