3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: Check the Subversion log.
8 # Cleanups all over the place (c) 2001 pl
11 # This configure script is *not* autoconf-based and has different semantics.
12 # It attempts to autodetect all settings and options where possible. It is
13 # possible to override autodetection with the --enable-option/--disable-option
14 # command line parameters. --enable-option forces the option on skipping
15 # autodetection. Yes, this means that compilation may fail and yes, this is not
16 # how autoconf-based configure scripts behave.
18 # configure generates a series of configuration files:
19 # - config.h contains #defines that are used in the C code.
20 # - config.mak is included from the Makefiles.
22 # If you want to add a new check for $feature, look at the existing checks
23 # and try to use helper functions where you can.
25 # Furthermore you need to add the variable _feature to the list of default
26 # settings and set it to one of yes/no/auto. Also add appropriate
27 # --enable-feature/--disable-feature command line options.
28 # The results of the check should be written to config.h and config.mak
29 # at the end of this script. The variable names used for this should be
30 # uniform, i.e. if the option is named 'feature':
32 # _feature : should have a value of yes/no/auto
33 # def_feature : '#define ... 1' or '#undef ...' for conditional compilation
34 # _ld_feature : '-L/path/dir -lfeature' GCC options
36 #############################################################################
38 # Prevent locale nonsense from breaking basic text processing utils
41 # Store the configure line that was used
44 # Prefer these macros to full length text !
45 # These macros only return an error code - NO display is done
50 cat "$source" >> "$TMPLOG"
52 echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o $TMPEXE $@" >> "$TMPLOG"
54 $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
62 compile_check
$TMPC $@
66 compile_check
$TMPCPP $@
-lstdc++
71 int main(void) { return 0; }
73 compile_check
$TMPC $@
79 int main(void) { return 0; }
82 compile_check
$TMPC $@
88 int main(void) { return $2; }
91 compile_check
$TMPC $@
97 int main(void) { $2; return 0; }
101 compile_check
$TMPC $@
104 define_statement_check
() {
108 int main(void) { $3; return 0; }
111 compile_check
$TMPC $@
114 return_statement_check
() {
117 int main(void) { $2; return $3; }
120 compile_check
$TMPC $@
125 int main(void) { __asm__ volatile ($1); return 0; }
128 compile_check
$TMPC $@
131 # The following checks are special and should only be used with broken and
132 # non-selfsufficient headers that do not include all of their dependencies.
134 header_check_broken
() {
138 int main(void) { return 0; }
142 compile_check
$TMPC $@
145 statement_check_broken
() {
149 int main(void) { $3; return 0; }
152 compile_check
$TMPC $@
157 cat "$TMPS" >> "$TMPLOG"
159 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
161 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
169 unset IFS
# shell should not be used for programming
171 echo "$_pkg_config --cflags $@" >> "$TMPLOG"
172 ctmp
=$
($_pkg_config --cflags "$@" 2>> "$TMPLOG") ||
return $?
174 echo "$_pkg_config --libs $@" >> "$TMPLOG"
175 ltmp
=$
($_pkg_config --libs "$@" 2>> "$TMPLOG") ||
return $?
177 echo "cflags: $ctmp" >> "$TMPLOG"
178 echo "libs: $ltmp" >> "$TMPLOG"
180 extra_cflags
="$extra_cflags $ctmp"
181 extra_ldflags
="$extra_ldflags $ltmp"
185 "$TMPEXE" >> "$TMPLOG" 2>&1
188 # Display error message, flushes tempfile, exit
193 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
194 echo "Check \"$TMPLOG\" if you do not understand why it failed."
198 # OS test booleans functions
200 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
202 aix
() { issystem
"AIX"; }
203 amigaos
() { issystem
"AmigaOS"; }
204 beos
() { issystem
"BEOS"; }
205 bsdos
() { issystem
"BSD/OS"; }
206 cygwin
() { issystem
"CYGWIN"; }
207 darwin
() { issystem
"Darwin"; }
208 dragonfly
() { issystem
"DragonFly"; }
209 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
210 gnu
() { issystem
"GNU"; }
211 hpux
() { issystem
"HP-UX"; }
212 linux
() { issystem
"Linux"; }
213 mingw32
() { issystem
"MINGW32"; }
214 morphos
() { issystem
"MorphOS"; }
215 netbsd
() { issystem
"NetBSD"; }
216 openbsd
() { issystem
"OpenBSD"; }
217 qnx
() { issystem
"QNX"; }
218 sunos
() { issystem
"SunOS"; }
219 win32
() { cygwin || mingw32
; }
221 # arch test boolean functions
222 # x86/x86pc is used by QNX
225 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
232 x86_64|amd64
) return 0 ;;
243 ppc|ppc64|powerpc|powerpc64
) return 0;;
262 # Use this before starting a check
264 echo "============ Checking for $@ ============" >> "$TMPLOG"
265 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
268 # Use this to echo the results of a check
270 if test "$res_comment" ; then
271 res_comment
="($res_comment)"
273 echo "Result is: $@ $res_comment" >> "$TMPLOG"
274 echo "##########################################" >> "$TMPLOG"
276 echo "$@ $res_comment"
279 #############################################################################
281 # Check how echo works in this /bin/sh
283 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
284 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
288 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
289 man_lang_all
=$
(echo DOCS
/man
/??
/mplayer
.1 DOCS
/man
/??_??
/mplayer
.1 |
sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g")
290 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
294 Usage: $0 [OPTIONS]...
297 -h, --help display this help and exit
299 Installation directories:
300 --prefix=DIR prefix directory for installation [/usr/local]
301 --bindir=DIR directory for installing binaries [PREFIX/bin]
302 --datadir=DIR directory for installing machine independent
303 data files (skins, etc) [PREFIX/share/mplayer]
304 --mandir=DIR directory for installing man pages [PREFIX/share/man]
305 --confdir=DIR directory for installing configuration files
307 --localedir=DIR directory for locale tree [PREFIX/share/locale]
308 --libdir=DIR directory for object code libraries [PREFIX/lib]
309 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
312 --disable-mplayer disable MPlayer compilation [enable]
313 --enable-termcap use termcap database for key codes [autodetect]
314 --enable-termios use termios database for key codes [autodetect]
315 --disable-iconv disable iconv for encoding conversion [autodetect]
316 --disable-langinfo do not use langinfo [autodetect]
317 --enable-lirc enable LIRC (remote control) support [autodetect]
318 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
319 --enable-joystick enable joystick support [disable]
320 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
321 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
322 --disable-vm disable X video mode extensions [autodetect]
323 --disable-xf86keysym disable support for multimedia keys [autodetect]
324 --enable-radio enable radio interface [disable]
325 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
326 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
327 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
328 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
329 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
330 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
331 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
332 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
333 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
334 --disable-networking disable networking [enable]
335 --enable-winsock2_h enable winsock2_h [autodetect]
336 --enable-smb enable Samba (SMB) input [autodetect]
337 --enable-live enable LIVE555 Streaming Media [disable]
338 --enable-libquvi enable libquvi [autodetect]
339 --enable-nemesi enable Nemesi Streaming Media [autodetect]
340 --disable-vcd disable VCD support [autodetect]
341 --disable-bluray disable Blu-ray support [autodetect]
342 --disable-dvdnav disable libdvdnav [autodetect]
343 --disable-dvdread disable libdvdread [autodetect]
344 --disable-dvdread-internal disable internal libdvdread [autodetect]
345 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
346 --disable-cddb disable cddb [autodetect]
347 --disable-bitmap-font disable bitmap font support [enable]
348 --disable-freetype disable FreeType 2 font rendering [autodetect]
349 --disable-fontconfig disable fontconfig font lookup [autodetect]
350 --disable-unrarexec disable using of UnRAR executable [enabled]
351 --disable-sortsub disable subtitle sorting [enabled]
352 --enable-fribidi enable the FriBiDi libs [autodetect]
353 --disable-enca disable ENCA charset oracle library [autodetect]
354 --enable-macosx-finder enable Mac OS X Finder invocation parameter
356 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
357 --disable-inet6 disable IPv6 support [autodetect]
358 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
359 --disable-ftp disable FTP support [enabled]
360 --disable-vstream disable TiVo vstream client support [autodetect]
361 --disable-pthreads disable Posix threads support [autodetect]
362 --disable-w32threads disable Win32 threads support [autodetect]
363 --disable-libass disable subtitle rendering with libass [autodetect]
364 --enable-rpath enable runtime linker path for extra libs [disabled]
365 --disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
368 --enable-gif enable GIF support [autodetect]
369 --enable-png enable PNG input/output support [autodetect]
370 --enable-mng enable MNG input support [autodetect]
371 --enable-jpeg enable JPEG input/output support [autodetect]
372 --enable-libcdio enable libcdio support [autodetect]
373 --disable-win32dll disable Win32 DLL support [autodetect]
374 --disable-qtx disable QuickTime codecs support [enabled]
375 --disable-xanim disable XAnim codecs support [enabled]
376 --disable-real disable RealPlayer codecs support [enabled]
377 --disable-xvid disable Xvid [autodetect]
378 --disable-libnut disable libnut [autodetect]
379 --enable-libav skip Libav autodetection [autodetect]
380 --disable-libvorbis disable libvorbis support [autodetect]
381 --disable-tremor disable Tremor [autodetect if no libvorbis]
382 --disable-speex disable Speex support [autodetect]
383 --enable-theora enable OggTheora libraries [autodetect]
384 --enable-faad enable FAAD2 (AAC) [autodetect]
385 --disable-ladspa disable LADSPA plugin support [autodetect]
386 --disable-libbs2b disable libbs2b audio filter support [autodetect]
387 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
388 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
389 --disable-mad disable libmad (MPEG audio) support [autodetect]
390 --enable-xmms enable XMMS input plugin support [disabled]
391 --enable-libdca enable libdca support [autodetect]
392 --disable-liba52 disable liba52 [autodetect]
393 --enable-musepack enable libmpcdec support (deprecated, libavcodec
394 Musepack decoder is preferred) [disabled]
397 --enable-gl enable OpenGL video output [autodetect]
398 --enable-dga2 enable DGA 2 support [autodetect]
399 --enable-dga1 enable DGA 1 support [autodetect]
400 --enable-vesa enable VESA video output [autodetect]
401 --enable-svga enable SVGAlib video output [autodetect]
402 --enable-sdl enable SDL video output [autodetect]
403 --enable-aa enable AAlib video output [autodetect]
404 --enable-caca enable CACA video output [autodetect]
405 --enable-ggi enable GGI video output [autodetect]
406 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
407 --enable-direct3d enable Direct3D video output [autodetect]
408 --enable-directx enable DirectX video output [autodetect]
409 --enable-dxr3 enable DXR3/H+ video output [autodetect]
410 --enable-ivtv enable IVTV TV-Out video output [autodetect]
411 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
412 --enable-dvb enable DVB video output [autodetect]
413 --enable-mga enable mga_vid video output [autodetect]
414 --enable-xmga enable mga_vid X11 video output [autodetect]
415 --enable-xv enable Xv video output [autodetect]
416 --enable-vdpau enable VDPAU acceleration [autodetect]
417 --enable-vm enable XF86VidMode support [autodetect]
418 --enable-xinerama enable Xinerama support [autodetect]
419 --enable-x11 enable X11 video output [autodetect]
420 --enable-xshape enable XShape support [autodetect]
421 --disable-xss disable screensaver support via xss [autodetect]
422 --enable-fbdev enable FBDev video output [autodetect]
423 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
424 --enable-tdfxfb enable tdfxfb video output [disable]
425 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
426 --enable-wii enable Nintendo Wii/GameCube video output [disable]
427 --enable-directfb enable DirectFB video output [autodetect]
428 --enable-bl enable Blinkenlights video output [disable]
429 --enable-tdfxvid enable tdfx_vid video output [disable]
430 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
431 --disable-tga disable Targa video output [enable]
432 --disable-pnm disable PNM video output [enable]
433 --disable-md5sum disable md5sum video output [enable]
434 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
435 --disable-corevideo disable CoreVideo video output [autodetect]
436 --disable-cocoa disable Cocoa OpenGL backend [autodetect]
437 --disable-sharedbuffer disable OSX shared buffer video output [autodetect]
440 --disable-alsa disable ALSA audio output [autodetect]
441 --disable-ossaudio disable OSS audio output [autodetect]
442 --disable-rsound disable RSound audio output [autodetect]
443 --disable-pulse disable Pulseaudio audio output [autodetect]
444 --disable-portaudio disable PortAudio audio output [autodetect]
445 --disable-jack disable JACK audio output [autodetect]
446 --enable-openal enable OpenAL audio output [disable]
447 --disable-nas disable NAS audio output [autodetect]
448 --disable-sunaudio disable Sun audio output [autodetect]
449 --disable-win32waveout disable Windows waveout audio output [autodetect]
450 --disable-coreaudio disable CoreAudio audio output [autodetect]
451 --disable-select disable using select() on the audio device [enable]
454 --enable-translation enable support for translated output [disable]
455 --charset=charset convert the console messages to this character set
456 --language-doc=lang language to use for the documentation [en]
457 --language-man=lang language to use for the man pages [en]
458 --language-msg=lang extra languages for program messages [all]
459 --language=lang default language to use [en]
460 Specific options override --language. You can pass a list of languages separated
461 by whitespace or commas instead of a single language. Nonexisting translations
462 will be dropped from each list. All translations available in the list will be
463 installed. The value "all" will activate all translations. The LINGUAS
464 environment variable is honored. In all cases the fallback is English.
465 The program always supports English-language output; additional message
466 languages are only installed if --enable-translation is also specified.
467 Available values for --language-doc are: all $doc_lang_all
468 Available values for --language-man are: all $man_lang_all
469 Available values for --language-msg are: all $msg_lang_all
471 Miscellaneous options:
472 --enable-runtime-cpudetection enable runtime CPU detection [disable]
473 --enable-cross-compile enable cross-compilation [disable]
474 --cc=COMPILER C compiler to build MPlayer [gcc]
475 --as=ASSEMBLER assembler to build MPlayer [as]
476 --nm=NM nm tool to build MPlayer [nm]
477 --yasm=YASM Yasm assembler to build MPlayer [yasm]
478 --ar=AR librarian to build MPlayer [ar]
479 --pkg-config=PKGCONFIG pkg-config to find some libraries [pkg-config]
480 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
481 --windres=WINDRES windres to build MPlayer [windres]
482 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
483 --enable-static build a statically linked binary
484 --with-install=PATH path to a custom install program
487 --enable-mmx enable MMX [autodetect]
488 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
489 --enable-3dnow enable 3DNow! [autodetect]
490 --enable-3dnowext enable extended 3DNow! [autodetect]
491 --enable-sse enable SSE [autodetect]
492 --enable-sse2 enable SSE2 [autodetect]
493 --enable-ssse3 enable SSSE3 [autodetect]
494 --enable-shm enable shm [autodetect]
495 --enable-altivec enable AltiVec (PowerPC) [autodetect]
496 --enable-armv5te enable DSP extensions (ARM) [autodetect]
497 --enable-armv6 enable ARMv6 (ARM) [autodetect]
498 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
499 --enable-armvfp enable ARM VFP (ARM) [autodetect]
500 --enable-neon enable NEON (ARM) [autodetect]
501 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
502 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
503 --enable-big-endian force byte order to big-endian [autodetect]
504 --enable-debug[=1-3] compile-in debugging information [disable]
505 --enable-profile compile-in profiling information [disable]
506 --disable-sighandler disable sighandler for crashes [enable]
507 --enable-crash-debug enable automatic gdb attach on crash [disable]
509 Use these options if autodetection fails:
510 --extra-cflags=FLAGS extra CFLAGS
511 --extra-ldflags=FLAGS extra LDFLAGS
512 --extra-libs=FLAGS extra linker flags
513 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
515 --with-sdl-config=PATH path to sdl*-config
516 --with-dvdnav-config=PATH path to dvdnav-config
517 --with-dvdread-config=PATH path to dvdread-config
519 This configure script is NOT autoconf-based, even though its output is similar.
520 It will try to autodetect all configuration options. If you --enable an option
521 it will be forcefully turned on, skipping autodetection. This can break
522 compilation, so you need to know what you are doing.
527 # GOTCHA: the variables below defines the default behavior for autodetection
528 # and have - unless stated otherwise - at least 2 states : yes no
529 # If autodetection is available then the third state is: auto
553 test "$CC" && _cc
="$CC"
557 _runtime_cpudetection
=no
619 _dvdnavconfig
=dvdnav-config
620 _dvdreadconfig
=dvdread-config
622 _dvdread_internal
=auto
623 _libdvdcss_internal
=auto
710 def_dos_paths
="#define HAVE_DOS_PATHS 0"
711 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
712 def_priority
="#undef CONFIG_PRIORITY"
713 def_pthread_cache
="#undef PTHREAD_CACHE"
721 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
724 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
727 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
730 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
733 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
736 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
739 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
742 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
746 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
750 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
752 --with-dvdnav-config=*)
753 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
755 --with-dvdread-config=*)
756 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
760 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
763 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
766 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
768 --extra-libs-mplayer=*)
769 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
773 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
776 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
779 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
782 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
785 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
788 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
791 _pkg_config
=$
(echo $ac_option | cut
-d '=' -f 2)
794 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
797 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
803 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
806 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
809 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
812 language
=$
(echo $ac_option | cut
-d '=' -f 2)
831 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
836 --enable-translation) _translation
=yes ;;
837 --disable-translation) _translation
=no
;;
838 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
839 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
840 --enable-cross-compile) _cross_compile
=yes ;;
841 --disable-cross-compile) _cross_compile
=no
;;
842 --enable-mplayer) _mplayer
=yes ;;
843 --disable-mplayer) _mplayer
=no
;;
844 --enable-x11) _x11
=yes ;;
845 --disable-x11) _x11
=no
;;
846 --enable-xshape) _xshape
=yes ;;
847 --disable-xshape) _xshape
=no
;;
848 --enable-xss) _xss
=yes ;;
849 --disable-xss) _xss
=no
;;
850 --enable-xv) _xv
=yes ;;
851 --disable-xv) _xv
=no
;;
852 --enable-vdpau) _vdpau
=yes ;;
853 --disable-vdpau) _vdpau
=no
;;
854 --enable-sdl) _sdl
=yes ;;
855 --disable-sdl) _sdl
=no
;;
856 --enable-direct3d) _direct3d
=yes ;;
857 --disable-direct3d) _direct3d
=no
;;
858 --enable-directx) _directx
=yes ;;
859 --disable-directx) _directx
=no
;;
860 --enable-win32waveout) _win32waveout
=yes ;;
861 --disable-win32waveout) _win32waveout
=no
;;
862 --enable-nas) _nas
=yes ;;
863 --disable-nas) _nas
=no
;;
864 --enable-png) _png
=yes ;;
865 --disable-png) _png
=no
;;
866 --enable-mng) _mng
=yes ;;
867 --disable-mng) _mng
=no
;;
868 --enable-jpeg) _jpeg
=yes ;;
869 --disable-jpeg) _jpeg
=no
;;
870 --enable-pnm) _pnm
=yes ;;
871 --disable-pnm) _pnm
=no
;;
872 --enable-md5sum) _md5sum
=yes ;;
873 --disable-md5sum) _md5sum
=no
;;
874 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
875 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
876 --enable-gif) _gif
=yes ;;
877 --disable-gif) _gif
=no
;;
878 --enable-gl) _gl
=yes ;;
879 --disable-gl) _gl
=no
;;
880 --enable-ggi) _ggi
=yes ;;
881 --disable-ggi) _ggi
=no
;;
882 --enable-ggiwmh) _ggiwmh
=yes ;;
883 --disable-ggiwmh) _ggiwmh
=no
;;
884 --enable-aa) _aa
=yes ;;
885 --disable-aa) _aa
=no
;;
886 --enable-caca) _caca
=yes ;;
887 --disable-caca) _caca
=no
;;
888 --enable-svga) _svga
=yes ;;
889 --disable-svga) _svga
=no
;;
890 --enable-vesa) _vesa
=yes ;;
891 --disable-vesa) _vesa
=no
;;
892 --enable-fbdev) _fbdev
=yes ;;
893 --disable-fbdev) _fbdev
=no
;;
894 --enable-dvb) _dvb
=yes ;;
895 --disable-dvb) _dvb
=no
;;
896 --enable-dxr3) _dxr3
=yes ;;
897 --disable-dxr3) _dxr3
=no
;;
898 --enable-ivtv) _ivtv
=yes ;;
899 --disable-ivtv) _ivtv
=no
;;
900 --enable-v4l2) _v4l2
=yes ;;
901 --disable-v4l2) _v4l2
=no
;;
902 --enable-iconv) _iconv
=yes ;;
903 --disable-iconv) _iconv
=no
;;
904 --enable-langinfo) _langinfo
=yes ;;
905 --disable-langinfo) _langinfo
=no
;;
906 --enable-rtc) _rtc
=yes ;;
907 --disable-rtc) _rtc
=no
;;
908 --enable-libdv) _libdv
=yes ;;
909 --disable-libdv) _libdv
=no
;;
910 --enable-ossaudio) _ossaudio
=yes ;;
911 --disable-ossaudio) _ossaudio
=no
;;
912 --enable-rsound) _rsound
=yes ;;
913 --disable-rsound) _rsound
=no
;;
914 --enable-pulse) _pulse
=yes ;;
915 --disable-pulse) _pulse
=no
;;
916 --enable-portaudio) _portaudio
=yes ;;
917 --disable-portaudio) _portaudio
=no
;;
918 --enable-jack) _jack
=yes ;;
919 --disable-jack) _jack
=no
;;
920 --enable-openal) _openal
=yes ;;
921 --disable-openal) _openal
=no
;;
922 --enable-mad) _mad
=yes ;;
923 --disable-mad) _mad
=no
;;
924 --enable-libcdio) _libcdio
=yes ;;
925 --disable-libcdio) _libcdio
=no
;;
926 --enable-libvorbis) _libvorbis
=yes ;;
927 --disable-libvorbis) _libvorbis
=no
;;
928 --enable-speex) _speex
=yes ;;
929 --disable-speex) _speex
=no
;;
930 --enable-tremor) _tremor
=yes ;;
931 --disable-tremor) _tremor
=no
;;
932 --enable-theora) _theora
=yes ;;
933 --disable-theora) _theora
=no
;;
934 --enable-mpg123) _mpg123
=yes ;;
935 --disable-mpg123) _mpg123
=no
;;
936 --enable-liba52) _liba52
=yes ;;
937 --disable-liba52) _liba52
=no
;;
938 --enable-libdca) _libdca
=yes ;;
939 --disable-libdca) _libdca
=no
;;
940 --enable-musepack) _musepack
=yes ;;
941 --disable-musepack) _musepack
=no
;;
942 --enable-faad) _faad
=yes ;;
943 --disable-faad) _faad
=no
;;
944 --enable-ladspa) _ladspa
=yes ;;
945 --disable-ladspa) _ladspa
=no
;;
946 --enable-libbs2b) _libbs2b
=yes ;;
947 --disable-libbs2b) _libbs2b
=no
;;
948 --enable-xmms) _xmms
=yes ;;
949 --disable-xmms) _xmms
=no
;;
950 --enable-vcd) _vcd
=yes ;;
951 --disable-vcd) _vcd
=no
;;
952 --enable-bluray) _bluray
=yes ;;
953 --disable-bluray) _bluray
=no
;;
954 --enable-dvdread) _dvdread
=yes ;;
955 --disable-dvdread) _dvdread
=no
;;
956 --enable-dvdread-internal) _dvdread_internal
=yes ;;
957 --disable-dvdread-internal) _dvdread_internal
=no
;;
958 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
959 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
960 --enable-dvdnav) _dvdnav
=yes ;;
961 --disable-dvdnav) _dvdnav
=no
;;
962 --enable-xanim) _xanim
=yes ;;
963 --disable-xanim) _xanim
=no
;;
964 --enable-real) _real
=yes ;;
965 --disable-real) _real
=no
;;
966 --enable-live) _live
=yes ;;
967 --disable-live) _live
=no
;;
968 --enable-nemesi) _nemesi
=yes ;;
969 --disable-nemesi) _nemesi
=no
;;
970 --enable-xinerama) _xinerama
=yes ;;
971 --disable-xinerama) _xinerama
=no
;;
972 --enable-mga) _mga
=yes ;;
973 --disable-mga) _mga
=no
;;
974 --enable-xmga) _xmga
=yes ;;
975 --disable-xmga) _xmga
=no
;;
976 --enable-vm) _vm
=yes ;;
977 --disable-vm) _vm
=no
;;
978 --enable-xf86keysym) _xf86keysym
=yes ;;
979 --disable-xf86keysym) _xf86keysym
=no
;;
980 --enable-sunaudio) _sunaudio
=yes ;;
981 --disable-sunaudio) _sunaudio
=no
;;
982 --enable-alsa) _alsa
=yes ;;
983 --disable-alsa) _alsa
=no
;;
984 --enable-tv) _tv
=yes ;;
985 --disable-tv) _tv
=no
;;
986 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
987 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
988 --enable-tv-v4l1) _tv_v4l1
=yes ;;
989 --disable-tv-v4l1) _tv_v4l1
=no
;;
990 --enable-tv-v4l2) _tv_v4l2
=yes ;;
991 --disable-tv-v4l2) _tv_v4l2
=no
;;
992 --enable-tv-dshow) _tv_dshow
=yes ;;
993 --disable-tv-dshow) _tv_dshow
=no
;;
994 --enable-radio) _radio
=yes ;;
995 --enable-radio-capture) _radio_capture
=yes ;;
996 --disable-radio-capture) _radio_capture
=no
;;
997 --disable-radio) _radio
=no
;;
998 --enable-radio-v4l) _radio_v4l
=yes ;;
999 --disable-radio-v4l) _radio_v4l
=no
;;
1000 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1001 --disable-radio-v4l2) _radio_v4l2
=no
;;
1002 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1003 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1004 --enable-pvr) _pvr
=yes ;;
1005 --disable-pvr) _pvr
=no
;;
1006 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1007 --disable-fastmemcpy) _fastmemcpy
=no
;;
1008 --enable-networking) networking
=yes ;;
1009 --disable-networking) networking
=no
;;
1010 --enable-winsock2_h) _winsock2_h
=yes ;;
1011 --disable-winsock2_h) _winsock2_h
=no
;;
1012 --enable-smb) _smb
=yes ;;
1013 --disable-smb) _smb
=no
;;
1014 --enable-libquvi) _libquvi
=yes ;;
1015 --disable-libquvi) _libquvi
=no
;;
1016 --enable-joystick) _joystick
=yes ;;
1017 --disable-joystick) _joystick
=no
;;
1018 --enable-xvid) _xvid
=yes ;;
1019 --disable-xvid) _xvid
=no
;;
1020 --enable-libnut) _libnut
=yes ;;
1021 --disable-libnut) _libnut
=no
;;
1022 --enable-libav) ffmpeg
=yes ;;
1023 --ffmpeg-source-dir=*)
1024 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1026 --enable-lirc) _lirc
=yes ;;
1027 --disable-lirc) _lirc
=no
;;
1028 --enable-lircc) _lircc
=yes ;;
1029 --disable-lircc) _lircc
=no
;;
1030 --enable-apple-remote) _apple_remote
=yes ;;
1031 --disable-apple-remote) _apple_remote
=no
;;
1032 --enable-apple-ir) _apple_ir
=yes ;;
1033 --disable-apple-ir) _apple_ir
=no
;;
1034 --enable-termcap) _termcap
=yes ;;
1035 --disable-termcap) _termcap
=no
;;
1036 --enable-termios) _termios
=yes ;;
1037 --disable-termios) _termios
=no
;;
1038 --enable-3dfx) _3dfx
=yes ;;
1039 --disable-3dfx) _3dfx
=no
;;
1040 --enable-s3fb) _s3fb
=yes ;;
1041 --disable-s3fb) _s3fb
=no
;;
1042 --enable-wii) _wii
=yes ;;
1043 --disable-wii) _wii
=no
;;
1044 --enable-tdfxfb) _tdfxfb
=yes ;;
1045 --disable-tdfxfb) _tdfxfb
=no
;;
1046 --disable-tdfxvid) _tdfxvid
=no
;;
1047 --enable-tdfxvid) _tdfxvid
=yes ;;
1048 --disable-xvr100) _xvr100
=no
;;
1049 --enable-xvr100) _xvr100
=yes ;;
1050 --disable-tga) _tga
=no
;;
1051 --enable-tga) _tga
=yes ;;
1052 --enable-directfb) _directfb
=yes ;;
1053 --disable-directfb) _directfb
=no
;;
1054 --enable-bl) _bl
=yes ;;
1055 --disable-bl) _bl
=no
;;
1056 --enable-shm) _shm
=yes ;;
1057 --disable-shm) _shm
=no
;;
1058 --enable-select) _select
=yes ;;
1059 --disable-select) _select
=no
;;
1060 --enable-cddb) _cddb
=yes ;;
1061 --disable-cddb) _cddb
=no
;;
1062 --enable-big-endian) _big_endian
=yes ;;
1063 --disable-big-endian) _big_endian
=no
;;
1064 --enable-bitmap-font) _bitmap_font
=yes ;;
1065 --disable-bitmap-font) _bitmap_font
=no
;;
1066 --enable-freetype) _freetype
=yes ;;
1067 --disable-freetype) _freetype
=no
;;
1068 --enable-fontconfig) _fontconfig
=yes ;;
1069 --disable-fontconfig) _fontconfig
=no
;;
1070 --enable-unrarexec) _unrar_exec
=yes ;;
1071 --disable-unrarexec) _unrar_exec
=no
;;
1072 --enable-ftp) _ftp
=yes ;;
1073 --disable-ftp) _ftp
=no
;;
1074 --enable-vstream) _vstream
=yes ;;
1075 --disable-vstream) _vstream
=no
;;
1076 --enable-pthreads) _pthreads
=yes ;;
1077 --disable-pthreads) _pthreads
=no
;;
1078 --enable-w32threads) _w32threads
=yes ;;
1079 --disable-w32threads) _w32threads
=no
;;
1080 --enable-libass) _ass
=yes ;;
1081 --disable-libass) _ass
=no
;;
1082 --enable-rpath) _rpath
=yes ;;
1083 --disable-rpath) _rpath
=no
;;
1084 --enable-libpostproc) libpostproc
=yes ;;
1085 --disable-libpostproc) libpostproc
=no
;;
1087 --enable-fribidi) _fribidi
=yes ;;
1088 --disable-fribidi) _fribidi
=no
;;
1090 --enable-enca) _enca
=yes ;;
1091 --disable-enca) _enca
=no
;;
1093 --enable-inet6) _inet6
=yes ;;
1094 --disable-inet6) _inet6
=no
;;
1096 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1097 --disable-gethostbyname2) _gethostbyname2
=no
;;
1099 --enable-dga1) _dga1
=yes ;;
1100 --disable-dga1) _dga1
=no
;;
1101 --enable-dga2) _dga2
=yes ;;
1102 --disable-dga2) _dga2
=no
;;
1104 --enable-qtx) _qtx
=yes ;;
1105 --disable-qtx) _qtx
=no
;;
1107 --enable-coreaudio) _coreaudio
=yes ;;
1108 --disable-coreaudio) _coreaudio
=no
;;
1109 --enable-corevideo) _corevideo
=yes ;;
1110 --disable-corevideo) _corevideo
=no
;;
1111 --enable-cocoa) _cocoa
=yes ;;
1112 --disable-cocoa) _cocoa
=no
;;
1113 --enable-sharedbuffer) _sharedbuffer
=yes ;;
1114 --disable-sharedbuffer) _sharedbuffer
=no
;;
1115 --enable-macosx-finder) _macosx_finder
=yes ;;
1116 --disable-macosx-finder) _macosx_finder
=no
;;
1117 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1118 --disable-macosx-bundle) _macosx_bundle
=no
;;
1120 --enable-sortsub) _sortsub
=yes ;;
1121 --disable-sortsub) _sortsub
=no
;;
1123 --enable-crash-debug) _crash_debug
=yes ;;
1124 --disable-crash-debug) _crash_debug
=no
;;
1125 --enable-sighandler) _sighandler
=yes ;;
1126 --disable-sighandler) _sighandler
=no
;;
1127 --enable-win32dll) _win32dll
=yes ;;
1128 --disable-win32dll) _win32dll
=no
;;
1130 --enable-sse) _sse
=yes ;;
1131 --disable-sse) _sse
=no
;;
1132 --enable-sse2) _sse2
=yes ;;
1133 --disable-sse2) _sse2
=no
;;
1134 --enable-ssse3) _ssse3
=yes ;;
1135 --disable-ssse3) _ssse3
=no
;;
1136 --enable-mmxext) _mmxext
=yes ;;
1137 --disable-mmxext) _mmxext
=no
;;
1138 --enable-3dnow) _3dnow
=yes ;;
1139 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1140 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1141 --disable-3dnowext) _3dnowext
=no
;;
1142 --enable-cmov) _cmov
=yes ;;
1143 --disable-cmov) _cmov
=no
;;
1144 --enable-fast-cmov) _fast_cmov
=yes ;;
1145 --disable-fast-cmov) _fast_cmov
=no
;;
1146 --enable-fast-clz) _fast_clz
=yes ;;
1147 --disable-fast-clz) _fast_clz
=no
;;
1148 --enable-altivec) _altivec
=yes ;;
1149 --disable-altivec) _altivec
=no
;;
1150 --enable-armv5te) _armv5te
=yes ;;
1151 --disable-armv5te) _armv5te
=no
;;
1152 --enable-armv6) _armv6
=yes ;;
1153 --disable-armv6) _armv6
=no
;;
1154 --enable-armv6t2) _armv6t2
=yes ;;
1155 --disable-armv6t2) _armv6t2
=no
;;
1156 --enable-armvfp) _armvfp
=yes ;;
1157 --disable-armvfp) _armvfp
=no
;;
1158 --enable-neon) neon
=yes ;;
1159 --disable-neon) neon
=no
;;
1160 --enable-iwmmxt) _iwmmxt
=yes ;;
1161 --disable-iwmmxt) _iwmmxt
=no
;;
1162 --enable-mmx) _mmx
=yes ;;
1163 --disable-mmx) # 3Dnow! and MMX2 require MMX
1164 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1167 echo "Unknown parameter: $ac_option" >&2
1174 # Atmos: moved this here, to be correct, if --prefix is specified
1175 test -z "$_bindir" && _bindir
="$_prefix/bin"
1176 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1177 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1178 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1179 test -z "$_libdir" && _libdir
="$_prefix/lib"
1180 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1182 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1183 test "$tmpdir" && break
1186 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1187 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1192 echo Parameters configure was run with
: > "$TMPLOG"
1193 if test -n "$CFLAGS" ; then
1194 echo ${_echo_n} CFLAGS
="'$CFLAGS' ${_echo_c}" >> "$TMPLOG"
1196 if test -n "$PKG_CONFIG_PATH" ; then
1197 echo ${_echo_n} PKG_CONFIG_PATH
="'$PKG_CONFIG_PATH' ${_echo_c}" >> "$TMPLOG"
1199 echo .
/configure
$configuration >> "$TMPLOG"
1203 echocheck
"cross compilation"
1204 echores
$_cross_compile
1206 if test $_cross_compile = yes; then
1214 if test $_cross_compile = yes ; then
1215 # Usually cross-compiler prefixes match with the target triplet
1216 test -n "$_target" && tool_prefix
="$_target"-
1219 test "$_ranlib" = auto
&& _ranlib
="$tool_prefix"ranlib
1220 test "$_windres" = auto
&& _windres
="$tool_prefix"windres
1221 test "$_ar" = auto
&& _ar
="$tool_prefix"ar
1222 test "$_yasm" = auto
&& _yasm
="$tool_prefix"yasm
1223 test "$_pkg_config" = auto
&& _pkg_config
="$tool_prefix"pkg-config
1225 if test "$_cc" = auto
; then
1226 if test -n "$tool_prefix" ; then
1227 _cc
="$tool_prefix"gcc
1233 # Determine our OS name and CPU architecture
1234 if test -z "$_target" ; then
1236 system_name
=$
(uname
-s 2>&1)
1237 case "$system_name" in
1238 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1249 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1259 system_name
="$system_name-UNKNOWN"
1264 # host's CPU/instruction set
1265 host_arch
=$
(uname
-p 2>&1)
1266 case "$host_arch" in
1267 i386|sparc|ppc|alpha|arm|mips|vax
)
1269 powerpc
) # Darwin returns 'powerpc'
1272 *) # uname -p on Linux returns 'unknown' for the processor type,
1273 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1275 # Maybe uname -m (machine hardware name) returns something we
1278 # x86/x86pc is used by QNX
1279 case "$(uname -m 2>&1)" in
1280 x86_64|amd64|i
[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium
*|athlon
*|i586_i686|i586-i686|BePC
) host_arch
=i386
;;
1281 ia64
) host_arch
=ia64
;;
1282 macppc|ppc
) host_arch
=ppc
;;
1283 ppc64
) host_arch
=ppc64
;;
1284 alpha
) host_arch
=alpha
;;
1285 sparc
) host_arch
=sparc
;;
1286 sparc64
) host_arch
=sparc64
;;
1287 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1288 arm
*|zaurus|cats
) host_arch
=arm
;;
1289 sh3|sh4|sh4a
) host_arch
=sh
;;
1290 s390
) host_arch
=s390
;;
1291 s390x
) host_arch
=s390x
;;
1292 *mips
*) host_arch
=mips
;;
1293 vax
) host_arch
=vax
;;
1294 xtensa
*) host_arch
=xtensa
;;
1295 *) host_arch
=UNKNOWN
;;
1299 else # if test -z "$_target"
1301 system_name
=$
(echo $_target | cut
-d '-' -f $i)
1302 case "$(echo $system_name | tr A-Z a-z)" in
1303 linux
) system_name
=Linux
;;
1304 freebsd
) system_name
=FreeBSD
;;
1305 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1306 netbsd
) system_name
=NetBSD
;;
1307 bsd
/os
) system_name
=BSD
/OS
;;
1308 openbsd
) system_name
=OpenBSD
;;
1309 dragonfly
) system_name
=DragonFly
;;
1310 sunos
) system_name
=SunOS
;;
1311 qnx
) system_name
=QNX
;;
1312 morphos
) system_name
=MorphOS
;;
1313 amigaos
) system_name
=AmigaOS
;;
1314 mingw32
*) system_name
=MINGW32
;;
1319 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1320 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1321 if test $
(echo $host_arch) != "x86_64" ; then
1322 host_arch
=$
(echo $host_arch |
tr '_' '-')
1326 extra_cflags
="-I. $extra_cflags"
1327 _timer
=timer-linux.c
1330 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1331 extra_cflags
="$extra_cflags -I/usr/local/include"
1334 if netbsd || dragonfly
; then
1335 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1336 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1340 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1341 _timer
=timer-darwin.c
1345 extra_ldflags
="$extra_ldflags -lC"
1354 extra_cflags
="$extra_cflags -fno-common"
1355 # -lwinmm is always needed for osdep/timer-win2.c
1356 extra_ldflags
="$extra_ldflags -lwinmm"
1360 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1361 def_priority
="#define CONFIG_PRIORITY 1"
1367 extra_cflags
="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
1374 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1375 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1379 extra_ldflags
="$extra_ldflags -lph"
1382 TMPC
="$mplayer_tmpdir/tmp.c"
1383 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1384 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1385 TMPH
="$mplayer_tmpdir/tmp.h"
1386 TMPS
="$mplayer_tmpdir/tmp.S"
1388 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1389 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1393 # Checking CC version...
1394 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1395 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1396 echocheck
"$_cc version"
1398 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1399 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1400 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1401 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1402 # TODO verify older icc/ecc compatibility
1405 cc_version
="v. ?.??, bad"
1409 cc_version
="$cc_version, ok"
1412 cc_version
="$cc_version, bad"
1416 echores
"$cc_version"
1418 for _cc
in "$_cc" gcc cc
; do
1419 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1420 if test "$cc_name_tmp" = "gcc"; then
1421 cc_name
=$cc_name_tmp
1422 echocheck
"$_cc version"
1424 cc_version
=$
($_cc -dumpversion 2>&1)
1430 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1431 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1432 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1435 echores
"$cc_version"
1438 if $_cc -v 2>&1 |
grep -q "clang"; then
1439 echocheck
"$_cc version"
1441 cc_version
=$
($_cc -dumpversion 2>&1)
1442 res_comment
="experimental support only"
1443 echores
"clang $cc_version"
1446 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1447 if test "$cc_name_tmp" = "Sun C"; then
1448 echocheck
"$_cc version"
1450 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1451 res_comment
="experimental support only"
1452 echores
"Sun C $cc_version"
1457 test "$cc_fail" = yes && die
"unsupported compiler version"
1459 echocheck
"working compiler"
1460 cflag_check
"" || die
"Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
1463 if test -z "$_target" && x86
; then
1466 int test[(int)sizeof(char *)-7];
1470 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1473 echo "Detected operating system: $system_name"
1474 echo "Detected host architecture: $host_arch"
1478 # now that we know what compiler should be used for compilation, try to find
1479 # out which assembler is used by the $_cc compiler
1480 if test "$_as" = auto
; then
1481 _as
=$
($_cc -print-prog-name=as
)
1482 test -z "$_as" && _as
=as
1485 if test "$_nm" = auto
; then
1486 _nm
=$
($_cc -print-prog-name=nm
)
1487 test -z "$_nm" && _nm
=nm
1490 # XXX: this should be ok..
1493 if test "$_runtime_cpudetection" = no
; then
1495 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1496 # FIXME: Remove the cygwin check once AMD CPUs are supported
1497 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1498 # Linux with /proc mounted, extract CPU information from it
1499 _cpuinfo
="cat /proc/cpuinfo"
1500 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1501 # FreeBSD with Linux emulation /proc mounted,
1502 # extract CPU information from it
1503 # Don't use it on x86 though, it never reports 3Dnow
1504 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1505 elif darwin
&& ! x86
; then
1506 # use hostinfo on Darwin
1509 # use 'lsattr' on AIX
1510 _cpuinfo
="lsattr -E -l proc0 -a type"
1512 # all other OSes try to extract CPU information from a small helper
1513 # program cpuinfo instead
1514 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1515 _cpuinfo
="./cpuinfo$_exesuf"
1519 # gather more CPU information
1520 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1521 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1522 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1523 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1524 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1526 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1528 pparam
=$
(echo $exts |
sed -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1529 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1530 pparam
=$
(echo $pparam |
sed -e 's/sse/sse mmxext/')
1532 for ext
in $pparam ; do
1533 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1536 echocheck
"CPU vendor"
1537 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1539 echocheck
"CPU type"
1543 fi # test "$_runtime_cpudetection" = no
1545 if x86
&& test "$_runtime_cpudetection" = no
; then
1547 if test "$1" = kernel_check
; then
1548 echocheck
"kernel support of $2"
1552 static void catch(int sig) { exit(1); }
1554 signal(SIGILL, catch);
1555 __asm__ volatile ("$3":::"memory"); return 0;
1559 if cc_check
&& tmp_run
; then
1562 _optimizing
="$_optimizing $2"
1567 echo "It seems that your kernel does not correctly support $2."
1568 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1575 extcheck
$_mmx "mmx" "emms"
1576 extcheck
$_mmxext "mmxext" "sfence"
1577 extcheck
$_3dnow "3dnow" "femms"
1578 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1579 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1580 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1581 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1582 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1584 if test "$_gcc3_ext" != ""; then
1585 # if we had to disable sse/sse2 because the active kernel does not
1586 # support this instruction set extension, we also have to tell
1587 # gcc3 to not generate sse/sse2 instructions for normal C code
1588 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1594 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1595 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1596 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1597 subarch_all
='X86_32 X86_64 PPC64'
1598 case "$host_arch" in
1599 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1602 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1607 if test "$_runtime_cpudetection" = no
; then
1611 3) proc
=i386 iproc
=386 ;;
1612 4) proc
=i486 iproc
=486 ;;
1613 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1614 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1615 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1617 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1619 elif test "$pmodel" -ge 8; then
1621 elif test "$pmodel" -ge 6; then
1628 # It's a bit difficult to determine the correct type of Family 6
1629 # AMD CPUs just from their signature. Instead, we check directly
1630 # whether it supports SSE.
1631 if test "$_sse" = yes; then
1632 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1635 # Again, gcc treats athlon and athlon-tbird similarly.
1640 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1641 # caught and remedied in the optimization tests below.
1645 *) proc
=amdfam10 iproc
=686
1646 test $_fast_clz = "auto" && _fast_clz
=yes
1652 3) proc
=i386 iproc
=386 ;;
1653 4) proc
=i486 iproc
=486 ;;
1655 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1656 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1662 if test "$pmodel" -ge 15; then
1664 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1666 elif test "$pmodel" -ge 7; then
1668 elif test "$pmodel" -ge 3; then
1673 test $_fast_clz = "auto" && _fast_clz
=yes
1676 # A nocona in 32-bit mode has no more capabilities than a prescott.
1677 if test "$pmodel" -ge 3; then
1681 test $_fast_clz = "auto" && _fast_clz
=yes
1683 test $_fast_cmov = "auto" && _fast_cmov
=no
1685 *) proc
=prescott iproc
=686 ;;
1691 if test "$pmodel" -ge 8; then
1693 elif test "$pmodel" -ge 4; then
1700 if test "$pmodel" -ge 9; then
1707 *) proc
=i686 iproc
=i686
;;
1712 3) proc
=i386 iproc
=386 ;;
1713 4) proc
=i486 iproc
=486 ;;
1714 *) proc
=i586 iproc
=586 ;;
1718 proc
=i586 iproc
=586 ;;
1720 test $_fast_clz = "auto" && _fast_clz
=no
1721 fi # test "$_runtime_cpudetection" = no
1724 # check that gcc supports our CPU, if not, fall back to earlier ones
1725 # LGB: check -mcpu and -march swithing step by step with enabling
1726 # to fall back till 386.
1728 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1730 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1736 echocheck
"GCC & CPU optimization abilities"
1737 if test "$_runtime_cpudetection" = no
; then
1738 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1739 cflag_check
-march=native
&& proc
=native
1741 if test "$proc" = "amdfam10"; then
1742 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1744 if test "$proc" = "k8"; then
1745 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1747 if test "$proc" = "athlon-xp"; then
1748 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1750 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1751 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1753 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1754 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1755 if cflag_check
-march=i586
$cpuopt=i686
; then
1762 if test "$proc" = "prescott" ; then
1763 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1765 if test "$proc" = "core2" ; then
1766 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1768 if test "$proc" = "pentium4" ||
test "$proc" = "pentium-m" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon" ||
test "$proc" = "c3-2" ||
test "$proc" = "geode"; then
1769 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1771 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1772 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1774 if test "$proc" = "i586"; then
1775 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1777 if test "$proc" = "i486" ; then
1778 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1780 if test "$proc" = "i386" ; then
1781 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1783 if test "$proc" = "error" ; then
1784 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1788 elif test "$proc" = "i586-i686"; then
1789 _march
="-march=i586"
1790 _mcpu
="$cpuopt=i686"
1793 _march
="-march=$proc"
1794 _mcpu
="$cpuopt=$proc"
1797 else # if test "$_runtime_cpudetection" = no
1798 _mcpu
="$cpuopt=generic"
1799 # at least i486 required, for bswap instruction
1800 _march
="-march=i486"
1801 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1802 cflag_check
$_mcpu || _mcpu
=""
1803 cflag_check
$_march $_mcpu || _march
=""
1806 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1807 ## autodetected mcpu/march parameters
1808 if test "$_target" ; then
1809 # TODO: it may be a good idea to check GCC and fall back in all cases
1810 if test "$host_arch" = "i586-i686"; then
1811 _march
="-march=i586"
1812 _mcpu
="$cpuopt=i686"
1814 _march
="-march=$host_arch"
1815 _mcpu
="$cpuopt=$host_arch"
1823 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1824 i686|athlon
*|pentium
*) iproc
=686 ;;
1829 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1834 test $_fast_clz = "auto" && _fast_clz
=yes
1841 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1848 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1849 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1852 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1853 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1858 if test "$_runtime_cpudetection" = no
; then
1863 test $_fast_clz = "auto" && _fast_clz
=no
1872 # 64-bit prescotts exist, but as far as GCC is concerned they
1873 # have the same capabilities as a nocona.
1875 test $_fast_cmov = "auto" && _fast_cmov
=no
1876 test $_fast_clz = "auto" && _fast_clz
=no
1883 fi # test "$_runtime_cpudetection" = no
1885 echocheck
"GCC & CPU optimization abilities"
1886 # This is a stripped-down version of the i386 fallback.
1887 if test "$_runtime_cpudetection" = no
; then
1888 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1889 cflag_check
-march=native
&& proc
=native
1891 # --- AMD processors ---
1892 if test "$proc" = "amdfam10"; then
1893 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1895 if test "$proc" = "k8"; then
1896 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1898 # This will fail if gcc version < 3.3, which is ok because earlier
1899 # versions don't really support 64-bit on amd64.
1900 # Is this a valid assumption? -Corey
1901 if test "$proc" = "athlon-xp"; then
1902 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1904 # --- Intel processors ---
1905 if test "$proc" = "core2"; then
1906 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1908 if test "$proc" = "x86-64"; then
1909 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
1911 if test "$proc" = "nocona"; then
1912 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1914 if test "$proc" = "pentium4"; then
1915 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1918 _march
="-march=$proc"
1919 _mcpu
="$cpuopt=$proc"
1920 if test "$proc" = "error" ; then
1921 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1925 else # if test "$_runtime_cpudetection" = no
1926 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1927 _march
="-march=x86-64"
1928 _mcpu
="$cpuopt=generic"
1929 cflag_check
$_mcpu || _mcpu
="x86-64"
1930 cflag_check
$_mcpu || _mcpu
=""
1931 cflag_check
$_march $_mcpu || _march
=""
1935 test $_fast_cmov = "auto" && _fast_cmov
=yes
1936 test $_fast_clz = "auto" && _fast_clz
=yes
1944 if test "$host_arch" = "sparc64" ; then
1947 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1949 echocheck
"CPU type"
1951 case "$(echo $karch)" in
1956 sun4u
) proc
=ultrasparc _vis
='yes' ;;
1975 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1977 test $_fast_clz = "auto" && _fast_clz
=yes
1985 ppc|ppc64|powerpc|powerpc64
)
1987 def_dcbzl
='#define HAVE_DCBZL 0'
1988 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1991 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
1993 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1995 echocheck
"CPU type"
1996 case $system_name in
1998 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
1999 if test -n "$($_cpuinfo | grep altivec)"; then
2000 test $_altivec = auto
&& _altivec
=yes
2004 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2005 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2006 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2007 test $_altivec = auto
&& _altivec
=yes
2011 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2013 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2016 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2017 test $_altivec = auto
&& _altivec
=yes
2023 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2026 if test "$_altivec" = yes; then
2027 echores
"$proc altivec"
2033 echocheck
"GCC & CPU optimization abilities"
2035 if test -n "$proc"; then
2037 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2038 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2039 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2040 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2041 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2042 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2043 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2044 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2045 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2048 # gcc 3.1(.1) and up supports 7400 and 7450
2049 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2051 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2052 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2056 # gcc 3.2 and up supports 970
2057 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2059 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2060 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2064 # gcc 3.3 and up supports POWER4
2065 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2067 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2071 # gcc 3.4 and up supports 440*
2072 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2074 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2075 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2079 # gcc 4.0 and up supports POWER5
2080 if test "$_cc_major" -ge "4"; then
2082 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2088 if test -n "$_mcpu"; then
2089 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2090 echores
"$_optimizing"
2095 test $_fast_clz = "auto" && _fast_clz
=yes
2102 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2104 echocheck
"CPU type"
2107 unsigned long ver, mask;
2108 __asm__ ("implver %0" : "=r" (ver));
2109 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2110 printf("%ld-%x\n", ver, ~mask);
2114 $_cc -o "$TMPEXE" "$TMPC"
2115 case $
("$TMPEXE") in
2117 0-0) proc
="ev4"; _mvi
="0";;
2118 1-0) proc
="ev5"; _mvi
="0";;
2119 1-1) proc
="ev56"; _mvi
="0";;
2120 1-101) proc
="pca56"; _mvi
="1";;
2121 2-303) proc
="ev6"; _mvi
="1";;
2122 2-307) proc
="ev67"; _mvi
="1";;
2123 2-1307) proc
="ev68"; _mvi
="1";;
2127 echocheck
"GCC & CPU optimization abilities"
2128 if test "$proc" = "ev68" ; then
2129 cc_check
-mcpu=$proc || proc
=ev67
2131 if test "$proc" = "ev67" ; then
2132 cc_check
-mcpu=$proc || proc
=ev6
2137 test $_fast_clz = "auto" && _fast_clz
=yes
2146 test $_fast_clz = "auto" && _fast_clz
=yes
2180 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2181 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2182 die
"unsupported architecture $host_arch"
2184 esac # case "$host_arch" in
2186 if test "$_runtime_cpudetection" = yes ; then
2188 test "$_cmov" != no
&& _cmov
=yes
2190 test "$_mmx" != no
&& _mmx
=yes
2191 test "$_3dnow" != no
&& _3dnow
=yes
2192 test "$_3dnowext" != no
&& _3dnowext
=yes
2193 test "$_mmxext" != no
&& _mmxext
=yes
2194 test "$_sse" != no
&& _sse
=yes
2195 test "$_sse2" != no
&& _sse2
=yes
2196 test "$_ssse3" != no
&& _ssse3
=yes
2205 echocheck
"byte order"
2206 if test "$_big_endian" = auto
; then
2208 short ascii_name[] = {
2209 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2210 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2211 int main(void) { return (long)ascii_name; }
2214 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2220 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2223 if test "$_big_endian" = yes ; then
2224 _byte_order
='big-endian'
2225 def_words_endian
='#define WORDS_BIGENDIAN 1'
2226 def_bigendian
='#define HAVE_BIGENDIAN 1'
2228 _byte_order
='little-endian'
2229 def_words_endian
='#undef WORDS_BIGENDIAN'
2230 def_bigendian
='#define HAVE_BIGENDIAN 0'
2232 echores
"$_byte_order"
2235 echocheck
"extern symbol prefix"
2239 cc_check
-c || die
"Symbol mangling check failed."
2240 sym
=$
($_nm -P -g $TMPEXE)
2241 extern_prefix
=${sym%%ff_extern*}
2242 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2243 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2244 echores
$extern_prefix
2247 echocheck
"assembler support of -pipe option"
2248 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2249 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2252 if darwin
&& test "$cc_vendor" = "gnu" ; then
2253 echocheck
"GCC support of -mstackrealign"
2254 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2255 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2256 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2257 # wrong code with this flag, but this can be worked around by adding
2258 # -fno-unit-at-a-time as described in the blog post at
2259 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2261 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2262 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2264 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2265 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time &&
2266 tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2267 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2268 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2271 # Checking for CFLAGS
2273 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2276 if test -z "$CFLAGS" ; then
2277 if test "$cc_vendor" = "intel" ; then
2278 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer"
2279 WARNFLAGS
="-wd167 -wd556 -wd144"
2280 elif test "$cc_vendor" = "sun" ; then
2281 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2282 elif test "$cc_vendor" = "clang"; then
2283 CFLAGS
="-O2 $_debug $_profile $_march $_pipe"
2284 WARNFLAGS
="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
2285 ERRORFLAGS
="-Werror=implicit-function-declaration"
2286 elif test "$cc_vendor" != "gnu" ; then
2287 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe"
2289 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2290 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2291 ERRORFLAGS
="-Werror-implicit-function-declaration"
2292 extra_ldflags
="$extra_ldflags -ffast-math"
2298 if darwin
&& test "$cc_vendor" = "gnu" ; then
2299 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
2302 if test "$cc_vendor" = "gnu" ; then
2303 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2304 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2305 # that's the only variable specific to C now, and this option is not valid
2307 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2308 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2309 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2310 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2311 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2313 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2316 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2317 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2320 if test -n "$LDFLAGS" ; then
2321 extra_ldflags
="$extra_ldflags $LDFLAGS"
2323 elif test "$cc_vendor" = "intel" ; then
2324 extra_ldflags
="$extra_ldflags -i-static"
2326 if test -n "$CPPFLAGS" ; then
2327 extra_cflags
="$extra_cflags $CPPFLAGS"
2334 # Checking assembler (_as) compatibility...
2335 # Added workaround for older as that reads from stdin by default - atmos
2336 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2337 echocheck
"assembler ($_as $as_version)"
2339 _pref_as_version
='2.9.1'
2341 if test "$_mmx" = yes ; then
2342 echo 'emms' >> $TMPS
2344 if test "$_3dnow" = yes ; then
2345 _pref_as_version
='2.10.1'
2346 echo 'femms' >> $TMPS
2348 if test "$_3dnowext" = yes ; then
2349 _pref_as_version
='2.10.1'
2350 echo 'pswapd %mm0, %mm0' >> $TMPS
2352 if test "$_mmxext" = yes ; then
2353 _pref_as_version
='2.10.1'
2354 echo 'movntq %mm0, (%eax)' >> $TMPS
2356 if test "$_sse" = yes ; then
2357 _pref_as_version
='2.10.1'
2358 echo 'xorps %xmm0, %xmm0' >> $TMPS
2360 #if test "$_sse2" = yes ; then
2361 # _pref_as_version='2.11'
2362 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2364 if test "$_cmov" = yes ; then
2365 _pref_as_version
='2.10.1'
2366 echo 'cmovb %eax, %ebx' >> $TMPS
2368 if test "$_ssse3" = yes ; then
2369 _pref_as_version
='2.16.92'
2370 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2372 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2374 if test "$as_verc_fail" != yes ; then
2377 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2379 die
"obsolete binutils version"
2389 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2390 #error PIC not enabled
2395 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2401 echocheck
".align is a power of two"
2402 if test "$_asmalign_pot" = auto
; then
2404 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2406 if test "$_asmalign_pot" = "yes" ; then
2407 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2409 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2411 echores
$_asmalign_pot
2414 echocheck
"ebx availability"
2416 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2423 // just adding ebx to clobber list seems unreliable with some
2424 // compilers, e.g. Haiku's gcc 2.95
2426 // and the above check does not work for OSX 64 bit...
2427 __asm__ volatile("":::"%ebx");
2431 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2432 echores
$ebx_available
2436 if test -z "$YASMFLAGS" ; then
2438 x86_64
&& objformat
="macho64" || objformat
="macho"
2444 # currently tested for Linux x86, x86_64
2445 YASMFLAGS
="-f $objformat"
2446 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2447 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2448 case "$objformat" in
2449 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2450 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2456 echo "pabsw xmm0, xmm0" > $TMPS
2457 yasm_check || _yasm
=""
2458 if test $_yasm ; then
2459 def_yasm
='#define HAVE_YASM 1'
2463 def_yasm
='#define HAVE_YASM 0'
2469 def_bswap
='#define HAVE_BSWAP 0'
2470 echo 'bswap %eax' > $TMPS
2471 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2476 #FIXME: This should happen before the check for CFLAGS..
2477 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2478 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2480 # check if AltiVec is supported by the compiler, and how to enable it
2481 echocheck
"GCC AltiVec flags"
2482 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2483 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2484 # check if <altivec.h> should be included
2485 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2486 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2487 inc_altivec_h
='#include <altivec.h>'
2489 if $
(cflag_check
-faltivec) ; then
2490 _altivec_gcc_flags
="-faltivec"
2493 _altivec_gcc_flags
="none, AltiVec disabled"
2497 echores
"$_altivec_gcc_flags"
2499 # check if the compiler supports braces for vector declarations
2502 int main(void) { (vector int) {1}; return 0; }
2504 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2506 # Disable runtime cpudetection if we cannot generate AltiVec code or
2507 # AltiVec is disabled by the user.
2508 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2509 && _runtime_cpudetection
=no
2511 # Show that we are optimizing for AltiVec (if enabled and supported).
2512 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2513 && _optimizing
="$_optimizing altivec"
2515 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2516 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2520 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2522 echocheck
"XFORM ASM support"
2523 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2524 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2525 echores
"$xform_asm"
2529 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2530 if test $_armv5te = "auto" ; then
2532 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2536 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2538 echocheck
"ARMv6 (SIMD instructions)"
2539 if test $_armv6 = "auto" ; then
2541 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2545 echocheck
"ARMv6t2 (SIMD instructions)"
2546 if test $_armv6t2 = "auto" ; then
2548 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2553 if test $_armvfp = "auto" ; then
2555 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2559 echocheck
"ARM NEON"
2560 if test $neon = "auto" ; then
2562 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2566 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2567 if test $_iwmmxt = "auto" ; then
2569 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2574 cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2575 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2576 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2577 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2578 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2579 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2580 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2581 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2582 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2583 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2584 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2585 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2586 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2587 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2588 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2589 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2590 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2591 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2592 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2593 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2595 # Checking kernel version...
2596 if x86_32
&& linux
; then
2598 kernel_version
=$
(uname
-r 2>&1)
2599 echocheck
"$system_name kernel version"
2600 case "$kernel_version" in
2601 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2602 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2603 _k_verc_problem
=yes;;
2605 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2608 if test "$_k_verc_fail" ; then
2609 echores
"$kernel_version, fail"
2610 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2611 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2612 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2613 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2614 echo "2.2.x you must upgrade it to get SSE support!"
2615 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2617 echores
"$kernel_version, ok"
2621 ######################
2622 # MAIN TESTS GO HERE #
2623 ######################
2627 if cflag_check
-lposix ; then
2628 extra_ldflags
="$extra_ldflags -lposix"
2635 if cflag_check
-lm ; then
2644 echocheck
"langinfo"
2645 if test "$_langinfo" = auto
; then
2647 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2649 if test "$_langinfo" = yes ; then
2650 def_langinfo
='#define HAVE_LANGINFO 1'
2652 def_langinfo
='#undef HAVE_LANGINFO'
2654 echores
"$_langinfo"
2657 echocheck
"translation support"
2658 if test "$_translation" = yes; then
2659 def_translation
="#define CONFIG_TRANSLATION 1"
2661 def_translation
="#undef CONFIG_TRANSLATION"
2663 echores
"$_translation"
2665 echocheck
"language"
2666 # Set preferred languages, "all" uses English as main language.
2667 test -z "$language" && language
=$LINGUAS
2668 test -z "$language_doc" && language_doc
=$language
2669 test -z "$language_man" && language_man
=$language
2670 test -z "$language_msg" && language_msg
=$language
2671 test -z "$language_msg" && language_msg
="all"
2672 language_doc
=$
(echo $language_doc |
tr , " ")
2673 language_man
=$
(echo $language_man |
tr , " ")
2674 language_msg
=$
(echo $language_msg |
tr , " ")
2676 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2677 test "$language_man" = "all" && language_man
=$man_lang_all
2678 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2680 if test "$_translation" != yes ; then
2684 # Prune non-existing translations from language lists.
2685 # Set message translation to the first available language.
2686 # Fall back on English.
2687 for lang
in $language_doc ; do
2688 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2690 language_doc
=$tmp_language_doc
2691 test -z "$language_doc" && language_doc
=en
2693 for lang
in $language_man ; do
2694 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2696 language_man
=$tmp_language_man
2697 test -z "$language_man" && language_man
=en
2699 for lang
in $language_msg ; do
2700 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2702 language_msg
=$tmp_language_msg
2704 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2707 echocheck
"enable sighandler"
2708 if test "$_sighandler" = yes ; then
2709 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2711 def_sighandler
='#undef CONFIG_SIGHANDLER'
2713 echores
"$_sighandler"
2715 echocheck
"runtime cpudetection"
2716 if test "$_runtime_cpudetection" = yes ; then
2717 _optimizing
="Runtime CPU-Detection enabled"
2718 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2720 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2722 echores
"$_runtime_cpudetection"
2725 echocheck
"restrict keyword"
2726 for restrict_keyword
in restrict __restrict __restrict__
; do
2727 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2729 def_restrict_keyword
=$restrict_keyword
2733 if [ -n "$def_restrict_keyword" ]; then
2734 echores
"$def_restrict_keyword"
2738 # Avoid infinite recursion loop ("#define restrict restrict")
2739 if [ "$def_restrict_keyword" != "restrict" ]; then
2740 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2742 def_restrict_keyword
=""
2746 echocheck
"__builtin_expect"
2747 # GCC branch prediction hint
2749 static int foo(int a) {
2750 a = __builtin_expect(a, 10);
2751 return a == 10 ? 0 : 1;
2753 int main(void) { return foo(10) && foo(0); }
2756 cc_check
&& _builtin_expect
=yes
2757 if test "$_builtin_expect" = yes ; then
2758 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2760 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2762 echores
"$_builtin_expect"
2767 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2768 if test "$_kstat" = yes ; then
2769 def_kstat
="#define HAVE_LIBKSTAT 1"
2770 extra_ldflags
="$extra_ldflags -lkstat"
2772 def_kstat
="#undef HAVE_LIBKSTAT"
2778 # required for nanosleep on some systems
2780 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2781 if test "$_posix4" = yes ; then
2782 extra_ldflags
="$extra_ldflags -lposix4"
2786 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2789 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2790 if eval test "x\$_$func" = "xyes"; then
2791 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2794 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2802 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp
=yes
2803 if test "$_mkstemp" = yes ; then
2804 def_mkstemp
='#define HAVE_MKSTEMP 1'
2806 def_mkstemp
='#define HAVE_MKSTEMP 0'
2811 echocheck
"nanosleep"
2813 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2814 if test "$_nanosleep" = yes ; then
2815 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2817 def_nanosleep
='#undef HAVE_NANOSLEEP'
2819 echores
"$_nanosleep"
2823 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2824 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2827 #include <sys/socket.h>
2828 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2831 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2832 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2834 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2835 if test $_winsock2_h = auto
; then
2837 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2839 test "$_ld_sock" && res_comment
="using $_ld_sock"
2843 if test $_winsock2_h = yes ; then
2845 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2847 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2851 echocheck
"arpa/inet.h"
2853 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2854 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2855 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2856 echores
"$arpa_inet_h"
2859 echocheck
"inet_pton()"
2860 def_inet_pton
='#define HAVE_INET_PTON 0'
2862 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2863 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
2865 if test $inet_pton = yes ; then
2866 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2867 def_inet_pton
='#define HAVE_INET_PTON 1'
2869 echores
"$inet_pton"
2872 echocheck
"inet_aton()"
2873 def_inet_aton
='#define HAVE_INET_ATON 0'
2875 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2876 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
2878 if test $inet_aton = yes ; then
2879 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2880 def_inet_aton
='#define HAVE_INET_ATON 1'
2882 echores
"$inet_aton"
2885 echocheck
"socklen_t"
2887 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
2888 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
2890 if test "$_socklen_t" = yes ; then
2891 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
2893 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
2895 echores
"$_socklen_t"
2898 echocheck
"closesocket()"
2900 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
2901 if test "$_closesocket" = yes ; then
2902 def_closesocket
='#define HAVE_CLOSESOCKET 1'
2904 def_closesocket
='#define HAVE_CLOSESOCKET 0'
2906 echores
"$_closesocket"
2909 echocheck
"networking"
2910 test $_winsock2_h = no
&& test $inet_pton = no
&&
2911 test $inet_aton = no
&& networking
=no
2912 if test "$networking" = yes ; then
2913 def_network
='#define CONFIG_NETWORK 1'
2914 def_networking
='#define CONFIG_NETWORKING 1'
2915 extra_ldflags
="$extra_ldflags $_ld_sock"
2916 inputmodules
="networking $inputmodules"
2918 noinputmodules
="networking $noinputmodules"
2919 def_network
='#define CONFIG_NETWORK 0'
2920 def_networking
='#undef CONFIG_NETWORKING'
2922 echores
"$networking"
2926 if test "$_inet6" = auto
; then
2928 #include <sys/types.h>
2929 #if !defined(_WIN32)
2930 #include <sys/socket.h>
2931 #include <netinet/in.h>
2933 #include <ws2tcpip.h>
2935 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
2938 if cc_check
$_ld_sock ; then
2942 if test "$_inet6" = yes ; then
2943 def_inet6
='#define HAVE_AF_INET6 1'
2945 def_inet6
='#undef HAVE_AF_INET6'
2950 echocheck
"gethostbyname2"
2951 if test "$_gethostbyname2" = auto
; then
2953 #include <sys/types.h>
2954 #include <sys/socket.h>
2956 int main(void) { gethostbyname2("", AF_INET); return 0; }
2963 if test "$_gethostbyname2" = yes ; then
2964 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
2966 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
2968 echores
"$_gethostbyname2"
2971 echocheck
"inttypes.h (required)"
2973 header_check inttypes.h
&& _inttypes
=yes
2974 echores
"$_inttypes"
2976 if test "$_inttypes" = no
; then
2977 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
2978 header_check sys
/bitypes.h
&& _inttypes
=yes
2979 if test "$_inttypes" = yes ; then
2980 die
"You don't have inttypes.h, but sys/bitypes.h is present. Please copy etc/inttypes.h into the include path, and re-run configure."
2982 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
2987 echocheck
"malloc.h"
2989 header_check malloc.h
&& _malloc
=yes
2990 if test "$_malloc" = yes ; then
2991 def_malloc_h
='#define HAVE_MALLOC_H 1'
2993 def_malloc_h
='#define HAVE_MALLOC_H 0'
2998 echocheck
"memalign()"
2999 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3000 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3002 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3003 if test "$_memalign" = yes ; then
3004 def_memalign
='#define HAVE_MEMALIGN 1'
3006 def_memalign
='#define HAVE_MEMALIGN 0'
3007 def_map_memalign
='#define memalign(a, b) malloc(b)'
3008 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3010 echores
"$_memalign"
3013 echocheck
"posix_memalign()"
3015 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3016 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' &&
3017 posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3018 echores
"$posix_memalign"
3021 echocheck
"alloca.h"
3023 statement_check alloca.h
'alloca(0)' && _alloca
=yes
3025 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3027 def_alloca_h
='#undef HAVE_ALLOCA_H'
3032 echocheck
"fastmemcpy"
3033 if test "$_fastmemcpy" = yes ; then
3034 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3036 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3038 echores
"$_fastmemcpy"
3043 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
3044 if test "$_mman" = yes ; then
3045 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3047 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3051 _mman_has_map_failed
=no
3052 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
3053 if test "$_mman_has_map_failed" = yes ; then
3054 def_mman_has_map_failed
=''
3056 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3059 echocheck
"dynamic loader"
3061 for _ld_tmp
in "" "-ldl"; do
3062 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3064 if test "$_dl" = yes ; then
3065 def_dl
='#define HAVE_LIBDL 1'
3067 def_dl
='#undef HAVE_LIBDL'
3072 def_threads
='#define HAVE_THREADS 0'
3076 THREAD_CFLAGS
=-D_REENTRANT
3077 elif freebsd || netbsd || openbsd || bsdos
; then
3078 THREAD_CFLAGS
=-D_THREAD_SAFE
3080 if test "$_pthreads" = auto
; then
3082 #include <pthread.h>
3083 static void *func(void *arg) { return arg; }
3086 #ifdef PTW32_STATIC_LIB
3087 pthread_win32_process_attach_np();
3088 pthread_win32_thread_attach_np();
3090 return pthread_create (&tid, 0, func, 0) != 0;
3095 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3096 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3097 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3099 if test "$_pthreads" = no
&& mingw32
; then
3100 _ld_tmp
="-lpthreadGC2 -lws2_32"
3101 cc_check
$_ld_tmp -DPTW32_STATIC_LIB && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && CFLAGS
="$CFLAGS -DPTW32_STATIC_LIB"
3105 if test "$_pthreads" = yes ; then
3106 test $_ld_pthread && res_comment
="using $_ld_pthread"
3107 def_pthreads
='#define HAVE_PTHREADS 1'
3108 def_threads
='#define HAVE_THREADS 1'
3109 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3111 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3112 def_pthreads
='#undef HAVE_PTHREADS'
3113 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3114 mingw32 || _win32dll
=no
3116 echores
"$_pthreads"
3119 if test "$_pthreads" = yes ; then
3120 def_pthread_cache
="#define PTHREAD_CACHE 1"
3123 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3127 echocheck
"w32threads"
3128 if test "$_pthreads" = yes ; then
3129 res_comment
="using pthread instead"
3132 if test "$_w32threads" = auto
; then
3134 mingw32
&& _w32threads
=yes
3136 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3137 echores
"$_w32threads"
3140 if test "$_rpath" = yes ; then
3141 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3142 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3149 if test "$_iconv" = auto
; then
3154 #define INBUFSIZE 1024
3155 #define OUTBUFSIZE 4096
3157 char inbuffer[INBUFSIZE];
3158 char outbuffer[OUTBUFSIZE];
3163 char *tocode="UTF-8";
3164 char *fromcode="cp1250";
3165 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3166 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3167 char *iptr=inbuffer;
3168 char *optr=outbuffer;
3169 size_t inleft=numread;
3170 size_t outleft=OUTBUFSIZE;
3171 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3173 write(1, outbuffer, OUTBUFSIZE - outleft);
3176 if (iconv_close(icdsc) == -1)
3183 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3184 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
3187 if test "$_iconv" != yes ; then
3188 die
"Unable to find iconv which should be part of standard compilation environment. Aborting. If you really mean to compile without iconv support use --disable-iconv."
3191 if test "$_iconv" = yes ; then
3192 def_iconv
='#define CONFIG_ICONV 1'
3194 def_iconv
='#undef CONFIG_ICONV'
3199 echocheck
"soundcard.h"
3201 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3202 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3203 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3204 header_check
$_soundcard_header && _soundcard_h
=yes &&
3205 res_comment
="$_soundcard_header" && break
3208 if test "$_soundcard_h" = yes ; then
3209 if test $_soundcard_header = "sys/soundcard.h"; then
3210 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3212 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3215 echores
"$_soundcard_h"
3218 echocheck
"sys/videoio.h"
3220 def_sys_videoio_h
='#undef HAVE_SYS_VIDEOIO_H'
3221 header_check sys
/videoio.h
&& sys_videoio_h
=yes &&
3222 def_sys_videoio_h
='#define HAVE_SYS_VIDEOIO_H 1'
3223 echores
"$sys_videoio_h"
3226 echocheck
"sys/dvdio.h"
3228 # FreeBSD 8.1 has broken dvdio.h
3229 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3230 if test "$_dvdio" = yes ; then
3231 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3233 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3238 echocheck
"sys/cdio.h"
3240 # at least OpenSolaris has a broken cdio.h
3241 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3242 if test "$_cdio" = yes ; then
3243 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3245 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3250 echocheck
"linux/cdrom.h"
3252 header_check linux
/cdrom.h
&& _cdrom
=yes
3253 if test "$_cdrom" = yes ; then
3254 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3256 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3263 header_check dvd.h
&& _dvd
=yes
3264 if test "$_dvd" = yes ; then
3265 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3267 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3273 echocheck
"BSDI dvd.h"
3275 header_check dvd.h
&& _bsdi_dvd
=yes
3276 if test "$_bsdi_dvd" = yes ; then
3277 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3279 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3281 echores
"$_bsdi_dvd"
3286 # also used by AIX, but AIX does not support VCD and/or libdvdread
3287 echocheck
"HP-UX SCSI header"
3289 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3290 if test "$_hpux_scsi_h" = yes ; then
3291 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3293 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3295 echores
"$_hpux_scsi_h"
3300 echocheck
"userspace SCSI headers (Solaris)"
3302 header_check sys
/scsi
/scsi_types.h
&&
3303 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3305 if test "$_sol_scsi_h" = yes ; then
3306 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3308 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3310 echores
"$_sol_scsi_h"
3315 if test "$_termcap" = auto
; then
3317 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3318 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3319 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3322 if test "$_termcap" = yes ; then
3323 def_termcap
='#define HAVE_TERMCAP 1'
3324 test $_ld_tmp && res_comment
="using $_ld_tmp"
3326 def_termcap
='#undef HAVE_TERMCAP'
3332 def_termios
='#undef HAVE_TERMIOS'
3333 def_termios_h
='#undef HAVE_TERMIOS_H'
3334 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3335 if test "$_termios" = auto
; then
3337 for _termios_header
in "termios.h" "sys/termios.h"; do
3338 header_check
$_termios_header && _termios
=yes &&
3339 res_comment
="using $_termios_header" && break
3343 if test "$_termios" = yes ; then
3344 def_termios
='#define HAVE_TERMIOS 1'
3345 if test "$_termios_header" = "termios.h" ; then
3346 def_termios_h
='#define HAVE_TERMIOS_H 1'
3348 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3355 if test "$_shm" = auto
; then
3357 statement_check sys
/shm.h
'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm
=yes
3359 if test "$_shm" = yes ; then
3360 def_shm
='#define HAVE_SHM 1'
3362 def_shm
='#undef HAVE_SHM'
3367 echocheck
"strsep()"
3369 statement_check string.h
'char *s = "Hello, world!"; strsep(&s, ",")' && _strsep
=yes
3370 if test "$_strsep" = yes ; then
3371 def_strsep
='#define HAVE_STRSEP 1'
3374 def_strsep
='#undef HAVE_STRSEP'
3380 echocheck
"vsscanf()"
3382 #define _ISOC99_SOURCE
3385 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3388 cc_check
&& _vsscanf
=yes
3389 if test "$_vsscanf" = yes ; then
3390 def_vsscanf
='#define HAVE_VSSCANF 1'
3393 def_vsscanf
='#undef HAVE_VSSCANF'
3401 define_statement_check
"_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' ||
3402 statement_check
"string.h" 'int a, b; swab(&a, &b, 0)' && _swab
=yes
3403 if test "$_swab" = yes ; then
3404 def_swab
='#define HAVE_SWAB 1'
3407 def_swab
='#undef HAVE_SWAB'
3412 echocheck
"POSIX select()"
3416 #include <sys/types.h>
3418 #include <sys/time.h>
3420 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3423 def_posix_select
='#undef HAVE_POSIX_SELECT'
3424 cc_check
&& _posix_select
=yes &&
3425 def_posix_select
='#define HAVE_POSIX_SELECT 1'
3426 echores
"$_posix_select"
3429 echocheck
"audio select()"
3430 if test "$_select" = no
; then
3431 def_select
='#undef HAVE_AUDIO_SELECT'
3432 elif test "$_select" = yes ; then
3433 def_select
='#define HAVE_AUDIO_SELECT 1'
3438 echocheck
"gettimeofday()"
3440 statement_check sys
/time.h
'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' && _gettimeofday
=yes
3441 if test "$_gettimeofday" = yes ; then
3442 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3443 need_gettimeofday
=no
3445 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3446 need_gettimeofday
=yes
3448 echores
"$_gettimeofday"
3453 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3455 if test "$_glob" = yes ; then
3456 def_glob
='#define HAVE_GLOB 1'
3458 def_glob
='#undef HAVE_GLOB'
3459 # HACK! need_glob currently enables compilation of a
3460 # win32-specific glob()-replacement.
3461 # Other OS neither need it nor can they use it (mf:// is disabled for them).
3462 win32
&& need_glob
=yes
3467 echocheck
"setenv()"
3469 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3470 if test "$_setenv" = yes ; then
3471 def_setenv
='#define HAVE_SETENV 1'
3474 def_setenv
='#undef HAVE_SETENV'
3480 echocheck
"setmode()"
3482 def_setmode
='#define HAVE_SETMODE 0'
3483 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3488 echocheck
"sysi86()"
3490 statement_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3491 if test "$_sysi86" = yes ; then
3492 def_sysi86
='#define HAVE_SYSI86 1'
3493 statement_check sys
/sysi86.h
'int sysi86(int, void*); sysi86(0)' && def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3495 def_sysi86
='#undef HAVE_SYSI86'
3501 echocheck
"sys/sysinfo.h"
3503 statement_check sys
/sysinfo.h
'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo
=yes
3504 if test "$_sys_sysinfo" = yes ; then
3505 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3507 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3509 echores
"$_sys_sysinfo"
3514 echocheck
"Mac OS X Finder Support"
3515 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3516 if test "$_macosx_finder" = yes ; then
3517 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3518 extra_ldflags
="$extra_ldflags -framework Cocoa"
3520 echores
"$_macosx_finder"
3522 echocheck
"Mac OS X Bundle file locations"
3523 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3524 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3525 if test "$_macosx_bundle" = yes ; then
3526 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3528 echores
"$_macosx_bundle"
3530 echocheck
"Apple Remote"
3531 if test "$_apple_remote" = auto
; then
3535 #include <IOKit/IOCFPlugIn.h>
3537 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3538 CFMutableDictionaryRef hidMatchDictionary;
3539 IOReturn ioReturnValue;
3541 // Set up a matching dictionary to search the I/O Registry by class.
3542 // name for all HID class devices
3543 hidMatchDictionary = IOServiceMatching("AppleIRController");
3545 // Now search I/O Registry for matching devices.
3546 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3547 hidMatchDictionary, &hidObjectIterator);
3549 // If search is unsuccessful, return nonzero.
3550 if (ioReturnValue != kIOReturnSuccess ||
3551 !IOIteratorIsValid(hidObjectIterator)) {
3557 cc_check
-framework IOKit
&& _apple_remote
=yes
3559 if test "$_apple_remote" = yes ; then
3560 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3561 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3563 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3565 echores
"$_apple_remote"
3571 echocheck
"Apple IR"
3572 if test "$_apple_ir" = auto
; then
3574 statement_check linux
/input.h
'struct input_event ev; struct input_id id' && _apple_ir
=yes
3576 if test "$_apple_ir" = yes ; then
3577 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3579 def_apple_ir
='#undef CONFIG_APPLE_IR'
3581 echores
"$_apple_ir"
3584 echocheck
"pkg-config"
3585 if $
($_pkg_config --version > /dev
/null
2>&1); then
3586 if test "$_ld_static"; then
3587 _pkg_config
="$_pkg_config --static"
3596 echocheck
"Samba support (libsmbclient)"
3597 if test "$_smb" = yes; then
3598 extra_ldflags
="$extra_ldflags -lsmbclient"
3600 if test "$_smb" = auto
; then
3602 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3603 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3604 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3608 if test "$_smb" = yes; then
3609 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3610 inputmodules
="smb $inputmodules"
3612 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3613 noinputmodules
="smb $noinputmodules"
3617 echocheck
"libquvi support"
3618 if test "$_libquvi" = auto
; then
3620 if pkg_config_add libquvi
; then
3624 if test "$_libquvi" = yes; then
3625 def_libquvi
="#define CONFIG_LIBQUVI 1"
3627 def_libquvi
="#undef CONFIG_LIBQUVI"
3637 if test "$_tdfxfb" = yes ; then
3638 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3639 vomodules
="tdfxfb $vomodules"
3641 def_tdfxfb
='#undef CONFIG_TDFXFB'
3642 novomodules
="tdfxfb $novomodules"
3647 if test "$_s3fb" = yes ; then
3648 def_s3fb
='#define CONFIG_S3FB 1'
3649 vomodules
="s3fb $vomodules"
3651 def_s3fb
='#undef CONFIG_S3FB'
3652 novomodules
="s3fb $novomodules"
3657 if test "$_wii" = yes ; then
3658 def_wii
='#define CONFIG_WII 1'
3659 vomodules
="wii $vomodules"
3661 def_wii
='#undef CONFIG_WII'
3662 novomodules
="wii $novomodules"
3667 if test "$_tdfxvid" = yes ; then
3668 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3669 vomodules
="tdfx_vid $vomodules"
3671 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3672 novomodules
="tdfx_vid $novomodules"
3677 if test "$_xvr100" = auto
; then
3680 #include <sys/fbio.h>
3681 #include <sys/visual_io.h>
3683 struct vis_identifier ident;
3684 struct fbgattr attr;
3685 ioctl(0, VIS_GETIDENTIFIER, &ident);
3686 ioctl(0, FBIOGATTR, &attr);
3691 cc_check
&& _xvr100
=yes
3693 if test "$_xvr100" = yes ; then
3694 def_xvr100
='#define CONFIG_XVR100 1'
3695 vomodules
="xvr100 $vomodules"
3697 def_tdfxvid
='#undef CONFIG_XVR100'
3698 novomodules
="xvr100 $novomodules"
3703 if test "$_tga" = yes ; then
3704 def_tga
='#define CONFIG_TGA 1'
3705 vomodules
="tga $vomodules"
3707 def_tga
='#undef CONFIG_TGA'
3708 novomodules
="tga $novomodules"
3713 echocheck
"md5sum support"
3714 if test "$_md5sum" = yes; then
3715 def_md5sum
="#define CONFIG_MD5SUM 1"
3716 vomodules
="md5sum $vomodules"
3718 def_md5sum
="#undef CONFIG_MD5SUM"
3719 novomodules
="md5sum $novomodules"
3724 echocheck
"yuv4mpeg support"
3725 if test "$_yuv4mpeg" = yes; then
3726 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3727 vomodules
="yuv4mpeg $vomodules"
3729 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3730 novomodules
="yuv4mpeg $novomodules"
3732 echores
"$_yuv4mpeg"
3736 if test "$_bl" = yes ; then
3737 def_bl
='#define CONFIG_BL 1'
3738 vomodules
="bl $vomodules"
3740 def_bl
='#undef CONFIG_BL'
3741 novomodules
="bl $novomodules"
3746 echocheck
"DirectFB"
3747 if test "$_directfb" = auto
; then
3750 #include <directfb.h>
3751 #include <directfb_version.h>
3752 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3753 #error "DirectFB version too old."
3755 int main(void) { DirectFBInit(0, 0); return 0; }
3757 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3758 cc_check
$_inc_tmp -ldirectfb &&
3759 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3762 if test "$_directfb" = yes ; then
3763 def_directfb
='#define CONFIG_DIRECTFB 1'
3764 vomodules
="directfb dfbmga $vomodules"
3765 libs_mplayer
="$libs_mplayer -ldirectfb"
3767 def_directfb
='#undef CONFIG_DIRECTFB'
3768 novomodules
="directfb dfbmga $novomodules"
3770 echores
"$_directfb"
3775 echocheck
"QuickTime"
3776 if test "$quicktime" = auto
; then
3778 statement_check QuickTime
/QuickTime.h
'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime
&& quicktime
=yes
3780 if test "$quicktime" = yes ; then
3781 extra_ldflags
="$extra_ldflags -framework QuickTime"
3782 def_quicktime
='#define CONFIG_QUICKTIME 1'
3784 def_quicktime
='#undef CONFIG_QUICKTIME'
3789 if test "$_cocoa" = auto
; then
3791 #include <CoreServices/CoreServices.h>
3792 #include <OpenGL/OpenGL.h>
3794 NSApplicationLoad();
3798 cc_check
-framework Cocoa
-framework OpenGL
&& _cocoa
=yes
3800 if test "$_cocoa" = yes ; then
3801 libs_mplayer
="$libs_mplayer -framework Cocoa -framework OpenGL"
3802 def_cocoa
='#define CONFIG_COCOA 1'
3804 def_cocoa
='#undef CONFIG_COCOA'
3808 echocheck
"CoreVideo"
3809 if test "$_cocoa" = yes && test "$_corevideo" = auto
; then
3811 #include <QuartzCore/CoreVideo.h>
3812 int main(void) { return 0; }
3815 cc_check
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
3817 if test "$_corevideo" = yes ; then
3818 vomodules
="corevideo $vomodules"
3819 libs_mplayer
="$libs_mplayer -framework QuartzCore"
3820 def_corevideo
='#define CONFIG_COREVIDEO 1'
3822 novomodules
="corevideo $novomodules"
3823 def_corevideo
='#undef CONFIG_COREVIDEO'
3825 echores
"$_corevideo"
3827 echocheck
"SharedBuffer"
3828 if test "$_sharedbuffer" = auto
; then
3831 NSApplicationLoad();
3835 cc_check
-framework Cocoa
&& _sharedbuffer
=yes
3837 if test "$_sharedbuffer" = yes ; then
3838 vomodules
="sharedbuffer $vomodules"
3839 libs_mplayer
="$libs_mplayer -framework Cocoa"
3840 def_sharedbuffer
='#define CONFIG_SHAREDBUFFER 1'
3842 novomodules
="sharedbuffer $novomodules"
3843 def_sharedbuffer
='#undef CONFIG_SHAREDBUFFER'
3845 echores
"$_sharedbuffer"
3847 depends_on_application_services
(){
3848 test "$_corevideo" = yes
3854 echocheck
"X11 headers presence"
3856 res_comment
="check if the dev(el) packages are installed"
3857 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3858 if test -f "$I/X11/Xlib.h" ; then
3864 if test $_cross_compile = no
; then
3865 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3866 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3867 if test -f "$I/X11/Xlib.h" ; then
3868 extra_cflags
="$extra_cflags -I$I"
3870 res_comment
="using $I"
3875 echores
"$_x11_headers"
3879 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3880 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3881 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3884 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3886 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3888 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3890 # Check that there aren't conflicting headers between ApplicationServices
3891 # and X11. On versions of Mac OSX prior to 10.7 the deprecated QuickDraw API
3892 # is included by -framework ApplicationServices and clashes with the X11
3893 # definition of the "Cursor" type.
3894 if darwin
&& depends_on_application_services
&& test "$_x11" = yes ; then
3896 header_check_broken ApplicationServices
/ApplicationServices.h \
3897 X11
/Xutil.h
$_ld_tmp && _x11
=yes
3899 if test "$_x11" = yes ; then
3900 libs_mplayer
="$libs_mplayer $_ld_tmp"
3905 if test "$_x11" = yes ; then
3906 def_x11
='#define CONFIG_X11 1'
3907 vomodules
="x11 xover $vomodules"
3910 def_x11
='#undef CONFIG_X11'
3911 novomodules
="x11 $novomodules"
3912 res_comment
="check if the dev(el) packages are installed"
3916 echocheck
"Xss screensaver extensions"
3917 if test "$_xss" = auto
; then
3919 statement_check
"X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss
=yes
3921 if test "$_xss" = yes ; then
3922 def_xss
='#define CONFIG_XSS 1'
3923 libs_mplayer
="$libs_mplayer -lXss"
3925 def_xss
='#undef CONFIG_XSS'
3932 if test "$_x11" = yes ; then
3934 #include <X11/Xmd.h>
3935 #include <X11/Xlib.h>
3936 #include <X11/Xutil.h>
3937 #include <X11/Xatom.h>
3938 #include <X11/extensions/dpms.h>
3939 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
3941 cc_check
-lXdpms && _xdpms3
=yes
3942 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
3944 if test "$_xdpms4" = yes ; then
3945 def_xdpms
='#define CONFIG_XDPMS 1'
3946 res_comment
="using Xdpms 4"
3948 elif test "$_xdpms3" = yes ; then
3949 def_xdpms
='#define CONFIG_XDPMS 1'
3950 libs_mplayer
="$libs_mplayer -lXdpms"
3951 res_comment
="using Xdpms 3"
3954 def_xdpms
='#undef CONFIG_XDPMS'
3960 if test "$_xv" = auto
&& test "$_x11" = yes ; then
3962 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
3965 if test "$_xv" = yes ; then
3966 def_xv
='#define CONFIG_XV 1'
3967 libs_mplayer
="$libs_mplayer -lXv"
3968 vomodules
="xv $vomodules"
3970 def_xv
='#undef CONFIG_XV'
3971 novomodules
="xv $novomodules"
3977 if test "$_vdpau" = auto
&& test "$_x11" = yes ; then
3979 if test "$_dl" = yes ; then
3980 pkg_config_add
'vdpau >= 0.2' && _vdpau
=yes
3983 if test "$_vdpau" = yes ; then
3984 def_vdpau
='#define CONFIG_VDPAU 1'
3985 vomodules
="vdpau $vomodules"
3987 def_vdpau
='#define CONFIG_VDPAU 0'
3988 novomodules
="vdpau $novomodules"
3993 echocheck
"Xinerama"
3994 if test "$_xinerama" = auto
&& test "$_x11" = yes ; then
3996 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
3999 if test "$_xinerama" = yes ; then
4000 def_xinerama
='#define CONFIG_XINERAMA 1'
4001 libs_mplayer
="$libs_mplayer -lXinerama"
4003 def_xinerama
='#undef CONFIG_XINERAMA'
4005 echores
"$_xinerama"
4008 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4009 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4010 # named 'X extensions' or something similar.
4011 # This check may be useful for future mplayer versions (to change resolution)
4012 # If you run into problems, remove '-lXxf86vm'.
4014 if test "$_vm" = auto
&& test "$_x11" = yes ; then
4016 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
4018 if test "$_vm" = yes ; then
4019 def_vm
='#define CONFIG_XF86VM 1'
4020 libs_mplayer
="$libs_mplayer -lXxf86vm"
4022 def_vm
='#undef CONFIG_XF86VM'
4026 # Check for the presence of special keycodes, like audio control buttons
4027 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4028 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4029 # have these new keycodes.
4030 echocheck
"XF86keysym"
4031 if test "$_xf86keysym" = auto
&& test "$_x11" = yes ; then
4033 return_check X11
/XF86keysym.h XF86XK_AudioPause
&& _xf86keysym
=yes
4035 if test "$_xf86keysym" = yes ; then
4036 def_xf86keysym
='#define CONFIG_XF86XK 1'
4038 def_xf86keysym
='#undef CONFIG_XF86XK'
4040 echores
"$_xf86keysym"
4043 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4045 statement_check_broken X11
/Xlib.h X11
/extensions
/Xxf86dga.h
'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2
=yes
4047 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4049 statement_check_broken X11
/Xlib.h X11
/extensions
/Xxf86dga.h
'XF86DGASetViewPort(0, 0, 0, 0)' -lXxf86dga -lXxf86vm && _dga1
=yes
4053 def_dga
='#undef CONFIG_DGA'
4054 def_dga1
='#undef CONFIG_DGA1'
4055 def_dga2
='#undef CONFIG_DGA2'
4056 if test "$_dga1" = yes ; then
4058 def_dga1
='#define CONFIG_DGA1 1'
4059 res_comment
="using DGA 1.0"
4060 elif test "$_dga2" = yes ; then
4062 def_dga2
='#define CONFIG_DGA2 1'
4063 res_comment
="using DGA 2.0"
4065 if test "$_dga" = yes ; then
4066 def_dga
='#define CONFIG_DGA 1'
4067 libs_mplayer
="$libs_mplayer -lXxf86dga"
4068 vomodules
="dga $vomodules"
4070 novomodules
="dga $novomodules"
4076 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4077 def_3dfx
='#define CONFIG_3DFX 1'
4078 vomodules
="3dfx $vomodules"
4081 def_3dfx
='#undef CONFIG_3DFX'
4082 novomodules
="3dfx $novomodules"
4088 if test "$_ggi" = auto
; then
4090 statement_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4092 if test "$_ggi" = yes ; then
4093 def_ggi
='#define CONFIG_GGI 1'
4094 libs_mplayer
="$libs_mplayer -lggi"
4095 vomodules
="ggi $vomodules"
4097 def_ggi
='#undef CONFIG_GGI'
4098 novomodules
="ggi $novomodules"
4102 echocheck
"GGI extension: libggiwmh"
4103 if test "$_ggiwmh" = auto
; then
4105 statement_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4107 # needed to get right output on obscure combination
4108 # like --disable-ggi --enable-ggiwmh
4109 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4110 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4111 libs_mplayer
="$libs_mplayer -lggiwmh"
4114 def_ggiwmh
='#undef CONFIG_GGIWMH'
4120 if test "$_aa" = auto
; then
4127 c = aa_autoinit(&aa_defparams);
4128 p = aa_getrenderparams();
4129 aa_autoinitkbd(c, 0);
4133 for _ld_tmp
in "-laa" ; do
4134 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4137 if test "$_aa" = yes ; then
4138 def_aa
='#define CONFIG_AA 1'
4140 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4142 vomodules
="aa $vomodules"
4144 def_aa
='#undef CONFIG_AA'
4145 novomodules
="aa $novomodules"
4151 if test "$_caca" = auto
; then
4153 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4156 #ifdef CACA_API_VERSION_1
4159 int main(void) { caca_init(); return 0; }
4161 cc_check $
(caca-config
--libs) && _caca
=yes
4164 if test "$_caca" = yes ; then
4165 def_caca
='#define CONFIG_CACA 1'
4166 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4167 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4168 vomodules
="caca $vomodules"
4170 def_caca
='#undef CONFIG_CACA'
4171 novomodules
="caca $novomodules"
4177 if test "$_svga" = auto
; then
4179 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4181 if test "$_svga" = yes ; then
4182 def_svga
='#define CONFIG_SVGALIB 1'
4183 libs_mplayer
="$libs_mplayer -lvga"
4184 vomodules
="svga $vomodules"
4186 def_svga
='#undef CONFIG_SVGALIB'
4187 novomodules
="svga $novomodules"
4193 if test "$_fbdev" = auto
; then
4197 if test "$_fbdev" = yes ; then
4198 def_fbdev
='#define CONFIG_FBDEV 1'
4199 vomodules
="fbdev $vomodules"
4201 def_fbdev
='#undef CONFIG_FBDEV'
4202 novomodules
="fbdev $novomodules"
4209 if test "$_dvb" = auto
; then
4213 #include <sys/ioctl.h>
4217 #include <linux/dvb/dmx.h>
4218 #include <linux/dvb/frontend.h>
4219 #include <linux/dvb/video.h>
4220 #include <linux/dvb/audio.h>
4221 int main(void) {return 0;}
4223 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4224 cc_check
$_inc_tmp && _dvb
=yes &&
4225 extra_cflags
="$extra_cflags $_inc_tmp" && break
4229 if test "$_dvb" = yes ; then
4231 inputmodules
="dvb $inputmodules"
4232 def_dvb
='#define CONFIG_DVB 1'
4233 def_dvbin
='#define CONFIG_DVBIN 1'
4234 aomodules
="mpegpes(dvb) $aomodules"
4235 vomodules
="mpegpes(dvb) $vomodules"
4238 noinputmodules
="dvb $noinputmodules"
4239 def_dvb
='#undef CONFIG_DVB'
4240 def_dvbin
='#undef CONFIG_DVBIN '
4241 aomodules
="mpegpes(file) $aomodules"
4242 vomodules
="mpegpes(file) $vomodules"
4246 echocheck
"PNG support"
4247 if test "$_png" = auto
; then
4254 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4255 printf("libpng: %s\n", png_libpng_ver);
4256 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4259 cc_check
-lpng -lz $_ld_lm && _png
=yes
4262 if test "$_png" = yes ; then
4263 def_png
='#define CONFIG_PNG 1'
4264 extra_ldflags
="$extra_ldflags -lpng -lz"
4266 def_png
='#undef CONFIG_PNG'
4269 echocheck
"MNG support"
4270 if test "$_mng" = auto
; then
4272 return_statement_check libmng.h
'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng
=yes
4275 if test "$_mng" = yes ; then
4276 def_mng
='#define CONFIG_MNG 1'
4277 extra_ldflags
="$extra_ldflags -lmng -lz"
4279 def_mng
='#undef CONFIG_MNG'
4282 echocheck
"JPEG support"
4283 if test "$_jpeg" = auto
; then
4285 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
4289 if test "$_jpeg" = yes ; then
4290 def_jpeg
='#define CONFIG_JPEG 1'
4291 vomodules
="jpeg $vomodules"
4292 extra_ldflags
="$extra_ldflags -ljpeg"
4294 def_jpeg
='#undef CONFIG_JPEG'
4295 novomodules
="jpeg $novomodules"
4300 echocheck
"PNM support"
4301 if test "$_pnm" = yes; then
4302 def_pnm
="#define CONFIG_PNM 1"
4303 vomodules
="pnm $vomodules"
4305 def_pnm
="#undef CONFIG_PNM"
4306 novomodules
="pnm $novomodules"
4312 echocheck
"GIF support"
4313 # This is to appease people who want to force gif support.
4314 # If it is forced to yes, then we still do checks to determine
4315 # which gif library to use.
4316 if test "$_gif" = yes ; then
4321 if test "$_gif" = auto
; then
4323 for _ld_gif
in "-lungif" "-lgif" ; do
4324 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4328 # If no library was found, and the user wants support forced,
4329 # then we force it on with libgif, as this is the safest
4330 # assumption IMHO. (libungif & libregif both create symbolic
4331 # links to libgif. We also assume that no x11 support is needed,
4332 # because if you are forcing this, then you _should_ know what
4333 # you are doing. [ Besides, package maintainers should never
4334 # have compiled x11 deps into libungif in the first place. ] )
4337 if test "$_force_gif" = yes && test "$_gif" = no
; then
4342 if test "$_gif" = yes ; then
4343 def_gif
='#define CONFIG_GIF 1'
4344 codecmodules
="gif $codecmodules"
4345 vomodules
="gif89a $vomodules"
4346 res_comment
="old version, some encoding functions disabled"
4347 def_gif_4
='#undef CONFIG_GIF_4'
4348 extra_ldflags
="$extra_ldflags $_ld_gif"
4354 #include <gif_lib.h>
4355 static void catch(int sig) { exit(1); }
4357 signal(SIGSEGV, catch); // catch segfault
4358 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4359 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4363 if cc_check
"$_ld_gif" ; then
4364 def_gif_4
='#define CONFIG_GIF_4 1'
4368 def_gif
='#undef CONFIG_GIF'
4369 def_gif_4
='#undef CONFIG_GIF_4'
4370 novomodules
="gif89a $novomodules"
4371 nocodecmodules
="gif $nocodecmodules"
4376 case "$_gif" in yes*)
4377 echocheck
"broken giflib workaround"
4378 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4382 #include <gif_lib.h>
4384 GifFileType gif = {.UserData = NULL};
4385 printf("UserData is at address %p\n", gif.UserData);
4389 if cc_check
"$_ld_gif" ; then
4390 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4399 echocheck
"VESA support"
4400 if test "$_vesa" = auto
; then
4402 statement_check vbe.h
'vbeInit()' -lvbe -llrmi && _vesa
=yes
4404 if test "$_vesa" = yes ; then
4405 def_vesa
='#define CONFIG_VESA 1'
4406 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4407 vomodules
="vesa $vomodules"
4409 def_vesa
='#undef CONFIG_VESA'
4410 novomodules
="vesa $novomodules"
4422 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4423 if test -z "$_sdlconfig" ; then
4424 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4425 _sdlconfig
="sdl-config"
4426 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4427 _sdlconfig
="sdl11-config"
4432 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4434 #ifdef CONFIG_SDL_SDL_H
4435 #include <SDL/SDL.h>
4440 // we allow SDL hacking our main() only on OSX
4443 int main(int argc, char *argv[]) {
4444 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4449 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4450 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4452 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4456 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4457 res_comment
="using $_sdlconfig"
4459 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4460 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4462 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4463 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4465 _inc_tmp
="$($_sdlconfig --cflags)"
4466 _ld_tmp
="$($_sdlconfig --libs)"
4468 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4470 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4471 # HACK for BeOS/Haiku SDL
4472 _ld_tmp
="$_ld_tmp -lstdc++"
4477 if test "$_sdl" = yes ; then
4478 def_sdl
='#define CONFIG_SDL 1'
4479 extra_cflags
="$extra_cflags $_inc_tmp"
4480 libs_mplayer
="$libs_mplayer $_ld_tmp"
4481 vomodules
="sdl $vomodules"
4482 aomodules
="sdl $aomodules"
4484 def_sdl
='#undef CONFIG_SDL'
4485 novomodules
="sdl $novomodules"
4486 noaomodules
="sdl $noaomodules"
4491 # make sure this stays below CoreVideo to avoid issues due to namespace
4492 # conflicts between -lGL and -framework OpenGL
4494 #Note: this test is run even with --enable-gl since we autodetect linker flags
4495 if (test "$_x11" = yes ||
test "$_sdl" = yes ||
test "$_cocoa" = yes || win32
) && test "$_gl" != no
; then
4498 #include <windows.h>
4500 #elif defined(GL_SDL)
4502 #ifdef CONFIG_SDL_SDL_H
4503 #include <SDL/SDL.h>
4508 // we allow SDL hacking our main() only on OSX
4513 #include <X11/Xlib.h>
4516 int main(int argc, char *argv[]) {
4519 wglCreateContext(dc);
4520 #elif defined(GL_SDL)
4521 SDL_GL_SwapBuffers();
4523 glXCreateContext(NULL, NULL, NULL, True);
4530 if test "$_x11" = yes ; then
4531 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4532 if cc_check
$_ld_tmp $_ld_lm ; then
4535 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4540 if win32
&& cc_check
-DGL_WIN32 -lopengl32 ; then
4543 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4545 if test "$_cocoa" = yes ; then
4549 # last so it can reuse any linker etc. flags detected before
4550 if test "$_sdl" = yes ; then
4551 if cc_check
-DGL_SDL ||
4552 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4555 elif cc_check
-DGL_SDL -lGL ||
4556 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4559 libs_mplayer
="$libs_mplayer -lGL"
4565 if test "$_gl" = yes ; then
4566 def_gl
='#define CONFIG_GL 1'
4567 res_comment
="backends:"
4568 if test "$_gl_cocoa" = yes ; then
4569 def_gl_cocoa
='#define CONFIG_GL_COCOA 1'
4570 res_comment
="$res_comment cocoa"
4572 if test "$_gl_win32" = yes ; then
4573 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4574 res_comment
="$res_comment win32"
4576 if test "$_gl_x11" = yes ; then
4577 def_gl_x11
='#define CONFIG_GL_X11 1'
4578 res_comment
="$res_comment x11"
4580 if test "$_gl_sdl" = yes ; then
4581 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4582 res_comment
="$res_comment sdl"
4584 vomodules
="opengl $vomodules"
4586 def_gl
='#undef CONFIG_GL'
4587 def_gl_cocoa
='#undef CONFIG_GL_COCOA'
4588 def_gl_win32
='#undef CONFIG_GL_WIN32'
4589 def_gl_x11
='#undef CONFIG_GL_X11'
4590 def_gl_sdl
='#undef CONFIG_GL_SDL'
4591 novomodules
="opengl $novomodules"
4598 echocheck
"Windows waveout"
4599 if test "$_win32waveout" = auto
; then
4601 header_check_broken windows.h mmsystem.h
-lwinmm && _win32waveout
=yes
4603 if test "$_win32waveout" = yes ; then
4604 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
4605 libs_mplayer
="$libs_mplayer -lwinmm"
4606 aomodules
="win32 $aomodules"
4608 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
4609 noaomodules
="win32 $noaomodules"
4611 echores
"$_win32waveout"
4613 echocheck
"Direct3D"
4614 if test "$_direct3d" = auto
; then
4616 header_check d3d9.h
&& _direct3d
=yes
4618 if test "$_direct3d" = yes ; then
4619 def_direct3d
='#define CONFIG_DIRECT3D 1'
4620 vomodules
="direct3d $vomodules"
4622 def_direct3d
='#undef CONFIG_DIRECT3D'
4623 novomodules
="direct3d $novomodules"
4625 echores
"$_direct3d"
4628 if test "$_directx" = auto
; then
4632 int main(void) { return 0; }
4635 cc_check
-lgdi32 && _directx
=yes
4637 if test "$_directx" = yes ; then
4638 def_directx
='#define CONFIG_DIRECTX 1'
4639 libs_mplayer
="$libs_mplayer -lgdi32"
4640 vomodules
="directx $vomodules"
4641 aomodules
="dsound $aomodules"
4643 def_directx
='#undef CONFIG_DIRECTX'
4644 novomodules
="directx $novomodules"
4645 noaomodules
="dsound $noaomodules"
4653 if test "$_dxr3" = auto
; then
4655 header_check linux
/em8300.h
&& _dxr3
=yes
4657 if test "$_dxr3" = yes ; then
4658 def_dxr3
='#define CONFIG_DXR3 1'
4659 vomodules
="dxr3 $vomodules"
4661 def_dxr3
='#undef CONFIG_DXR3'
4662 novomodules
="dxr3 $novomodules"
4667 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
4668 if test "$_ivtv" = auto
; then
4670 #include <sys/time.h>
4671 #include <linux/videodev2.h>
4672 #include <linux/ivtv.h>
4673 #include <sys/ioctl.h>
4675 struct ivtv_cfg_stop_decode sd;
4676 struct ivtv_cfg_start_decode sd1;
4677 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
4678 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
4682 cc_check
&& _ivtv
=yes
4684 if test "$_ivtv" = yes ; then
4685 def_ivtv
='#define CONFIG_IVTV 1'
4686 vomodules
="ivtv $vomodules"
4687 aomodules
="ivtv $aomodules"
4689 def_ivtv
='#undef CONFIG_IVTV'
4690 novomodules
="ivtv $novomodules"
4691 noaomodules
="ivtv $noaomodules"
4696 echocheck
"V4L2 MPEG Decoder"
4697 if test "$_v4l2" = auto
; then
4699 #include <sys/time.h>
4700 #include <linux/videodev2.h>
4701 #include <linux/version.h>
4703 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4704 #error kernel headers too old, need 2.6.22
4706 struct v4l2_ext_controls ctrls;
4707 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4712 cc_check
&& _v4l2
=yes
4714 if test "$_v4l2" = yes ; then
4715 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
4716 vomodules
="v4l2 $vomodules"
4717 aomodules
="v4l2 $aomodules"
4719 def_v4l2
='#undef CONFIG_V4L2_DECODER'
4720 novomodules
="v4l2 $novomodules"
4721 noaomodules
="v4l2 $noaomodules"
4732 echocheck
"OSS Audio"
4733 if test "$_ossaudio" = auto
; then
4735 return_check
$_soundcard_header SNDCTL_DSP_SETFRAGMENT
&& _ossaudio
=yes
4737 if test "$_ossaudio" = yes ; then
4738 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
4739 aomodules
="oss $aomodules"
4741 #include <$_soundcard_header>
4742 #ifdef OPEN_SOUND_SYSTEM
4743 int main(void) { return 0; }
4745 #error Not the real thing
4749 cc_check
&& _real_ossaudio
=yes
4750 if test "$_real_ossaudio" = yes; then
4751 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4752 # Check for OSS4 headers (override default headers)
4753 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
4754 if test -f /etc
/oss.conf
; then
4756 _ossinc
="$OSSLIBDIR/include"
4757 if test -f "$_ossinc/sys/soundcard.h"; then
4758 extra_cflags
="-I$_ossinc $extra_cflags"
4761 elif netbsd || openbsd
; then
4762 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4763 extra_ldflags
="$extra_ldflags -lossaudio"
4765 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4767 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4769 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
4770 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4771 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4772 noaomodules
="oss $noaomodules"
4774 echores
"$_ossaudio"
4778 if test "$_rsound" = auto
; then
4780 statement_check rsound.h
'rsd_init(NULL);' -lrsound && _rsound
=yes
4784 if test "$_rsound" = yes ; then
4785 def_rsound
='#define CONFIG_RSOUND 1'
4786 aomodules
="rsound $aomodules"
4787 libs_mplayer
="$libs_mplayer -lrsound"
4789 def_rsound
='#undef CONFIG_RSOUND'
4790 noaomodules
="rsound $noaomodules"
4795 if test "$_nas" = auto
; then
4797 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
4799 if test "$_nas" = yes ; then
4800 def_nas
='#define CONFIG_NAS 1'
4801 libs_mplayer
="$libs_mplayer -laudio -lXt"
4802 aomodules
="nas $aomodules"
4804 noaomodules
="nas $noaomodules"
4805 def_nas
='#undef CONFIG_NAS'
4811 if test "$_pulse" = auto
; then
4813 if pkg_config_add
'libpulse >= 0.9' ; then
4819 if test "$_pulse" = yes ; then
4820 def_pulse
='#define CONFIG_PULSE 1'
4821 aomodules
="pulse $aomodules"
4823 def_pulse
='#undef CONFIG_PULSE'
4824 noaomodules
="pulse $noaomodules"
4828 echocheck
"PortAudio"
4829 if test "$_portaudio" = auto
&& test "$_pthreads" != yes ; then
4831 res_comment
="pthreads not enabled"
4833 if test "$_portaudio" = auto
; then
4835 if pkg_config_add
'portaudio-2.0 >= 19' ; then
4839 echores
"$_portaudio"
4841 if test "$_portaudio" = yes ; then
4842 def_portaudio
='#define CONFIG_PORTAUDIO 1'
4843 aomodules
="portaudio $aomodules"
4845 def_portaudio
='#undef CONFIG_PORTAUDIO'
4846 noaomodules
="portaudio $noaomodules"
4851 if test "$_jack" = auto
; then
4853 if pkg_config_add jack
; then
4858 if test "$_jack" = yes ; then
4859 def_jack
='#define CONFIG_JACK 1'
4860 aomodules
="jack $aomodules"
4862 noaomodules
="jack $noaomodules"
4867 if test "$_openal" = auto
; then
4871 #include <OpenAL/al.h>
4876 alSourceQueueBuffers(0, 0, 0);
4877 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
4881 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
4882 cc_check
$I && _openal
=yes && break
4883 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
4885 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
4887 if test "$_openal" = yes ; then
4888 def_openal
='#define CONFIG_OPENAL 1'
4889 aomodules
="openal $aomodules"
4891 noaomodules
="openal $noaomodules"
4895 echocheck
"ALSA audio"
4896 if test "$_alloca" != yes ; then
4898 res_comment
="alloca missing"
4900 if test "$_alsa" = auto
; then
4902 if pkg_config_add
"alsa >= 1.0.9" ; then
4906 def_alsa
='#undef CONFIG_ALSA'
4907 if test "$_alsa" = yes ; then
4908 aomodules
="alsa $aomodules"
4909 def_alsa
='#define CONFIG_ALSA 1'
4911 noaomodules
="alsa $noaomodules"
4916 echocheck
"Sun audio"
4917 if test "$_sunaudio" = auto
; then
4919 #include <sys/types.h>
4920 #include <sys/audioio.h>
4921 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4924 cc_check
&& _sunaudio
=yes
4926 if test "$_sunaudio" = yes ; then
4927 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
4928 aomodules
="sun $aomodules"
4930 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
4931 noaomodules
="sun $noaomodules"
4933 echores
"$_sunaudio"
4937 echocheck
"CoreAudio"
4938 if test "$_coreaudio" = auto
; then
4940 #include <CoreAudio/CoreAudio.h>
4941 #include <AudioToolbox/AudioToolbox.h>
4942 #include <AudioUnit/AudioUnit.h>
4943 int main(void) { return 0; }
4946 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
4948 if test "$_coreaudio" = yes ; then
4949 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
4950 def_coreaudio
='#define CONFIG_COREAUDIO 1'
4951 aomodules
="coreaudio $aomodules"
4953 def_coreaudio
='#undef CONFIG_COREAUDIO'
4954 noaomodules
="coreaudio $noaomodules"
4960 # set default CD/DVD devices
4962 default_cdrom_device
="D:"
4964 default_cdrom_device
="/dev/disk1"
4965 elif dragonfly
; then
4966 default_cdrom_device
="/dev/cd0"
4968 default_cdrom_device
="/dev/acd0"
4970 default_cdrom_device
="/dev/rcd0c"
4972 default_cdrom_device
="/vol/dev/aliases/cdrom0"
4973 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
4974 # file system and the volfs service.
4975 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
4977 default_cdrom_device
="a1ide.device:2"
4979 default_cdrom_device
="/dev/cdrom"
4982 if win32 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
4983 default_dvd_device
=$default_cdrom_device
4985 default_dvd_device
="/dev/rdiskN"
4987 default_dvd_device
="/dev/dvd"
4991 echocheck
"VCD support"
4992 if test "$_vcd" = auto
; then
4994 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos
; then
4997 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5000 if test "$_vcd" = yes; then
5001 inputmodules
="vcd $inputmodules"
5002 def_vcd
='#define CONFIG_VCD 1'
5004 def_vcd
='#undef CONFIG_VCD'
5005 noinputmodules
="vcd $noinputmodules"
5006 res_comment
="not supported on this OS"
5012 echocheck
"Blu-ray support"
5013 if test "$_bluray" = auto
; then
5015 pkg_config_add
'libbluray >= 0.2.1' && _bluray
=yes
5017 if test "$_bluray" = yes ; then
5018 def_bluray
='#define CONFIG_LIBBLURAY 1'
5019 inputmodules
="bluray $inputmodules"
5021 def_bluray
='#undef CONFIG_LIBBLURAY'
5022 noinputmodules
="bluray $noinputmodules"
5027 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5028 _dvdread_internal
=no
5030 if test "$_dvdread_internal" = auto
; then
5031 _dvdread_internal
=no
5033 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) &&
5034 (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes ||
5035 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) ||
5036 darwin || win32
; then
5037 _dvdread_internal
=yes
5039 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5041 elif test "$_dvdread" = auto
; then
5043 if test "$_dl" = yes; then
5044 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
5045 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
5046 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5048 extra_cflags
="$extra_cflags $_dvdreadcflags"
5049 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5050 res_comment
="external"
5055 if test "$_dvdread_internal" = yes; then
5056 def_dvdread
='#define CONFIG_DVDREAD 1'
5057 inputmodules
="dvdread(internal) $inputmodules"
5058 res_comment
="internal"
5059 elif test "$_dvdread" = yes; then
5060 def_dvdread
='#define CONFIG_DVDREAD 1'
5061 extra_ldflags
="$extra_ldflags -ldvdread"
5062 inputmodules
="dvdread(external) $inputmodules"
5063 res_comment
="external"
5065 def_dvdread
='#undef CONFIG_DVDREAD'
5066 noinputmodules
="dvdread $noinputmodules"
5071 echocheck
"internal libdvdcss"
5072 if test "$_libdvdcss_internal" = auto
; then
5073 _libdvdcss_internal
=no
5074 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
5075 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5077 if test "$_libdvdcss_internal" = yes ; then
5078 if linux || netbsd || openbsd || bsdos
; then
5079 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5080 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5081 elif freebsd || dragonfly
; then
5082 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5084 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5085 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5087 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5089 cflags_libdvdcss
="-DSYS_BEOS"
5091 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5092 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5093 inputmodules
="libdvdcss(internal) $inputmodules"
5095 noinputmodules
="libdvdcss(internal) $noinputmodules"
5097 echores
"$_libdvdcss_internal"
5101 if test "$_libcdio" = auto
; then
5103 if pkg_config_add libcdio_paranoia
; then
5107 if test "$_libcdio" = yes ; then
5109 def_cdda
='#define CONFIG_CDDA 1'
5110 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5111 inputmodules
="cdda $inputmodules"
5115 def_cdda
='#undef CONFIG_CDDA'
5116 noinputmodules
="cdda $noinputmodules"
5120 if test "$_cddb" = yes ; then
5121 def_cddb
='#define CONFIG_CDDB 1'
5122 inputmodules
="cddb $inputmodules"
5125 def_cddb
='#undef CONFIG_CDDB'
5126 noinputmodules
="cddb $noinputmodules"
5129 echocheck
"bitmap font support"
5130 if test "$_bitmap_font" = yes ; then
5131 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5133 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5135 echores
"$_bitmap_font"
5138 echocheck
"freetype >= 2.0.9"
5140 # freetype depends on iconv
5141 if test "$_iconv" = no
; then
5143 res_comment
="iconv support needed"
5146 if test "$_freetype" = auto
; then
5147 if pkg_config_add freetype2
; then
5150 die
"Unable to find development files for libfreetype. Aborting. If you really mean to compile without FreeType support use --disable-freetype."
5153 if test "$_freetype" = yes ; then
5154 def_freetype
='#define CONFIG_FREETYPE 1'
5156 def_freetype
='#undef CONFIG_FREETYPE'
5158 echores
"$_freetype"
5160 if test "$_freetype" = no
; then
5162 res_comment
="FreeType support needed"
5164 echocheck
"fontconfig"
5165 if test "$_fontconfig" = auto
; then
5166 if pkg_config_add
'fontconfig >= 2.4.2' ; then
5169 die
"Unable to find development files for libfontconfig. Aborting. If you really mean to compile without fontconfig support use --disable-fontconfig."
5172 if test "$_fontconfig" = yes ; then
5173 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5175 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5177 echores
"$_fontconfig"
5180 echocheck
"SSA/ASS support"
5181 if test "$_ass" = auto
; then
5182 if pkg_config_add libass
; then
5184 def_ass
='#define CONFIG_ASS 1'
5186 die
"Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
5189 def_ass
='#undef CONFIG_ASS'
5194 echocheck
"fribidi with charsets"
5195 if test "$_fribidi" = auto
; then
5197 if pkg_config_add fribidi
; then
5201 if test "$_fribidi" = yes ; then
5202 def_fribidi
='#define CONFIG_FRIBIDI 1'
5204 def_fribidi
='#undef CONFIG_FRIBIDI'
5210 if test "$_enca" = auto
; then
5212 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
5214 if test "$_enca" = yes ; then
5215 def_enca
='#define CONFIG_ENCA 1'
5216 extra_ldflags
="$extra_ldflags -lenca"
5218 def_enca
='#undef CONFIG_ENCA'
5225 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
5226 if test "$_zlib" = yes ; then
5227 def_zlib
='#define CONFIG_ZLIB 1'
5228 extra_ldflags
="$extra_ldflags -lz"
5230 def_zlib
='#define CONFIG_ZLIB 0'
5236 if test "$_rtc" = auto
; then
5238 #include <sys/ioctl.h>
5240 #include <linux/rtc.h>
5243 #define RTC_PIE_ON RTCIO_PIE_ON
5245 int main(void) { return RTC_PIE_ON; }
5248 cc_check
&& _rtc
=yes
5251 if test "$_rtc" = yes ; then
5252 def_rtc
='#define HAVE_RTC 1'
5254 def_rtc
='#undef HAVE_RTC'
5259 echocheck
"mad support"
5260 if test "$_mad" = auto
; then
5262 header_check mad.h
-lmad && _mad
=yes
5264 if test "$_mad" = yes ; then
5265 def_mad
='#define CONFIG_LIBMAD 1'
5266 extra_ldflags
="$extra_ldflags -lmad"
5267 codecmodules
="libmad $codecmodules"
5269 def_mad
='#undef CONFIG_LIBMAD'
5270 nocodecmodules
="libmad $nocodecmodules"
5274 echocheck
"OggVorbis support"
5275 if test "$_libvorbis" = auto
; then
5277 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes && _tremor
=no
5278 elif test "$_libvorbis" = yes ; then
5281 if test "$_tremor" = auto
; then
5283 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes
5285 if test "$_tremor" = yes ; then
5287 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5288 def_tremor
='#define CONFIG_TREMOR 1'
5289 codecmodules
="tremor(external) $codecmodules"
5290 res_comment
="external Tremor"
5291 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
5292 elif test "$_libvorbis" = yes ; then
5294 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5295 codecmodules
="libvorbis $codecmodules"
5296 res_comment
="libvorbis"
5297 extra_ldflags
="$extra_ldflags -lvorbis -logg"
5300 nocodecmodules
="libvorbis $nocodecmodules"
5304 echocheck
"libspeex (version >= 1.1 required)"
5305 if test "$_speex" = auto
; then
5309 #include <speex/speex.h>
5310 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
5312 cc_check
-lspeex $_ld_lm && _speex
=yes
5314 if test "$_speex" = yes ; then
5315 def_speex
='#define CONFIG_SPEEX 1'
5316 extra_ldflags
="$extra_ldflags -lspeex"
5317 codecmodules
="speex $codecmodules"
5319 def_speex
='#undef CONFIG_SPEEX'
5320 nocodecmodules
="speex $nocodecmodules"
5324 echocheck
"OggTheora support"
5325 if test "$_theora" = auto
; then
5327 if pkg_config_add theora
; then
5331 if test "$_theora" = yes ; then
5332 def_theora
='#define CONFIG_OGGTHEORA 1'
5333 codecmodules
="libtheora $codecmodules"
5335 def_theora
='#undef CONFIG_OGGTHEORA'
5336 nocodecmodules
="libtheora $nocodecmodules"
5340 # Any version of libmpg123 that knows MPG123_RESYNC_LIMIT shall be fine.
5341 # That is, 1.2.0 onwards. Recommened is 1.14 onwards, though.
5342 echocheck
"mpg123 support"
5343 def_mpg123
='#undef CONFIG_MPG123'
5344 if test "$_mpg123" = auto
; then
5346 pkg_config_add
'libmpg123 >= 1.2.0' && _mpg123
=yes
5348 if test "$_mpg123" = yes ; then
5349 def_mpg123
='#define CONFIG_MPG123 1'
5350 codecmodules
="mpg123 $codecmodules"
5352 nocodecmodules
="mpg123 $nocodecmodules"
5356 echocheck
"liba52 support"
5357 def_liba52
='#undef CONFIG_LIBA52'
5358 if test "$_liba52" = auto
; then
5361 #include <inttypes.h>
5362 #include <a52dec/a52.h>
5363 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
5365 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
5367 if test "$_liba52" = yes ; then
5368 def_liba52
='#define CONFIG_LIBA52 1'
5369 codecmodules
="liba52 $codecmodules"
5371 nocodecmodules
="liba52 $nocodecmodules"
5375 echocheck
"libdca support"
5376 if test "$_libdca" = auto
; then
5378 for _ld_dca
in -ldca -ldts ; do
5379 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
5380 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
5383 if test "$_libdca" = yes ; then
5384 def_libdca
='#define CONFIG_LIBDCA 1'
5385 codecmodules
="libdca $codecmodules"
5387 def_libdca
='#undef CONFIG_LIBDCA'
5388 nocodecmodules
="libdca $nocodecmodules"
5392 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5393 if test "$_musepack" = yes ; then
5397 #include <mpcdec/mpcdec.h>
5399 mpc_streaminfo info;
5400 mpc_decoder decoder;
5401 mpc_decoder_set_streaminfo(&decoder, &info);
5402 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5406 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5408 if test "$_musepack" = yes ; then
5409 def_musepack
='#define CONFIG_MUSEPACK 1'
5410 extra_ldflags
="$extra_ldflags -lmpcdec"
5411 codecmodules
="musepack $codecmodules"
5413 def_musepack
='#undef CONFIG_MUSEPACK'
5414 nocodecmodules
="musepack $nocodecmodules"
5416 echores
"$_musepack"
5419 echocheck
"FAAD2 support"
5420 if test "$_faad" = auto
; then
5424 #ifndef FAAD_MIN_STREAMSIZE
5425 #error Too old version
5427 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
5428 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5430 cc_check
-lfaad $_ld_lm && _faad
=yes
5433 def_faad
='#undef CONFIG_FAAD'
5434 if test "$_faad" = yes ; then
5435 def_faad
='#define CONFIG_FAAD 1'
5436 extra_ldflags
="$extra_ldflags -lfaad"
5437 codecmodules
="faad2 $codecmodules"
5439 nocodecmodules
="faad2 $nocodecmodules"
5444 echocheck
"LADSPA plugin support"
5445 if test "$_ladspa" = auto
; then
5447 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
5449 if test "$_ladspa" = yes; then
5450 def_ladspa
="#define CONFIG_LADSPA 1"
5452 def_ladspa
="#undef CONFIG_LADSPA"
5457 echocheck
"libbs2b audio filter support"
5458 if test "$_libbs2b" = auto
; then
5460 if pkg_config_add libbs2b
; then
5464 def_libbs2b
="#undef CONFIG_LIBBS2B"
5465 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
5469 if test -z "$_codecsdir" ; then
5470 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
5471 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5472 if test -d "$dir" ; then
5478 # Fall back on default directory.
5479 if test -z "$_codecsdir" ; then
5480 _codecsdir
="$_libdir/codecs"
5481 mingw32
&& _codecsdir
="codecs"
5485 echocheck
"Win32 codecs"
5486 if test "$_win32dll" = auto
; then
5488 if x86_32
&& ! qnx
; then
5492 if test "$_win32dll" = yes ; then
5493 def_win32dll
='#define CONFIG_WIN32DLL 1'
5495 def_win32_loader
='#define WIN32_LOADER 1'
5496 _win32_emulation
=yes
5498 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
5499 res_comment
="using native windows"
5501 codecmodules
="win32 $codecmodules"
5503 def_win32dll
='#undef CONFIG_WIN32DLL'
5504 def_win32_loader
='#undef WIN32_LOADER'
5505 nocodecmodules
="win32 $nocodecmodules"
5507 echores
"$_win32dll"
5510 echocheck
"XAnim codecs"
5511 if test "$_xanim" = auto
; then
5513 res_comment
="dynamic loader support needed"
5514 if test "$_dl" = yes ; then
5518 if test "$_xanim" = yes ; then
5519 def_xanim
='#define CONFIG_XANIM 1'
5520 codecmodules
="xanim $codecmodules"
5522 def_xanim
='#undef CONFIG_XANIM'
5523 nocodecmodules
="xanim $nocodecmodules"
5528 echocheck
"RealPlayer codecs"
5529 if test "$_real" = auto
; then
5531 res_comment
="dynamic loader support needed"
5532 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
5533 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32
) ; then
5537 if test "$_real" = yes ; then
5538 def_real
='#define CONFIG_REALCODECS 1'
5539 codecmodules
="real $codecmodules"
5541 def_real
='#undef CONFIG_REALCODECS'
5542 nocodecmodules
="real $nocodecmodules"
5547 echocheck
"QuickTime codecs"
5549 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
5550 if test "$_qtx" = auto
; then
5551 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
5553 if test "$_qtx" = yes ; then
5554 def_qtx
='#define CONFIG_QTX_CODECS 1'
5555 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
5556 codecmodules
="qtx $codecmodules"
5557 darwin || win32 || _qtx_emulation
=yes
5559 def_qtx
='#undef CONFIG_QTX_CODECS'
5560 nocodecmodules
="qtx $nocodecmodules"
5564 echocheck
"Nemesi Streaming Media libraries"
5565 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
5567 if pkg_config_add libnemesi
; then
5571 if test "$_nemesi" = yes; then
5573 def_nemesi
='#define CONFIG_LIBNEMESI 1'
5574 inputmodules
="nemesi $inputmodules"
5576 _native_rtsp
="$networking"
5578 def_nemesi
='#undef CONFIG_LIBNEMESI'
5579 noinputmodules
="nemesi $noinputmodules"
5583 echocheck
"LIVE555 Streaming Media libraries"
5584 if test "$_live" != no
&& test "$networking" = yes ; then
5585 cat > $TMPCPP << EOF
5586 #include <liveMedia.hh>
5587 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
5588 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
5590 int main(void) { return 0; }
5594 for I
in $extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
5595 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include
$I/groupsock
/include
&&
5596 _livelibdir
=$
(echo $I|
sed s
/-I//) &&
5597 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
5598 $_livelibdir/groupsock/libgroupsock.a \
5599 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
5600 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
5601 $extra_ldflags -lstdc++" \
5602 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
5603 -I$_livelibdir/UsageEnvironment/include \
5604 -I$_livelibdir/BasicUsageEnvironment/include \
5605 -I$_livelibdir/groupsock/include" &&
5608 if test "$_live" != yes ; then
5609 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
5610 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
5615 if test "$_live" = yes && test "$networking" = yes; then
5616 test $_livelibdir && res_comment
="using $_livelibdir"
5617 def_live
='#define CONFIG_LIVE555 1'
5618 inputmodules
="live555 $inputmodules"
5619 elif test "$_live_dist" = yes && test "$networking" = yes; then
5620 res_comment
="using distribution version"
5622 def_live
='#define CONFIG_LIVE555 1'
5623 extra_ldflags
="$extra_ldflags $ld_tmp"
5624 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
5625 inputmodules
="live555 $inputmodules"
5628 def_live
='#undef CONFIG_LIVE555'
5629 noinputmodules
="live555 $noinputmodules"
5635 # Test with > against Libav 0.8 versions which will NOT work rather than
5636 # specify minimum version, to allow (future) point releases to possibly work.
5637 all_libav_libs
="libavutil > 51.21.0:libavcodec > 53.34.0:libavformat > 53.20.0:libswscale >= 2.0.0"
5638 echocheck
"Libav ($all_libav_libs)"
5639 if test "$ffmpeg" = auto
; then
5640 IFS
=":" # shell should not be used for programming
5641 if ! pkg_config_add
$all_libav_libs ; then
5642 die
"Unable to find development files for some of the required Libav libraries above. Aborting."
5647 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
5648 if ! test -z "$_ffmpeg_source" ; then
5649 def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
5652 echocheck
"libpostproc >= 52.0.0"
5653 if test "$libpostproc" = auto
; then
5655 if pkg_config_add
"libpostproc >= 52.0.0" ; then
5659 if test "$libpostproc" = yes ; then
5660 def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
5662 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
5664 echores
"$libpostproc"
5667 echocheck
"libdv-0.9.5+"
5668 if test "$_libdv" = auto
; then
5670 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
5672 if test "$_libdv" = yes ; then
5673 def_libdv
='#define CONFIG_LIBDV095 1'
5674 extra_ldflags
="$extra_ldflags -ldv"
5675 codecmodules
="libdv $codecmodules"
5677 def_libdv
='#undef CONFIG_LIBDV095'
5678 nocodecmodules
="libdv $nocodecmodules"
5684 if test "$_xvid" = auto
; then
5686 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
5687 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
5688 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
5692 if test "$_xvid" = yes ; then
5693 def_xvid
='#define CONFIG_XVID4 1'
5694 codecmodules
="xvid $codecmodules"
5696 def_xvid
='#undef CONFIG_XVID4'
5697 nocodecmodules
="xvid $nocodecmodules"
5703 if test "$_libnut" = auto
; then
5705 statement_check libnut.h
'nut_context_tt * nut; nut_error(0)' -lnut && _libnut
=yes
5708 if test "$_libnut" = yes ; then
5709 def_libnut
='#define CONFIG_LIBNUT 1'
5710 extra_ldflags
="$extra_ldflags -lnut"
5712 def_libnut
='#undef CONFIG_LIBNUT'
5716 # These VO checks must be done after the FFmpeg one
5717 echocheck
"/dev/mga_vid"
5718 if test "$_mga" = auto
; then
5720 test -c /dev
/mga_vid
&& _mga
=yes
5722 if test "$_mga" = yes ; then
5723 def_mga
='#define CONFIG_MGA 1'
5724 vomodules
="mga $vomodules"
5726 def_mga
='#undef CONFIG_MGA'
5727 novomodules
="mga $novomodules"
5733 if test "$_xmga" = auto
; then
5735 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
5737 if test "$_xmga" = yes ; then
5738 def_xmga
='#define CONFIG_XMGA 1'
5739 vomodules
="xmga $vomodules"
5741 def_xmga
='#undef CONFIG_XMGA'
5742 novomodules
="xmga $novomodules"
5747 echocheck
"UnRAR executable"
5748 if test "$_unrar_exec" = auto
; then
5750 mingw32
&& _unrar_exec
="no"
5752 if test "$_unrar_exec" = yes ; then
5753 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
5755 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
5757 echores
"$_unrar_exec"
5759 echocheck
"TV interface"
5760 if test "$_tv" = yes ; then
5761 def_tv
='#define CONFIG_TV 1'
5762 inputmodules
="tv $inputmodules"
5764 noinputmodules
="tv $noinputmodules"
5765 def_tv
='#undef CONFIG_TV'
5770 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
5771 echocheck
"*BSD BT848 bt8xx header"
5773 for file in "machine/ioctl_bt848.h" \
5774 "dev/bktr/ioctl_bt848.h" \
5775 "dev/video/bktr/ioctl_bt848.h" \
5776 "dev/ic/bt8xx.h" ; do
5778 #include <sys/types.h>
5779 #include <sys/ioctl.h>
5781 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
5785 _ioctl_bt848_h_name
="$file"
5789 if test "$_ioctl_bt848_h" = yes ; then
5790 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
5791 res_comment
="using $_ioctl_bt848_h_name"
5793 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
5795 echores
"$_ioctl_bt848_h"
5797 echocheck
"*BSD ioctl_meteor.h"
5799 for ioctl_meteor_h_path
in "machine/ioctl_meteor.h" "dev/bktr/ioctl_meteor.h" "dev/video/bktr/ioctl_meteor.h" ; do
5800 statement_check_broken
"sys/types.h" "$ioctl_meteor_h_path" 'ioctl(0, METEORSINPUT, 0)' &&
5801 _ioctl_meteor_h
=yes && break
5803 if test "$_ioctl_meteor_h" = yes ; then
5804 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$ioctl_meteor_h_path>"
5805 res_comment
="using $ioctl_meteor_h_path"
5807 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
5809 echores
"$_ioctl_meteor_h"
5811 echocheck
"*BSD BrookTree 848 TV interface"
5812 if test "$_tv_bsdbt848" = auto
; then
5814 if test "$_tv" = yes ; then
5816 #include <sys/types.h>
5817 $def_ioctl_meteor_h_name
5818 $def_ioctl_bt848_h_name
5819 #ifdef IOCTL_METEOR_H_NAME
5820 #include IOCTL_METEOR_H_NAME
5822 #ifdef IOCTL_BT848_H_NAME
5823 #include IOCTL_BT848_H_NAME
5826 ioctl(0, METEORSINPUT, 0);
5827 ioctl(0, TVTUNER_GETFREQ, 0);
5831 cc_check
&& _tv_bsdbt848
=yes
5834 if test "$_tv_bsdbt848" = yes ; then
5835 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
5836 inputmodules
="tv-bsdbt848 $inputmodules"
5838 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
5839 noinputmodules
="tv-bsdbt848 $noinputmodules"
5841 echores
"$_tv_bsdbt848"
5842 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
5845 echocheck
"DirectShow TV interface"
5846 if test "$_tv_dshow" = auto
; then
5848 if test "$_tv" = yes && win32
; then
5849 statement_check ole2.h
'void* p; CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p)' -lole32 -luuid && _tv_dshow
=yes
5852 if test "$_tv_dshow" = yes ; then
5853 inputmodules
="tv-dshow $inputmodules"
5854 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
5855 extra_ldflags
="$extra_ldflags -lole32 -luuid"
5857 noinputmodules
="tv-dshow $noinputmodules"
5858 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
5860 echores
"$_tv_dshow"
5863 echocheck
"Video 4 Linux TV interface"
5864 if test "$_tv_v4l1" = auto
; then
5866 if test "$_tv" = yes && linux
; then
5867 header_check_broken sys
/time.h linux
/videodev.h
&& _tv_v4l1
=yes
5870 if test "$_tv_v4l1" = yes ; then
5873 def_tv_v4l
='#define CONFIG_TV_V4L 1'
5874 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
5875 inputmodules
="tv-v4l $inputmodules"
5877 noinputmodules
="tv-v4l1 $noinputmodules"
5878 def_tv_v4l
='#undef CONFIG_TV_V4L'
5883 echocheck
"Video 4 Linux 2 TV interface"
5884 if test "$_tv_v4l2" = auto
; then
5886 if test "$_tv" = yes && linux
; then
5887 header_check_broken sys
/time.h linux
/videodev2.h
&& _tv_v4l2
=yes
5888 elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then
5892 if test "$_tv_v4l2" = yes ; then
5895 def_tv_v4l
='#define CONFIG_TV_V4L 1'
5896 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
5897 inputmodules
="tv-v4l2 $inputmodules"
5899 noinputmodules
="tv-v4l2 $noinputmodules"
5900 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
5905 echocheck
"Radio interface"
5906 if test "$_radio" = yes ; then
5907 def_radio
='#define CONFIG_RADIO 1'
5908 inputmodules
="radio $inputmodules"
5909 if test "$_alsa" != yes -a "$_ossaudio" != yes ; then
5912 if test "$_radio_capture" = yes ; then
5914 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
5916 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
5919 noinputmodules
="radio $noinputmodules"
5920 def_radio
='#undef CONFIG_RADIO'
5921 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
5925 echocheck
"Capture for Radio interface"
5926 echores
"$_radio_capture"
5928 echocheck
"Video 4 Linux 2 Radio interface"
5929 if test "$_radio_v4l2" = auto
; then
5931 if test "$_radio" = yes && linux
; then
5932 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
5935 if test "$_radio_v4l2" = yes ; then
5936 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
5938 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
5940 echores
"$_radio_v4l2"
5942 echocheck
"Video 4 Linux Radio interface"
5943 if test "$_radio_v4l" = auto
; then
5945 if test "$_radio" = yes && linux
; then
5946 header_check linux
/videodev.h
&& _radio_v4l
=yes
5949 if test "$_radio_v4l" = yes ; then
5950 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
5952 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
5954 echores
"$_radio_v4l"
5956 if freebsd || netbsd || openbsd || dragonfly || bsdos
&&
5957 test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
5958 echocheck
"*BSD BrookTree 848 Radio interface"
5961 #include <sys/types.h>
5962 $def_ioctl_bt848_h_name
5963 #ifdef IOCTL_BT848_H_NAME
5964 #include IOCTL_BT848_H_NAME
5966 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
5968 cc_check
&& _radio_bsdbt848
=yes
5969 echores
"$_radio_bsdbt848"
5970 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
5972 if test "$_radio_bsdbt848" = yes ; then
5973 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
5975 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
5978 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&&
5979 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
5980 die
"Radio driver requires BSD BT848, V4L or V4L2!"
5983 echocheck
"Video 4 Linux 2 MPEG PVR interface"
5984 if test "$_pvr" = auto
; then
5986 if test "$_tv_v4l2" = yes && linux
; then
5988 #include <sys/time.h>
5989 #include <linux/videodev2.h>
5990 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
5992 cc_check
&& _pvr
=yes
5995 if test "$_pvr" = yes ; then
5996 def_pvr
='#define CONFIG_PVR 1'
5997 inputmodules
="pvr $inputmodules"
5999 noinputmodules
="pvr $noinputmodules"
6000 def_pvr
='#undef CONFIG_PVR'
6006 if test "$_ftp" = "auto" ; then
6007 test "$networking" = "yes" && ! beos
&& _ftp
=yes
6009 if test "$_ftp" = yes ; then
6010 def_ftp
='#define CONFIG_FTP 1'
6011 inputmodules
="ftp $inputmodules"
6013 noinputmodules
="ftp $noinputmodules"
6014 def_ftp
='#undef CONFIG_FTP'
6018 echocheck
"vstream client"
6019 if test "$_vstream" = auto
; then
6022 #include <vstream-client.h>
6023 void vstream_error(const char *format, ... ) {}
6024 int main(void) { vstream_start(); return 0; }
6026 cc_check
-lvstream-client && _vstream
=yes
6028 if test "$_vstream" = yes ; then
6029 def_vstream
='#define CONFIG_VSTREAM 1'
6030 inputmodules
="vstream $inputmodules"
6031 extra_ldflags
="$extra_ldflags -lvstream-client"
6033 noinputmodules
="vstream $noinputmodules"
6034 def_vstream
='#undef CONFIG_VSTREAM'
6039 echocheck
"Subtitles sorting"
6040 if test "$_sortsub" = yes ; then
6041 def_sortsub
='#define CONFIG_SORTSUB 1'
6043 def_sortsub
='#undef CONFIG_SORTSUB'
6048 echocheck
"XMMS inputplugin support"
6049 if test "$_xmms" = yes ; then
6050 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6051 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
6052 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
6054 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6055 _xmmslibdir
=/usr
/lib
6058 def_xmms
='#define CONFIG_XMMS 1'
6060 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
6062 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6065 def_xmms
='#undef CONFIG_XMMS'
6069 if test "$_charset" != "noconv" ; then
6070 def_charset
="#define MSG_CHARSET \"$_charset\""
6072 def_charset
="#undef MSG_CHARSET"
6076 #############################################################################
6078 echocheck
"automatic gdb attach"
6079 if test "$_crash_debug" = yes ; then
6080 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
6082 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
6085 echores
"$_crash_debug"
6087 echocheck
"compiler support for noexecstack"
6088 if cflag_check
-Wl,-z,noexecstack
; then
6089 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
6095 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
6096 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
6097 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
6104 # Dynamic linking flags
6105 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6107 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
6108 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! sunos
; then
6109 _ld_dl_dynamic
='-rdynamic'
6112 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6113 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
6114 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
6116 def_debug
='#undef MP_DEBUG'
6117 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
6120 echocheck
"joystick"
6121 def_joystick
='#undef CONFIG_JOYSTICK'
6122 if test "$_joystick" = yes ; then
6123 if linux || freebsd
; then
6124 # TODO add some check
6125 def_joystick
='#define CONFIG_JOYSTICK 1'
6128 res_comment
="unsupported under $system_name"
6131 echores
"$_joystick"
6134 if test "$_lirc" = auto
; then
6136 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
6138 if test "$_lirc" = yes ; then
6139 def_lirc
='#define CONFIG_LIRC 1'
6140 libs_mplayer
="$libs_mplayer -llirc_client"
6142 def_lirc
='#undef CONFIG_LIRC'
6147 if test "$_lircc" = auto
; then
6149 header_check lirc
/lircc.h
-llircc && _lircc
=yes
6151 if test "$_lircc" = yes ; then
6152 def_lircc
='#define CONFIG_LIRCC 1'
6153 libs_mplayer
="$libs_mplayer -llircc"
6155 def_lircc
='#undef CONFIG_LIRCC'
6159 #############################################################################
6161 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
6163 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
6165 # This must be the last test to be performed. Any other tests following it
6166 # could fail due to linker errors. libdvdnavmini is intentionally not linked
6167 # against libdvdread (to permit MPlayer to use its own copy of the library).
6168 # So any compilation using the flags added here but not linking against
6169 # libdvdread can fail.
6170 echocheck
"DVD support (libdvdnav)"
6171 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
6175 if test "$_dvdnav" = auto
; then
6176 if test "$_dvdread_internal" = yes ; then
6179 res_comment
="internal"
6181 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
6184 if test "$_dvdnav" = auto
; then
6186 _dvdnavdir
=$
($_dvdnavconfig --cflags)
6187 _dvdnavlibs
=$
($_dvdnavconfig --libs)
6188 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
6190 if test "$_dvdnav" = yes ; then
6191 def_dvdnav
='#define CONFIG_DVDNAV 1'
6192 if test "$dvdnav_internal" = yes ; then
6193 cflags_libdvdnav
="-Ilibdvdnav"
6194 inputmodules
="dvdnav(internal) $inputmodules"
6196 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
6197 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
6198 inputmodules
="dvdnav $inputmodules"
6201 def_dvdnav
='#undef CONFIG_DVDNAV'
6202 noinputmodules
="dvdnav $noinputmodules"
6206 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
6207 # Read dvdnav comment above.
6210 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
6211 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
6213 for part
in $list; do
6214 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
6215 echo "${nprefix}_$part = yes"
6220 #############################################################################
6221 echo "Creating config.mak"
6222 cat > config.mak
<< EOF
6223 # -------- Generated by configure -----------
6225 # Ensure that locale settings do not interfere with shell commands.
6228 CONFIGURATION = $configuration
6231 DOC_LANGS = $language_doc
6232 DOC_LANG_ALL = $doc_lang_all
6233 MAN_LANGS = $language_man
6234 MAN_LANG_ALL = $man_lang_all
6235 MSG_LANGS = $language_msg
6236 MSG_LANG_ALL = $msg_lang_all
6238 prefix = \$(DESTDIR)$_prefix
6239 BINDIR = \$(DESTDIR)$_bindir
6240 DATADIR = \$(DESTDIR)$_datadir
6241 LIBDIR = \$(DESTDIR)$_libdir
6242 MANDIR = \$(DESTDIR)$_mandir
6243 CONFDIR = \$(DESTDIR)$_confdir
6244 LOCALEDIR = \$(DESTDIR)$_localedir
6251 INSTALLSTRIP = $_install_strip
6254 CFLAGS = $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
6255 CXXFLAGS = $WARNFLAGS $ERRORFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
6256 DEPFLAGS = $DEPFLAGS
6258 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
6259 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
6260 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
6261 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
6262 CFLAGS_STACKREALIGN = $cflags_stackrealign
6264 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
6265 EXTRALIBS_MPLAYER = $libs_mplayer
6274 $(mak_enable "$arch_all" "$arch" ARCH)
6275 $(mak_enable "$subarch_all" "$subarch" ARCH)
6276 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
6280 NEED_GETTIMEOFDAY = $need_gettimeofday
6281 NEED_GLOB = $need_glob
6282 NEED_SETENV = $need_setenv
6283 NEED_SHMEM = $need_shmem
6284 NEED_STRSEP = $need_strsep
6285 NEED_SWAB = $need_swab
6286 NEED_VSSCANF = $need_vsscanf
6292 APPLE_IR = $_apple_ir
6293 APPLE_REMOTE = $_apple_remote
6294 AUDIO_INPUT = $_audio_input
6295 BITMAP_FONT = $_bitmap_font
6301 COREAUDIO = $_coreaudio
6302 COREVIDEO = $_corevideo
6303 SHAREDBUFFER = $_sharedbuffer
6305 DIRECT3D = $_direct3d
6306 DIRECTFB = $_directfb
6310 DVDNAV_INTERNAL = $dvdnav_internal
6312 DVDREAD_INTERNAL = $_dvdread_internal
6315 FASTMEMCPY = $_fastmemcpy
6317 FREETYPE = $_freetype
6322 GL_COCOA = $_gl_cocoa
6323 GL_WIN32 = $_gl_win32
6326 HAVE_POSIX_SELECT = $_posix_select
6327 HAVE_SYS_MMAN_H = $_mman
6330 JOYSTICK = $_joystick
6335 LIBBLURAY = $_bluray
6339 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
6341 LIBNEMESI = $_nemesi
6343 LIBPOSTPROC = $libpostproc
6344 LIBSMBCLIENT = $_smb
6346 LIBTHEORA = $_theora
6349 MACOSX_FINDER = $_macosx_finder
6354 MUSEPACK = $_musepack
6356 NATIVE_RTSP = $_native_rtsp
6357 NETWORKING = $networking
6360 PE_EXECUTABLE = $_pe_executable
6363 PRIORITY = $_priority
6365 PORTAUDIO = $_portaudio
6368 QTX_CODECS_WIN32 = $_qtx_codecs_win32
6369 QTX_EMULATION = $_qtx_emulation
6371 RADIO_CAPTURE=$_radio_capture
6372 REAL_CODECS = $_real
6377 STREAM_CACHE = $_stream_cache
6378 SUNAUDIO = $_sunaudio
6384 TV_BSDBT848 = $_tv_bsdbt848
6385 TV_DSHOW = $_tv_dshow
6389 UNRAR_EXEC = $_unrar_exec
6397 WIN32DLL = $_win32dll
6398 WIN32WAVEOUT = $_win32waveout
6399 WIN32_EMULATION = $_win32_emulation
6401 XANIM_CODECS = $_xanim
6403 XMMS_PLUGINS = $_xmms
6407 YUV4MPEG = $_yuv4mpeg
6410 FFMPEG_INTERNALS = $ffmpeg_internals
6411 FFMPEG_SOURCE_PATH = $_ffmpeg_source
6415 YASMFLAGS = $YASMFLAGS
6417 CONFIG_VDPAU = $_vdpau
6418 CONFIG_ZLIB = $_zlib
6420 HAVE_PTHREADS = $_pthreads
6422 HAVE_W32THREADS = $_w32threads
6423 HAVE_YASM = $have_yasm
6427 #############################################################################
6429 ff_config_enable
() {
6430 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
6431 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
6433 test -z "$_nprefix" && _nprefix
='CONFIG'
6434 for part
in $list; do
6435 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
6436 echo "#define ${_nprefix}_$part 1"
6438 echo "#define ${_nprefix}_$part 0"
6443 echo "Creating config.h"
6445 /*----------------------------------------------------------------------------
6446 ** This file has been automatically generated by configure any changes in it
6447 ** will be lost when you run configure again.
6448 ** Instead of modifying definitions here, use the --enable/--disable options
6449 ** of the configure script! See ./configure --help for details.
6450 *---------------------------------------------------------------------------*/
6452 #ifndef MPLAYER_CONFIG_H
6453 #define MPLAYER_CONFIG_H
6455 /* Undefine this if you do not want to select mono audio (left or right)
6456 with a stereo MPEG layer 2/3 audio stream. The command line option
6457 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
6458 right-only), with 0 being the default.
6460 #define CONFIG_FAKE_MONO 1
6462 /* set up audio OUTBURST. Do not change this! */
6463 #define OUTBURST 512
6465 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
6467 #undef FAST_OSD_TABLE
6471 #define CONFIGURATION "$configuration"
6473 #define MPLAYER_DATADIR "$_datadir"
6474 #define MPLAYER_CONFDIR "$_confdir"
6475 #define MPLAYER_LOCALEDIR "$_localedir"
6479 /* definitions needed by included libraries */
6480 #define HAVE_INTTYPES_H 1
6482 #define HAVE_ERRNO_H 1
6483 /* libdvdcss + libdvdread */
6484 #define HAVE_LIMITS_H 1
6486 #define HAVE_UNISTD_H 1
6488 #define STDC_HEADERS 1
6489 #define HAVE_MEMCPY 1
6491 #define READ_CACHE_TRACE 0
6493 #define HAVE_DLFCN_H 1
6497 /* system headers */
6502 $def_mman_has_map_failed
6504 $def_sys_soundcard_h
6512 /* system functions */
6535 /* system-specific features */
6548 $def_restrict_keyword
6553 /* configurable options */
6558 $def_runtime_cpudetection
6566 #define __CPU__ $iproc
6570 $(ff_config_enable "$arch_all" "$arch" "ARCH")
6571 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
6572 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
6575 /* Blu-ray/DVD/VCD/CD */
6576 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
6577 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
6597 /* codec libraries */
6624 #define BINARY_CODECS_PATH "$_codecsdir"
6625 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
6628 /* Audio output drivers */
6636 $def_ossaudio_devdsp
6637 $def_ossaudio_devmixer
6651 $def_ioctl_bt848_h_name
6652 $def_ioctl_meteor_h_name
6753 $def_ffmpeg_internals
6777 #define HAVE_INLINE_ASM 1
6779 /* Use these registers in x86 inline asm. No proper detection yet. */
6780 #define HAVE_EBP_AVAILABLE 1
6782 #endif /* MPLAYER_CONFIG_H */
6785 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
6786 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
6788 #############################################################################
6792 Config files successfully generated by ./configure $configuration !
6794 Install prefix: $_prefix
6795 Data directory: $_datadir
6796 Config direct.: $_confdir
6798 Byte order: $_byte_order
6799 Optimizing for: $_optimizing
6802 Messages (in addition to English): $language_msg
6803 Manual pages: $language_man
6804 Documentation: $language_doc
6806 Enabled optional drivers:
6807 Input: $inputmodules
6808 Codecs: $codecmodules
6809 Audio output: $aomodules
6810 Video output: $vomodules
6812 Disabled optional drivers:
6813 Input: $noinputmodules
6814 Codecs: $nocodecmodules
6815 Audio output: $noaomodules
6816 Video output: $novomodules
6818 'config.h' and 'config.mak' contain your configuration options.
6819 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
6820 compile *** DO NOT REPORT BUGS if you tweak these files ***
6822 'make' will now compile MPlayer and 'make install' will install it.
6823 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
6829 Check $TMPLOG if you wonder why an autodetection failed (make sure
6830 development headers/packages are installed).
6832 NOTE: The --enable-* parameters unconditionally force options on, completely
6833 skipping autodetection. This behavior is unlike what you may be used to from
6834 autoconf-based configure scripts that can decide to override you. This greater
6835 level of control comes at a price. You may have to provide the correct compiler
6836 and linker flags yourself.
6837 If you used one of these options (except --enable-runtime-cpudetection and
6838 similar ones that turn on internal features) and experience a compilation or
6839 linking failure, make sure you have passed the necessary compiler/linker flags
6842 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
6846 if test "$warn_cflags" = yes; then
6849 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
6852 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
6854 It is strongly recommended to let MPlayer choose the correct CFLAGS!
6855 To do so, execute 'CFLAGS= ./configure <options>'
6861 rm -rf "$mplayer_tmpdir"