configure
changeset 10777 2883d23b5a28
parent 10660 1ae4e8001b73
child 10787 2a0bcfc4d35c
     1.1 --- a/configure	Fri Jan 06 21:23:51 2017 -0500
     1.2 +++ b/configure	Fri Jan 06 20:43:53 2017 -0800
     1.3 @@ -818,8 +818,12 @@
     1.4  enable_nas_shared
     1.5  enable_sndio
     1.6  enable_sndio_shared
     1.7 +enable_fusionsound
     1.8 +enable_fusionsound_shared
     1.9  enable_diskaudio
    1.10  enable_dummyaudio
    1.11 +enable_libsamplerate
    1.12 +enable_libsamplerate_shared
    1.13  enable_video_wayland
    1.14  enable_video_wayland_qt_touch
    1.15  enable_wayland_shared
    1.16 @@ -840,8 +844,6 @@
    1.17  enable_video_cocoa
    1.18  enable_video_directfb
    1.19  enable_directfb_shared
    1.20 -enable_fusionsound
    1.21 -enable_fusionsound_shared
    1.22  enable_video_dummy
    1.23  enable_video_opengl
    1.24  enable_video_opengles
    1.25 @@ -1544,8 +1546,16 @@
    1.26    --enable-nas-shared     dynamically load NAS audio support [[default=yes]]
    1.27    --enable-sndio          support the sndio audio API [[default=yes]]
    1.28    --enable-sndio-shared   dynamically load sndio audio support [[default=yes]]
    1.29 +  --enable-fusionsound    use FusionSound audio driver [[default=no]]
    1.30 +  --enable-fusionsound-shared
    1.31 +                          dynamically load fusionsound audio support
    1.32 +                          [[default=yes]]
    1.33    --enable-diskaudio      support the disk writer audio driver [[default=yes]]
    1.34    --enable-dummyaudio     support the dummy audio driver [[default=yes]]
    1.35 +  --enable-libsamplerate  use libsamplerate for audio rate conversion
    1.36 +                          [[default=yes]]
    1.37 +  --enable-libsamplerate-shared
    1.38 +                          dynamically load libsamplerate [[default=yes]]
    1.39    --enable-video-wayland  use Wayland video driver [[default=yes]]
    1.40    --enable-video-wayland-qt-touch
    1.41                            QtWayland server support for Wayland video driver
    1.42 @@ -1576,10 +1586,6 @@
    1.43    --enable-video-directfb use DirectFB video driver [[default=no]]
    1.44    --enable-directfb-shared
    1.45                            dynamically load directfb support [[default=yes]]
    1.46 -  --enable-fusionsound    use FusionSound audio driver [[default=no]]
    1.47 -  --enable-fusionsound-shared
    1.48 -                          dynamically load fusionsound audio support
    1.49 -                          [[default=yes]]
    1.50    --enable-video-dummy    use dummy video driver [[default=yes]]
    1.51    --enable-video-opengl   include OpenGL support [[default=yes]]
    1.52    --enable-video-opengles include OpenGL ES support [[default=yes]]
    1.53 @@ -18547,6 +18553,116 @@
    1.54      fi
    1.55  }
    1.56  
    1.57 +CheckFusionSound()
    1.58 +{
    1.59 +    # Check whether --enable-fusionsound was given.
    1.60 +if test "${enable_fusionsound+set}" = set; then :
    1.61 +  enableval=$enable_fusionsound;
    1.62 +else
    1.63 +  enable_fusionsound=no
    1.64 +fi
    1.65 +
    1.66 +    if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
    1.67 +        fusionsound=no
    1.68 +
    1.69 +        FUSIONSOUND_REQUIRED_VERSION=1.1.1
    1.70 +
    1.71 +        # Extract the first word of "pkg-config", so it can be a program name with args.
    1.72 +set dummy pkg-config; ac_word=$2
    1.73 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    1.74 +$as_echo_n "checking for $ac_word... " >&6; }
    1.75 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
    1.76 +  $as_echo_n "(cached) " >&6
    1.77 +else
    1.78 +  case $PKG_CONFIG in
    1.79 +  [\\/]* | ?:[\\/]*)
    1.80 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
    1.81 +  ;;
    1.82 +  *)
    1.83 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    1.84 +for as_dir in $PATH
    1.85 +do
    1.86 +  IFS=$as_save_IFS
    1.87 +  test -z "$as_dir" && as_dir=.
    1.88 +    for ac_exec_ext in '' $ac_executable_extensions; do
    1.89 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    1.90 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    1.91 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    1.92 +    break 2
    1.93 +  fi
    1.94 +done
    1.95 +  done
    1.96 +IFS=$as_save_IFS
    1.97 +
    1.98 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
    1.99 +  ;;
   1.100 +esac
   1.101 +fi
   1.102 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.103 +if test -n "$PKG_CONFIG"; then
   1.104 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.105 +$as_echo "$PKG_CONFIG" >&6; }
   1.106 +else
   1.107 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.108 +$as_echo "no" >&6; }
   1.109 +fi
   1.110 +
   1.111 +
   1.112 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support" >&5
   1.113 +$as_echo_n "checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support... " >&6; }
   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 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound" >&5
   1.122 +$as_echo "$fusionsound" >&6; }
   1.123 +
   1.124 +        if test x$fusionsound = xyes; then
   1.125 +
   1.126 +$as_echo "#define SDL_AUDIO_DRIVER_FUSIONSOUND 1" >>confdefs.h
   1.127 +
   1.128 +            SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
   1.129 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
   1.130 +
   1.131 +            # Check whether --enable-fusionsound-shared was given.
   1.132 +if test "${enable_fusionsound_shared+set}" = set; then :
   1.133 +  enableval=$enable_fusionsound_shared;
   1.134 +else
   1.135 +  enable_fusionsound_shared=yes
   1.136 +fi
   1.137 +
   1.138 +            fusionsound_shared=no
   1.139 +            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound dynamic loading support" >&5
   1.140 +$as_echo_n "checking for FusionSound dynamic loading support... " >&6; }
   1.141 +            if test x$have_loadso != xyes && \
   1.142 +               test x$enable_fusionsound_shared = xyes; then
   1.143 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic fusionsound loading" >&5
   1.144 +$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic fusionsound loading" >&2;}
   1.145 +            fi
   1.146 +            if test x$have_loadso = xyes && \
   1.147 +               test x$enable_fusionsound_shared = xyes; then
   1.148 +
   1.149 +cat >>confdefs.h <<_ACEOF
   1.150 +#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so"
   1.151 +_ACEOF
   1.152 +
   1.153 +                fusionsound_shared=yes
   1.154 +                SUMMARY_audio="${SUMMARY_audio} fusionsound(dynamic)"
   1.155 +            else
   1.156 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
   1.157 +                SUMMARY_audio="${SUMMARY_audio} fusionsound"
   1.158 +            fi
   1.159 +            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound_shared" >&5
   1.160 +$as_echo "$fusionsound_shared" >&6; }
   1.161 +
   1.162 +            have_audio=yes
   1.163 +        fi
   1.164 +    fi
   1.165 +}
   1.166 +
   1.167  CheckDiskAudio()
   1.168  {
   1.169      # Check whether --enable-diskaudio was given.
   1.170 @@ -18583,6 +18699,52 @@
   1.171      fi
   1.172  }
   1.173  
   1.174 +CheckLibSampleRate()
   1.175 +{
   1.176 +    # Check whether --enable-libsamplerate was given.
   1.177 +if test "${enable_libsamplerate+set}" = set; then :
   1.178 +  enableval=$enable_libsamplerate;
   1.179 +else
   1.180 +  enable_libsamplerate=yes
   1.181 +fi
   1.182 +
   1.183 +    if test x$enable_libsamplerate = xyes; then
   1.184 +        ac_fn_c_check_header_mongrel "$LINENO" "samplerate.h" "ac_cv_header_samplerate_h" "$ac_includes_default"
   1.185 +if test "x$ac_cv_header_samplerate_h" = xyes; then :
   1.186 +  have_samplerate_h_hdr=yes
   1.187 +else
   1.188 +  have_samplerate_h_hdr=no
   1.189 +fi
   1.190 +
   1.191 +
   1.192 +        if test x$have_samplerate_h_hdr = xyes; then
   1.193 +
   1.194 +$as_echo "#define HAVE_LIBSAMPLERATE_H 1" >>confdefs.h
   1.195 +
   1.196 +
   1.197 +            # Check whether --enable-libsamplerate-shared was given.
   1.198 +if test "${enable_libsamplerate_shared+set}" = set; then :
   1.199 +  enableval=$enable_libsamplerate_shared;
   1.200 +else
   1.201 +  enable_libsamplerate_shared=yes
   1.202 +fi
   1.203 +
   1.204 +
   1.205 +            if test x$enable_libsamplerate_shared = xyes; then
   1.206 +                samplerate_lib=`find_lib "libsamplerate.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`
   1.207 +                if test x$samplerate_lib != x; then
   1.208 +                    echo "-- dynamic samplerate -> $samplerate_lib"
   1.209 +
   1.210 +cat >>confdefs.h <<_ACEOF
   1.211 +#define SDL_LIBSAMPLERATE_DYNAMIC "$samplerate_lib"
   1.212 +_ACEOF
   1.213 +
   1.214 +                fi
   1.215 +            fi
   1.216 +        fi
   1.217 +    fi
   1.218 +}
   1.219 +
   1.220  CheckVisibilityHidden()
   1.221  {
   1.222      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -fvisibility=hidden option" >&5
   1.223 @@ -20959,116 +21121,6 @@
   1.224      fi
   1.225  }
   1.226  
   1.227 -CheckFusionSound()
   1.228 -{
   1.229 -    # Check whether --enable-fusionsound was given.
   1.230 -if test "${enable_fusionsound+set}" = set; then :
   1.231 -  enableval=$enable_fusionsound;
   1.232 -else
   1.233 -  enable_fusionsound=no
   1.234 -fi
   1.235 -
   1.236 -    if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
   1.237 -        fusionsound=no
   1.238 -
   1.239 -        FUSIONSOUND_REQUIRED_VERSION=1.1.1
   1.240 -
   1.241 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.242 -set dummy pkg-config; ac_word=$2
   1.243 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.244 -$as_echo_n "checking for $ac_word... " >&6; }
   1.245 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.246 -  $as_echo_n "(cached) " >&6
   1.247 -else
   1.248 -  case $PKG_CONFIG in
   1.249 -  [\\/]* | ?:[\\/]*)
   1.250 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.251 -  ;;
   1.252 -  *)
   1.253 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.254 -for as_dir in $PATH
   1.255 -do
   1.256 -  IFS=$as_save_IFS
   1.257 -  test -z "$as_dir" && as_dir=.
   1.258 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.259 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.260 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.261 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.262 -    break 2
   1.263 -  fi
   1.264 -done
   1.265 -  done
   1.266 -IFS=$as_save_IFS
   1.267 -
   1.268 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.269 -  ;;
   1.270 -esac
   1.271 -fi
   1.272 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.273 -if test -n "$PKG_CONFIG"; then
   1.274 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.275 -$as_echo "$PKG_CONFIG" >&6; }
   1.276 -else
   1.277 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.278 -$as_echo "no" >&6; }
   1.279 -fi
   1.280 -
   1.281 -
   1.282 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support" >&5
   1.283 -$as_echo_n "checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support... " >&6; }
   1.284 -        if test x$PKG_CONFIG != xno; then
   1.285 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
   1.286 -                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
   1.287 -                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
   1.288 -                fusionsound=yes
   1.289 -            fi
   1.290 -        fi
   1.291 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound" >&5
   1.292 -$as_echo "$fusionsound" >&6; }
   1.293 -
   1.294 -        if test x$fusionsound = xyes; then
   1.295 -
   1.296 -$as_echo "#define SDL_AUDIO_DRIVER_FUSIONSOUND 1" >>confdefs.h
   1.297 -
   1.298 -            SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
   1.299 -            EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
   1.300 -
   1.301 -            # Check whether --enable-fusionsound-shared was given.
   1.302 -if test "${enable_fusionsound_shared+set}" = set; then :
   1.303 -  enableval=$enable_fusionsound_shared;
   1.304 -else
   1.305 -  enable_fusionsound_shared=yes
   1.306 -fi
   1.307 -
   1.308 -            fusionsound_shared=no
   1.309 -            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound dynamic loading support" >&5
   1.310 -$as_echo_n "checking for FusionSound dynamic loading support... " >&6; }
   1.311 -            if test x$have_loadso != xyes && \
   1.312 -               test x$enable_fusionsound_shared = xyes; then
   1.313 -                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic fusionsound loading" >&5
   1.314 -$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic fusionsound loading" >&2;}
   1.315 -            fi
   1.316 -            if test x$have_loadso = xyes && \
   1.317 -               test x$enable_fusionsound_shared = xyes; then
   1.318 -
   1.319 -cat >>confdefs.h <<_ACEOF
   1.320 -#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so"
   1.321 -_ACEOF
   1.322 -
   1.323 -                fusionsound_shared=yes
   1.324 -                SUMMARY_audio="${SUMMARY_audio} fusionsound(dynamic)"
   1.325 -            else
   1.326 -                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
   1.327 -                SUMMARY_audio="${SUMMARY_audio} fusionsound"
   1.328 -            fi
   1.329 -            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound_shared" >&5
   1.330 -$as_echo "$fusionsound_shared" >&6; }
   1.331 -
   1.332 -            have_audio=yes
   1.333 -        fi
   1.334 -    fi
   1.335 -}
   1.336 -
   1.337  CheckDummyVideo()
   1.338  {
   1.339      # Check whether --enable-video-dummy was given.
   1.340 @@ -23144,9 +23196,10 @@
   1.341          CheckESD
   1.342          CheckNAS
   1.343          CheckSNDIO
   1.344 +        CheckFusionSound
   1.345 +        CheckLibSampleRate
   1.346          CheckX11
   1.347          CheckDirectFB
   1.348 -        CheckFusionSound
   1.349          CheckOpenGLX11
   1.350          CheckOpenGLESX11
   1.351          CheckMir