AC_DEFINE(HAVE_XKB)
fi
+have_xinput=
+AC_CHECK_LIB(Xi, XOpenDevice, XINPUT_LIBS=-lXi)
+if test "x$XINPUT_LIBS" = x; then
+ save_LIBS="$LIBS"
+ for xinputpath in /usr/X11R6/lib /usr/openwin/lib; do
+ LIBS="-L$xinputpath -lXi"
+ case "$host" in
+ *solaris*) XINPUT_RPATH_FLAGS="-R$xinputpath" ;;
+ esac
+ AC_MSG_CHECKING(for -lXi in $xinputpath)
+ AC_TRY_LINK([], [XOpenDisplay()], [
+ AC_MSG_RESULT(yes)
+ XINPUT_LIBS="$XINPUT_RPATH_FLAGS -L$xinputpath -lXi"
+ LIBS="$save_LIBS"
+ break],[AC_MSG_RESULT(no)])
+ done
+ if test "x$XINPUT_LIBS" = x; then
+ AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details)
+ fi
+ AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
+fi
+AC_SUBST(XINPUT_LIBS)
+
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)