dnl xkb.m4
dnl Copyright (C) 2015 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

dnl By Jae-hyeon Park

# Define HAVE_XKB if <X11/XKBlib.h> exists

AC_DEFUN([AC_XKB],
[
  AC_CHECK_HEADER([X11/XKBlib.h],
    [use_xkb=true
     AC_DEFINE([HAVE_XKB], 1, [define if X Keyboard Extension is available])],
    [use_xkb=false
     AC_MSG_WARN(
     [X Keyboard Extension unavailable! Disabling access to keyboard geometry])])
  AM_CONDITIONAL(XKB, $use_xkb)
])
