Make it possible to select the audio-output for configure

There are some-systems which have both header files installed...


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@633 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2004-03-09 22:50:16 +00:00
parent 1e9b0883e5
commit 7c01009a88

21
configure vendored
View File

@ -16,6 +16,7 @@ echo "# Generated by $0 $*" >Makeconf
cflags='-DKEYMAP_PATH=\"$(KEYMAP_PATH)\"' cflags='-DKEYMAP_PATH=\"$(KEYMAP_PATH)\"'
ldflags='' ldflags=''
rpath= rpath=
withsound='yes'
for arg in $*; do for arg in $*; do
optarg=`echo $arg | sed 's/[-a-z]*=//'` optarg=`echo $arg | sed 's/[-a-z]*=//'`
@ -70,6 +71,18 @@ case $arg in
--with-ipv6) --with-ipv6)
cflags="$cflags -DIPv6" cflags="$cflags -DIPv6"
;; ;;
--without-sound*)
withsound=no
;;
--with-sound)
withsound=yes
;;
--with-sound=oss)
withsound=$optarg
;;
--with-sound=sun)
withsound=$optarg
;;
*) *)
echo "Target directories:" echo "Target directories:"
echo " --prefix=PREFIX location for architecture-independent files" echo " --prefix=PREFIX location for architecture-independent files"
@ -91,6 +104,8 @@ case $arg in
echo " --with-debug-rdp5 enable debugging of RDP5 code" echo " --with-debug-rdp5 enable debugging of RDP5 code"
echo " --with-debug-clipboard enable debugging of clipboard code" echo " --with-debug-clipboard enable debugging of clipboard code"
echo " --with-ipv6 enable support for IPv6" echo " --with-ipv6 enable support for IPv6"
echo " --without-sound disable support for sound redirection"
echo " --with-sound=ARG only detect sound-support for \"oss\" or \"sun\" (and BSD)"
echo echo
rm -f Makeconf rm -f Makeconf
exit 1 exit 1
@ -263,19 +278,19 @@ fi
# Check for OSS sound support # Check for OSS sound support
if [ -f /usr/include/sys/soundcard.h ]; then if [ -f /usr/include/sys/soundcard.h -a \( "$withsound" = "yes" -o "$withsound" = "oss" \) ]; then
echo Sound support enabled: Open Sound System echo Sound support enabled: Open Sound System
echo echo
echo "SOUNDOBJ = rdpsnd.o rdpsnd_oss.o" >>Makeconf echo "SOUNDOBJ = rdpsnd.o rdpsnd_oss.o" >>Makeconf
cflags="$cflags -DWITH_RDPSND" cflags="$cflags -DWITH_RDPSND"
elif [ -f /usr/include/sys/audioio.h ]; then elif [ -f /usr/include/sys/audioio.h -a \( "$withsound" = "yes" -o "$withsound" = "sun" \) ]; then
echo Sound support enabled: Sun/BSD echo Sound support enabled: Sun/BSD
echo echo
echo "SOUNDOBJ = rdpsnd.o rdpsnd_sun.o" >>Makeconf echo "SOUNDOBJ = rdpsnd.o rdpsnd_sun.o" >>Makeconf
cflags="$cflags -DWITH_RDPSND" cflags="$cflags -DWITH_RDPSND"
else else
echo "WARNING: sound support disabled (no /usr/include/sys/soundcard.h or /usr/include/sys/audioio.h)" echo "WARNING: sound support disabled (no /usr/include/sys/soundcard.h or /usr/include/sys/audioio.h)"
echo "Currently supported systems are Open Sound System and Sun" echo "Currently supported systems are Open Sound System (oss) and Sun/BSD (sun)"
echo echo
fi fi