From 0c7c087f77132657dd8ee342963bb1b51d659571 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 Dec 2011 10:19:48 +1000 Subject: Test for mtdev before assuming multitouch If the XI2.2 headers are present but mtdev isn't, build without MULTITOUCH defined. Signed-off-by: Peter Hutterer --- configure.ac | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5671193..451a730 100644 --- a/configure.ac +++ b/configure.ac @@ -48,13 +48,14 @@ XORG_DEFAULT_OPTIONS PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto) PKG_CHECK_MODULES(UDEV, udev) -PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3], - HAVE_XI22="yes"; AC_DEFINE(MULTITOUCH, 1, [XI2.2 available]), - HAVE_XI22="no") +PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3], HAVE_XI22="yes", HAVE_XI22="no") if test "x$HAVE_XI22" = xyes; then # Obtain compiler/linker options for mtdev - PKG_CHECK_MODULES(MTDEV, mtdev) + PKG_CHECK_MODULES(MTDEV, mtdev, HAVE_MTDEV="yes", HAVE_MTDEV="no") +fi +if test "x$HAVE_XI22" = xyes && test "x$HAVE_MTDEV" = xyes; then + AC_DEFINE(MULTITOUCH, 1, [XI2.2 available]) fi # Define a configure option for an alternate input module directory -- cgit v1.2.3