changeset 1004:57972eb8127a

prefix add to config.h
author pontscho
date Mon, 04 Jun 2001 18:23:10 +0000
parents 26579d6e6c38
children 90682d6f84f5
files configure
diffstat 1 files changed, 39 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Mon Jun 04 18:01:05 2001 +0000
+++ b/configure	Mon Jun 04 18:23:10 2001 +0000
@@ -111,6 +111,8 @@
 	--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 @@
 
 _gui=no;
 
+_alsa=yes
+
 for i in `echo $pparam`; do
 
  case "$i" in
@@ -568,6 +572,30 @@
 
 # ---
 
+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 @@
   --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 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 @@
  _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 @@
 
 /* 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