summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-04 18:23:10 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-04 18:23:10 +0000
commit359c17a1e796bef8cd831affb67c1db0015f7e2b (patch)
treea2319dc3941d7b7c644875a4f0ea9fa21c823620 /configure
parentd181e2c1c1b2d47965618f99180594f3755eb2b6 (diff)
downloadmpv-359c17a1e796bef8cd831affb67c1db0015f7e2b.tar.bz2
mpv-359c17a1e796bef8cd831affb67c1db0015f7e2b.tar.xz
prefix add to config.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1005 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure39
1 files changed, 39 insertions, 0 deletions
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 <sys/asoundlib.h>
+#include <soundcard.h>
+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 <sys/asoundlib.h>
+#include <soundcard.h>
+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