diff configure @ 448:198b46b739d8

qrva eletbe nem kene cvs-t elbaszni inkabb ne nyuljatok hozza baz+
author arpi_esp
date Sun, 15 Apr 2001 20:31:58 +0000
parents d19a3da6ac13
children 5062115afefd
line wrap: on
line diff
--- a/configure	Sun Apr 15 19:35:34 2001 +0000
+++ b/configure	Sun Apr 15 20:31:58 2001 +0000
@@ -6,10 +6,6 @@
 #
 # 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
 #
@@ -93,10 +89,7 @@
 
 	--enable-termcap	use termcap database for key codes
 	--enable-xmmp	        use XMMP audio drivers
-	--enable-lirc	        enable LIRC ( remote control ) support
-	
-	--disable-select        disable audio select() support ( for example required this
-	                        option ALSA or Vortex2 driver )
+	--enable-lirc	        enable LIRC (remote control) support
 
         --with-x11libdir=DIR    X library files are in DIR
         --with-win32libdir=DIR  windows codec files
@@ -137,6 +130,16 @@
 # ---  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
@@ -144,6 +147,15 @@
   --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
 
@@ -170,7 +182,6 @@
 _sdl=no
 _xv=no
 _vm=no
-_x11=no
 _3dfx=no
 _syncfb=no
 _mlib=no
@@ -179,7 +190,7 @@
 _dga=no
 _dga2=no
 _svga=no
-_fbdev=no
+_fbdev=yes
 _lirc=no
 _xdpms=no
 
@@ -188,11 +199,8 @@
 
 _gllib=
 _sdllib=
+_xvlib=
 _x11lib=
-_xvlib=
-_xlibdir=
-
-_select='#define HAVE_AUDIO_SELECT'
 
 for i in `echo $pparam`; do
 
@@ -229,13 +237,6 @@
 
 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
@@ -375,21 +376,15 @@
 #echo "DONE (${proc})."
 
 
-# check GL & X11 & Xext & Xv & SDL & termcap libs
+$_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes
 
-$_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 || \
+$_cc $TMPC -o $TMPO -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 $_x11libdir -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes
+$_cc $TMPC -o $TMPO -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes
 
 _termcap=no
 $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes
@@ -397,7 +392,28 @@
 _binutils=no
 as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes
 
-# LGB: Check DGA
+# ----------- 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
 
 cat > $TMPC << EOF
 #include <stdio.h>
@@ -406,7 +422,6 @@
 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
@@ -414,8 +429,6 @@
 # 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>
@@ -427,24 +440,10 @@
 _dga2=no
 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=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!";}
+fi
 
 rm -f $TMPC $TMPO
 
-
-if [ $_x11 = 'yes' ]; then
- if [ $_mga = 'yes' ]; then
-  _xmga=yes
- fi
-fi
-
 # ---
 
 # check for the parameters.
@@ -494,9 +493,6 @@
   --enable-vm)
         _vm=yes
         ;;
-  --enable-x11)
-        _x11=yes
-        ;;
   --enable-3dfx)
         _3dfx=yes
         ;;
@@ -518,9 +514,6 @@
   --enable-lirc)
 	_lirc=yes
 	;;
-  --enable-select)
-        _select='#define HAVE_AUDIO_SELECT'
-	;;
   --disable-sse)
         _sse=no
         ;;
@@ -552,9 +545,6 @@
   --disable-vm)
         _vm=no
         ;;
-  --disable-x11)
-        _x11=no
-        ;;
   --disable-mlib)
 	_mlib=no
 	;;
@@ -573,12 +563,6 @@
   --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
@@ -589,11 +573,19 @@
   --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 )"
@@ -683,12 +675,10 @@
 
 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=\$(X11DIR) $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
+X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib
 TERMCAP_LIB=$_libtermcap
 XMM_LIBS = $_xmmplibs
 LIRC_LIBS = $_lirclibs
@@ -847,7 +837,7 @@
 /* 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! */
-$_select
+#define HAVE_AUDIO_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