configure.in
changeset 8972 dfc759d7486f
parent 8962 c593cbef6d7d
child 8976 1a5d959d7b32
     1.1 --- a/configure.in	Thu Jul 03 17:36:08 2014 -0300
     1.2 +++ b/configure.in	Thu Jul 03 15:39:55 2014 -0700
     1.3 @@ -2496,8 +2496,25 @@
     1.4          AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
     1.5          AC_CHECK_HEADER(dsound.h, have_dsound=yes)
     1.6          AC_CHECK_HEADER(dinput.h, have_dinput=yes)
     1.7 +        AC_CHECK_HEADER(dxgi.h, have_dxgi=yes)
     1.8          AC_CHECK_HEADER(xaudio2.h, have_xaudio2=yes)
     1.9 -        AC_CHECK_HEADER(dxgi.h, have_dxgi=yes)
    1.10 +        AC_CHECK_HEADER(xinput.h, have_xinput=yes)
    1.11 +
    1.12 +        if test x$have_ddraw = xyes; then
    1.13 +            AC_DEFINE(HAVE_DDRAW_H, 1, [ ])
    1.14 +        fi
    1.15 +        if test x$have_dinput = xyes; then
    1.16 +            AC_DEFINE(HAVE_DINPUT_H, 1, [ ])
    1.17 +        fi
    1.18 +        if test x$have_dsound = xyes; then
    1.19 +            AC_DEFINE(HAVE_DSOUND_H, 1, [ ])
    1.20 +        fi
    1.21 +        if test x$have_dxgi = xyes; then
    1.22 +            AC_DEFINE(HAVE_DXGI_H, 1, [ ])
    1.23 +        fi
    1.24 +        if test x$have_xinput = xyes; then
    1.25 +            AC_DEFINE(HAVE_XINPUT_H, 1, [ ])
    1.26 +        fi
    1.27  
    1.28          SUMMARY_video="${SUMMARY_video} directx"
    1.29          SUMMARY_audio="${SUMMARY_audio} directx"
    1.30 @@ -2927,9 +2944,6 @@
    1.31                  AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
    1.32              fi
    1.33          fi
    1.34 -        if test x$have_dxgi = xyes; then
    1.35 -            AC_DEFINE(HAVE_DXGI_H, 1, [ ])
    1.36 -        fi
    1.37          # Set up files for the audio library
    1.38          if test x$enable_audio = xyes; then
    1.39              AC_DEFINE(SDL_AUDIO_DRIVER_WINMM, 1, [ ])
    1.40 @@ -2946,19 +2960,28 @@
    1.41          fi
    1.42          # Set up files for the joystick library
    1.43          if test x$enable_joystick = xyes; then
    1.44 -            if test x$have_dinput = xyes; then
    1.45 -                AC_DEFINE(SDL_JOYSTICK_DINPUT, 1, [ ])
    1.46 -                SOURCES="$SOURCES $srcdir/src/joystick/windows/SDL_dxjoystick.c"
    1.47 -                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
    1.48 +            if test x$have_dinput = xyes -o x$have_xinput = xyes; then
    1.49 +                if test x$have_xinput = xyes; then
    1.50 +                    AC_DEFINE(SDL_JOYSTICK_XINPUT, 1, [ ])
    1.51 +                fi
    1.52 +                if test x$have_dinput = xyes; then
    1.53 +                    AC_DEFINE(SDL_JOYSTICK_DINPUT, 1, [ ])
    1.54 +                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
    1.55 +                fi
    1.56              else
    1.57                  AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
    1.58 -                SOURCES="$SOURCES $srcdir/src/joystick/windows/SDL_mmjoystick.c"
    1.59              fi
    1.60 +            SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
    1.61              have_joystick=yes
    1.62          fi
    1.63          if test x$enable_haptic = xyes; then
    1.64 -            if test x$have_dinput = xyes; then
    1.65 -                AC_DEFINE(SDL_HAPTIC_DINPUT, 1, [ ])
    1.66 +            if test x$have_dinput = xyes -o x$have_xinput = xyes; then
    1.67 +                if test x$have_xinput = xyes; then
    1.68 +                    AC_DEFINE(SDL_HAPTIC_XINPUT, 1, [ ])
    1.69 +                fi
    1.70 +                if test x$have_dinput = xyes; then
    1.71 +                    AC_DEFINE(SDL_HAPTIC_DINPUT, 1, [ ])
    1.72 +                fi
    1.73                  SOURCES="$SOURCES $srcdir/src/haptic/windows/SDL_syshaptic.c"
    1.74                  have_haptic=yes
    1.75              fi