summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorgabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-15 18:35:17 +0000
committergabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-15 18:35:17 +0000
commit6ead487b065fb66adad951f585919a8258c6bf10 (patch)
tree56683cb0264ae0b37874e6924498351def73095b /configure
parent77c23fbd26336f7d62b4db6842577c8573b3c271 (diff)
downloadmpv-6ead487b065fb66adad951f585919a8258c6bf10.tar.bz2
mpv-6ead487b065fb66adad951f585919a8258c6bf10.tar.xz
Pontscho's mixer, select, and hell-a-lot-of-stuff patch ;)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@441 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure126
1 files changed, 68 insertions, 58 deletions
diff --git a/configure b/configure
index d49fb504a9..90b1551a6d 100755
--- a/configure
+++ b/configure
@@ -6,6 +6,10 @@
#
# Changes in reversed order:
#
+# 2001/04/15 by Pontscho
+# - added --disable-select option
+# - added X11DIR variable in config.mak and fix syncfb Makefile -L/usr/X11/lib bug
+#
# 2001/03/24 by Mike Graffam:
# - added autodetect code for XF86VidMode, along with explicit --enable-vm
#
@@ -89,7 +93,10 @@ params:
--enable-termcap use termcap database for key codes
--enable-xmmp use XMMP audio drivers
- --enable-lirc enable LIRC (remote control) support
+ --enable-lirc enable LIRC ( remote control ) support
+
+ --disable-select disable audio select() support ( for example required this
+ option ALSA or Vortex2 driver )
--with-x11libdir=DIR X library files are in DIR
--with-win32libdir=DIR windows codec files
@@ -130,16 +137,6 @@ MCONF='config.mak'
# --- Check for C compiler:
_cc=gcc
-_x11=auto
-
-_x11libdir=
-if [ -e /usr/X11R6 ]; then
- _x11libdir=-L/usr/X11R6/lib
-else
- if [ -e /usr/X11 ]; then
- _x11libdir=-L/usr/X11/lib
- fi
-fi
for ac_option
do
@@ -147,15 +144,6 @@ do
--cc=*)
_cc=`echo $ac_option | cut -d '=' -f 2`
;;
- --with-x11libdir=*)
- _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
- ;;
- --enable-x11)
- _x11=yes
- ;;
- --disable-x11)
- _x11=no
- ;;
esac
done
@@ -182,6 +170,7 @@ _gl=no
_sdl=no
_xv=no
_vm=no
+_x11=no
_3dfx=no
_syncfb=no
_mlib=no
@@ -190,7 +179,7 @@ _xmga=no
_dga=no
_dga2=no
_svga=no
-_fbdev=yes
+_fbdev=no
_lirc=no
_xdpms=no
@@ -199,8 +188,11 @@ _y=1
_gllib=
_sdllib=
-_xvlib=
_x11lib=
+_xvlib=
+_xlibdir=
+
+_select='#define HAVE_AUDIO_SELECT'
for i in `echo $pparam`; do
@@ -237,6 +229,13 @@ for i in `echo $pparam`; do
done
+if [ -e /usr/X11R6 ]; then
+ _x11libdir=-L/usr/X11R6/lib
+else
+ if [ -e /usr/X11 ]; then
+ _x11libdir=-L/usr/X11/lib
+ fi
+fi
_win32libdirnotify=no
if [ -e /usr/lib/win32 ]; then
@@ -376,15 +375,21 @@ fi
#echo "DONE (${proc})."
-$_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes
+# check GL & X11 & Xext & Xv & SDL & termcap libs
-$_cc $TMPC -o $TMPO -lpthread &> /dev/null || \
+$_cc $TMPC -o $TMPO $_x11libdir/ -lGL &> /dev/null && _gl=yes
+$_cc $TMPC -o $TMPO $_x11libdir/ -lXxf86vm &> /dev/null && _vm=yes
+$_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes
+$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes
+$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes
+$_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes
+$_cc $TMPC -o $TMPO $_x11libdir -L/usr/local/lib/ -lpthread &> /dev/null || \
{ echo "Lib pthread not found."; rm -f $TMPC $TMPO ; exit 1; }
# SDL disabled by default (0.11pre22-) because of the compilation problems
# this is very buggy & experimental code, use it only if you really need it!!
_have_sdl=no
-$_cc $TMPC -o $TMPO -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes
+$_cc $TMPC -o $TMPO $_x11libdir -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes
_termcap=no
$_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes
@@ -392,28 +397,7 @@ $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes
_binutils=no
as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes
-# ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) --------------
-
-if [ $_x11 = auto ]; then
- _x11=no
- $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes
-fi
-
-if [ $_x11 = yes ]; then
-
-$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes
-$_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes
-
-$_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null && _gl=yes
-
-cat > $TMPC << EOF
-#include <GL/gl.h>
-int main( void ) { return 0; }
-EOF
-$_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null || \
- { _gl=no; echo "GL includes not found!";}
-
-$_cc $TMPC -o $TMPO $_x11libdir -lXxf86vm &> /dev/null && _vm=yes
+# LGB: Check DGA
cat > $TMPC << EOF
#include <stdio.h>
@@ -422,6 +406,7 @@ cat > $TMPC << EOF
int main (void) { return 0;}
EOF
+_dga=no
$_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga=yes
# Note: the -lXxf86vm library is the VideoMode extension and though it's
# not needed for DGA, AFAIK every distribution packages together with DGA
@@ -429,6 +414,8 @@ $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXx
# for further mplayer versions to set resolution by mplayer itself.
# If you run into problems, remove '-lXxf86vm'.
+# ---
+
# Check if DGA is 2.0 or greater
cat > $TMPC << EOF
#include <stdio.h>
@@ -440,10 +427,24 @@ EOF
_dga2=no
$_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=yes
-fi
+
+cat > $TMPC << EOF
+#include <GL/gl.h>
+int main( void ) { return 0; }
+EOF
+
+$_cc $TMPC -o $TMPO $_x11libdir/ -lGL &> /dev/null || \
+ { _gl=no; echo "GL includes not found!";}
rm -f $TMPC $TMPO
+
+if [ $_x11 = 'yes' ]; then
+ if [ $_mga = 'yes' ]; then
+ _xmga=yes
+ fi
+fi
+
# ---
# check for the parameters.
@@ -493,6 +494,9 @@ do
--enable-vm)
_vm=yes
;;
+ --enable-x11)
+ _x11=yes
+ ;;
--enable-3dfx)
_3dfx=yes
;;
@@ -514,6 +518,9 @@ do
--enable-lirc)
_lirc=yes
;;
+ --enable-select)
+ _select='#define HAVE_AUDIO_SELECT'
+ ;;
--disable-sse)
_sse=no
;;
@@ -545,6 +552,9 @@ do
--disable-vm)
_vm=no
;;
+ --disable-x11)
+ _x11=no
+ ;;
--disable-mlib)
_mlib=no
;;
@@ -563,6 +573,12 @@ do
--disable-termcap)
_termcap=no
;;
+ --disable-select)
+ _select='#undef HAVE_AUDIO_SELECT'
+ ;;
+ --with-x11libdir=*)
+ _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
+ ;;
--with-win32libdir=*)
_win32libdir=`echo $ac_option | cut -d '=' -f 2`
_win32libdirnotify=no
@@ -573,19 +589,11 @@ do
--size-y=*)
_y=`echo $ac_option | cut -d '=' -f 2`
;;
- --with-x11libdir=*)
- ;;
--cc=*)
;;
esac
done
-if [ $_x11 = 'yes' ]; then
- if [ $_mga = 'yes' ]; then
- _xmga=yes
- fi
-fi
-
# to screen.
echo "Using C compiler: $_cc"
echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )"
@@ -675,10 +683,12 @@ cat > $MCONF << EOF
AR=ar
CC=$_cc
+X11DIR=$_x11libdir
# OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -ffast-math
# LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib
-X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
+# X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
+X_LIBS=\$(X11DIR) $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
TERMCAP_LIB=$_libtermcap
XMM_LIBS = $_xmmplibs
LIRC_LIBS = $_lirclibs
@@ -837,7 +847,7 @@ cat > $CCONF << EOF
/* Undefine this if your soundcard driver has no working select().
If you have kernel Oops, player hangups, or just no audio, you should
try to recompile MPlayer with this option disabled! */
-#define HAVE_AUDIO_SELECT
+$_select
/* You have a choice for MP3 decoding: mp3lib(mpg123) or Win32(l3codeca.acm)
#define this if you prefer mpg123 (with 3Dnow! support) than l3codeca.acm