configure
changeset 11081 eea7f98a37e4
parent 11028 25cd7fe50180
child 11090 d85832ad10c3
     1.1 --- a/configure	Thu Jun 08 22:40:35 2017 +0200
     1.2 +++ b/configure	Thu Jun 08 13:27:58 2017 -0400
     1.3 @@ -658,10 +658,10 @@
     1.4  X_CFLAGS
     1.5  XMKMF
     1.6  ARTSCONFIG
     1.7 -PKG_CONFIG
     1.8  ESD_LIBS
     1.9  ESD_CFLAGS
    1.10  ESD_CONFIG
    1.11 +PKG_CONFIG
    1.12  ALSA_LIBS
    1.13  ALSA_CFLAGS
    1.14  POW_LIB
    1.15 @@ -806,6 +806,8 @@
    1.16  with_alsa_inc_prefix
    1.17  enable_alsatest
    1.18  enable_alsa_shared
    1.19 +enable_jack
    1.20 +enable_jack_shared
    1.21  enable_esd
    1.22  with_esd_prefix
    1.23  with_esd_exec_prefix
    1.24 @@ -1535,6 +1537,8 @@
    1.25    --enable-alsa           support the ALSA audio API [[default=yes]]
    1.26    --disable-alsatest      Do not try to compile and run a test Alsa program
    1.27    --enable-alsa-shared    dynamically load ALSA audio support [[default=yes]]
    1.28 +  --enable-jack           use JACK audio [[default=yes]]
    1.29 +  --enable-jack-shared    dynamically load JACK audio support [[default=yes]]
    1.30    --enable-esd            support the Enlightened Sound Daemon [[default=yes]]
    1.31    --disable-esdtest       Do not try to compile and run a test ESD program
    1.32    --enable-esd-shared     dynamically load ESD audio support [[default=yes]]
    1.33 @@ -17870,6 +17874,119 @@
    1.34      fi
    1.35  }
    1.36  
    1.37 +CheckJACK()
    1.38 +{
    1.39 +    # Check whether --enable-jack was given.
    1.40 +if test "${enable_jack+set}" = set; then :
    1.41 +  enableval=$enable_jack;
    1.42 +else
    1.43 +  enable_jack=yes
    1.44 +fi
    1.45 +
    1.46 +    if test x$enable_audio = xyes -a x$enable_jack = xyes; then
    1.47 +        audio_jack=no
    1.48 +
    1.49 +        JACK_REQUIRED_VERSION=0.125
    1.50 +
    1.51 +        # Extract the first word of "pkg-config", so it can be a program name with args.
    1.52 +set dummy pkg-config; ac_word=$2
    1.53 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    1.54 +$as_echo_n "checking for $ac_word... " >&6; }
    1.55 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
    1.56 +  $as_echo_n "(cached) " >&6
    1.57 +else
    1.58 +  case $PKG_CONFIG in
    1.59 +  [\\/]* | ?:[\\/]*)
    1.60 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
    1.61 +  ;;
    1.62 +  *)
    1.63 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    1.64 +for as_dir in $PATH
    1.65 +do
    1.66 +  IFS=$as_save_IFS
    1.67 +  test -z "$as_dir" && as_dir=.
    1.68 +    for ac_exec_ext in '' $ac_executable_extensions; do
    1.69 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    1.70 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    1.71 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    1.72 +    break 2
    1.73 +  fi
    1.74 +done
    1.75 +  done
    1.76 +IFS=$as_save_IFS
    1.77 +
    1.78 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
    1.79 +  ;;
    1.80 +esac
    1.81 +fi
    1.82 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
    1.83 +if test -n "$PKG_CONFIG"; then
    1.84 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
    1.85 +$as_echo "$PKG_CONFIG" >&6; }
    1.86 +else
    1.87 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    1.88 +$as_echo "no" >&6; }
    1.89 +fi
    1.90 +
    1.91 +
    1.92 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK $JACK_REQUIRED_VERSION support" >&5
    1.93 +$as_echo_n "checking for JACK $JACK_REQUIRED_VERSION support... " >&6; }
    1.94 +        if test x$PKG_CONFIG != xno; then
    1.95 +        if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
    1.96 +                JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
    1.97 +                JACK_LIBS=`$PKG_CONFIG --libs jack`
    1.98 +                audio_jack=yes
    1.99 +            fi
   1.100 +        fi
   1.101 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_jack" >&5
   1.102 +$as_echo "$audio_jack" >&6; }
   1.103 +
   1.104 +        if test x$audio_jack = xyes; then
   1.105 +            # Check whether --enable-jack-shared was given.
   1.106 +if test "${enable_jack_shared+set}" = set; then :
   1.107 +  enableval=$enable_jack_shared;
   1.108 +else
   1.109 +  enable_jack_shared=yes
   1.110 +fi
   1.111 +
   1.112 +            jack_lib=`find_lib "libjack.so.*" "$JACK_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
   1.113 +
   1.114 +
   1.115 +$as_echo "#define SDL_AUDIO_DRIVER_JACK 1" >>confdefs.h
   1.116 +
   1.117 +            SOURCES="$SOURCES $srcdir/src/audio/jack/*.c"
   1.118 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $JACK_CFLAGS"
   1.119 +            if test x$have_loadso != xyes && \
   1.120 +               test x$enable_jack_shared = xyes; then
   1.121 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic JACK audio loading" >&5
   1.122 +$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic JACK audio loading" >&2;}
   1.123 +            fi
   1.124 +            if test x$have_loadso = xyes && \
   1.125 +               test x$enable_jack_shared = xyes && test x$jack_lib != x; then
   1.126 +                echo "-- dynamic libjack -> $jack_lib"
   1.127 +
   1.128 +cat >>confdefs.h <<_ACEOF
   1.129 +#define SDL_AUDIO_DRIVER_JACK_DYNAMIC "$jack_lib"
   1.130 +_ACEOF
   1.131 +
   1.132 +                SUMMARY_audio="${SUMMARY_audio} jack(dynamic)"
   1.133 +
   1.134 +                case "$host" in
   1.135 +                    # On Solaris, jack must be linked deferred explicitly
   1.136 +                    # to prevent undefined symbol failures.
   1.137 +                    *-*-solaris*)
   1.138 +                        JACK_LIBS=`echo $JACK_LIBS | sed 's/\-l/-Wl,-l/g'`
   1.139 +                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $JACK_LIBS -Wl,-znodeferred"
   1.140 +                esac
   1.141 +            else
   1.142 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $JACK_LIBS"
   1.143 +                SUMMARY_audio="${SUMMARY_audio} jack"
   1.144 +            fi
   1.145 +            have_audio=yes
   1.146 +        fi
   1.147 +    fi
   1.148 +}
   1.149 +
   1.150  CheckESD()
   1.151  {
   1.152      # Check whether --enable-esd was given.
   1.153 @@ -23264,6 +23381,7 @@
   1.154          CheckOSS
   1.155          CheckALSA
   1.156          CheckPulseAudio
   1.157 +        CheckJACK
   1.158          CheckARTSC
   1.159          CheckESD
   1.160          CheckNAS