configure.ac
changeset 13632 49320151ca4d
parent 13609 5abd513b853d
child 13633 340324c76848
     1.1 --- a/configure.ac	Sun Mar 15 16:01:19 2020 -0400
     1.2 +++ b/configure.ac	Mon Mar 16 00:21:22 2020 -0400
     1.3 @@ -3410,6 +3410,19 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Set up the Virtual joystick driver.
     1.8 +CheckVirtualJoystick()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(joystick-virtual,
    1.11 +AS_HELP_STRING([--enable-joystick-virtual], [enable virtual joystick APIs [[default=no]]]),
    1.12 +                  , enable_joystick_virtual=no)
    1.13 +    if test x$enable_joystick = xyes -a x$enable_joystick_virtual = xyes; then
    1.14 +        AC_DEFINE(SDL_JOYSTICK_VIRTUAL, 1, [ ])
    1.15 +        SOURCES="$SOURCES $srcdir/src/joystick/virtual/*.c"
    1.16 +        have_joystick_virtual=yes
    1.17 +    fi
    1.18 +}
    1.19 +
    1.20  
    1.21  
    1.22  dnl Do this on all platforms, before everything else (other things might want to override it).
    1.23 @@ -4092,6 +4105,9 @@
    1.24          ;;
    1.25  esac
    1.26  
    1.27 +dnl Permit use of virtual joystick APIs on any platform (subject to configure options)
    1.28 +CheckVirtualJoystick
    1.29 +
    1.30  # Check whether to install sdl2-config
    1.31  AC_MSG_CHECKING(whether to install sdl2-config)
    1.32  AC_ARG_ENABLE([sdl2-config],
    1.33 @@ -4315,6 +4331,11 @@
    1.34      SUMMARY="${SUMMARY}X11 libraries   :${SUMMARY_video_x11}\n"
    1.35  fi
    1.36  SUMMARY="${SUMMARY}Input drivers   :${SUMMARY_input}\n"
    1.37 +if test x$have_joystick_virtual = xyes; then
    1.38 +    SUMMARY="${SUMMARY}Enable virtual joystick APIs : YES\n"
    1.39 +else
    1.40 +    SUMMARY="${SUMMARY}Enable virtual joystick APIs : NO\n"
    1.41 +fi
    1.42  if test x$have_samplerate_h_hdr = xyes; then
    1.43      SUMMARY="${SUMMARY}Using libsamplerate : YES\n"
    1.44  else