mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
add and disable esd detection support ;)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1030 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
61948baa99
commit
1eb94e0c23
67
configure
vendored
67
configure
vendored
@ -6,6 +6,8 @@
|
||||
#
|
||||
# Changes in reversed order:
|
||||
#
|
||||
# 2001/06/05 by Pontscho
|
||||
# - added alsa and esd detection
|
||||
#
|
||||
# 2001/06/05 by Nick Kurshev
|
||||
# - added checking of kernel version
|
||||
@ -115,8 +117,9 @@ params:
|
||||
--enable-xmmp use XMMP audio drivers
|
||||
--enable-lirc enable LIRC (remote control) support
|
||||
|
||||
--disable-alsa disable alsa support [autodetect]
|
||||
|
||||
--disable-alsa disable alsa support [autodetect]
|
||||
--disable-esd disable esd sound support [autodetect]
|
||||
|
||||
--disable-gcc-checking disable gcc version checking
|
||||
|
||||
--disable-select disable audio select() support ( for example required this
|
||||
@ -292,6 +295,7 @@ _select='#define HAVE_AUDIO_SELECT'
|
||||
_gui=no;
|
||||
|
||||
_alsa=yes
|
||||
_esd=yes
|
||||
|
||||
for i in `echo $pparam`; do
|
||||
|
||||
@ -596,29 +600,37 @@ rm -f $TMPC $TMPO
|
||||
|
||||
cat > $TMPC << EOF
|
||||
#include <sys/asoundlib.h>
|
||||
#include <soundcard.h>
|
||||
int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==5)return 1; return 0; }
|
||||
#include <sys/soundcard.h>
|
||||
int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==5)return 0; return 1; }
|
||||
EOF
|
||||
|
||||
_alsaver='notfound'
|
||||
$_cc -o $TMPO -lasound $TMPC &> /dev/null || _alsa=no
|
||||
_alsaver='not found'
|
||||
$_cc -o $TMPO -lasound $TMPC 2> /dev/null || _alsa=no
|
||||
[ $_alsa == 'yes' ] && $TMPO && { _alsaver='0.5.x'; }
|
||||
|
||||
[ $_alsa == "yes" ] && $TMPO && { _alsaver='0.5.x'; }
|
||||
|
||||
if [ $_alsaver = 'notfound' ]; then
|
||||
if [ $_alsaver == 'not found' ]; then
|
||||
cat > $TMPC << EOF
|
||||
#include <sys/asoundlib.h>
|
||||
#include <soundcard.h>
|
||||
int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==9)return 1; return 0; }
|
||||
#include <sys/soundcard.h>
|
||||
int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==9)return 0; return 1; }
|
||||
EOF
|
||||
|
||||
_alsaver='notfound'
|
||||
$_cc -o $TMPO -lasound $TMPC &> /dev/null || _alsa=no
|
||||
[ $_alsa == "yes" ] && $TMPO && { _alsaver='0.9.x'; }
|
||||
_alsaver='not found'
|
||||
$_cc -o $TMPO -lasound $TMPC 2> /dev/null || _alsa=no
|
||||
[ $_alsa == 'yes' ] && $TMPO && { _alsaver='0.9.x'; }
|
||||
fi
|
||||
|
||||
# ---
|
||||
|
||||
cat > $TMPC << EOF
|
||||
#include <esd.h>
|
||||
int main( void ){ return 0; }
|
||||
EOF
|
||||
|
||||
$_cc -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no; }
|
||||
|
||||
# ---
|
||||
|
||||
# check for the parameters.
|
||||
|
||||
_prefix="/usr/local"
|
||||
@ -792,6 +804,9 @@ do
|
||||
_alsaver='notfound'
|
||||
_alsa=no
|
||||
;;
|
||||
--disable-esd)
|
||||
_esd=no
|
||||
;;
|
||||
--with-win32libdir=*)
|
||||
_win32libdir=`echo $ac_option | cut -d '=' -f 2`
|
||||
_win32libdirnotify=no
|
||||
@ -936,6 +951,7 @@ echo "Checking for PNG support ... $_png"
|
||||
echo "Checking for DirectShow ... $_dshow"
|
||||
echo "Checking for fastmemcpy ... $_fastmemcpy"
|
||||
echo "Checking for alsa ... $_alsaver"
|
||||
echo "Checking for esd ... $_esd"
|
||||
# write conf files.
|
||||
|
||||
if [ $_gl = yes ]; then
|
||||
@ -1221,13 +1237,18 @@ else
|
||||
_gui='#undef HAVE_GUI'
|
||||
fi
|
||||
|
||||
if [ "$_alsaver" != "notfound" ]; then
|
||||
[ $_alsaver == '0.5.x' ] && { _aosrc="$_aosrc ao_alsa5.c"; $_alsa='#define HAVE_ALSA5'; }
|
||||
# [ $_alsaver == '0.9.x' ] && { _aosrc="$_aosrc ao_alsa9.c"; }
|
||||
else
|
||||
_alsa=' '
|
||||
_alsa5='#undef HAVE_ALSA5'
|
||||
_alsa9='#undef HAVE_ALSA9'
|
||||
if [ $_alsa == 'yes' ]; then
|
||||
[ $_alsaver == '0.5.x' ] && { _aosrc="$_aosrc ao_alsa5.c"; _alsa5='#define HAVE_ALSA5'; }
|
||||
# [ $_alsaver == '0.9.x' ] && { _aosrc="$_aosrc ao_alsa9.c"; _alsa9='#define HAVE_ALSA9'; }
|
||||
fi
|
||||
|
||||
|
||||
_esdd='#undef HAVE_ESD'
|
||||
if [ $_esd == 'yes' ]; then
|
||||
_esdd='#undef HAVE_ESD'
|
||||
fi
|
||||
|
||||
cat > $CCONF << EOF
|
||||
|
||||
/* -------- Generated by ./configure ----------- */
|
||||
@ -1296,8 +1317,10 @@ $_fastmemcpy
|
||||
$_gui
|
||||
#define PREFIX "$_prefix"
|
||||
|
||||
/* ALSA support */
|
||||
$_alsa
|
||||
/* Audio lib drivers */
|
||||
$_alsa5
|
||||
$_alsa9
|
||||
$_esdd
|
||||
|
||||
/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
|
||||
#undef FAST_OSD
|
||||
|
Loading…
Reference in New Issue
Block a user