+AS_IF([test "x$platform_linux" = "xyes"],
+ [
+ AC_DEFINE([OS_LINUX], [1], [Define to 1 if building for Linux])
+ ])
+
+# additional input backends
+
+AC_ARG_ENABLE([tslib-input],
+ [AS_HELP_STRING([--enable-tslib-input=@<:@yes/no@:>@], [Enable TSLib for input events (default=no)])],
+ [enable_tslib=$enableval],
+ [enable_tslib=no])
+AC_ARG_ENABLE([evdev-input],
+ [AS_HELP_STRING([--enable-evdev-input=@<:@yes/no@:>@], [Enable evdev for input events (default=no)])],
+ [enable_evdev=$enableval],
+ [enable_evdev=no])
+
+AS_IF([test "x$enable_tslib" = "xyes"],
+ [
+ PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no])
+ AS_IF([test "x$have_tslib" = "xyes"],
+ [
+ CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS tslib"
+ experimental_input_backend="yes"
+ AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])
+ SUPPORT_TSLIB=1
+ ])
+ ])
+
+AS_IF([test "x$enable_evdev" = "xyes"],
+ [
+ PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], [have_evdev=yes], [have_evdev=no])
+ AS_IF([test "x$have_evdev" = "xyes"],
+ [
+ CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
+ BACKEND_PC_FILES="$BACKEND_PC_FILES gudev-1.0 xkbcommon"
+ experimental_input_backend="yes"
+ AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
+ SUPPORT_EVDEV=1
+ ])
+ ])
+