Updated configure with libudev detection
authorSam Lantinga <slouken@libsdl.org>
Tue, 11 Dec 2012 10:50:45 -0800
changeset 673763ba9e5b1272
parent 6736 03dd4a1d06e9
child 6738 b408d5a406a3
Updated configure with libudev detection
configure
     1.1 --- a/configure	Tue Dec 11 10:50:26 2012 -0800
     1.2 +++ b/configure	Tue Dec 11 10:50:45 2012 -0800
     1.3 @@ -812,7 +812,7 @@
     1.4  enable_video_dummy
     1.5  enable_video_opengl
     1.6  enable_video_opengles
     1.7 -enable_input_events
     1.8 +enable_libudev
     1.9  enable_input_tslib
    1.10  enable_pthreads
    1.11  enable_pthread_sem
    1.12 @@ -1535,8 +1535,7 @@
    1.13    --enable-video-dummy    use dummy video driver [[default=yes]]
    1.14    --enable-video-opengl   include OpenGL support [[default=yes]]
    1.15    --enable-video-opengles include OpenGL ES support [[default=yes]]
    1.16 -  --enable-input-events   use Linux 2.4 unified input interface
    1.17 -                          [[default=yes]]
    1.18 +  --enable-libudev        enable libudev support [[default=yes]]
    1.19    --enable-input-tslib    use the Touchscreen library for input
    1.20                            [[default=yes]]
    1.21    --enable-pthreads       use POSIX threads for multi-threading
    1.22 @@ -20680,15 +20679,7 @@
    1.23  
    1.24  CheckInputEvents()
    1.25  {
    1.26 -        # Check whether --enable-input-events was given.
    1.27 -if test "${enable_input_events+set}" = set; then :
    1.28 -  enableval=$enable_input_events;
    1.29 -else
    1.30 -  enable_input_events=yes
    1.31 -fi
    1.32 -
    1.33 -    if test x$enable_input_events = xyes; then
    1.34 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
    1.35 +            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
    1.36  $as_echo_n "checking for Linux 2.4 unified input interface... " >&6; }
    1.37          use_input_events=no
    1.38          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.39 @@ -20721,6 +20712,31 @@
    1.40  $as_echo "#define SDL_INPUT_LINUXEV 1" >>confdefs.h
    1.41  
    1.42          fi
    1.43 +}
    1.44 +
    1.45 +CheckLibUDev()
    1.46 +{
    1.47 +    # Check whether --enable-libudev was given.
    1.48 +if test "${enable_libudev+set}" = set; then :
    1.49 +  enableval=$enable_libudev;
    1.50 +else
    1.51 +  enable_libudev=yes
    1.52 +fi
    1.53 +
    1.54 +    if test x$enable_libudev = xyes; then
    1.55 +        ac_fn_c_check_header_mongrel "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default"
    1.56 +if test "x$ac_cv_header_libudev_h" = xyes; then :
    1.57 +  have_libudev_h_hdr=yes
    1.58 +else
    1.59 +  have_libudev_h_hdr=no
    1.60 +fi
    1.61 +
    1.62 +
    1.63 +        if test x$have_libudev_h_hdr = xyes; then
    1.64 +
    1.65 +$as_echo "#define HAVE_LIBUDEV_H 1" >>confdefs.h
    1.66 +
    1.67 +        fi
    1.68      fi
    1.69  }
    1.70  
    1.71 @@ -21910,6 +21926,7 @@
    1.72          CheckFusionSound
    1.73          CheckOpenGLX11
    1.74          CheckOpenGLESX11
    1.75 +        CheckLibUDev
    1.76          CheckInputEvents
    1.77          CheckTslib
    1.78          CheckUSBHID