Updated configure with libudev detection
authorSam Lantinga <slouken@libsdl.org>
Tue, 11 Dec 2012 10:50:45 -0800
changeset 6737 63ba9e5b1272
parent 6736 03dd4a1d06e9
child 6738 b408d5a406a3
Updated configure with libudev detection
configure
--- a/configure	Tue Dec 11 10:50:26 2012 -0800
+++ b/configure	Tue Dec 11 10:50:45 2012 -0800
@@ -812,7 +812,7 @@
 enable_video_dummy
 enable_video_opengl
 enable_video_opengles
-enable_input_events
+enable_libudev
 enable_input_tslib
 enable_pthreads
 enable_pthread_sem
@@ -1535,8 +1535,7 @@
   --enable-video-dummy    use dummy video driver [[default=yes]]
   --enable-video-opengl   include OpenGL support [[default=yes]]
   --enable-video-opengles include OpenGL ES support [[default=yes]]
-  --enable-input-events   use Linux 2.4 unified input interface
-                          [[default=yes]]
+  --enable-libudev        enable libudev support [[default=yes]]
   --enable-input-tslib    use the Touchscreen library for input
                           [[default=yes]]
   --enable-pthreads       use POSIX threads for multi-threading
@@ -20680,15 +20679,7 @@
 
 CheckInputEvents()
 {
-        # Check whether --enable-input-events was given.
-if test "${enable_input_events+set}" = set; then :
-  enableval=$enable_input_events;
-else
-  enable_input_events=yes
-fi
-
-    if test x$enable_input_events = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
 $as_echo_n "checking for Linux 2.4 unified input interface... " >&6; }
         use_input_events=no
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20721,6 +20712,31 @@
 $as_echo "#define SDL_INPUT_LINUXEV 1" >>confdefs.h
 
         fi
+}
+
+CheckLibUDev()
+{
+    # Check whether --enable-libudev was given.
+if test "${enable_libudev+set}" = set; then :
+  enableval=$enable_libudev;
+else
+  enable_libudev=yes
+fi
+
+    if test x$enable_libudev = xyes; then
+        ac_fn_c_check_header_mongrel "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default"
+if test "x$ac_cv_header_libudev_h" = xyes; then :
+  have_libudev_h_hdr=yes
+else
+  have_libudev_h_hdr=no
+fi
+
+
+        if test x$have_libudev_h_hdr = xyes; then
+
+$as_echo "#define HAVE_LIBUDEV_H 1" >>confdefs.h
+
+        fi
     fi
 }
 
@@ -21910,6 +21926,7 @@
         CheckFusionSound
         CheckOpenGLX11
         CheckOpenGLESX11
+        CheckLibUDev
         CheckInputEvents
         CheckTslib
         CheckUSBHID