changeset 34710:d5251a5c10ef

Test for XkbGetKeyboard with an AC_TRY_LINK whose source file includes XKBlib.h. On some broken Solaris systems, there is an XKBlib.h, reportedly, but header files included by XKBlib.h are missing.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 19 Dec 2000 11:26:41 +0000
parents 4e626e8c7eb7
children 583cd327d7b5
files configure.in
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Tue Dec 19 11:15:38 2000 +0000
+++ b/configure.in	Tue Dec 19 11:26:41 2000 +0000
@@ -1632,8 +1632,20 @@
     fi
   fi
 
+  # Reportedly, some broken Solaris systems have XKBlib.h but are missing
+  # header files included from there.
+  AC_MSG_CHECKING(for Xkb)
+  AC_TRY_LINK([#include <X11/Xlib.h>
+#include <X11/XKBlib.h>],
+	[XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);],
+	emacs_xkb=yes, emacs_xkb=no)
+  AC_MSG_CHECKING($emacs_xkb)
+  if test $emacs_xkb = yes; then
+    AC_DEFINE(HAVE_XKBGETKEYBOARD)
+  fi
+
   AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
-XScreenNumberOfScreen XSetWMProtocols XkbGetKeyboard)
+XScreenNumberOfScreen XSetWMProtocols)
 fi
 
 if test "${window_system}" = "x11"; then