From 359c17a1e796bef8cd831affb67c1db0015f7e2b Mon Sep 17 00:00:00 2001 From: pontscho Date: Mon, 4 Jun 2001 18:23:10 +0000 Subject: prefix add to config.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1005 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 1e19508495..2bf6e89ebd 100755 --- a/configure +++ b/configure @@ -111,6 +111,8 @@ params: --enable-xmmp use XMMP audio drivers --enable-lirc enable LIRC (remote control) support + --disable-alsa disable alsa support [autodetect] + --disable-gcc-checking disable gcc version checking --disable-select disable audio select() support ( for example required this @@ -274,6 +276,8 @@ _select='#define HAVE_AUDIO_SELECT' _gui=no; +_alsa=yes + for i in `echo $pparam`; do case "$i" in @@ -568,6 +572,30 @@ rm -f $TMPC $TMPO # --- +cat > $TMPC << EOF +#include +#include +int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==5)return 1; return 0; } +EOF + +_alsaver='not found' +$_cc -o $TMPO -lasound $TMPC &> /dev/null || _alsa=no +[ $_alsa == "yes" ] && $TMPO && { _alsaver='0.5.x'; } + +if [ $_alsaver == 'not found' ]; then +cat > $TMPC << EOF +#include +#include +int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==9)return 1; return 0; } +EOF + +_alsaver='not found' +$_cc -o $TMPO -lasound $TMPC &> /dev/null || _alsa=no +[ $_alsa == "yes" ] && $TMPO && { _alsaver='0.9.x'; } +fi + +# --- + # check for the parameters. _prefix="/usr/local" @@ -737,6 +765,10 @@ do --disable-gui) _gui=no ;; + --disable-alsa) + _alsaver='not found' + _alsa=no + ;; --with-win32libdir=*) _win32libdir=`echo $ac_option | cut -d '=' -f 2` _win32libdirnotify=no @@ -847,6 +879,7 @@ echo "Checking for DeCSS support ... $_css" echo "Checking for PNG support ... $_png" echo "Checking for DirectShow ... $_dshow" echo "Checking for fastmemcpy ... $_fastmemcpy" +echo "Checking for alsa ... $_alsaver" # write conf files. if [ $_gl = yes ]; then @@ -1132,6 +1165,11 @@ else _gui='#undef HAVE_GUI' fi +if [ $_alsaver != 'not found' ]; then + [ $_alsaver == '0.5.x' ] && { _aosrc="$_aosrc ao_alsa5.c"; } +# [ $_alsaver == '0.9.x' ] && { _aosrc="$_aosrc ao_alsa9.c"; } +fi + cat > $CCONF << EOF /* -------- Generated by ./configure ----------- */ @@ -1198,6 +1236,7 @@ $_fastmemcpy /* gui support, please do not edit this option */ $_gui +#define PREFIX "$_prefix" /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */ #undef FAST_OSD -- cgit v1.2.3