comparison configure @ 1038:b36fb1ae4b53

applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
author arpi_esp
date Tue, 05 Jun 2001 18:40:44 +0000
parents 79e7a1d3186f
children b333271f4e7c
comparison
equal deleted inserted replaced
1037:2767682b85de 1038:b36fb1ae4b53
1 #!/bin/bash 1 #!/bin/sh
2 2
3 # 3 #
4 # MPlayer configurator. (C) 2000 Pontscho/fresh!mindworkz 4 # MPlayer configurator. (C) 2000 Pontscho/fresh!mindworkz
5 # pontscho@makacs.poliod.hu 5 # pontscho@makacs.poliod.hu
6 # 6 #
78 # - some english bugfix :) 78 # - some english bugfix :)
79 # - removed _??exists flags, _?? is enough... 79 # - removed _??exists flags, _?? is enough...
80 # - creating only config.mak files instead of whole Makefiles 80 # - creating only config.mak files instead of whole Makefiles
81 # 81 #
82 # -- 82 # --
83
84
85 # Check how echo works in this /bin/sh
86 case `echo -n` in
87 -n) _echo_n= _echo_c='\c';;
88 *) _echo_n=-n _echo_c=;;
89 esac
83 90
84 91
85 # LGB: Help moved here. 92 # LGB: Help moved here.
86 93
87 if [ "$1" = "--help" -o "$1" = "-help" -o "$1" = "-h" ]; then 94 if [ "$1" = "--help" -o "$1" = "-help" -o "$1" = "-h" ]; then
115 122
116 --enable-termcap use termcap database for key codes 123 --enable-termcap use termcap database for key codes
117 --enable-xmmp use XMMP audio drivers 124 --enable-xmmp use XMMP audio drivers
118 --enable-lirc enable LIRC (remote control) support 125 --enable-lirc enable LIRC (remote control) support
119 126
120 --disable-alsa disable alsa support [autodetect] 127 --disable-oss disable OSS sound support [autodetect]
128 --disable-alsa disable alsa sound support [autodetect]
121 --disable-esd disable esd sound support [autodetect] 129 --disable-esd disable esd sound support [autodetect]
130 --disable-sun disable Sun sound support [autodetect]
122 131
123 --disable-gcc-checking disable gcc version checking 132 --disable-gcc-checking disable gcc version checking
124 133
125 --disable-select disable audio select() support ( for example required this 134 --disable-select disable audio select() support ( for example required this
126 option ALSA or Vortex2 driver ) 135 option ALSA or Vortex2 driver )
177 MCONF='config.mak' 186 MCONF='config.mak'
178 187
179 # --- Check for C compiler: 188 # --- Check for C compiler:
180 189
181 _cc=gcc 190 _cc=gcc
191 _as=as
182 _x11=auto 192 _x11=auto
183 193
184 _x11libdir= 194 _x11libdir=
185 if [ -d /usr/X11R6 ]; then 195 if [ -d /usr/X11R6 ]; then
186 _x11libdir=-L/usr/X11R6/lib 196 _x11libdir=-L/usr/X11R6/lib
198 do 208 do
199 case "$ac_option" in 209 case "$ac_option" in
200 --cc=*) 210 --cc=*)
201 _cc=`echo $ac_option | cut -d '=' -f 2` 211 _cc=`echo $ac_option | cut -d '=' -f 2`
202 ;; 212 ;;
213 --as=*)
214 _as=`echo $ac_option | cut -d '=' -f 2`
215 ;;
203 --disable-gcc-checking) 216 --disable-gcc-checking)
204 _skip_cc_check=yes 217 _skip_cc_check=yes
205 ;; 218 ;;
206 --disable-as-checking) 219 --disable-as-checking)
207 _skip_as_check=yes 220 _skip_as_check=yes
218 --with-sdl-config=*) 231 --with-sdl-config=*)
219 _sdlconfig=`echo $ac_option | cut -d '=' -f 2` 232 _sdlconfig=`echo $ac_option | cut -d '=' -f 2`
220 ;; 233 ;;
221 esac 234 esac
222 done 235 done
236
237 # ---
223 238
224 # Checking CC version... 239 # Checking CC version...
225 # Q: what's with egcs, pgcc? - Atmos 240 # Q: what's with egcs, pgcc? - Atmos
226 # A: same as with agcc! These compilers always were introduced as experimental 241 # A: same as with agcc! These compilers always were introduced as experimental
227 # ones. Now gcc-3.0 should introduce all features of these compilers. 242 # ones. Now gcc-3.0 should introduce all features of these compilers.
228 # Since 3.0 is almost released we don't need to support them. - Nick 05 jun 2001 243 # Since 3.0 is almost released we don't need to support them. - Nick 05 jun 2001
229 if test "$_skip_cc_check" != "yes"; then 244 if test "$_skip_cc_check" != "yes"; then
230 echo -n "Checking version of $_cc ... " 245 echo $_echo_n "Checking version of $_cc ... $_echo_c"
231 cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'` 246 cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'`
232 case $cc_version in 247 case $cc_version in
233 '') cc_version="v. ?.??, bad"; cc_verc_fail=yes;; 248 '') cc_version="v. ?.??, bad"; cc_verc_fail=yes;;
234 2.95.[2-9]|3.[0-9]) 249 2.95.[2-9]|3.[0-9])
235 cc_version="$cc_version, ok";; 250 cc_version="$cc_version, ok";;
236 *) cc_version="$cc_version, bad"; cc_verc_fail=yes;; 251 *) cc_version="$cc_version, bad"; cc_verc_fail=yes;;
237 esac 252 esac
238 echo "$cc_version" 253 echo "$cc_version"
239 if ! test -z "$cc_verc_fail"; then 254 if [ ! -z "$cc_verc_fail" ] ; then
240 echo "Please downgrade(upgrade) gcc compiler to gcc-2.95.2+ or gcc-3.0+ version" 255 echo "Please downgrade(upgrade) gcc compiler to gcc-2.95.2+ or gcc-3.0+ version"
241 exit 256 exit
242 fi 257 fi
243 else 258 else
244 echo "YOU'VE SELECTED '--disable-gcc-checking'. PLEASE DON'T SEND US ANY BUGREPORTS!" 259 echo "YOU'VE SELECTED '--disable-gcc-checking'. PLEASE DON'T SEND US ANY BUGREPORTS!"
245 fi 260 fi
246 # --- 261 # ---
247 262
248 pname=`cat /proc/cpuinfo | grep 'model name' | cut -d ':' -f 2` 263
249 pparam=`cat /proc/cpuinfo | grep 'features' | cut -d ':' -f 2` 264 if [ -r /proc/cpuinfo ]; then
265 # linux with /proc mounted, extract cpu information from it
266 _cpuinfo="cat /proc/cpuinfo"
267 else
268 # all other OS try to extract cpu information from a small helper
269 # program TOOLS/cpuinfo instead
270 $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
271 _cpuinfo="TOOLS/cpuinfo"
272 fi
273
274 pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2`
275 pparam=`$_cpuinfo | grep 'features' | cut -d ':' -f 2`
250 if [ -z "$pparam" ]; then 276 if [ -z "$pparam" ]; then
251 pparam=`cat /proc/cpuinfo | grep 'flags' | cut -d ':' -f 2` 277 pparam=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2`
252 fi 278 fi
253 pvendor=`cat /proc/cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2` 279 pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2`
254 pfamily=`cat /proc/cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2` 280 pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2`
255 pmodel=`cat /proc/cpuinfo |grep -v 'model name'| grep "model" | cut -d ':' -f 2 | cut -d ' ' -f 2` 281 pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2`
256 pstepping=`cat /proc/cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2` 282 pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2`
257 283
258 _mmx=no 284 _mmx=no
259 _mmx2=no 285 _mmx2=no
260 _3dnow=no 286 _3dnow=no
261 _3dnowex=no 287 _3dnowex=no
274 _mpg123=no 300 _mpg123=no
275 _xmga=no 301 _xmga=no
276 _dga=no 302 _dga=no
277 _dga2=no 303 _dga2=no
278 _svga=no 304 _svga=no
279 _fbdev=yes 305 _fbdev=no
306 [ x`uname -s` = xLinux ] && _fbdev=yes
280 _lirc=no 307 _lirc=no
281 _css=no 308 _css=no
282 _dshow=yes 309 _dshow=yes
283 _fastmemcpy=yes 310 _fastmemcpy=yes
284 311
285 _x=1 312 _x=1
286 _y=1 313 _y=1
287 314
288 _gllib= 315 _gllib=
289 _sdllib= 316 _sdllib=
317 _sdlcflags=
290 _xvlib= 318 _xvlib=
291 _x11lib= 319 _x11lib=
292 320
293 _select='#define HAVE_AUDIO_SELECT' 321 _select='#define HAVE_AUDIO_SELECT'
294 322
446 # to fall back till 386. 474 # to fall back till 386.
447 475
448 #echo -n "Checking your GCC CPU optimalization abilities: " 476 #echo -n "Checking your GCC CPU optimalization abilities: "
449 if [ "$proc" = "k7" ]; then 477 if [ "$proc" = "k7" ]; then
450 # echo -n "trying k7 " 478 # echo -n "trying k7 "
451 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=athlon 479 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=athlon
452 fi 480 fi
453 if [ "$proc" = "athlon" ]; then 481 if [ "$proc" = "athlon" ]; then
454 # echo -n "trying athlon " 482 # echo -n "trying athlon "
455 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=k6 483 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=k6
456 fi 484 fi
457 if [ "$proc" = "k6" ]; then 485 if [ "$proc" = "k6" ]; then
458 # echo -n "trying k6 " 486 # echo -n "trying k6 "
459 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=k5 487 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=k5
460 fi 488 fi
461 if [ "$proc" = "k5" ]; then 489 if [ "$proc" = "k5" ]; then
462 # echo -n "trying k5 " 490 # echo -n "trying k5 "
463 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=pentium 491 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=pentium
464 fi 492 fi
465 if [ "$proc" = "i686" ]; then 493 if [ "$proc" = "i686" ]; then
466 # echo -n "trying i686 " 494 # echo -n "trying i686 "
467 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=pentiumpro 495 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=pentiumpro
468 fi 496 fi
469 if [ "$proc" = "pentiumpro" ]; then 497 if [ "$proc" = "pentiumpro" ]; then
470 # echo -n "trying pentiumpro " 498 # echo -n "trying pentiumpro "
471 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=pentium 499 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=pentium
472 fi 500 fi
473 if [ "$proc" = "pentium" ]; then 501 if [ "$proc" = "pentium" ]; then
474 # echo -n "trying pentium " 502 # echo -n "trying pentium "
475 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=i486 503 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=i486
476 fi 504 fi
477 if [ "$proc" = "i486" ]; then 505 if [ "$proc" = "i486" ]; then
478 # echo -n "trying i486 " 506 # echo -n "trying i486 "
479 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=i386 507 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=i386
480 fi 508 fi
481 if [ "$proc" = "i386" ]; then 509 if [ "$proc" = "i386" ]; then
482 # echo -n "trying i386 " 510 # echo -n "trying i386 "
483 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=error 511 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc > /dev/null 2>&1 || proc=error
484 fi 512 fi
485 if [ "$proc" = "error" ]; then 513 if [ "$proc" = "error" ]; then
486 echo 514 echo
487 echo "Your gcc does not support even \"i386\" for '-march' and '-mcpu'." >&2 515 echo "Your gcc does not support even \"i386\" for '-march' and '-mcpu'." >&2
488 rm -f $TMPC $TMPO $TMPS 516 rm -f $TMPC $TMPO $TMPS
489 exit 517 exit
490 fi 518 fi
491 #echo "DONE (${proc})." 519 #echo "DONE (${proc})."
492 520
493 521
494 $_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes 522 $_cc $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes
495 523
496 $_cc $TMPC -o $TMPO -lpthread &> /dev/null || \ 524 $_cc $TMPC -o $TMPO -lpthread > /dev/null 2>&1 || \
497 { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; } 525 { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; }
498 526
499 # Atmosfear: added SDL versioncheck and autodetect; removed warnings. 527 # Atmosfear: added SDL versioncheck and autodetect; removed warnings.
500 _sdl=no 528 _sdl=no
501 if $_cc $TMPC -o $TMPO `$_sdlconfig --libs` &> /dev/null ; then 529 if $_cc `$_sdlconfig --cflags` $TMPC -o $TMPO `$_sdlconfig --libs` > /dev/null 2>&1 ; then
502 if test `$_sdlconfig --version | sed s/[^0-9]//g` -gt 116 ; then 530 _sdlversion=`$_sdlconfig --version | sed 's/[^0-9]//g'`
503 if test `$_sdlconfig --version | sed s/[^0-9]//g` -lt 121 ; then 531 if test "$_sdlversion" -gt 116 ; then
532 if test "$_sdlversion" -lt 121 ; then
504 533
505 _sdlbuggy='#define BUGGY_SDL' 534 _sdlbuggy='#define BUGGY_SDL'
506 else 535 else
507 _sdlbuggy='#undef BUGGY_SDL' 536 _sdlbuggy='#undef BUGGY_SDL'
508 fi 537 fi
512 fi 541 fi
513 fi 542 fi
514 543
515 # Atmosfear: added libcss autodetect 544 # Atmosfear: added libcss autodetect
516 _css=no 545 _css=no
517 if test -e "/usr/local/lib/libcss.so" ; then 546 if test -s "/usr/local/lib/libcss.so" ; then
518 _csslibdir="/usr/local/lib/" 547 _csslibdir="/usr/local/lib/"
519 if test -e "/usr/local/include/css.h" ; then 548 if test -s "/usr/local/include/css.h" ; then
520 _cssincdir="/usr/local/include" 549 _cssincdir="/usr/local/include"
521 _css=yes 550 _css=yes
522 fi 551 fi
523 else 552 else
524 if test -e "/usr/lib/libcss.so" ; then 553 if test -s "/usr/lib/libcss.so" ; then
525 _csslibdir="/usr/lib/" 554 _csslibdir="/usr/lib/"
526 if test -e "/usr/include/css.h" ; then 555 if test -s "/usr/include/css.h" ; then
527 _cssincdir="/usr/include/" 556 _cssincdir="/usr/include/"
528 _css=yes 557 _css=yes
529 fi 558 fi
530 fi 559 fi
531 fi 560 fi
532 561
533 _termcap=no 562 _termcap=no
534 $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes 563 $_cc $TMPC -o $TMPO -ltermcap > /dev/null 2>&1 && _termcap=yes
535 564
536 _png=no 565 _png=no
537 $_cc $TMPC -o $TMPO -lpng -lz -lm &> /dev/null && _png=yes 566 $_cc $TMPC -o $TMPO -lpng -lz -lm > /dev/null 2>&1 && _png=yes
538 567
539 _binutils=no 568 _binutils=no
540 as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes 569 $_as libac3/downmix/downmix_i386.S -o $TMPO > /dev/null 2>&1 && _binutils=yes
541 570
542 # echo binutils: $_binutils 571 # echo binutils: $_binutils
572
543 573
544 # ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) -------------- 574 # ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) --------------
545 575
546 # for Solaris: 576 # for Solaris:
547 _socklib= 577 _socklib=
548 $_cc $TMPC -o $TMPO -lsocket >/dev/null 2>&1 && _socklib=-lsocket 578 $_cc $TMPC -o $TMPO -lsocket >/dev/null 2>&1 && _socklib=-lsocket
549 579
550 if [ $_x11 = auto ]; then 580 if [ $_x11 = auto ]; then
551 _x11=no 581 _x11=no
552 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext $_socklib &> /dev/null && _x11=yes 582 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext $_socklib > /dev/null 2>&1 && _x11=yes
553 fi 583 fi
554 584
555 if [ $_x11 = yes ]; then 585 if [ $_x11 = yes ]; then
556 586
557 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms $_socklib &> /dev/null && _xdpms=yes 587 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms $_socklib > /dev/null 2>&1 && _xdpms=yes
558 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv $_socklib &> /dev/null && _xv=yes 588 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv $_socklib > /dev/null 2>&1 && _xv=yes
559 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib &> /dev/null && _vm=yes 589 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib > /dev/null 2>&1 && _vm=yes
560 590
561 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib &> /dev/null && _gl=yes 591 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib > /dev/null 2>&1 && _gl=yes
562 592
563 cat > $TMPC << EOF 593 cat > $TMPC << EOF
564 #include <GL/gl.h> 594 #include <GL/gl.h>
565 int main( void ) { return 0; } 595 int main( void ) { return 0; }
566 EOF 596 EOF
567 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib &> /dev/null || \ 597 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib > /dev/null 2>&1 || \
568 { _gl=no; echo "GL includes not found!";} 598 { _gl=no; echo "GL includes not found!";}
569 599
570 cat > $TMPC << EOF 600 cat > $TMPC << EOF
571 #include <stdio.h> 601 #include <stdio.h>
572 #include <X11/Xlib.h> 602 #include <X11/Xlib.h>
573 #include <X11/extensions/xf86dga.h> 603 #include <X11/extensions/xf86dga.h>
574 int main (void) { return 0;} 604 int main (void) { return 0;}
575 EOF 605 EOF
576 606
577 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib &> /dev/null && _dga=yes 607 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga=yes
578 # Note: the -lXxf86vm library is the VideoMode extension and though it's 608 # Note: the -lXxf86vm library is the VideoMode extension and though it's
579 # not needed for DGA, AFAIK every distribution packages together with DGA 609 # not needed for DGA, AFAIK every distribution packages together with DGA
580 # stuffs named 'X extensions' or something similar. This check can be usefull 610 # stuffs named 'X extensions' or something similar. This check can be usefull
581 # for further mplayer versions to set resolution by mplayer itself. 611 # for further mplayer versions to set resolution by mplayer itself.
582 # If you run into problems, remove '-lXxf86vm'. 612 # If you run into problems, remove '-lXxf86vm'.
588 #include <X11/extensions/xf86dga.h> 618 #include <X11/extensions/xf86dga.h>
589 int main (void) { XDGAMode mode; XDGADevice device; return 0;} 619 int main (void) { XDGAMode mode; XDGADevice device; return 0;}
590 EOF 620 EOF
591 621
592 _dga2=no 622 _dga2=no
593 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib &> /dev/null && _dga2=yes 623 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga2=yes
594 624
595 fi 625 fi
596 626
597 rm -f $TMPC $TMPO 627 rm -f $TMPC $TMPO
628
629
630 # ---
631 # try to detect type of audio supported on this machine
632
633 _oss_audio=no
634 [ -c /dev/dsp ] && _oss_audio=yes
635
636 _sun_audio=no
637 [ -c /dev/audio -a -c /dev/audioctl ] && _sun_audio=yes
598 638
599 # --- 639 # ---
600 640
601 cat > $TMPC << EOF 641 cat > $TMPC << EOF
602 #include <sys/asoundlib.h> 642 #include <sys/asoundlib.h>
604 int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==5)return 0; return 1; } 644 int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==5)return 0; return 1; }
605 EOF 645 EOF
606 646
607 _alsaver='not found' 647 _alsaver='not found'
608 $_cc -o $TMPO -lasound $TMPC 2> /dev/null || _alsa=no 648 $_cc -o $TMPO -lasound $TMPC 2> /dev/null || _alsa=no
609 [ $_alsa == 'yes' ] && $TMPO && { _alsaver='0.5.x'; } 649 [ $_alsa = 'yes' ] && $TMPO && { _alsaver='0.5.x'; }
610 650
611 if [ "$_alsaver" == 'not found' ]; then 651 if [ "$_alsaver" = 'not found' ]; then
612 cat > $TMPC << EOF 652 cat > $TMPC << EOF
613 #include <sys/asoundlib.h> 653 #include <sys/asoundlib.h>
614 #include <sys/soundcard.h> 654 #include <sys/soundcard.h>
615 int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==9)return 0; return 1; } 655 int main( void ) { if(SND_LIB_MAJOR==0&&SND_LIB_MINOR==9)return 0; return 1; }
616 EOF 656 EOF
617 657
618 _alsaver='not found' 658 _alsaver='not found'
619 $_cc -o $TMPO -lasound $TMPC 2> /dev/null || _alsa=no 659 $_cc -o $TMPO -lasound $TMPC 2> /dev/null || _alsa=no
620 [ $_alsa == 'yes' ] && $TMPO && { _alsaver='0.9.x'; } 660 [ $_alsa = 'yes' ] && $TMPO && { _alsaver='0.9.x'; }
621 fi 661 fi
622 662
623 # --- 663 # ---
624 664
625 cat > $TMPC << EOF 665 cat > $TMPC << EOF
643 ;; 683 ;;
644 --enable-debug) 684 --enable-debug)
645 _debug='-g' 685 _debug='-g'
646 ;; 686 ;;
647 --enable-debug=*) 687 --enable-debug=*)
648 _debug=`echo -n '-g'; echo $ac_option | cut -d '=' -f 2` 688 _debug=`echo '-g'; echo $ac_option | cut -d '=' -f 2`
649 ;; 689 ;;
650 --enable-css) 690 --enable-css)
651 _css=yes 691 _css=yes
652 ;; 692 ;;
653 --enable-png) 693 --enable-png)
715 _termcap=yes 755 _termcap=yes
716 ;; 756 ;;
717 --enable-xmmp) 757 --enable-xmmp)
718 _xmmp=yes 758 _xmmp=yes
719 ;; 759 ;;
760 --enable-ossaudio)
761 _oss_audio=yes
762 ;;
763 --enable-sunaudio)
764 _sun_audio=yes
765 ;;
720 --enable-lirc) 766 --enable-lirc)
721 _lirc=yes 767 _lirc=yes
722 ;; 768 ;;
723 --enable-select) 769 --enable-select)
724 _select='#define HAVE_AUDIO_SELECT' 770 _select='#define HAVE_AUDIO_SELECT'
805 _alsa=no 851 _alsa=no
806 ;; 852 ;;
807 --disable-esd) 853 --disable-esd)
808 _esd=no 854 _esd=no
809 ;; 855 ;;
856 --disable-ossaudio)
857 _oss_audio=no
858 ;;
859 --disable-sunaudio)
860 _sun_audio=no
861 ;;
810 --with-win32libdir=*) 862 --with-win32libdir=*)
811 _win32libdir=`echo $ac_option | cut -d '=' -f 2` 863 _win32libdir=`echo $ac_option | cut -d '=' -f 2`
812 _win32libdirnotify=no 864 _win32libdirnotify=no
813 ;; 865 ;;
814 --with-csslibdir=*) 866 --with-csslibdir=*)
830 --prefix=*) 882 --prefix=*)
831 _prefix=`echo $ac_option | cut -d '=' -f 2` 883 _prefix=`echo $ac_option | cut -d '=' -f 2`
832 ;; 884 ;;
833 --cc=*) 885 --cc=*)
834 ;; 886 ;;
887 --as=*)
888 ;;
835 esac 889 esac
836 done 890 done
837 891
838 # Checking assembler (as) compatibility... 892 # Checking assembler (_as) compatibility...
839 as_version=`as --version 2>&1 | sed -n 's/^.*assembler \([0-9.]*\).*$/\1/p'` 893 as_version=`$_as --version 2>&1 | sed -n 's/^.*assembler \([0-9.]*\).*$/\1/p'`
840 echo -n "Checking assembler (as) ... $as_version, " 894 echo $_echo_n "Checking assembler (as) ... $as_version, $_echo_c"
841 _pref_as_version='2.9.1' 895 _pref_as_version='2.9.1'
842 ### this test disabled, see _binutils test above! --A'rpi 896 ### this test disabled, see _binutils test above! --A'rpi
843 # cat > astest.S <<EOF 897 # cat > astest.S <<EOF
844 # filds -2(%ebp) 898 # filds -2(%ebp)
845 # EOF 899 # EOF
846 # as astest.S -o astest.o &> /dev/null || as_verc_fail=yes 900 # $_as astest.S -o astest.o > /dev/null 2>&1 || as_verc_fail=yes
901
902 cat > $TMPS <<EOF
903 nop
904 EOF
847 905
848 if [ $_mmx = 'yes' ]; then 906 if [ $_mmx = 'yes' ]; then
849 cat > $TMPS <<EOF 907 cat >> $TMPS <<EOF
850 emms 908 emms
851 EOF 909 EOF
852 fi 910 fi
853 911
854 if [ $_3dnow = 'yes' ]; then 912 if [ $_3dnow = 'yes' ]; then
883 #_pref_as_version='2.11' 941 #_pref_as_version='2.11'
884 #cat >> $TMPS <<EOF 942 #cat >> $TMPS <<EOF
885 #xorpd %xmm0, %xmm0 943 #xorpd %xmm0, %xmm0
886 #EOF 944 #EOF
887 #fi 945 #fi
888 as $TMPS -o $TMPO &> /dev/null || as_verc_fail=yes 946 $_as $TMPS -o $TMPO > /dev/null 2>&1 || as_verc_fail=yes
889 rm -f $TMPS $TMPO $TMPC 947 rm -f $TMPS $TMPO $TMPC
890 948
891 if test "$as_verc_fail" != "yes"; then 949 if test "$as_verc_fail" != "yes"; then
892 echo "ok" 950 echo "ok"
893 else 951 else
898 956
899 # Checking kernel version... 957 # Checking kernel version...
900 _k_verc_problem=no 958 _k_verc_problem=no
901 system_name=`uname -s 2>&1` 959 system_name=`uname -s 2>&1`
902 kernel_version=`uname -r 2>&1` 960 kernel_version=`uname -r 2>&1`
903 echo -n "Checking $system_name kernel version ... " 961 echo $_echo_n "Checking $system_name kernel version ... $_echo_c"
904 case $kernel_version in 962 case $kernel_version in
905 '') kernel_version="?.??"; _k_verc_fail=yes;; 963 '') kernel_version="?.??"; _k_verc_fail=yes;;
906 [0-1].[0-99].[0-99]|2.[0-3].[0-99]) 964 [0-1].[0-99].[0-99]|2.[0-3].[0-99])
907 _k_verc_problem=yes;; 965 _k_verc_problem=yes;;
908 esac 966 esac
909 if [ $_k_verc_problem = 'yes' ] && [ $_sse = 'yes' ]; then 967 if [ $_k_verc_problem = 'yes' ] && [ $_sse = 'yes' ]; then
910 _k_verc_fail=yes 968 _k_verc_fail=yes
911 fi 969 fi
912 if ! test -z "$_k_verc_fail"; then 970 if [ ! -z "$_k_verc_fail" ]; then
913 echo "$kernel_version, fail" 971 echo "$kernel_version, fail"
914 echo "WARNING! You want to run mplayer on this system then be prepared for problems" 972 echo "WARNING! You want to run mplayer on this system then be prepared for problems"
915 else 973 else
916 echo "$kernel_version, ok" 974 echo "$kernel_version, ok"
917 fi 975 fi
944 echo "Checking for DGA ... $_dga" 1002 echo "Checking for DGA ... $_dga"
945 echo "Checking for DGA 2.0 .. $_dga2" 1003 echo "Checking for DGA 2.0 .. $_dga2"
946 echo "Checking for Xf86VM ... $_vm" 1004 echo "Checking for Xf86VM ... $_vm"
947 echo "Checking for SVGAlib ... $_svga" 1005 echo "Checking for SVGAlib ... $_svga"
948 echo "Checking for FBDev ... $_fbdev" 1006 echo "Checking for FBDev ... $_fbdev"
1007 echo "Checking for OSS Audio ... $_oss_audio"
1008 echo "Checking for ALSA Audio ... $_alsaver"
1009 echo "Checking for ESD Audio ... $_esd"
1010 echo "Checking for Sun Audio ... $_sun_audio"
949 echo "Checking for DeCSS support ... $_css" 1011 echo "Checking for DeCSS support ... $_css"
950 echo "Checking for PNG support ... $_png" 1012 echo "Checking for PNG support ... $_png"
951 echo "Checking for DirectShow ... $_dshow" 1013 echo "Checking for DirectShow ... $_dshow"
952 echo "Checking for fastmemcpy ... $_fastmemcpy" 1014 echo "Checking for fastmemcpy ... $_fastmemcpy"
953 echo "Checking for alsa ... $_alsaver"
954 echo "Checking for esd ... $_esd"
955 # write conf files. 1015 # write conf files.
956 1016
957 if [ $_gl = yes ]; then 1017 if [ $_gl = yes ]; then
958 _gllib='-lGL' 1018 _gllib='-lGL'
959 fi 1019 fi
1004 _xvlib='-lXv' 1064 _xvlib='-lXv'
1005 fi 1065 fi
1006 1066
1007 if [ $_sdl = yes ]; then 1067 if [ $_sdl = yes ]; then
1008 _sdllib=`$_sdlconfig --libs` 1068 _sdllib=`$_sdlconfig --libs`
1069 _sdlcflags=`$_sdlconfig --cflags`
1009 fi 1070 fi
1010 1071
1011 if [ $_dga = yes ]; then 1072 if [ $_dga = yes ]; then
1012 _dgalib='-lXxf86dga' 1073 _dgalib='-lXxf86dga'
1013 fi 1074 fi
1049 1110
1050 _aosrc='' 1111 _aosrc=''
1051 1112
1052 _alsa5='#undef HAVE_ALSA5' 1113 _alsa5='#undef HAVE_ALSA5'
1053 _alsa9='#undef HAVE_ALSA9' 1114 _alsa9='#undef HAVE_ALSA9'
1054 if [ $_alsa == 'yes' ]; then 1115 if [ $_alsa = 'yes' ]; then
1055 [ $_alsaver == '0.5.x' ] && { _aosrc="$_aosrc ao_alsa5.c"; _alsa5='#define HAVE_ALSA5'; _alsalib='-lasound'; } 1116 [ $_alsaver = '0.5.x' ] && { _aosrc="$_aosrc ao_alsa5.c"; _alsa5='#define HAVE_ALSA5'; _alsalib='-lasound'; }
1056 # [ $_alsaver == '0.9.x' ] && { _aosrc="$_aosrc ao_alsa9.c"; _alsa9='#define HAVE_ALSA9'; _alsalib='-lasound'; } 1117 # [ $_alsaver = '0.9.x' ] && { _aosrc="$_aosrc ao_alsa9.c"; _alsa9='#define HAVE_ALSA9'; _alsalib='-lasound'; }
1057 fi 1118 fi
1058 1119
1059 _esdd='#undef HAVE_ESD' 1120 _esdd='#undef HAVE_ESD'
1060 #if [ $_esd == 'yes' ]; then 1121 #if [ $_esd = 'yes' ]; then
1061 # _esdd='#define HAVE_ESD' 1122 # _esdd='#define HAVE_ESD'
1062 # _aosrc="$_aosrc ao_esd.c" 1123 # _aosrc="$_aosrc ao_esd.c"
1063 # _esdlib='-lesd' 1124 # _esdlib='-lesd'
1064 #fi 1125 #fi
1126
1127 if [ "$_oss_audio" = "yes" ]; then
1128 _ossaudio='#define USE_OSS_AUDIO'
1129 _aosrc="$_aosrc ao_oss.c"
1130 else
1131 _ossaudio='#undef USE_OSS_AUDIO'
1132 fi
1133
1134 if [ "$_sun_audio" = "yes" ]; then
1135 _sunaudio='#define USE_SUN_AUDIO'
1136 _aosrc="$_aosrc ao_sun.c"
1137 else
1138 _sunaudio='#undef USE_SUN_AUDIO'
1139 fi
1065 1140
1066 # Checking for CFLAGS 1141 # Checking for CFLAGS
1067 if [ "$_profile" != "" ] || [ "$_debug" != "" ]; then 1142 if [ "$_profile" != "" ] || [ "$_debug" != "" ]; then
1068 CFLAGS="-O2 -march=$proc -mcpu=$proc $_debug $_profile" 1143 CFLAGS="-O2 -march=$proc -mcpu=$proc $_debug $_profile"
1069 else 1144 else
1087 TERMCAP_LIB=$_libtermcap 1162 TERMCAP_LIB=$_libtermcap
1088 XMM_LIBS = $_xmmplibs 1163 XMM_LIBS = $_xmmplibs
1089 LIRC_LIBS = $_lirclibs 1164 LIRC_LIBS = $_lirclibs
1090 CSS_LIB = $_csslib 1165 CSS_LIB = $_csslib
1091 CSS_INC = $_cssinc 1166 CSS_INC = $_cssinc
1167 SDL_LIB = $_sdllib
1168 SDL_INC = $_sdlcflags
1092 WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\" 1169 WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\"
1093 DS_DEP = $_dshowdep 1170 DS_DEP = $_dshowdep
1094 DS_LIB = $_dshowlib 1171 DS_LIB = $_dshowlib
1095 ALSA_LIB = $_alsalib 1172 ALSA_LIB = $_alsalib
1096 ESD_LIB = $_esdlib 1173 ESD_LIB = $_esdlib
1285 /* You have a choice for MP3 decoding: mp3lib(mpg123) or Win32(l3codeca.acm) 1362 /* You have a choice for MP3 decoding: mp3lib(mpg123) or Win32(l3codeca.acm)
1286 #define this if you prefer mpg123 (with 3Dnow! support) than l3codeca.acm 1363 #define this if you prefer mpg123 (with 3Dnow! support) than l3codeca.acm
1287 (with mmx/sse optimizations) 1364 (with mmx/sse optimizations)
1288 You can still change it runtime using -afm 1 (mpg123) or -afm 4 (l3codeca)*/ 1365 You can still change it runtime using -afm 1 (mpg123) or -afm 4 (l3codeca)*/
1289 $_mpg123 1366 $_mpg123
1367
1368 /* AUDIO Support */
1369 $_ossaudio
1370 $_sunaudio
1290 1371
1291 /* XMMP support: (test code) */ 1372 /* XMMP support: (test code) */
1292 $_xmmpaudio 1373 $_xmmpaudio
1293 #define LIBDIR "/usr/local/lib" 1374 #define LIBDIR "/usr/local/lib"
1294 #define PLUGINDIR LIBDIR "/xmmp/Plugins" 1375 #define PLUGINDIR LIBDIR "/xmmp/Plugins"