]> git.eshelyaron.com Git - emacs.git/commitdiff
Test for XkbGetKeyboard with an AC_TRY_LINK whose
authorGerd Moellmann <gerd@gnu.org>
Tue, 19 Dec 2000 11:26:41 +0000 (11:26 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 19 Dec 2000 11:26:41 +0000 (11:26 +0000)
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.

configure.in

index 65dd867b27f99ab68dd6f2158dc79d58fcb9ddd6..6f8f777565a12a965b4af609f3347b35693087eb 100644 (file)
@@ -1632,8 +1632,20 @@ if test "${HAVE_X11}" = "yes"; then
     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