Mercurial > mplayer.hg
comparison configure @ 417:1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
author | arpi_esp |
---|---|
date | Sat, 14 Apr 2001 21:16:23 +0000 |
parents | c39058295939 |
children | d19a3da6ac13 |
comparison
equal
deleted
inserted
replaced
416:dd528a763c6f | 417:1afdd7a8eaf9 |
---|---|
128 MCONF='config.mak' | 128 MCONF='config.mak' |
129 | 129 |
130 # --- Check for C compiler: | 130 # --- Check for C compiler: |
131 | 131 |
132 _cc=gcc | 132 _cc=gcc |
133 _x11=auto | |
134 | |
135 _x11libdir= | |
136 if [ -e /usr/X11R6 ]; then | |
137 _x11libdir=-L/usr/X11R6/lib | |
138 else | |
139 if [ -e /usr/X11 ]; then | |
140 _x11libdir=-L/usr/X11/lib | |
141 fi | |
142 fi | |
133 | 143 |
134 for ac_option | 144 for ac_option |
135 do | 145 do |
136 case "$ac_option" in | 146 case "$ac_option" in |
137 --cc=*) | 147 --cc=*) |
138 _cc=`echo $ac_option | cut -d '=' -f 2` | 148 _cc=`echo $ac_option | cut -d '=' -f 2` |
149 ;; | |
150 --with-x11libdir=*) | |
151 _x11libdir=-L`echo $ac_option | cut -d '=' -f 2` | |
152 ;; | |
153 --enable-x11) | |
154 _x11=yes | |
155 ;; | |
156 --disable-x11) | |
157 _x11=no | |
139 ;; | 158 ;; |
140 esac | 159 esac |
141 done | 160 done |
142 | 161 |
143 # --- | 162 # --- |
161 _mga=no | 180 _mga=no |
162 _gl=no | 181 _gl=no |
163 _sdl=no | 182 _sdl=no |
164 _xv=no | 183 _xv=no |
165 _vm=no | 184 _vm=no |
166 _x11=no | |
167 _3dfx=no | 185 _3dfx=no |
168 _syncfb=no | 186 _syncfb=no |
169 _mlib=no | 187 _mlib=no |
170 _mpg123=no | 188 _mpg123=no |
171 _xmga=no | 189 _xmga=no |
172 _dga=no | 190 _dga=no |
173 _dga2=no | 191 _dga2=no |
174 _svga=no | 192 _svga=no |
175 _fbdev=no | 193 _fbdev=yes |
176 _lirc=no | 194 _lirc=no |
177 _xdpms=no | 195 _xdpms=no |
178 | 196 |
179 _x=1 | 197 _x=1 |
180 _y=1 | 198 _y=1 |
181 | 199 |
182 _gllib= | 200 _gllib= |
183 _sdllib= | 201 _sdllib= |
202 _xvlib= | |
184 _x11lib= | 203 _x11lib= |
185 _xvlib= | |
186 _xlibdir= | |
187 | 204 |
188 for i in `echo $pparam`; do | 205 for i in `echo $pparam`; do |
189 | 206 |
190 case "$i" in | 207 case "$i" in |
191 3dnow) | 208 3dnow) |
218 ;; | 235 ;; |
219 esac | 236 esac |
220 | 237 |
221 done | 238 done |
222 | 239 |
223 if [ -e /usr/X11R6 ]; then | |
224 _x11libdir=-L/usr/X11R6/lib | |
225 else | |
226 if [ -e /usr/X11 ]; then | |
227 _x11libdir=-L/usr/X11/lib | |
228 fi | |
229 fi | |
230 | 240 |
231 _win32libdirnotify=no | 241 _win32libdirnotify=no |
232 if [ -e /usr/lib/win32 ]; then | 242 if [ -e /usr/lib/win32 ]; then |
233 _win32libdir=/usr/lib/win32 | 243 _win32libdir=/usr/lib/win32 |
234 else | 244 else |
364 exit | 374 exit |
365 fi | 375 fi |
366 #echo "DONE (${proc})." | 376 #echo "DONE (${proc})." |
367 | 377 |
368 | 378 |
369 # check GL & X11 & Xext & Xv & SDL & termcap libs | |
370 | |
371 $_cc $TMPC -o $TMPO $_x11libdir/ -lGL &> /dev/null && _gl=yes | |
372 $_cc $TMPC -o $TMPO $_x11libdir/ -lXxf86vm &> /dev/null && _vm=yes | |
373 $_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes | 379 $_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes |
374 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes | 380 |
375 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes | 381 $_cc $TMPC -o $TMPO -lpthread &> /dev/null || \ |
376 $_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes | |
377 $_cc $TMPC -o $TMPO $_x11libdir -L/usr/local/lib/ -lpthread &> /dev/null || \ | |
378 { echo "Lib pthread not found."; rm -f $TMPC $TMPO ; exit 1; } | 382 { echo "Lib pthread not found."; rm -f $TMPC $TMPO ; exit 1; } |
379 | 383 |
380 # SDL disabled by default (0.11pre22-) because of the compilation problems | 384 # SDL disabled by default (0.11pre22-) because of the compilation problems |
381 # this is very buggy & experimental code, use it only if you really need it!! | 385 # this is very buggy & experimental code, use it only if you really need it!! |
382 _have_sdl=no | 386 _have_sdl=no |
383 $_cc $TMPC -o $TMPO $_x11libdir -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes | 387 $_cc $TMPC -o $TMPO -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes |
384 | 388 |
385 _termcap=no | 389 _termcap=no |
386 $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes | 390 $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes |
387 | 391 |
388 _binutils=no | 392 _binutils=no |
389 as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes | 393 as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes |
390 | 394 |
391 # LGB: Check DGA | 395 # ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) -------------- |
396 | |
397 if [ $_x11 = auto ]; then | |
398 _x11=no | |
399 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes | |
400 fi | |
401 | |
402 if [ $_x11 = yes ]; then | |
403 | |
404 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes | |
405 $_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes | |
406 | |
407 $_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null && _gl=yes | |
408 | |
409 cat > $TMPC << EOF | |
410 #include <GL/gl.h> | |
411 int main( void ) { return 0; } | |
412 EOF | |
413 $_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null || \ | |
414 { _gl=no; echo "GL includes not found!";} | |
415 | |
416 $_cc $TMPC -o $TMPO $_x11libdir -lXxf86vm &> /dev/null && _vm=yes | |
392 | 417 |
393 cat > $TMPC << EOF | 418 cat > $TMPC << EOF |
394 #include <stdio.h> | 419 #include <stdio.h> |
395 #include <X11/Xlib.h> | 420 #include <X11/Xlib.h> |
396 #include <X11/extensions/xf86dga.h> | 421 #include <X11/extensions/xf86dga.h> |
397 int main (void) { return 0;} | 422 int main (void) { return 0;} |
398 EOF | 423 EOF |
399 | 424 |
400 _dga=no | |
401 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga=yes | 425 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga=yes |
402 # Note: the -lXxf86vm library is the VideoMode extension and though it's | 426 # Note: the -lXxf86vm library is the VideoMode extension and though it's |
403 # not needed for DGA, AFAIK every distribution packages together with DGA | 427 # not needed for DGA, AFAIK every distribution packages together with DGA |
404 # stuffs named 'X extensions' or something similar. This check can be usefull | 428 # stuffs named 'X extensions' or something similar. This check can be usefull |
405 # for further mplayer versions to set resolution by mplayer itself. | 429 # for further mplayer versions to set resolution by mplayer itself. |
406 # If you run into problems, remove '-lXxf86vm'. | 430 # If you run into problems, remove '-lXxf86vm'. |
407 | 431 |
408 # --- | |
409 | |
410 # Check if DGA is 2.0 or greater | 432 # Check if DGA is 2.0 or greater |
411 cat > $TMPC << EOF | 433 cat > $TMPC << EOF |
412 #include <stdio.h> | 434 #include <stdio.h> |
413 #include <X11/Xlib.h> | 435 #include <X11/Xlib.h> |
414 #include <X11/extensions/xf86dga.h> | 436 #include <X11/extensions/xf86dga.h> |
416 EOF | 438 EOF |
417 | 439 |
418 _dga2=no | 440 _dga2=no |
419 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=yes | 441 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=yes |
420 | 442 |
421 | 443 fi |
422 cat > $TMPC << EOF | |
423 #include <GL/gl.h> | |
424 int main( void ) { return 0; } | |
425 EOF | |
426 | |
427 $_cc $TMPC -o $TMPO $_x11libdir/ -lGL &> /dev/null || \ | |
428 { _gl=no; echo "GL includes not found!";} | |
429 | 444 |
430 rm -f $TMPC $TMPO | 445 rm -f $TMPC $TMPO |
431 | |
432 | |
433 if [ $_x11 = 'yes' ]; then | |
434 if [ $_mga = 'yes' ]; then | |
435 _xmga=yes | |
436 fi | |
437 fi | |
438 | 446 |
439 # --- | 447 # --- |
440 | 448 |
441 # check for the parameters. | 449 # check for the parameters. |
442 | 450 |
483 _xv=yes | 491 _xv=yes |
484 ;; | 492 ;; |
485 --enable-vm) | 493 --enable-vm) |
486 _vm=yes | 494 _vm=yes |
487 ;; | 495 ;; |
488 --enable-x11) | |
489 _x11=yes | |
490 ;; | |
491 --enable-3dfx) | 496 --enable-3dfx) |
492 _3dfx=yes | 497 _3dfx=yes |
493 ;; | 498 ;; |
494 --enable-syncfb) | 499 --enable-syncfb) |
495 _syncfb=yes | 500 _syncfb=yes |
538 _xv=no | 543 _xv=no |
539 ;; | 544 ;; |
540 --disable-vm) | 545 --disable-vm) |
541 _vm=no | 546 _vm=no |
542 ;; | 547 ;; |
543 --disable-x11) | |
544 _x11=no | |
545 ;; | |
546 --disable-mlib) | 548 --disable-mlib) |
547 _mlib=no | 549 _mlib=no |
548 ;; | 550 ;; |
549 --disable-svga) | 551 --disable-svga) |
550 _svga=no | 552 _svga=no |
559 _fbdev=no | 561 _fbdev=no |
560 ;; | 562 ;; |
561 --disable-termcap) | 563 --disable-termcap) |
562 _termcap=no | 564 _termcap=no |
563 ;; | 565 ;; |
564 --with-x11libdir=*) | |
565 _x11libdir=-L`echo $ac_option | cut -d '=' -f 2` | |
566 ;; | |
567 --with-win32libdir=*) | 566 --with-win32libdir=*) |
568 _win32libdir=`echo $ac_option | cut -d '=' -f 2` | 567 _win32libdir=`echo $ac_option | cut -d '=' -f 2` |
569 _win32libdirnotify=no | 568 _win32libdirnotify=no |
570 ;; | 569 ;; |
571 --size-x=*) | 570 --size-x=*) |
572 _x=`echo $ac_option | cut -d '=' -f 2` | 571 _x=`echo $ac_option | cut -d '=' -f 2` |
573 ;; | 572 ;; |
574 --size-y=*) | 573 --size-y=*) |
575 _y=`echo $ac_option | cut -d '=' -f 2` | 574 _y=`echo $ac_option | cut -d '=' -f 2` |
576 ;; | 575 ;; |
576 --with-x11libdir=*) | |
577 ;; | |
577 --cc=*) | 578 --cc=*) |
578 ;; | 579 ;; |
579 esac | 580 esac |
580 done | 581 done |
582 | |
583 if [ $_x11 = 'yes' ]; then | |
584 if [ $_mga = 'yes' ]; then | |
585 _xmga=yes | |
586 fi | |
587 fi | |
581 | 588 |
582 # to screen. | 589 # to screen. |
583 echo "Using C compiler: $_cc" | 590 echo "Using C compiler: $_cc" |
584 echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )" | 591 echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )" |
585 echo "Checking for cpu type ... $pname" | 592 echo "Checking for cpu type ... $pname" |