configure.in
changeset 10777 2883d23b5a28
parent 10660 1ae4e8001b73
child 10787 2a0bcfc4d35c
     1.1 --- a/configure.in	Fri Jan 06 21:23:51 2017 -0500
     1.2 +++ b/configure.in	Fri Jan 06 20:43:53 2017 -0800
     1.3 @@ -1049,6 +1049,58 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Find FusionSound
     1.8 +CheckFusionSound()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(fusionsound,
    1.11 +AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
    1.12 +                  , enable_fusionsound=no)
    1.13 +    if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
    1.14 +        fusionsound=no
    1.15 +
    1.16 +        FUSIONSOUND_REQUIRED_VERSION=1.1.1
    1.17 +
    1.18 +        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
    1.19 +        AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
    1.20 +        if test x$PKG_CONFIG != xno; then
    1.21 +            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
    1.22 +                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
    1.23 +                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
    1.24 +                fusionsound=yes
    1.25 +            fi
    1.26 +        fi
    1.27 +        AC_MSG_RESULT($fusionsound)
    1.28 +
    1.29 +        if test x$fusionsound = xyes; then
    1.30 +            AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND, 1, [ ])
    1.31 +            SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
    1.32 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
    1.33 +            
    1.34 +            AC_ARG_ENABLE(fusionsound-shared,
    1.35 +AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
    1.36 +                          , enable_fusionsound_shared=yes)
    1.37 +            fusionsound_shared=no
    1.38 +            AC_MSG_CHECKING(for FusionSound dynamic loading support)
    1.39 +            if test x$have_loadso != xyes && \
    1.40 +               test x$enable_fusionsound_shared = xyes; then
    1.41 +                AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
    1.42 +            fi
    1.43 +            if test x$have_loadso = xyes && \
    1.44 +               test x$enable_fusionsound_shared = xyes; then
    1.45 +                AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so", [ ])
    1.46 +                fusionsound_shared=yes
    1.47 +                SUMMARY_audio="${SUMMARY_audio} fusionsound(dynamic)"
    1.48 +            else
    1.49 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
    1.50 +                SUMMARY_audio="${SUMMARY_audio} fusionsound"
    1.51 +            fi
    1.52 +            AC_MSG_RESULT($fusionsound_shared)
    1.53 +            
    1.54 +            have_audio=yes
    1.55 +        fi
    1.56 +    fi
    1.57 +}
    1.58 +
    1.59  dnl rcg07142001 See if the user wants the disk writer audio driver...
    1.60  CheckDiskAudio()
    1.61  {
    1.62 @@ -1075,6 +1127,34 @@
    1.63      fi
    1.64  }
    1.65  
    1.66 +dnl See if libsamplerate is available
    1.67 +CheckLibSampleRate()
    1.68 +{
    1.69 +    AC_ARG_ENABLE(libsamplerate,
    1.70 +AC_HELP_STRING([--enable-libsamplerate], [use libsamplerate for audio rate conversion [[default=yes]]]),
    1.71 +                  , enable_libsamplerate=yes)
    1.72 +    if test x$enable_libsamplerate = xyes; then
    1.73 +        AC_CHECK_HEADER(samplerate.h,
    1.74 +                        have_samplerate_h_hdr=yes,
    1.75 +                        have_samplerate_h_hdr=no)
    1.76 +        if test x$have_samplerate_h_hdr = xyes; then
    1.77 +            AC_DEFINE(HAVE_LIBSAMPLERATE_H, 1, [ ])
    1.78 +
    1.79 +            AC_ARG_ENABLE(libsamplerate-shared,
    1.80 +AC_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate [[default=yes]]]),
    1.81 +                          , enable_libsamplerate_shared=yes)
    1.82 +
    1.83 +            if test x$enable_libsamplerate_shared = xyes; then
    1.84 +                samplerate_lib=[`find_lib "libsamplerate.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.85 +                if test x$samplerate_lib != x; then
    1.86 +                    echo "-- dynamic samplerate -> $samplerate_lib"
    1.87 +                    AC_DEFINE_UNQUOTED(SDL_LIBSAMPLERATE_DYNAMIC, "$samplerate_lib", [ ])
    1.88 +                fi
    1.89 +            fi
    1.90 +        fi
    1.91 +    fi
    1.92 +}
    1.93 +
    1.94  dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
    1.95  dnl  Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
    1.96  CheckVisibilityHidden()
    1.97 @@ -1904,58 +1984,6 @@
    1.98      fi
    1.99  }
   1.100  
   1.101 -dnl Find FusionSound
   1.102 -CheckFusionSound()
   1.103 -{
   1.104 -    AC_ARG_ENABLE(fusionsound,
   1.105 -AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
   1.106 -                  , enable_fusionsound=no)
   1.107 -    if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
   1.108 -        fusionsound=no
   1.109 -
   1.110 -        FUSIONSOUND_REQUIRED_VERSION=1.1.1
   1.111 -
   1.112 -        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
   1.113 -        AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
   1.114 -        if test x$PKG_CONFIG != xno; then
   1.115 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
   1.116 -                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
   1.117 -                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
   1.118 -                fusionsound=yes
   1.119 -            fi
   1.120 -        fi
   1.121 -        AC_MSG_RESULT($fusionsound)
   1.122 -
   1.123 -        if test x$fusionsound = xyes; then
   1.124 -            AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND, 1, [ ])
   1.125 -            SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
   1.126 -            EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
   1.127 -            
   1.128 -            AC_ARG_ENABLE(fusionsound-shared,
   1.129 -AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
   1.130 -                          , enable_fusionsound_shared=yes)
   1.131 -            fusionsound_shared=no
   1.132 -            AC_MSG_CHECKING(for FusionSound dynamic loading support)
   1.133 -            if test x$have_loadso != xyes && \
   1.134 -               test x$enable_fusionsound_shared = xyes; then
   1.135 -                AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
   1.136 -            fi
   1.137 -            if test x$have_loadso = xyes && \
   1.138 -               test x$enable_fusionsound_shared = xyes; then
   1.139 -                AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so", [ ])
   1.140 -                fusionsound_shared=yes
   1.141 -                SUMMARY_audio="${SUMMARY_audio} fusionsound(dynamic)"
   1.142 -            else
   1.143 -                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
   1.144 -                SUMMARY_audio="${SUMMARY_audio} fusionsound"
   1.145 -            fi
   1.146 -            AC_MSG_RESULT($fusionsound_shared)
   1.147 -            
   1.148 -            have_audio=yes
   1.149 -        fi
   1.150 -    fi
   1.151 -}
   1.152 -
   1.153  dnl rcg04172001 Set up the Null video driver.
   1.154  CheckDummyVideo()
   1.155  {
   1.156 @@ -2968,9 +2996,10 @@
   1.157          CheckESD
   1.158          CheckNAS
   1.159          CheckSNDIO
   1.160 +        CheckFusionSound
   1.161 +        CheckLibSampleRate
   1.162          CheckX11
   1.163          CheckDirectFB
   1.164 -        CheckFusionSound
   1.165          CheckOpenGLX11
   1.166          CheckOpenGLESX11
   1.167          CheckMir