aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorVincent Bernat2018-02-17 12:50:19 +0100
committerEugene Sandulenko2018-04-08 09:17:19 +0200
commit9edd8eff0166c32fc2b5e07eaf0a37783a847ef3 (patch)
tree3899e7205ed46b47a619b7c718f04ec178557a11 /configure
parent73c56f13e005f34c1a95ccae1c4a70e4f51df35e (diff)
downloadscummvm-rg350-9edd8eff0166c32fc2b5e07eaf0a37783a847ef3.tar.gz
scummvm-rg350-9edd8eff0166c32fc2b5e07eaf0a37783a847ef3.tar.bz2
scummvm-rg350-9edd8eff0166c32fc2b5e07eaf0a37783a847ef3.zip
AUDIO: add support for OPL2LPT
The OPL2LPT is an OPL2 chip plugged on a parallel port. It is write-only but otherwise acts as a classic AdLib. This commit adds support for this device. User is expected to have the right permissions on the parallel port. By default, the first suitable parallel port is used. It is possible to override that with the hidden configuration setting "opl2lpt_parport". It depends on the presence of the libieee1284 library which abstracts a bit parallel port handling. An alternative would be to access directly /dev/parportX on Linux. This would amount of code but it would be Linux-only. Tested with Indy 3 and SOMI.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure b/configure
index e6ffba53b6..8e2a387acc 100755
--- a/configure
+++ b/configure
@@ -134,6 +134,7 @@ _tremor=auto
_tremolo=no
_flac=auto
_mad=auto
+_opl2lpt=no
_alsa=auto
_seq_midi=auto
_sndio=auto
@@ -1049,6 +1050,9 @@ Optional Libraries:
installed (optional)
--disable-fluidsynth disable fluidsynth MIDI driver [autodetect]
+ --with-ieee1284-prefix=DIR prefix where libieee1284 is installed (optional)
+ --enable-opl2lpt enable OPL2LPT support
+
--with-sparkle-prefix=DIR prefix where sparkle is installed
(OS X/Windows only - optional)
--disable-sparkle disable sparkle automatic update support
@@ -1134,6 +1138,8 @@ for ac_option in $@; do
--disable-vorbis) _vorbis=no ;;
--enable-tremor) _tremor=yes ;;
--disable-tremor) _tremor=no ;;
+ --enable-opl2lpt) _opl2lpt=yes ;;
+ --disable-opl2lpt) _opl2lpt=no ;;
--enable-flac) _flac=yes ;;
--disable-flac) _flac=no ;;
--enable-mad) _mad=yes ;;
@@ -1230,6 +1236,11 @@ for ac_option in $@; do
TREMOR_CFLAGS="-I$arg/include"
TREMOR_LIBS="-L$arg/lib"
;;
+ --with-ieee1284-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ IEEE1284_CFLAGS="-I$arg/include"
+ IEEE1284_LIBS="-L$arg/lib"
+ ;;
--with-flac-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
FLAC_CFLAGS="-I$arg/include"
@@ -4023,6 +4034,27 @@ add_to_config_mk_if_yes "$_tremor" 'USE_TREMOR = 1'
echo "$_tremor"
#
+# Check for IEEE1284 for OPL2lPT
+#
+echocheck "OPL2LPT"
+if test "$_opl2lpt" = yes ; then
+ _opl2lpt=no
+ cat > $TMPC << EOF
+#include <ieee1284.h>
+struct parport_list parports;
+int main(void) { ieee1284_find_ports(&parports, 0); return 0; }
+EOF
+ cc_check $IEEE1284_CFLAGS $IEEE1284_LIBS -lieee1284 && \
+ _opl2lpt=yes
+fi
+if test "$_opl2lpt" = yes; then
+ append_var LIBS "$IEEE1284_LIBS -lieee1284"
+ append_var INCLUDES "$IEEE1284_CFLAGS"
+fi
+define_in_config_if_yes "$_opl2lpt" 'ENABLE_OPL2LPT'
+echo "$_opl2lpt"
+
+#
# Check for FLAC
#
echocheck "FLAC >= 1.0.1"