[gtk+/xi2] Enable XI2/XI by default if found.



commit b6860cf1350e18907248205ffaa2d54b718d6dc9
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu May 6 20:45:07 2010 +0200

    Enable XI2/XI by default if found.

 configure.in |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/configure.in b/configure.in
index 7f80aab..3f9714d 100644
--- a/configure.in
+++ b/configure.in
@@ -1571,26 +1571,22 @@ if test "x$gdktarget" = "xx11"; then
   fi
   
   # set up things for XInput
-
-  if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
+  if test "x$with_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
     AC_DEFINE(XINPUT_XFREE, 1,
               [Define to 1 if XFree XInput should be used])
 
-    if $PKG_CONFIG --exists xi ; then
-      X_PACKAGES="$X_PACKAGES xi"
+    X_PACKAGES="$X_PACKAGES xi"
 
-      AC_CHECK_HEADER(X11/extensions/XInput2.h,
-                      have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
-    else
-      GTK_ADD_LIB(x_extra_libs, Xi)
-    fi
+    AC_CHECK_HEADER(X11/extensions/XInput2.h,
+                    have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
   else
     AC_DEFINE(XINPUT_NONE, 1,
               [Define to 1 if no XInput should be used])
   fi
 
-  AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
-  AM_CONDITIONAL(XINPUT_2, test "x$have_xinput2" = "xyes")
+  AM_CONDITIONAL(XINPUT_NONE,  test "x$with_xinput" = "xno")
+  AM_CONDITIONAL(XINPUT_XFREE, test "x$with_xinput" != "xno")
+  AM_CONDITIONAL(XINPUT_2,     test "x$have_xinput2" = "xyes")
 
   # Check for the RANDR extension
   if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]