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 $@
67 int main(void) { return 0; }
69 compile_check
$TMPC $@
75 int main(void) { return 0; }
78 compile_check
$TMPC $@
84 int main(void) { return $2; }
87 compile_check
$TMPC $@
93 int main(void) { $2; return 0; }
97 compile_check
$TMPC $@
100 define_statement_check
() {
104 int main(void) { $3; return 0; }
107 compile_check
$TMPC $@
110 return_statement_check
() {
113 int main(void) { $2; return $3; }
116 compile_check
$TMPC $@
121 int main(void) { __asm__ volatile ($1); return 0; }
124 compile_check
$TMPC $@
127 # The following checks are special and should only be used with broken and
128 # non-selfsufficient headers that do not include all of their dependencies.
130 header_check_broken
() {
134 int main(void) { return 0; }
138 compile_check
$TMPC $@
141 statement_check_broken
() {
145 int main(void) { $3; return 0; }
148 compile_check
$TMPC $@
153 cat "$TMPS" >> "$TMPLOG"
155 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
157 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
165 unset IFS
# shell should not be used for programming
167 echo "$_pkg_config --cflags $@" >> "$TMPLOG"
168 ctmp
=$
($_pkg_config --cflags "$@" 2>> "$TMPLOG") ||
return $?
170 echo "$_pkg_config --libs $@" >> "$TMPLOG"
171 ltmp
=$
($_pkg_config --libs "$@" 2>> "$TMPLOG") ||
return $?
173 echo "cflags: $ctmp" >> "$TMPLOG"
174 echo "libs: $ltmp" >> "$TMPLOG"
176 extra_cflags
="$extra_cflags $ctmp"
177 extra_ldflags
="$extra_ldflags $ltmp"
181 "$TMPEXE" >> "$TMPLOG" 2>&1
184 # Display error message, flushes tempfile, exit
189 rm -f "$TMPEXE" "$TMPC" "$TMPS"
190 echo "Check \"$TMPLOG\" if you do not understand why it failed."
194 # OS test booleans functions
196 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
198 aix
() { issystem
"AIX"; }
199 amigaos
() { issystem
"AmigaOS"; }
200 beos
() { issystem
"BEOS"; }
201 bsdos
() { issystem
"BSD/OS"; }
202 cygwin
() { issystem
"CYGWIN"; }
203 darwin
() { issystem
"Darwin"; }
204 dragonfly
() { issystem
"DragonFly"; }
205 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
206 gnu
() { issystem
"GNU"; }
207 hpux
() { issystem
"HP-UX"; }
208 linux
() { issystem
"Linux"; }
209 mingw32
() { issystem
"MINGW32"; }
210 morphos
() { issystem
"MorphOS"; }
211 netbsd
() { issystem
"NetBSD"; }
212 openbsd
() { issystem
"OpenBSD"; }
213 qnx
() { issystem
"QNX"; }
214 win32
() { cygwin || mingw32
; }
216 # arch test boolean functions
217 # x86/x86pc is used by QNX
220 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
227 x86_64|amd64
) return 0 ;;
238 ppc|ppc64|powerpc|powerpc64
) return 0;;
257 # Use this before starting a check
259 echo "============ Checking for $@ ============" >> "$TMPLOG"
260 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
263 # Use this to echo the results of a check
265 if test "$res_comment" ; then
266 res_comment
="($res_comment)"
268 echo "Result is: $@ $res_comment" >> "$TMPLOG"
269 echo "##########################################" >> "$TMPLOG"
271 echo "$@ $res_comment"
274 #############################################################################
276 # Check how echo works in this /bin/sh
278 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
279 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
283 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
284 man_lang_all
=$
(echo DOCS
/man
/*/mplayer.rst |
sed -e "s:DOCS/man/\(..\)/mplayer.rst:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.rst:\1:g")
285 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
289 Usage: $0 [OPTIONS]...
292 -h, --help display this help and exit
294 Installation directories:
295 --prefix=DIR prefix directory for installation [/usr/local]
296 --bindir=DIR directory for installing binaries [PREFIX/bin]
297 --datadir=DIR directory for installing machine independent
298 data files (skins, etc) [PREFIX/share/mplayer]
299 --mandir=DIR directory for installing man pages [PREFIX/share/man]
300 --confdir=DIR directory for installing configuration files
302 --localedir=DIR directory for locale tree [PREFIX/share/locale]
303 --libdir=DIR directory for object code libraries [PREFIX/lib]
304 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
307 --disable-mplayer disable MPlayer compilation [enable]
308 --enable-termcap use termcap database for key codes [autodetect]
309 --enable-termios use termios database for key codes [autodetect]
310 --disable-iconv disable iconv for encoding conversion [autodetect]
311 --disable-langinfo do not use langinfo [autodetect]
312 --enable-lirc enable LIRC (remote control) support [autodetect]
313 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
314 --enable-joystick enable joystick support [disable]
315 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
316 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
317 --disable-vm disable X video mode extensions [autodetect]
318 --disable-xf86keysym disable support for multimedia keys [autodetect]
319 --enable-radio enable radio interface [disable]
320 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
321 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
322 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
323 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
324 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
325 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
326 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
327 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
328 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
329 --disable-networking disable networking [enable]
330 --enable-winsock2_h enable winsock2_h [autodetect]
331 --enable-smb enable Samba (SMB) input [autodetect]
332 --enable-libquvi enable libquvi [autodetect]
333 --enable-lcms2 enable LCMS2 support [autodetect]
334 --disable-vcd disable VCD support [autodetect]
335 --disable-bluray disable Blu-ray support [autodetect]
336 --disable-dvdnav disable libdvdnav [autodetect]
337 --disable-dvdread disable libdvdread [autodetect]
338 --disable-dvdread-internal disable internal libdvdread [autodetect]
339 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
340 --disable-cddb disable cddb [autodetect]
341 --disable-unrarexec disable using of UnRAR executable [enabled]
342 --disable-sortsub disable subtitle sorting [enabled]
343 --disable-enca disable ENCA charset oracle library [autodetect]
344 --enable-macosx-finder enable Mac OS X Finder invocation parameter
346 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
347 --disable-inet6 disable IPv6 support [autodetect]
348 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
349 --disable-ftp disable FTP support [enabled]
350 --disable-vstream disable TiVo vstream client support [autodetect]
351 --disable-pthreads disable Posix threads support [autodetect]
352 --disable-w32threads disable Win32 threads support [autodetect]
353 --disable-libass disable subtitle rendering with libass [autodetect]
354 --enable-rpath enable runtime linker path for extra libs [disabled]
355 --disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
356 --disable-libavresample disable libavresample (sample format conversion) [autodetect]
359 --enable-gif enable GIF support [autodetect]
360 --enable-png enable PNG input/output support [autodetect]
361 --enable-mng enable MNG input support [autodetect]
362 --enable-jpeg enable JPEG input/output support [autodetect]
363 --enable-libcdio enable libcdio support [autodetect]
364 --disable-win32dll disable Win32 DLL support [autodetect]
365 --disable-qtx disable QuickTime codecs support [enabled]
366 --disable-xanim disable XAnim codecs support [enabled]
367 --disable-real disable RealPlayer codecs support [enabled]
368 --disable-xvid disable Xvid [autodetect]
369 --disable-libnut disable libnut [autodetect]
370 --enable-libav skip Libav autodetection [autodetect]
371 --disable-libvorbis disable libvorbis support [autodetect]
372 --disable-tremor disable Tremor [autodetect if no libvorbis]
373 --disable-speex disable Speex support [autodetect]
374 --enable-theora enable OggTheora libraries [autodetect]
375 --enable-faad enable FAAD2 (AAC) [autodetect]
376 --disable-ladspa disable LADSPA plugin support [autodetect]
377 --disable-libbs2b disable libbs2b audio filter support [autodetect]
378 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
379 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
380 --disable-mad disable libmad (MPEG audio) support [autodetect]
381 --enable-xmms enable XMMS input plugin support [disabled]
382 --enable-libdca enable libdca support [autodetect]
383 --disable-liba52 disable liba52 [autodetect]
384 --enable-musepack enable libmpcdec support (deprecated, libavcodec
385 Musepack decoder is preferred) [disabled]
388 --enable-gl enable OpenGL video output [autodetect]
389 --enable-sdl enable SDL video output [autodetect]
390 --enable-caca enable CACA video output [autodetect]
391 --enable-direct3d enable Direct3D video output [autodetect]
392 --enable-directx enable DirectX video output [autodetect]
393 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
394 --enable-dvb enable DVB video input [autodetect]
395 --enable-xv enable Xv video output [autodetect]
396 --enable-vdpau enable VDPAU acceleration [autodetect]
397 --enable-vm enable XF86VidMode support [autodetect]
398 --enable-xinerama enable Xinerama support [autodetect]
399 --enable-x11 enable X11 video output [autodetect]
400 --enable-xshape enable XShape support [autodetect]
401 --disable-xss disable screensaver support via xss [autodetect]
402 --enable-directfb enable DirectFB video output [autodetect]
403 --disable-tga disable Targa video output [enable]
404 --disable-pnm disable PNM video output [enable]
405 --disable-md5sum disable md5sum video output [enable]
406 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
407 --disable-corevideo disable CoreVideo video output [autodetect]
408 --disable-cocoa disable Cocoa OpenGL backend [autodetect]
409 --disable-sharedbuffer disable OSX shared buffer video output [autodetect]
412 --disable-alsa disable ALSA audio output [autodetect]
413 --disable-ossaudio disable OSS audio output [autodetect]
414 --disable-rsound disable RSound audio output [autodetect]
415 --disable-pulse disable Pulseaudio audio output [autodetect]
416 --disable-portaudio disable PortAudio audio output [autodetect]
417 --disable-jack disable JACK audio output [autodetect]
418 --enable-openal enable OpenAL audio output [disable]
419 --disable-coreaudio disable CoreAudio audio output [autodetect]
420 --disable-select disable using select() on the audio device [enable]
423 --enable-translation enable support for translated output [disable]
424 --charset=charset convert the console messages to this character set
425 --language-doc=lang language to use for the documentation [en]
426 --language-man=lang language to use for the man pages [en]
427 --language-msg=lang extra languages for program messages [all]
428 --language=lang default language to use [en]
429 Specific options override --language. You can pass a list of languages separated
430 by whitespace or commas instead of a single language. Nonexisting translations
431 will be dropped from each list. All translations available in the list will be
432 installed. The value "all" will activate all translations. The LINGUAS
433 environment variable is honored. In all cases the fallback is English.
434 The program always supports English-language output; additional message
435 languages are only installed if --enable-translation is also specified.
436 Available values for --language-doc are: all $doc_lang_all
437 Available values for --language-man are: all $man_lang_all
438 Available values for --language-msg are: all $msg_lang_all
440 Miscellaneous options:
441 --enable-runtime-cpudetection enable runtime CPU detection [disable]
442 --enable-cross-compile enable cross-compilation [disable]
443 --cc=COMPILER C compiler to build MPlayer [gcc]
444 --as=ASSEMBLER assembler to build MPlayer [as]
445 --nm=NM nm tool to build MPlayer [nm]
446 --yasm=YASM Yasm assembler to build MPlayer [yasm]
447 --ar=AR librarian to build MPlayer [ar]
448 --pkg-config=PKGCONFIG pkg-config to find some libraries [pkg-config]
449 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
450 --windres=WINDRES windres to build MPlayer [windres]
451 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
452 --enable-static build a statically linked binary
453 --with-install=PATH path to a custom install program
456 --enable-mmx enable MMX [autodetect]
457 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
458 --enable-3dnow enable 3DNow! [autodetect]
459 --enable-3dnowext enable extended 3DNow! [autodetect]
460 --enable-sse enable SSE [autodetect]
461 --enable-sse2 enable SSE2 [autodetect]
462 --enable-ssse3 enable SSSE3 [autodetect]
463 --enable-shm enable shm [autodetect]
464 --enable-altivec enable AltiVec (PowerPC) [autodetect]
465 --enable-armv5te enable DSP extensions (ARM) [autodetect]
466 --enable-armv6 enable ARMv6 (ARM) [autodetect]
467 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
468 --enable-armvfp enable ARM VFP (ARM) [autodetect]
469 --enable-neon enable NEON (ARM) [autodetect]
470 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
471 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
472 --enable-big-endian force byte order to big-endian [autodetect]
473 --enable-debug[=1-3] compile-in debugging information [disable]
474 --enable-profile compile-in profiling information [disable]
475 --disable-sighandler disable sighandler for crashes [enable]
476 --enable-crash-debug enable automatic gdb attach on crash [disable]
478 Use these options if autodetection fails:
479 --extra-cflags=FLAGS extra CFLAGS
480 --extra-ldflags=FLAGS extra LDFLAGS
481 --extra-libs=FLAGS extra linker flags
482 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
484 --with-sdl-config=PATH path to sdl*-config
485 --with-dvdnav-config=PATH path to dvdnav-config
486 --with-dvdread-config=PATH path to dvdread-config
488 This configure script is NOT autoconf-based, even though its output is similar.
489 It will try to autodetect all configuration options. If you --enable an option
490 it will be forcefully turned on, skipping autodetection. This can break
491 compilation, so you need to know what you are doing.
496 # GOTCHA: the variables below defines the default behavior for autodetection
497 # and have - unless stated otherwise - at least 2 states : yes no
498 # If autodetection is available then the third state is: auto
522 test "$CC" && _cc
="$CC"
526 _runtime_cpudetection
=no
577 _dvdnavconfig
=dvdnav-config
578 _dvdreadconfig
=dvdread-config
580 _dvdread_internal
=auto
581 _libdvdcss_internal
=auto
653 def_dos_paths
="#define HAVE_DOS_PATHS 0"
654 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
655 def_priority
="#undef CONFIG_PRIORITY"
656 def_pthread_cache
="#undef PTHREAD_CACHE"
664 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
667 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
670 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
673 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
676 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
679 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
682 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
685 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
689 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
693 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
695 --with-dvdnav-config=*)
696 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
698 --with-dvdread-config=*)
699 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
703 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
706 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
709 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
711 --extra-libs-mplayer=*)
712 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
716 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
719 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
722 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
725 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
728 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
731 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
734 _pkg_config
=$
(echo $ac_option | cut
-d '=' -f 2)
737 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
740 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
743 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
746 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
749 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
752 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
755 language
=$
(echo $ac_option | cut
-d '=' -f 2)
774 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
779 --enable-translation) _translation
=yes ;;
780 --disable-translation) _translation
=no
;;
781 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
782 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
783 --enable-cross-compile) _cross_compile
=yes ;;
784 --disable-cross-compile) _cross_compile
=no
;;
785 --enable-x11) _x11
=yes ;;
786 --disable-x11) _x11
=no
;;
787 --enable-xshape) _xshape
=yes ;;
788 --disable-xshape) _xshape
=no
;;
789 --enable-xss) _xss
=yes ;;
790 --disable-xss) _xss
=no
;;
791 --enable-xv) _xv
=yes ;;
792 --disable-xv) _xv
=no
;;
793 --enable-vdpau) _vdpau
=yes ;;
794 --disable-vdpau) _vdpau
=no
;;
795 --enable-sdl) _sdl
=yes ;;
796 --disable-sdl) _sdl
=no
;;
797 --enable-direct3d) _direct3d
=yes ;;
798 --disable-direct3d) _direct3d
=no
;;
799 --enable-directx) _directx
=yes ;;
800 --disable-directx) _directx
=no
;;
801 --enable-png) _png
=yes ;;
802 --disable-png) _png
=no
;;
803 --enable-mng) _mng
=yes ;;
804 --disable-mng) _mng
=no
;;
805 --enable-jpeg) _jpeg
=yes ;;
806 --disable-jpeg) _jpeg
=no
;;
807 --enable-pnm) _pnm
=yes ;;
808 --disable-pnm) _pnm
=no
;;
809 --enable-md5sum) _md5sum
=yes ;;
810 --disable-md5sum) _md5sum
=no
;;
811 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
812 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
813 --enable-gif) _gif
=yes ;;
814 --disable-gif) _gif
=no
;;
815 --enable-gl) _gl
=yes ;;
816 --disable-gl) _gl
=no
;;
817 --enable-caca) _caca
=yes ;;
818 --disable-caca) _caca
=no
;;
819 --enable-dvb) _dvb
=yes ;;
820 --disable-dvb) _dvb
=no
;;
821 --enable-v4l2) _v4l2
=yes ;;
822 --disable-v4l2) _v4l2
=no
;;
823 --enable-iconv) _iconv
=yes ;;
824 --disable-iconv) _iconv
=no
;;
825 --enable-langinfo) _langinfo
=yes ;;
826 --disable-langinfo) _langinfo
=no
;;
827 --enable-rtc) _rtc
=yes ;;
828 --disable-rtc) _rtc
=no
;;
829 --enable-libdv) _libdv
=yes ;;
830 --disable-libdv) _libdv
=no
;;
831 --enable-ossaudio) _ossaudio
=yes ;;
832 --disable-ossaudio) _ossaudio
=no
;;
833 --enable-rsound) _rsound
=yes ;;
834 --disable-rsound) _rsound
=no
;;
835 --enable-pulse) _pulse
=yes ;;
836 --disable-pulse) _pulse
=no
;;
837 --enable-portaudio) _portaudio
=yes ;;
838 --disable-portaudio) _portaudio
=no
;;
839 --enable-jack) _jack
=yes ;;
840 --disable-jack) _jack
=no
;;
841 --enable-openal) _openal
=yes ;;
842 --disable-openal) _openal
=no
;;
843 --enable-mad) _mad
=yes ;;
844 --disable-mad) _mad
=no
;;
845 --enable-libcdio) _libcdio
=yes ;;
846 --disable-libcdio) _libcdio
=no
;;
847 --enable-libvorbis) _libvorbis
=yes ;;
848 --disable-libvorbis) _libvorbis
=no
;;
849 --enable-speex) _speex
=yes ;;
850 --disable-speex) _speex
=no
;;
851 --enable-tremor) _tremor
=yes ;;
852 --disable-tremor) _tremor
=no
;;
853 --enable-theora) _theora
=yes ;;
854 --disable-theora) _theora
=no
;;
855 --enable-mpg123) _mpg123
=yes ;;
856 --disable-mpg123) _mpg123
=no
;;
857 --enable-liba52) _liba52
=yes ;;
858 --disable-liba52) _liba52
=no
;;
859 --enable-libdca) _libdca
=yes ;;
860 --disable-libdca) _libdca
=no
;;
861 --enable-musepack) _musepack
=yes ;;
862 --disable-musepack) _musepack
=no
;;
863 --enable-faad) _faad
=yes ;;
864 --disable-faad) _faad
=no
;;
865 --enable-ladspa) _ladspa
=yes ;;
866 --disable-ladspa) _ladspa
=no
;;
867 --enable-libbs2b) _libbs2b
=yes ;;
868 --disable-libbs2b) _libbs2b
=no
;;
869 --enable-xmms) _xmms
=yes ;;
870 --disable-xmms) _xmms
=no
;;
871 --enable-vcd) _vcd
=yes ;;
872 --disable-vcd) _vcd
=no
;;
873 --enable-bluray) _bluray
=yes ;;
874 --disable-bluray) _bluray
=no
;;
875 --enable-dvdread) _dvdread
=yes ;;
876 --disable-dvdread) _dvdread
=no
;;
877 --enable-dvdread-internal) _dvdread_internal
=yes ;;
878 --disable-dvdread-internal) _dvdread_internal
=no
;;
879 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
880 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
881 --enable-dvdnav) _dvdnav
=yes ;;
882 --disable-dvdnav) _dvdnav
=no
;;
883 --enable-xanim) _xanim
=yes ;;
884 --disable-xanim) _xanim
=no
;;
885 --enable-real) _real
=yes ;;
886 --disable-real) _real
=no
;;
887 --enable-lcms2) _lcms2
=yes ;;
888 --disable-lcms2) _lcms2
=no
;;
889 --enable-xinerama) _xinerama
=yes ;;
890 --disable-xinerama) _xinerama
=no
;;
891 --enable-vm) _vm
=yes ;;
892 --disable-vm) _vm
=no
;;
893 --enable-xf86keysym) _xf86keysym
=yes ;;
894 --disable-xf86keysym) _xf86keysym
=no
;;
895 --enable-alsa) _alsa
=yes ;;
896 --disable-alsa) _alsa
=no
;;
897 --enable-tv) _tv
=yes ;;
898 --disable-tv) _tv
=no
;;
899 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
900 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
901 --enable-tv-v4l1) _tv_v4l1
=yes ;;
902 --disable-tv-v4l1) _tv_v4l1
=no
;;
903 --enable-tv-v4l2) _tv_v4l2
=yes ;;
904 --disable-tv-v4l2) _tv_v4l2
=no
;;
905 --enable-tv-dshow) _tv_dshow
=yes ;;
906 --disable-tv-dshow) _tv_dshow
=no
;;
907 --enable-radio) _radio
=yes ;;
908 --enable-radio-capture) _radio_capture
=yes ;;
909 --disable-radio-capture) _radio_capture
=no
;;
910 --disable-radio) _radio
=no
;;
911 --enable-radio-v4l) _radio_v4l
=yes ;;
912 --disable-radio-v4l) _radio_v4l
=no
;;
913 --enable-radio-v4l2) _radio_v4l2
=yes ;;
914 --disable-radio-v4l2) _radio_v4l2
=no
;;
915 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
916 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
917 --enable-pvr) _pvr
=yes ;;
918 --disable-pvr) _pvr
=no
;;
919 --enable-fastmemcpy) _fastmemcpy
=yes ;;
920 --disable-fastmemcpy) _fastmemcpy
=no
;;
921 --enable-networking) networking
=yes ;;
922 --disable-networking) networking
=no
;;
923 --enable-winsock2_h) _winsock2_h
=yes ;;
924 --disable-winsock2_h) _winsock2_h
=no
;;
925 --enable-smb) _smb
=yes ;;
926 --disable-smb) _smb
=no
;;
927 --enable-libquvi) _libquvi
=yes ;;
928 --disable-libquvi) _libquvi
=no
;;
929 --enable-joystick) _joystick
=yes ;;
930 --disable-joystick) _joystick
=no
;;
931 --enable-xvid) _xvid
=yes ;;
932 --disable-xvid) _xvid
=no
;;
933 --enable-libnut) _libnut
=yes ;;
934 --disable-libnut) _libnut
=no
;;
935 --enable-libav) ffmpeg
=yes ;;
936 --ffmpeg-source-dir=*)
937 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
939 --enable-lirc) _lirc
=yes ;;
940 --disable-lirc) _lirc
=no
;;
941 --enable-lircc) _lircc
=yes ;;
942 --disable-lircc) _lircc
=no
;;
943 --enable-apple-remote) _apple_remote
=yes ;;
944 --disable-apple-remote) _apple_remote
=no
;;
945 --enable-apple-ir) _apple_ir
=yes ;;
946 --disable-apple-ir) _apple_ir
=no
;;
947 --enable-termcap) _termcap
=yes ;;
948 --disable-termcap) _termcap
=no
;;
949 --enable-termios) _termios
=yes ;;
950 --disable-termios) _termios
=no
;;
951 --disable-tga) _tga
=no
;;
952 --enable-tga) _tga
=yes ;;
953 --enable-directfb) _directfb
=yes ;;
954 --disable-directfb) _directfb
=no
;;
955 --enable-shm) _shm
=yes ;;
956 --disable-shm) _shm
=no
;;
957 --enable-select) _select
=yes ;;
958 --disable-select) _select
=no
;;
959 --enable-cddb) _cddb
=yes ;;
960 --disable-cddb) _cddb
=no
;;
961 --enable-big-endian) _big_endian
=yes ;;
962 --disable-big-endian) _big_endian
=no
;;
963 --enable-unrarexec) _unrar_exec
=yes ;;
964 --disable-unrarexec) _unrar_exec
=no
;;
965 --enable-ftp) _ftp
=yes ;;
966 --disable-ftp) _ftp
=no
;;
967 --enable-vstream) _vstream
=yes ;;
968 --disable-vstream) _vstream
=no
;;
969 --enable-pthreads) _pthreads
=yes ;;
970 --disable-pthreads) _pthreads
=no
;;
971 --enable-w32threads) _w32threads
=yes ;;
972 --disable-w32threads) _w32threads
=no
;;
973 --enable-libass) _ass
=yes ;;
974 --disable-libass) _ass
=no
;;
975 --enable-rpath) _rpath
=yes ;;
976 --disable-rpath) _rpath
=no
;;
977 --enable-libpostproc) libpostproc
=yes ;;
978 --disable-libpostproc) libpostproc
=no
;;
979 --enable-libavresample) libavresample
=yes ;;
980 --disable-libavresample) libavresample
=no
;;
982 --enable-enca) _enca
=yes ;;
983 --disable-enca) _enca
=no
;;
985 --enable-inet6) _inet6
=yes ;;
986 --disable-inet6) _inet6
=no
;;
988 --enable-gethostbyname2) _gethostbyname2
=yes ;;
989 --disable-gethostbyname2) _gethostbyname2
=no
;;
991 --enable-qtx) _qtx
=yes ;;
992 --disable-qtx) _qtx
=no
;;
994 --enable-coreaudio) _coreaudio
=yes ;;
995 --disable-coreaudio) _coreaudio
=no
;;
996 --enable-corevideo) _corevideo
=yes ;;
997 --disable-corevideo) _corevideo
=no
;;
998 --enable-cocoa) _cocoa
=yes ;;
999 --disable-cocoa) _cocoa
=no
;;
1000 --enable-sharedbuffer) _sharedbuffer
=yes ;;
1001 --disable-sharedbuffer) _sharedbuffer
=no
;;
1002 --enable-macosx-finder) _macosx_finder
=yes ;;
1003 --disable-macosx-finder) _macosx_finder
=no
;;
1004 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1005 --disable-macosx-bundle) _macosx_bundle
=no
;;
1007 --enable-sortsub) _sortsub
=yes ;;
1008 --disable-sortsub) _sortsub
=no
;;
1010 --enable-crash-debug) _crash_debug
=yes ;;
1011 --disable-crash-debug) _crash_debug
=no
;;
1012 --enable-sighandler) _sighandler
=yes ;;
1013 --disable-sighandler) _sighandler
=no
;;
1014 --enable-win32dll) _win32dll
=yes ;;
1015 --disable-win32dll) _win32dll
=no
;;
1017 --enable-sse) _sse
=yes ;;
1018 --disable-sse) _sse
=no
;;
1019 --enable-sse2) _sse2
=yes ;;
1020 --disable-sse2) _sse2
=no
;;
1021 --enable-ssse3) _ssse3
=yes ;;
1022 --disable-ssse3) _ssse3
=no
;;
1023 --enable-mmxext) _mmxext
=yes ;;
1024 --disable-mmxext) _mmxext
=no
;;
1025 --enable-3dnow) _3dnow
=yes ;;
1026 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1027 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1028 --disable-3dnowext) _3dnowext
=no
;;
1029 --enable-cmov) _cmov
=yes ;;
1030 --disable-cmov) _cmov
=no
;;
1031 --enable-fast-cmov) _fast_cmov
=yes ;;
1032 --disable-fast-cmov) _fast_cmov
=no
;;
1033 --enable-fast-clz) _fast_clz
=yes ;;
1034 --disable-fast-clz) _fast_clz
=no
;;
1035 --enable-altivec) _altivec
=yes ;;
1036 --disable-altivec) _altivec
=no
;;
1037 --enable-armv5te) _armv5te
=yes ;;
1038 --disable-armv5te) _armv5te
=no
;;
1039 --enable-armv6) _armv6
=yes ;;
1040 --disable-armv6) _armv6
=no
;;
1041 --enable-armv6t2) _armv6t2
=yes ;;
1042 --disable-armv6t2) _armv6t2
=no
;;
1043 --enable-armvfp) _armvfp
=yes ;;
1044 --disable-armvfp) _armvfp
=no
;;
1045 --enable-neon) neon
=yes ;;
1046 --disable-neon) neon
=no
;;
1047 --enable-iwmmxt) _iwmmxt
=yes ;;
1048 --disable-iwmmxt) _iwmmxt
=no
;;
1049 --enable-mmx) _mmx
=yes ;;
1050 --disable-mmx) # 3Dnow! and MMX2 require MMX
1051 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1054 echo "Unknown parameter: $ac_option" >&2
1061 # Atmos: moved this here, to be correct, if --prefix is specified
1062 test -z "$_bindir" && _bindir
="$_prefix/bin"
1063 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1064 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1065 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1066 test -z "$_libdir" && _libdir
="$_prefix/lib"
1067 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1069 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1070 test "$tmpdir" && break
1073 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1074 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1079 echo Parameters configure was run with
: > "$TMPLOG"
1080 if test -n "$CFLAGS" ; then
1081 echo ${_echo_n} CFLAGS
="'$CFLAGS' ${_echo_c}" >> "$TMPLOG"
1083 if test -n "$PKG_CONFIG_PATH" ; then
1084 echo ${_echo_n} PKG_CONFIG_PATH
="'$PKG_CONFIG_PATH' ${_echo_c}" >> "$TMPLOG"
1086 echo .
/configure
$configuration >> "$TMPLOG"
1090 echocheck
"cross compilation"
1091 echores
$_cross_compile
1093 if test $_cross_compile = yes; then
1101 if test $_cross_compile = yes ; then
1102 # Usually cross-compiler prefixes match with the target triplet
1103 test -n "$_target" && tool_prefix
="$_target"-
1106 test "$_ranlib" = auto
&& _ranlib
="$tool_prefix"ranlib
1107 test "$_windres" = auto
&& _windres
="$tool_prefix"windres
1108 test "$_ar" = auto
&& _ar
="$tool_prefix"ar
1109 test "$_yasm" = auto
&& _yasm
="$tool_prefix"yasm
1110 test "$_pkg_config" = auto
&& _pkg_config
="$tool_prefix"pkg-config
1112 if test "$_cc" = auto
; then
1113 if test -n "$tool_prefix" ; then
1114 _cc
="$tool_prefix"gcc
1120 # Determine our OS name and CPU architecture
1121 if test -z "$_target" ; then
1123 system_name
=$
(uname
-s 2>&1)
1124 case "$system_name" in
1125 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1136 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1146 system_name
="$system_name-UNKNOWN"
1151 # host's CPU/instruction set
1152 host_arch
=$
(uname
-p 2>&1)
1153 case "$host_arch" in
1154 i386|sparc|ppc|alpha|arm|mips|vax
)
1156 powerpc
) # Darwin returns 'powerpc'
1159 *) # uname -p on Linux returns 'unknown' for the processor type,
1160 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1162 # Maybe uname -m (machine hardware name) returns something we
1165 # x86/x86pc is used by QNX
1166 case "$(uname -m 2>&1)" in
1167 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
;;
1168 ia64
) host_arch
=ia64
;;
1169 macppc|ppc
) host_arch
=ppc
;;
1170 ppc64
) host_arch
=ppc64
;;
1171 alpha
) host_arch
=alpha
;;
1172 sparc
) host_arch
=sparc
;;
1173 sparc64
) host_arch
=sparc64
;;
1174 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1175 arm
*|zaurus|cats
) host_arch
=arm
;;
1176 sh3|sh4|sh4a
) host_arch
=sh
;;
1177 s390
) host_arch
=s390
;;
1178 s390x
) host_arch
=s390x
;;
1179 *mips
*) host_arch
=mips
;;
1180 vax
) host_arch
=vax
;;
1181 xtensa
*) host_arch
=xtensa
;;
1182 *) host_arch
=UNKNOWN
;;
1186 else # if test -z "$_target"
1188 system_name
=$
(echo $_target | cut
-d '-' -f $i)
1189 case "$(echo $system_name | tr A-Z a-z)" in
1190 linux
) system_name
=Linux
;;
1191 freebsd
) system_name
=FreeBSD
;;
1192 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1193 netbsd
) system_name
=NetBSD
;;
1194 bsd
/os
) system_name
=BSD
/OS
;;
1195 openbsd
) system_name
=OpenBSD
;;
1196 dragonfly
) system_name
=DragonFly
;;
1197 qnx
) system_name
=QNX
;;
1198 morphos
) system_name
=MorphOS
;;
1199 amigaos
) system_name
=AmigaOS
;;
1200 mingw32
*) system_name
=MINGW32
;;
1205 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1206 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1207 if test $
(echo $host_arch) != "x86_64" ; then
1208 host_arch
=$
(echo $host_arch |
tr '_' '-')
1212 extra_cflags
="-I. $extra_cflags"
1213 _timer
=timer-linux.c
1216 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1217 extra_cflags
="$extra_cflags -I/usr/local/include"
1220 if netbsd || dragonfly
; then
1221 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1222 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1226 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1227 _timer
=timer-darwin.c
1231 extra_ldflags
="$extra_ldflags -lC"
1240 extra_cflags
="$extra_cflags -fno-common"
1241 # -lwinmm is always needed for osdep/timer-win2.c
1242 extra_ldflags
="$extra_ldflags -lwinmm"
1246 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1247 def_priority
="#define CONFIG_PRIORITY 1"
1253 extra_cflags
="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
1260 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1261 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1265 extra_ldflags
="$extra_ldflags -lph"
1268 TMPC
="$mplayer_tmpdir/tmp.c"
1269 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1270 TMPH
="$mplayer_tmpdir/tmp.h"
1271 TMPS
="$mplayer_tmpdir/tmp.S"
1273 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1274 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1278 if [ -f "$(which rst2man.py)" ] ; then
1282 # Checking CC version...
1283 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1284 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1285 echocheck
"$_cc version"
1287 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1288 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1289 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1290 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1291 # TODO verify older icc/ecc compatibility
1294 cc_version
="v. ?.??, bad"
1298 cc_version
="$cc_version, ok"
1301 cc_version
="$cc_version, bad"
1305 echores
"$cc_version"
1307 for _cc
in "$_cc" gcc cc
; do
1308 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1309 if test "$cc_name_tmp" = "gcc"; then
1310 cc_name
=$cc_name_tmp
1311 echocheck
"$_cc version"
1313 cc_version
=$
($_cc -dumpversion 2>&1)
1319 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1320 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1321 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1324 echores
"$cc_version"
1327 if $_cc -v 2>&1 |
grep -q "clang"; then
1328 echocheck
"$_cc version"
1330 cc_version
=$
($_cc -dumpversion 2>&1)
1331 res_comment
="experimental support only"
1332 echores
"clang $cc_version"
1335 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1338 test "$cc_fail" = yes && die
"unsupported compiler version"
1340 echocheck
"working compiler"
1341 cflag_check
"" || die
"Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
1344 if test -z "$_target" && x86
; then
1347 int test[(int)sizeof(char *)-7];
1351 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1354 echo "Detected operating system: $system_name"
1355 echo "Detected host architecture: $host_arch"
1359 # now that we know what compiler should be used for compilation, try to find
1360 # out which assembler is used by the $_cc compiler
1361 if test "$_as" = auto
; then
1362 _as
=$
($_cc -print-prog-name=as
)
1363 test -z "$_as" && _as
=as
1366 if test "$_nm" = auto
; then
1367 _nm
=$
($_cc -print-prog-name=nm
)
1368 test -z "$_nm" && _nm
=nm
1371 # XXX: this should be ok..
1374 if test "$_runtime_cpudetection" = no
; then
1376 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1377 # FIXME: Remove the cygwin check once AMD CPUs are supported
1378 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1379 # Linux with /proc mounted, extract CPU information from it
1380 _cpuinfo
="cat /proc/cpuinfo"
1381 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1382 # FreeBSD with Linux emulation /proc mounted,
1383 # extract CPU information from it
1384 # Don't use it on x86 though, it never reports 3Dnow
1385 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1386 elif darwin
&& ! x86
; then
1387 # use hostinfo on Darwin
1390 # use 'lsattr' on AIX
1391 _cpuinfo
="lsattr -E -l proc0 -a type"
1393 # all other OSes try to extract CPU information from a small helper
1394 # program cpuinfo instead
1395 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1396 _cpuinfo
="./cpuinfo$_exesuf"
1400 # gather more CPU information
1401 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1402 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1403 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1404 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1405 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1407 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1409 pparam
=$
(echo $exts |
sed -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1410 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1411 pparam
=$
(echo $pparam |
sed -e 's/sse/sse mmxext/')
1413 for ext
in $pparam ; do
1414 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1417 echocheck
"CPU vendor"
1418 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1420 echocheck
"CPU type"
1424 fi # test "$_runtime_cpudetection" = no
1426 if x86
&& test "$_runtime_cpudetection" = no
; then
1428 if test "$1" = kernel_check
; then
1429 echocheck
"kernel support of $2"
1433 static void catch(int sig) { exit(1); }
1435 signal(SIGILL, catch);
1436 __asm__ volatile ("$3":::"memory"); return 0;
1440 if cc_check
&& tmp_run
; then
1443 _optimizing
="$_optimizing $2"
1448 echo "It seems that your kernel does not correctly support $2."
1449 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1456 extcheck
$_mmx "mmx" "emms"
1457 extcheck
$_mmxext "mmxext" "sfence"
1458 extcheck
$_3dnow "3dnow" "femms"
1459 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1460 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1461 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1462 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1463 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1465 if test "$_gcc3_ext" != ""; then
1466 # if we had to disable sse/sse2 because the active kernel does not
1467 # support this instruction set extension, we also have to tell
1468 # gcc3 to not generate sse/sse2 instructions for normal C code
1469 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1475 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1476 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1477 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1478 subarch_all
='X86_32 X86_64 PPC64'
1479 case "$host_arch" in
1480 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1483 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1488 if test "$_runtime_cpudetection" = no
; then
1492 3) proc
=i386 iproc
=386 ;;
1493 4) proc
=i486 iproc
=486 ;;
1494 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1495 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1496 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1498 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1500 elif test "$pmodel" -ge 8; then
1502 elif test "$pmodel" -ge 6; then
1509 # It's a bit difficult to determine the correct type of Family 6
1510 # AMD CPUs just from their signature. Instead, we check directly
1511 # whether it supports SSE.
1512 if test "$_sse" = yes; then
1513 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1516 # Again, gcc treats athlon and athlon-tbird similarly.
1521 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1522 # caught and remedied in the optimization tests below.
1526 *) proc
=amdfam10 iproc
=686
1527 test $_fast_clz = "auto" && _fast_clz
=yes
1533 3) proc
=i386 iproc
=386 ;;
1534 4) proc
=i486 iproc
=486 ;;
1536 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1537 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1543 if test "$pmodel" -ge 15; then
1545 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1547 elif test "$pmodel" -ge 7; then
1549 elif test "$pmodel" -ge 3; then
1554 test $_fast_clz = "auto" && _fast_clz
=yes
1557 # A nocona in 32-bit mode has no more capabilities than a prescott.
1558 if test "$pmodel" -ge 3; then
1562 test $_fast_clz = "auto" && _fast_clz
=yes
1564 test $_fast_cmov = "auto" && _fast_cmov
=no
1566 *) proc
=prescott iproc
=686 ;;
1572 if test "$pmodel" -ge 8; then
1574 elif test "$pmodel" -ge 4; then
1581 if test "$pmodel" -ge 9; then
1588 *) proc
=i686 iproc
=i686
;;
1593 3) proc
=i386 iproc
=386 ;;
1594 4) proc
=i486 iproc
=486 ;;
1595 *) proc
=i586 iproc
=586 ;;
1599 proc
=i586 iproc
=586 ;;
1601 test $_fast_clz = "auto" && _fast_clz
=no
1602 fi # test "$_runtime_cpudetection" = no
1605 # check that gcc supports our CPU, if not, fall back to earlier ones
1606 # LGB: check -mcpu and -march swithing step by step with enabling
1607 # to fall back till 386.
1609 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1611 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1617 echocheck
"GCC & CPU optimization abilities"
1618 if test "$_runtime_cpudetection" = no
; then
1619 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1620 cflag_check
-march=native
&& proc
=native
1622 if test "$proc" = "amdfam10"; then
1623 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1625 if test "$proc" = "k8"; then
1626 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1628 if test "$proc" = "athlon-xp"; then
1629 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1631 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1632 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1634 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1635 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1636 if cflag_check
-march=i586
$cpuopt=i686
; then
1643 if test "$proc" = "prescott" ; then
1644 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1646 if test "$proc" = "core2" ; then
1647 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1649 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
1650 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1652 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1653 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1655 if test "$proc" = "i586"; then
1656 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1658 if test "$proc" = "i486" ; then
1659 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1661 if test "$proc" = "i386" ; then
1662 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1664 if test "$proc" = "error" ; then
1665 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1669 elif test "$proc" = "i586-i686"; then
1670 _march
="-march=i586"
1671 _mcpu
="$cpuopt=i686"
1674 _march
="-march=$proc"
1675 _mcpu
="$cpuopt=$proc"
1678 else # if test "$_runtime_cpudetection" = no
1679 _mcpu
="$cpuopt=generic"
1680 # at least i486 required, for bswap instruction
1681 _march
="-march=i486"
1682 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1683 cflag_check
$_mcpu || _mcpu
=""
1684 cflag_check
$_march $_mcpu || _march
=""
1687 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1688 ## autodetected mcpu/march parameters
1689 if test "$_target" ; then
1690 # TODO: it may be a good idea to check GCC and fall back in all cases
1691 if test "$host_arch" = "i586-i686"; then
1692 _march
="-march=i586"
1693 _mcpu
="$cpuopt=i686"
1695 _march
="-march=$host_arch"
1696 _mcpu
="$cpuopt=$host_arch"
1704 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1705 i686|athlon
*|pentium
*) iproc
=686 ;;
1710 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1715 test $_fast_clz = "auto" && _fast_clz
=yes
1722 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1729 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1730 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1733 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1734 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1739 if test "$_runtime_cpudetection" = no
; then
1744 test $_fast_clz = "auto" && _fast_clz
=no
1753 # 64-bit prescotts exist, but as far as GCC is concerned they
1754 # have the same capabilities as a nocona.
1756 test $_fast_cmov = "auto" && _fast_cmov
=no
1757 test $_fast_clz = "auto" && _fast_clz
=no
1764 fi # test "$_runtime_cpudetection" = no
1766 echocheck
"GCC & CPU optimization abilities"
1767 # This is a stripped-down version of the i386 fallback.
1768 if test "$_runtime_cpudetection" = no
; then
1769 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1770 cflag_check
-march=native
&& proc
=native
1772 # --- AMD processors ---
1773 if test "$proc" = "amdfam10"; then
1774 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1776 if test "$proc" = "k8"; then
1777 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1779 # This will fail if gcc version < 3.3, which is ok because earlier
1780 # versions don't really support 64-bit on amd64.
1781 # Is this a valid assumption? -Corey
1782 if test "$proc" = "athlon-xp"; then
1783 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1785 # --- Intel processors ---
1786 if test "$proc" = "core2"; then
1787 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1789 if test "$proc" = "x86-64"; then
1790 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
1792 if test "$proc" = "nocona"; then
1793 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1795 if test "$proc" = "pentium4"; then
1796 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1799 _march
="-march=$proc"
1800 _mcpu
="$cpuopt=$proc"
1801 if test "$proc" = "error" ; then
1802 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1806 else # if test "$_runtime_cpudetection" = no
1807 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1808 _march
="-march=x86-64"
1809 _mcpu
="$cpuopt=generic"
1810 cflag_check
$_mcpu || _mcpu
="x86-64"
1811 cflag_check
$_mcpu || _mcpu
=""
1812 cflag_check
$_march $_mcpu || _march
=""
1816 test $_fast_cmov = "auto" && _fast_cmov
=yes
1817 test $_fast_clz = "auto" && _fast_clz
=yes
1825 if test "$host_arch" = "sparc64" ; then
1828 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1843 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1845 test $_fast_clz = "auto" && _fast_clz
=yes
1853 ppc|ppc64|powerpc|powerpc64
)
1855 def_dcbzl
='#define HAVE_DCBZL 0'
1856 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1859 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
1861 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1863 echocheck
"CPU type"
1864 case $system_name in
1866 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
1867 if test -n "$($_cpuinfo | grep altivec)"; then
1868 test $_altivec = auto
&& _altivec
=yes
1872 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
1873 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
1874 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
1875 test $_altivec = auto
&& _altivec
=yes
1879 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1881 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1884 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
1885 test $_altivec = auto
&& _altivec
=yes
1891 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
1894 if test "$_altivec" = yes; then
1895 echores
"$proc altivec"
1901 echocheck
"GCC & CPU optimization abilities"
1903 if test -n "$proc"; then
1905 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1906 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1907 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1908 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1909 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1910 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1911 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
1912 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
1913 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
1916 # gcc 3.1(.1) and up supports 7400 and 7450
1917 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
1919 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1920 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1924 # gcc 3.2 and up supports 970
1925 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1927 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
1928 def_dcbzl
='#define HAVE_DCBZL 1' ;;
1932 # gcc 3.3 and up supports POWER4
1933 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1935 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
1939 # gcc 3.4 and up supports 440*
1940 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
1942 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
1943 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
1947 # gcc 4.0 and up supports POWER5
1948 if test "$_cc_major" -ge "4"; then
1950 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
1956 if test -n "$_mcpu"; then
1957 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
1958 echores
"$_optimizing"
1963 test $_fast_clz = "auto" && _fast_clz
=yes
1970 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1972 echocheck
"CPU type"
1975 unsigned long ver, mask;
1976 __asm__ ("implver %0" : "=r" (ver));
1977 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
1978 printf("%ld-%x\n", ver, ~mask);
1982 $_cc -o "$TMPEXE" "$TMPC"
1983 case $
("$TMPEXE") in
1985 0-0) proc
="ev4"; _mvi
="0";;
1986 1-0) proc
="ev5"; _mvi
="0";;
1987 1-1) proc
="ev56"; _mvi
="0";;
1988 1-101) proc
="pca56"; _mvi
="1";;
1989 2-303) proc
="ev6"; _mvi
="1";;
1990 2-307) proc
="ev67"; _mvi
="1";;
1991 2-1307) proc
="ev68"; _mvi
="1";;
1995 echocheck
"GCC & CPU optimization abilities"
1996 if test "$proc" = "ev68" ; then
1997 cc_check
-mcpu=$proc || proc
=ev67
1999 if test "$proc" = "ev67" ; then
2000 cc_check
-mcpu=$proc || proc
=ev6
2005 test $_fast_clz = "auto" && _fast_clz
=yes
2014 test $_fast_clz = "auto" && _fast_clz
=yes
2048 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2049 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2050 die
"unsupported architecture $host_arch"
2052 esac # case "$host_arch" in
2054 if test "$_runtime_cpudetection" = yes ; then
2056 test "$_cmov" != no
&& _cmov
=yes
2058 test "$_mmx" != no
&& _mmx
=yes
2059 test "$_3dnow" != no
&& _3dnow
=yes
2060 test "$_3dnowext" != no
&& _3dnowext
=yes
2061 test "$_mmxext" != no
&& _mmxext
=yes
2062 test "$_sse" != no
&& _sse
=yes
2063 test "$_sse2" != no
&& _sse2
=yes
2064 test "$_ssse3" != no
&& _ssse3
=yes
2073 echocheck
"byte order"
2074 if test "$_big_endian" = auto
; then
2076 short ascii_name[] = {
2077 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2078 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2079 int main(void) { return (long)ascii_name; }
2082 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2088 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2091 if test "$_big_endian" = yes ; then
2092 _byte_order
='big-endian'
2093 def_words_endian
='#define WORDS_BIGENDIAN 1'
2094 def_bigendian
='#define HAVE_BIGENDIAN 1'
2096 _byte_order
='little-endian'
2097 def_words_endian
='#undef WORDS_BIGENDIAN'
2098 def_bigendian
='#define HAVE_BIGENDIAN 0'
2100 echores
"$_byte_order"
2103 echocheck
"extern symbol prefix"
2107 cc_check
-c || die
"Symbol mangling check failed."
2108 sym
=$
($_nm -P -g $TMPEXE)
2109 extern_prefix
=${sym%%ff_extern*}
2110 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2111 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2112 echores
$extern_prefix
2115 echocheck
"assembler support of -pipe option"
2116 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2117 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2120 if darwin
&& test "$cc_vendor" = "gnu" ; then
2121 echocheck
"GCC support of -mstackrealign"
2122 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2123 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2124 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2125 # wrong code with this flag, but this can be worked around by adding
2126 # -fno-unit-at-a-time as described in the blog post at
2127 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2129 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2130 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2132 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2133 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time &&
2134 tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2135 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2136 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2139 # Checking for CFLAGS
2141 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2144 if test -z "$CFLAGS" ; then
2145 if test "$cc_vendor" = "intel" ; then
2146 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer"
2147 WARNFLAGS
="-wd167 -wd556 -wd144"
2148 elif test "$cc_vendor" = "clang"; then
2149 CFLAGS
="-O2 $_debug $_profile $_march $_pipe"
2150 WARNFLAGS
="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
2151 ERRORFLAGS
="-Werror=implicit-function-declaration"
2152 elif test "$cc_vendor" != "gnu" ; then
2153 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe"
2155 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2156 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2157 ERRORFLAGS
="-Werror-implicit-function-declaration"
2158 extra_ldflags
="$extra_ldflags -ffast-math"
2164 if darwin
&& test "$cc_vendor" = "gnu" ; then
2165 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
2168 if test "$cc_vendor" = "gnu" ; then
2169 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2170 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2171 # that's the only variable specific to C now, and this option is not valid
2173 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2174 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2175 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2176 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2177 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2179 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2182 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2183 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2186 if test -n "$LDFLAGS" ; then
2187 extra_ldflags
="$extra_ldflags $LDFLAGS"
2189 elif test "$cc_vendor" = "intel" ; then
2190 extra_ldflags
="$extra_ldflags -i-static"
2192 if test -n "$CPPFLAGS" ; then
2193 extra_cflags
="$extra_cflags $CPPFLAGS"
2200 # Checking assembler (_as) compatibility...
2201 # Added workaround for older as that reads from stdin by default - atmos
2202 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2203 echocheck
"assembler ($_as $as_version)"
2205 _pref_as_version
='2.9.1'
2207 if test "$_mmx" = yes ; then
2208 echo 'emms' >> $TMPS
2210 if test "$_3dnow" = yes ; then
2211 _pref_as_version
='2.10.1'
2212 echo 'femms' >> $TMPS
2214 if test "$_3dnowext" = yes ; then
2215 _pref_as_version
='2.10.1'
2216 echo 'pswapd %mm0, %mm0' >> $TMPS
2218 if test "$_mmxext" = yes ; then
2219 _pref_as_version
='2.10.1'
2220 echo 'movntq %mm0, (%eax)' >> $TMPS
2222 if test "$_sse" = yes ; then
2223 _pref_as_version
='2.10.1'
2224 echo 'xorps %xmm0, %xmm0' >> $TMPS
2226 #if test "$_sse2" = yes ; then
2227 # _pref_as_version='2.11'
2228 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2230 if test "$_cmov" = yes ; then
2231 _pref_as_version
='2.10.1'
2232 echo 'cmovb %eax, %ebx' >> $TMPS
2234 if test "$_ssse3" = yes ; then
2235 _pref_as_version
='2.16.92'
2236 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2238 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2240 if test "$as_verc_fail" != yes ; then
2243 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2245 die
"obsolete binutils version"
2255 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2256 #error PIC not enabled
2261 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2267 echocheck
".align is a power of two"
2268 if test "$_asmalign_pot" = auto
; then
2270 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2272 if test "$_asmalign_pot" = "yes" ; then
2273 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2275 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2277 echores
$_asmalign_pot
2280 echocheck
"ebx availability"
2282 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2289 // just adding ebx to clobber list seems unreliable with some
2290 // compilers, e.g. Haiku's gcc 2.95
2292 // and the above check does not work for OSX 64 bit...
2293 __asm__ volatile("":::"%ebx");
2297 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2298 echores
$ebx_available
2302 if test -z "$YASMFLAGS" ; then
2304 x86_64
&& objformat
="macho64" || objformat
="macho"
2310 # currently tested for Linux x86, x86_64
2311 YASMFLAGS
="-f $objformat"
2312 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2313 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2314 case "$objformat" in
2315 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2316 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2322 echo "pabsw xmm0, xmm0" > $TMPS
2323 yasm_check || _yasm
=""
2324 if test $_yasm ; then
2325 def_yasm
='#define HAVE_YASM 1'
2329 def_yasm
='#define HAVE_YASM 0'
2335 def_bswap
='#define HAVE_BSWAP 0'
2336 echo 'bswap %eax' > $TMPS
2337 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2342 #FIXME: This should happen before the check for CFLAGS..
2343 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2344 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2346 # check if AltiVec is supported by the compiler, and how to enable it
2347 echocheck
"GCC AltiVec flags"
2348 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2349 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2350 # check if <altivec.h> should be included
2351 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2352 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2353 inc_altivec_h
='#include <altivec.h>'
2355 if $
(cflag_check
-faltivec) ; then
2356 _altivec_gcc_flags
="-faltivec"
2359 _altivec_gcc_flags
="none, AltiVec disabled"
2363 echores
"$_altivec_gcc_flags"
2365 # check if the compiler supports braces for vector declarations
2368 int main(void) { (vector int) {1}; return 0; }
2370 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2372 # Disable runtime cpudetection if we cannot generate AltiVec code or
2373 # AltiVec is disabled by the user.
2374 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2375 && _runtime_cpudetection
=no
2377 # Show that we are optimizing for AltiVec (if enabled and supported).
2378 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2379 && _optimizing
="$_optimizing altivec"
2381 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2382 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2386 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2388 echocheck
"XFORM ASM support"
2389 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2390 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2391 echores
"$xform_asm"
2395 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2396 if test $_armv5te = "auto" ; then
2398 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2402 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2404 echocheck
"ARMv6 (SIMD instructions)"
2405 if test $_armv6 = "auto" ; then
2407 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2411 echocheck
"ARMv6t2 (SIMD instructions)"
2412 if test $_armv6t2 = "auto" ; then
2414 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2419 if test $_armvfp = "auto" ; then
2421 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2425 echocheck
"ARM NEON"
2426 if test $neon = "auto" ; then
2428 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2432 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2433 if test $_iwmmxt = "auto" ; then
2435 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2440 cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2441 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2442 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2443 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2444 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2445 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2446 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2447 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2448 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2449 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2450 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2451 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2452 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2453 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2454 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2455 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2456 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2457 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2458 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2459 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2461 # Checking kernel version...
2462 if x86_32
&& linux
; then
2464 kernel_version
=$
(uname
-r 2>&1)
2465 echocheck
"$system_name kernel version"
2466 case "$kernel_version" in
2467 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2468 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2469 _k_verc_problem
=yes;;
2471 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2474 if test "$_k_verc_fail" ; then
2475 echores
"$kernel_version, fail"
2476 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2477 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2478 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2479 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2480 echo "2.2.x you must upgrade it to get SSE support!"
2481 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2483 echores
"$kernel_version, ok"
2487 ######################
2488 # MAIN TESTS GO HERE #
2489 ######################
2493 if cflag_check
-lposix ; then
2494 extra_ldflags
="$extra_ldflags -lposix"
2501 if cflag_check
-lm ; then
2510 echocheck
"langinfo"
2511 if test "$_langinfo" = auto
; then
2513 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2515 if test "$_langinfo" = yes ; then
2516 def_langinfo
='#define HAVE_LANGINFO 1'
2518 def_langinfo
='#undef HAVE_LANGINFO'
2520 echores
"$_langinfo"
2523 echocheck
"translation support"
2524 if test "$_translation" = yes; then
2525 def_translation
="#define CONFIG_TRANSLATION 1"
2527 def_translation
="#undef CONFIG_TRANSLATION"
2529 echores
"$_translation"
2531 echocheck
"language"
2532 # Set preferred languages, "all" uses English as main language.
2533 test -z "$language" && language
=$LINGUAS
2534 test -z "$language_doc" && language_doc
=$language
2535 test -z "$language_man" && language_man
=$language
2536 test -z "$language_msg" && language_msg
=$language
2537 test -z "$language_msg" && language_msg
="all"
2538 language_doc
=$
(echo $language_doc |
tr , " ")
2539 language_man
=$
(echo $language_man |
tr , " ")
2540 language_msg
=$
(echo $language_msg |
tr , " ")
2542 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2543 test "$language_man" = "all" && language_man
=$man_lang_all
2544 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2546 if test "$_translation" != yes ; then
2550 # Prune non-existing translations from language lists.
2551 # Set message translation to the first available language.
2552 # Fall back on English.
2553 for lang
in $language_doc ; do
2554 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2556 language_doc
=$tmp_language_doc
2557 test -z "$language_doc" && language_doc
=en
2559 for lang
in $language_man ; do
2560 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2562 language_man
=$tmp_language_man
2563 test -z "$language_man" && language_man
=en
2565 for lang
in $language_msg ; do
2566 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2568 language_msg
=$tmp_language_msg
2570 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2573 echocheck
"enable sighandler"
2574 if test "$_sighandler" = yes ; then
2575 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2577 def_sighandler
='#undef CONFIG_SIGHANDLER'
2579 echores
"$_sighandler"
2581 echocheck
"runtime cpudetection"
2582 if test "$_runtime_cpudetection" = yes ; then
2583 _optimizing
="Runtime CPU-Detection enabled"
2584 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2586 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2588 echores
"$_runtime_cpudetection"
2591 echocheck
"restrict keyword"
2592 for restrict_keyword
in restrict __restrict __restrict__
; do
2593 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2595 def_restrict_keyword
=$restrict_keyword
2599 if [ -n "$def_restrict_keyword" ]; then
2600 echores
"$def_restrict_keyword"
2604 # Avoid infinite recursion loop ("#define restrict restrict")
2605 if [ "$def_restrict_keyword" != "restrict" ]; then
2606 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2608 def_restrict_keyword
=""
2612 echocheck
"__builtin_expect"
2613 # GCC branch prediction hint
2615 static int foo(int a) {
2616 a = __builtin_expect(a, 10);
2617 return a == 10 ? 0 : 1;
2619 int main(void) { return foo(10) && foo(0); }
2622 cc_check
&& _builtin_expect
=yes
2623 if test "$_builtin_expect" = yes ; then
2624 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2626 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2628 echores
"$_builtin_expect"
2633 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2634 if test "$_kstat" = yes ; then
2635 def_kstat
="#define HAVE_LIBKSTAT 1"
2636 extra_ldflags
="$extra_ldflags -lkstat"
2638 def_kstat
="#undef HAVE_LIBKSTAT"
2644 # required for nanosleep on some systems
2646 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2647 if test "$_posix4" = yes ; then
2648 extra_ldflags
="$extra_ldflags -lposix4"
2652 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2655 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2656 if eval test "x\$_$func" = "xyes"; then
2657 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2660 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2668 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp
=yes
2669 if test "$_mkstemp" = yes ; then
2670 def_mkstemp
='#define HAVE_MKSTEMP 1'
2672 def_mkstemp
='#define HAVE_MKSTEMP 0'
2677 echocheck
"nanosleep"
2679 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2680 if test "$_nanosleep" = yes ; then
2681 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2683 def_nanosleep
='#undef HAVE_NANOSLEEP'
2685 echores
"$_nanosleep"
2689 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2690 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2693 #include <sys/socket.h>
2694 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2697 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2698 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2700 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2701 if test $_winsock2_h = auto
; then
2703 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2705 test "$_ld_sock" && res_comment
="using $_ld_sock"
2709 if test $_winsock2_h = yes ; then
2711 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2713 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2717 echocheck
"arpa/inet.h"
2719 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2720 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2721 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2722 echores
"$arpa_inet_h"
2725 echocheck
"inet_pton()"
2726 def_inet_pton
='#define HAVE_INET_PTON 0'
2728 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2729 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
2731 if test $inet_pton = yes ; then
2732 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2733 def_inet_pton
='#define HAVE_INET_PTON 1'
2735 echores
"$inet_pton"
2738 echocheck
"inet_aton()"
2739 def_inet_aton
='#define HAVE_INET_ATON 0'
2741 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2742 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
2744 if test $inet_aton = yes ; then
2745 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2746 def_inet_aton
='#define HAVE_INET_ATON 1'
2748 echores
"$inet_aton"
2751 echocheck
"socklen_t"
2753 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
2754 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
2756 if test "$_socklen_t" = yes ; then
2757 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
2759 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
2761 echores
"$_socklen_t"
2764 echocheck
"closesocket()"
2766 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
2767 if test "$_closesocket" = yes ; then
2768 def_closesocket
='#define HAVE_CLOSESOCKET 1'
2770 def_closesocket
='#define HAVE_CLOSESOCKET 0'
2772 echores
"$_closesocket"
2775 echocheck
"networking"
2776 test $_winsock2_h = no
&& test $inet_pton = no
&&
2777 test $inet_aton = no
&& networking
=no
2778 if test "$networking" = yes ; then
2779 def_network
='#define CONFIG_NETWORK 1'
2780 def_networking
='#define CONFIG_NETWORKING 1'
2781 extra_ldflags
="$extra_ldflags $_ld_sock"
2782 inputmodules
="networking $inputmodules"
2784 noinputmodules
="networking $noinputmodules"
2785 def_network
='#define CONFIG_NETWORK 0'
2786 def_networking
='#undef CONFIG_NETWORKING'
2788 echores
"$networking"
2792 if test "$_inet6" = auto
; then
2794 #include <sys/types.h>
2795 #if !defined(_WIN32)
2796 #include <sys/socket.h>
2797 #include <netinet/in.h>
2799 #include <ws2tcpip.h>
2801 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
2804 if cc_check
$_ld_sock ; then
2808 if test "$_inet6" = yes ; then
2809 def_inet6
='#define HAVE_AF_INET6 1'
2811 def_inet6
='#undef HAVE_AF_INET6'
2816 echocheck
"gethostbyname2"
2817 if test "$_gethostbyname2" = auto
; then
2819 #include <sys/types.h>
2820 #include <sys/socket.h>
2822 int main(void) { gethostbyname2("", AF_INET); return 0; }
2829 if test "$_gethostbyname2" = yes ; then
2830 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
2832 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
2834 echores
"$_gethostbyname2"
2837 echocheck
"inttypes.h (required)"
2839 header_check inttypes.h
&& _inttypes
=yes
2840 echores
"$_inttypes"
2842 if test "$_inttypes" = no
; then
2843 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
2844 header_check sys
/bitypes.h
&& _inttypes
=yes
2845 if test "$_inttypes" = yes ; then
2846 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."
2848 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
2853 echocheck
"malloc.h"
2855 header_check malloc.h
&& _malloc
=yes
2856 if test "$_malloc" = yes ; then
2857 def_malloc_h
='#define HAVE_MALLOC_H 1'
2859 def_malloc_h
='#define HAVE_MALLOC_H 0'
2864 echocheck
"memalign()"
2865 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2866 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
2868 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
2869 if test "$_memalign" = yes ; then
2870 def_memalign
='#define HAVE_MEMALIGN 1'
2872 def_memalign
='#define HAVE_MEMALIGN 0'
2873 def_map_memalign
='#define memalign(a, b) malloc(b)'
2874 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2876 echores
"$_memalign"
2879 echocheck
"posix_memalign()"
2881 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
2882 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' &&
2883 posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
2884 echores
"$posix_memalign"
2887 echocheck
"alloca.h"
2889 statement_check alloca.h
'alloca(0)' && _alloca
=yes
2891 def_alloca_h
='#define HAVE_ALLOCA_H 1'
2893 def_alloca_h
='#undef HAVE_ALLOCA_H'
2898 echocheck
"fastmemcpy"
2899 if test "$_fastmemcpy" = yes ; then
2900 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
2902 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
2904 echores
"$_fastmemcpy"
2909 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
2910 if test "$_mman" = yes ; then
2911 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
2913 def_mman_h
='#undef HAVE_SYS_MMAN_H'
2917 _mman_has_map_failed
=no
2918 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
2919 if test "$_mman_has_map_failed" = yes ; then
2920 def_mman_has_map_failed
=''
2922 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2925 echocheck
"dynamic loader"
2927 for _ld_tmp
in "" "-ldl"; do
2928 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
2930 if test "$_dl" = yes ; then
2931 def_dl
='#define HAVE_LIBDL 1'
2933 def_dl
='#undef HAVE_LIBDL'
2938 def_threads
='#define HAVE_THREADS 0'
2942 THREAD_CFLAGS
=-D_REENTRANT
2943 elif freebsd || netbsd || openbsd || bsdos
; then
2944 THREAD_CFLAGS
=-D_THREAD_SAFE
2946 if test "$_pthreads" = auto
; then
2948 #include <pthread.h>
2949 static void *func(void *arg) { return arg; }
2952 #ifdef PTW32_STATIC_LIB
2953 pthread_win32_process_attach_np();
2954 pthread_win32_thread_attach_np();
2956 return pthread_create (&tid, 0, func, 0) != 0;
2961 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
2962 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2963 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
2965 if test "$_pthreads" = no
&& mingw32
; then
2966 _ld_tmp
="-lpthreadGC2 -lws2_32"
2967 cc_check
$_ld_tmp -DPTW32_STATIC_LIB && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && CFLAGS
="$CFLAGS -DPTW32_STATIC_LIB"
2971 if test "$_pthreads" = yes ; then
2972 test $_ld_pthread && res_comment
="using $_ld_pthread"
2973 def_pthreads
='#define HAVE_PTHREADS 1'
2974 def_threads
='#define HAVE_THREADS 1'
2975 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
2977 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
2978 def_pthreads
='#undef HAVE_PTHREADS'
2979 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
2980 mingw32 || _win32dll
=no
2982 echores
"$_pthreads"
2985 if test "$_pthreads" = yes ; then
2986 def_pthread_cache
="#define PTHREAD_CACHE 1"
2989 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
2993 echocheck
"w32threads"
2994 if test "$_pthreads" = yes ; then
2995 res_comment
="using pthread instead"
2998 if test "$_w32threads" = auto
; then
3000 mingw32
&& _w32threads
=yes
3002 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3003 echores
"$_w32threads"
3006 if test "$_rpath" = yes ; then
3007 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3008 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3015 if test "$_iconv" = auto
; then
3020 #define INBUFSIZE 1024
3021 #define OUTBUFSIZE 4096
3023 char inbuffer[INBUFSIZE];
3024 char outbuffer[OUTBUFSIZE];
3029 char *tocode="UTF-8";
3030 char *fromcode="cp1250";
3031 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3032 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3033 char *iptr=inbuffer;
3034 char *optr=outbuffer;
3035 size_t inleft=numread;
3036 size_t outleft=OUTBUFSIZE;
3037 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3039 write(1, outbuffer, OUTBUFSIZE - outleft);
3042 if (iconv_close(icdsc) == -1)
3049 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3050 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
3053 if test "$_iconv" != yes ; then
3054 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."
3057 if test "$_iconv" = yes ; then
3058 def_iconv
='#define CONFIG_ICONV 1'
3060 def_iconv
='#undef CONFIG_ICONV'
3065 echocheck
"soundcard.h"
3067 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3068 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3069 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3070 header_check
$_soundcard_header && _soundcard_h
=yes &&
3071 res_comment
="$_soundcard_header" && break
3074 if test "$_soundcard_h" = yes ; then
3075 if test $_soundcard_header = "sys/soundcard.h"; then
3076 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3078 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3081 echores
"$_soundcard_h"
3084 echocheck
"sys/videoio.h"
3086 def_sys_videoio_h
='#undef HAVE_SYS_VIDEOIO_H'
3087 header_check sys
/videoio.h
&& sys_videoio_h
=yes &&
3088 def_sys_videoio_h
='#define HAVE_SYS_VIDEOIO_H 1'
3089 echores
"$sys_videoio_h"
3092 echocheck
"sys/dvdio.h"
3094 # FreeBSD 8.1 has broken dvdio.h
3095 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3096 if test "$_dvdio" = yes ; then
3097 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3099 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3104 echocheck
"sys/cdio.h"
3106 # at least OpenSolaris has a broken cdio.h
3107 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3108 if test "$_cdio" = yes ; then
3109 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3111 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3116 echocheck
"linux/cdrom.h"
3118 header_check linux
/cdrom.h
&& _cdrom
=yes
3119 if test "$_cdrom" = yes ; then
3120 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3122 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3129 header_check dvd.h
&& _dvd
=yes
3130 if test "$_dvd" = yes ; then
3131 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3133 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3139 echocheck
"BSDI dvd.h"
3141 header_check dvd.h
&& _bsdi_dvd
=yes
3142 if test "$_bsdi_dvd" = yes ; then
3143 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3145 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3147 echores
"$_bsdi_dvd"
3152 # also used by AIX, but AIX does not support VCD and/or libdvdread
3153 echocheck
"HP-UX SCSI header"
3155 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3156 if test "$_hpux_scsi_h" = yes ; then
3157 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3159 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3161 echores
"$_hpux_scsi_h"
3166 if test "$_termcap" = auto
; then
3168 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3169 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3170 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3173 if test "$_termcap" = yes ; then
3174 def_termcap
='#define HAVE_TERMCAP 1'
3175 test $_ld_tmp && res_comment
="using $_ld_tmp"
3177 def_termcap
='#undef HAVE_TERMCAP'
3183 def_termios
='#undef HAVE_TERMIOS'
3184 def_termios_h
='#undef HAVE_TERMIOS_H'
3185 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3186 if test "$_termios" = auto
; then
3188 for _termios_header
in "termios.h" "sys/termios.h"; do
3189 header_check
$_termios_header && _termios
=yes &&
3190 res_comment
="using $_termios_header" && break
3194 if test "$_termios" = yes ; then
3195 def_termios
='#define HAVE_TERMIOS 1'
3196 if test "$_termios_header" = "termios.h" ; then
3197 def_termios_h
='#define HAVE_TERMIOS_H 1'
3199 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3206 if test "$_shm" = auto
; then
3208 statement_check sys
/shm.h
'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm
=yes
3210 if test "$_shm" = yes ; then
3211 def_shm
='#define HAVE_SHM 1'
3213 def_shm
='#undef HAVE_SHM'
3218 echocheck
"strsep()"
3220 statement_check string.h
'char *s = "Hello, world!"; strsep(&s, ",")' && _strsep
=yes
3221 if test "$_strsep" = yes ; then
3222 def_strsep
='#define HAVE_STRSEP 1'
3225 def_strsep
='#undef HAVE_STRSEP'
3231 echocheck
"vsscanf()"
3233 #define _ISOC99_SOURCE
3236 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3239 cc_check
&& _vsscanf
=yes
3240 if test "$_vsscanf" = yes ; then
3241 def_vsscanf
='#define HAVE_VSSCANF 1'
3244 def_vsscanf
='#undef HAVE_VSSCANF'
3252 define_statement_check
"_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' ||
3253 statement_check
"string.h" 'int a, b; swab(&a, &b, 0)' && _swab
=yes
3254 if test "$_swab" = yes ; then
3255 def_swab
='#define HAVE_SWAB 1'
3258 def_swab
='#undef HAVE_SWAB'
3263 echocheck
"POSIX select()"
3267 #include <sys/types.h>
3269 #include <sys/time.h>
3271 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3274 def_posix_select
='#undef HAVE_POSIX_SELECT'
3275 cc_check
&& _posix_select
=yes &&
3276 def_posix_select
='#define HAVE_POSIX_SELECT 1'
3277 echores
"$_posix_select"
3280 echocheck
"audio select()"
3281 if test "$_select" = no
; then
3282 def_select
='#undef HAVE_AUDIO_SELECT'
3283 elif test "$_select" = yes ; then
3284 def_select
='#define HAVE_AUDIO_SELECT 1'
3289 echocheck
"gettimeofday()"
3291 statement_check sys
/time.h
'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' && _gettimeofday
=yes
3292 if test "$_gettimeofday" = yes ; then
3293 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3294 need_gettimeofday
=no
3296 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3297 need_gettimeofday
=yes
3299 echores
"$_gettimeofday"
3304 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3306 if test "$_glob" = yes ; then
3307 def_glob
='#define HAVE_GLOB 1'
3309 def_glob
='#undef HAVE_GLOB'
3310 # HACK! need_glob currently enables compilation of a
3311 # win32-specific glob()-replacement.
3312 # Other OS neither need it nor can they use it (mf:// is disabled for them).
3313 win32
&& need_glob
=yes
3318 echocheck
"setenv()"
3320 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3321 if test "$_setenv" = yes ; then
3322 def_setenv
='#define HAVE_SETENV 1'
3325 def_setenv
='#undef HAVE_SETENV'
3331 echocheck
"setmode()"
3333 def_setmode
='#define HAVE_SETMODE 0'
3334 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3338 echocheck
"sys/sysinfo.h"
3340 statement_check sys
/sysinfo.h
'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo
=yes
3341 if test "$_sys_sysinfo" = yes ; then
3342 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3344 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3346 echores
"$_sys_sysinfo"
3351 echocheck
"Mac OS X Finder Support"
3352 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3353 if test "$_macosx_finder" = yes ; then
3354 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3355 extra_ldflags
="$extra_ldflags -framework Cocoa"
3357 echores
"$_macosx_finder"
3359 echocheck
"Mac OS X Bundle file locations"
3360 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3361 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3362 if test "$_macosx_bundle" = yes ; then
3363 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3365 echores
"$_macosx_bundle"
3367 echocheck
"Apple Remote"
3368 if test "$_apple_remote" = auto
; then
3372 #include <IOKit/IOCFPlugIn.h>
3374 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3375 CFMutableDictionaryRef hidMatchDictionary;
3376 IOReturn ioReturnValue;
3378 // Set up a matching dictionary to search the I/O Registry by class.
3379 // name for all HID class devices
3380 hidMatchDictionary = IOServiceMatching("AppleIRController");
3382 // Now search I/O Registry for matching devices.
3383 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3384 hidMatchDictionary, &hidObjectIterator);
3386 // If search is unsuccessful, return nonzero.
3387 if (ioReturnValue != kIOReturnSuccess ||
3388 !IOIteratorIsValid(hidObjectIterator)) {
3394 cc_check
-framework IOKit
&& _apple_remote
=yes
3396 if test "$_apple_remote" = yes ; then
3397 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3398 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3400 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3402 echores
"$_apple_remote"
3408 echocheck
"Apple IR"
3409 if test "$_apple_ir" = auto
; then
3411 statement_check linux
/input.h
'struct input_event ev; struct input_id id' && _apple_ir
=yes
3413 if test "$_apple_ir" = yes ; then
3414 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3416 def_apple_ir
='#undef CONFIG_APPLE_IR'
3418 echores
"$_apple_ir"
3421 echocheck
"pkg-config"
3422 if $
($_pkg_config --version > /dev
/null
2>&1); then
3423 if test "$_ld_static"; then
3424 _pkg_config
="$_pkg_config --static"
3433 echocheck
"Samba support (libsmbclient)"
3434 if test "$_smb" = yes; then
3435 extra_ldflags
="$extra_ldflags -lsmbclient"
3437 if test "$_smb" = auto
; then
3439 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3440 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3441 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3445 if test "$_smb" = yes; then
3446 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3447 inputmodules
="smb $inputmodules"
3449 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3450 noinputmodules
="smb $noinputmodules"
3454 echocheck
"libquvi support"
3455 if test "$_libquvi" = auto
; then
3457 if pkg_config_add
'libquvi >= 0.4.1' ; then
3461 if test "$_libquvi" = yes; then
3462 def_libquvi
="#define CONFIG_LIBQUVI 1"
3464 def_libquvi
="#undef CONFIG_LIBQUVI"
3474 if test "$_tga" = yes ; then
3475 def_tga
='#define CONFIG_TGA 1'
3476 vomodules
="tga $vomodules"
3478 def_tga
='#undef CONFIG_TGA'
3479 novomodules
="tga $novomodules"
3484 echocheck
"md5sum support"
3485 if test "$_md5sum" = yes; then
3486 def_md5sum
="#define CONFIG_MD5SUM 1"
3487 vomodules
="md5sum $vomodules"
3489 def_md5sum
="#undef CONFIG_MD5SUM"
3490 novomodules
="md5sum $novomodules"
3495 echocheck
"yuv4mpeg support"
3496 if test "$_yuv4mpeg" = yes; then
3497 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3498 vomodules
="yuv4mpeg $vomodules"
3500 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3501 novomodules
="yuv4mpeg $novomodules"
3503 echores
"$_yuv4mpeg"
3506 echocheck
"DirectFB"
3507 if test "$_directfb" = auto
; then
3510 #include <directfb.h>
3511 #include <directfb_version.h>
3512 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3513 #error "DirectFB version too old."
3515 int main(void) { DirectFBInit(0, 0); return 0; }
3517 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3518 cc_check
$_inc_tmp -ldirectfb &&
3519 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3522 if test "$_directfb" = yes ; then
3523 def_directfb
='#define CONFIG_DIRECTFB 1'
3524 vomodules
="directfb $vomodules"
3525 libs_mplayer
="$libs_mplayer -ldirectfb"
3527 def_directfb
='#undef CONFIG_DIRECTFB'
3528 novomodules
="directfb $novomodules"
3530 echores
"$_directfb"
3535 echocheck
"QuickTime"
3536 if test "$quicktime" = auto
; then
3538 statement_check QuickTime
/QuickTime.h
'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime
&& quicktime
=yes
3540 if test "$quicktime" = yes ; then
3541 extra_ldflags
="$extra_ldflags -framework QuickTime"
3542 def_quicktime
='#define CONFIG_QUICKTIME 1'
3544 def_quicktime
='#undef CONFIG_QUICKTIME'
3549 if test "$_cocoa" = auto
; then
3551 #include <CoreServices/CoreServices.h>
3552 #include <OpenGL/OpenGL.h>
3554 NSApplicationLoad();
3558 cc_check
-framework IOKit
-framework Cocoa
-framework OpenGL
&& _cocoa
=yes
3560 if test "$_cocoa" = yes ; then
3561 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa -framework OpenGL"
3562 def_cocoa
='#define CONFIG_COCOA 1'
3564 def_cocoa
='#undef CONFIG_COCOA'
3568 echocheck
"CoreVideo"
3569 if test "$_cocoa" = yes && test "$_corevideo" = auto
; then
3571 #include <QuartzCore/CoreVideo.h>
3572 int main(void) { return 0; }
3575 cc_check
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
3577 if test "$_corevideo" = yes ; then
3578 vomodules
="corevideo $vomodules"
3579 libs_mplayer
="$libs_mplayer -framework QuartzCore"
3580 def_corevideo
='#define CONFIG_COREVIDEO 1'
3582 novomodules
="corevideo $novomodules"
3583 def_corevideo
='#undef CONFIG_COREVIDEO'
3585 echores
"$_corevideo"
3587 echocheck
"SharedBuffer"
3588 if test "$_sharedbuffer" = auto
; then
3591 NSApplicationLoad();
3595 cc_check
-framework Cocoa
&& _sharedbuffer
=yes
3597 if test "$_sharedbuffer" = yes ; then
3598 vomodules
="sharedbuffer $vomodules"
3599 libs_mplayer
="$libs_mplayer -framework Cocoa"
3600 def_sharedbuffer
='#define CONFIG_SHAREDBUFFER 1'
3602 novomodules
="sharedbuffer $novomodules"
3603 def_sharedbuffer
='#undef CONFIG_SHAREDBUFFER'
3605 echores
"$_sharedbuffer"
3607 depends_on_application_services
(){
3608 test "$_corevideo" = yes
3614 echocheck
"X11 headers presence"
3616 res_comment
="check if the dev(el) packages are installed"
3617 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3618 if test -f "$I/X11/Xlib.h" ; then
3624 if test $_cross_compile = no
; then
3625 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3626 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3627 if test -f "$I/X11/Xlib.h" ; then
3628 extra_cflags
="$extra_cflags -I$I"
3630 res_comment
="using $I"
3635 echores
"$_x11_headers"
3639 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3640 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3641 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3644 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3646 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3648 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3650 # Check that there aren't conflicting headers between ApplicationServices
3651 # and X11. On versions of Mac OSX prior to 10.7 the deprecated QuickDraw API
3652 # is included by -framework ApplicationServices and clashes with the X11
3653 # definition of the "Cursor" type.
3654 if darwin
&& depends_on_application_services
&& test "$_x11" = yes ; then
3656 header_check_broken ApplicationServices
/ApplicationServices.h \
3657 X11
/Xutil.h
$_ld_tmp && _x11
=yes
3659 if test "$_x11" = yes ; then
3660 libs_mplayer
="$libs_mplayer $_ld_tmp"
3665 if test "$_x11" = yes ; then
3666 def_x11
='#define CONFIG_X11 1'
3667 vomodules
="x11 $vomodules"
3670 def_x11
='#undef CONFIG_X11'
3671 novomodules
="x11 $novomodules"
3672 res_comment
="check if the dev(el) packages are installed"
3676 echocheck
"Xss screensaver extensions"
3677 if test "$_xss" = auto
; then
3679 statement_check
"X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss
=yes
3681 if test "$_xss" = yes ; then
3682 def_xss
='#define CONFIG_XSS 1'
3683 libs_mplayer
="$libs_mplayer -lXss"
3685 def_xss
='#undef CONFIG_XSS'
3692 if test "$_x11" = yes ; then
3694 #include <X11/Xmd.h>
3695 #include <X11/Xlib.h>
3696 #include <X11/Xutil.h>
3697 #include <X11/Xatom.h>
3698 #include <X11/extensions/dpms.h>
3699 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
3701 cc_check
-lXdpms && _xdpms3
=yes
3702 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
3704 if test "$_xdpms4" = yes ; then
3705 def_xdpms
='#define CONFIG_XDPMS 1'
3706 res_comment
="using Xdpms 4"
3708 elif test "$_xdpms3" = yes ; then
3709 def_xdpms
='#define CONFIG_XDPMS 1'
3710 libs_mplayer
="$libs_mplayer -lXdpms"
3711 res_comment
="using Xdpms 3"
3714 def_xdpms
='#undef CONFIG_XDPMS'
3720 if test "$_xv" = auto
&& test "$_x11" = yes ; then
3722 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
3725 if test "$_xv" = yes ; then
3726 def_xv
='#define CONFIG_XV 1'
3727 libs_mplayer
="$libs_mplayer -lXv"
3728 vomodules
="xv $vomodules"
3730 def_xv
='#undef CONFIG_XV'
3731 novomodules
="xv $novomodules"
3737 if test "$_vdpau" = auto
&& test "$_x11" = yes ; then
3739 if test "$_dl" = yes ; then
3740 pkg_config_add
'vdpau >= 0.2' && _vdpau
=yes
3743 if test "$_vdpau" = yes ; then
3744 def_vdpau
='#define CONFIG_VDPAU 1'
3745 vomodules
="vdpau $vomodules"
3747 def_vdpau
='#define CONFIG_VDPAU 0'
3748 novomodules
="vdpau $novomodules"
3753 echocheck
"Xinerama"
3754 if test "$_xinerama" = auto
&& test "$_x11" = yes ; then
3756 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
3759 if test "$_xinerama" = yes ; then
3760 def_xinerama
='#define CONFIG_XINERAMA 1'
3761 libs_mplayer
="$libs_mplayer -lXinerama"
3763 def_xinerama
='#undef CONFIG_XINERAMA'
3765 echores
"$_xinerama"
3768 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3769 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3770 # named 'X extensions' or something similar.
3771 # This check may be useful for future mplayer versions (to change resolution)
3772 # If you run into problems, remove '-lXxf86vm'.
3774 if test "$_vm" = auto
&& test "$_x11" = yes ; then
3776 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
3778 if test "$_vm" = yes ; then
3779 def_vm
='#define CONFIG_XF86VM 1'
3780 libs_mplayer
="$libs_mplayer -lXxf86vm"
3782 def_vm
='#undef CONFIG_XF86VM'
3786 # Check for the presence of special keycodes, like audio control buttons
3787 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3788 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3789 # have these new keycodes.
3790 echocheck
"XF86keysym"
3791 if test "$_xf86keysym" = auto
&& test "$_x11" = yes ; then
3793 return_check X11
/XF86keysym.h XF86XK_AudioPause
&& _xf86keysym
=yes
3795 if test "$_xf86keysym" = yes ; then
3796 def_xf86keysym
='#define CONFIG_XF86XK 1'
3798 def_xf86keysym
='#undef CONFIG_XF86XK'
3800 echores
"$_xf86keysym"
3804 if test "$_caca" = auto
; then
3806 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
3809 #ifdef CACA_API_VERSION_1
3812 int main(void) { caca_init(); return 0; }
3814 cc_check $
(caca-config
--libs) && _caca
=yes
3817 if test "$_caca" = yes ; then
3818 def_caca
='#define CONFIG_CACA 1'
3819 extra_cflags
="$extra_cflags $(caca-config --cflags)"
3820 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
3821 vomodules
="caca $vomodules"
3823 def_caca
='#undef CONFIG_CACA'
3824 novomodules
="caca $novomodules"
3830 if test "$_dvb" = auto
; then
3834 #include <sys/ioctl.h>
3838 #include <linux/dvb/dmx.h>
3839 #include <linux/dvb/frontend.h>
3840 #include <linux/dvb/video.h>
3841 #include <linux/dvb/audio.h>
3842 int main(void) {return 0;}
3844 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
3845 cc_check
$_inc_tmp && _dvb
=yes &&
3846 extra_cflags
="$extra_cflags $_inc_tmp" && break
3850 if test "$_dvb" = yes ; then
3852 inputmodules
="dvb $inputmodules"
3853 def_dvbin
='#define CONFIG_DVBIN 1'
3856 noinputmodules
="dvb $noinputmodules"
3857 def_dvbin
='#undef CONFIG_DVBIN '
3861 echocheck
"PNG support"
3862 if test "$_png" = auto
; then
3869 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
3870 printf("libpng: %s\n", png_libpng_ver);
3871 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
3874 cc_check
-lpng -lz $_ld_lm && _png
=yes
3877 if test "$_png" = yes ; then
3878 def_png
='#define CONFIG_PNG 1'
3879 extra_ldflags
="$extra_ldflags -lpng -lz"
3881 def_png
='#undef CONFIG_PNG'
3884 echocheck
"MNG support"
3885 if test "$_mng" = auto
; then
3887 return_statement_check libmng.h
'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng
=yes
3890 if test "$_mng" = yes ; then
3891 def_mng
='#define CONFIG_MNG 1'
3892 extra_ldflags
="$extra_ldflags -lmng -lz"
3894 def_mng
='#undef CONFIG_MNG'
3897 echocheck
"JPEG support"
3898 if test "$_jpeg" = auto
; then
3900 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
3904 if test "$_jpeg" = yes ; then
3905 def_jpeg
='#define CONFIG_JPEG 1'
3906 vomodules
="jpeg $vomodules"
3907 extra_ldflags
="$extra_ldflags -ljpeg"
3909 def_jpeg
='#undef CONFIG_JPEG'
3910 novomodules
="jpeg $novomodules"
3915 echocheck
"PNM support"
3916 if test "$_pnm" = yes; then
3917 def_pnm
="#define CONFIG_PNM 1"
3918 vomodules
="pnm $vomodules"
3920 def_pnm
="#undef CONFIG_PNM"
3921 novomodules
="pnm $novomodules"
3927 echocheck
"GIF support"
3928 # This is to appease people who want to force gif support.
3929 # If it is forced to yes, then we still do checks to determine
3930 # which gif library to use.
3931 if test "$_gif" = yes ; then
3936 if test "$_gif" = auto
; then
3938 for _ld_gif
in "-lungif" "-lgif" ; do
3939 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
3943 # If no library was found, and the user wants support forced,
3944 # then we force it on with libgif, as this is the safest
3945 # assumption IMHO. (libungif & libregif both create symbolic
3946 # links to libgif. We also assume that no x11 support is needed,
3947 # because if you are forcing this, then you _should_ know what
3948 # you are doing. [ Besides, package maintainers should never
3949 # have compiled x11 deps into libungif in the first place. ] )
3952 if test "$_force_gif" = yes && test "$_gif" = no
; then
3957 if test "$_gif" = yes ; then
3958 def_gif
='#define CONFIG_GIF 1'
3959 codecmodules
="gif $codecmodules"
3960 vomodules
="gif89a $vomodules"
3961 res_comment
="old version, some encoding functions disabled"
3962 def_gif_4
='#undef CONFIG_GIF_4'
3963 extra_ldflags
="$extra_ldflags $_ld_gif"
3969 #include <gif_lib.h>
3970 static void catch(int sig) { exit(1); }
3972 signal(SIGSEGV, catch); // catch segfault
3973 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
3974 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
3978 if cc_check
"$_ld_gif" ; then
3979 def_gif_4
='#define CONFIG_GIF_4 1'
3983 def_gif
='#undef CONFIG_GIF'
3984 def_gif_4
='#undef CONFIG_GIF_4'
3985 novomodules
="gif89a $novomodules"
3986 nocodecmodules
="gif $nocodecmodules"
3991 case "$_gif" in yes*)
3992 echocheck
"broken giflib workaround"
3993 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
3997 #include <gif_lib.h>
3999 GifFileType gif = {.UserData = NULL};
4000 printf("UserData is at address %p\n", gif.UserData);
4004 if cc_check
"$_ld_gif" ; then
4005 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4022 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4023 if test -z "$_sdlconfig" ; then
4024 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4025 _sdlconfig
="sdl-config"
4026 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4027 _sdlconfig
="sdl11-config"
4032 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4034 #ifdef CONFIG_SDL_SDL_H
4035 #include <SDL/SDL.h>
4040 // we allow SDL hacking our main() only on OSX
4043 int main(int argc, char *argv[]) {
4044 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4049 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4050 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4052 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4056 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4057 res_comment
="using $_sdlconfig"
4059 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4060 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4062 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4063 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4065 _inc_tmp
="$($_sdlconfig --cflags)"
4066 _ld_tmp
="$($_sdlconfig --libs)"
4068 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4070 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4071 # HACK for BeOS/Haiku SDL
4072 _ld_tmp
="$_ld_tmp -lstdc++"
4077 if test "$_sdl" = yes ; then
4078 def_sdl
='#define CONFIG_SDL 1'
4079 extra_cflags
="$extra_cflags $_inc_tmp"
4080 libs_mplayer
="$libs_mplayer $_ld_tmp"
4081 vomodules
="sdl $vomodules"
4082 aomodules
="sdl $aomodules"
4084 def_sdl
='#undef CONFIG_SDL'
4085 novomodules
="sdl $novomodules"
4086 noaomodules
="sdl $noaomodules"
4091 # make sure this stays below CoreVideo to avoid issues due to namespace
4092 # conflicts between -lGL and -framework OpenGL
4094 #Note: this test is run even with --enable-gl since we autodetect linker flags
4095 if (test "$_x11" = yes ||
test "$_sdl" = yes ||
test "$_cocoa" = yes || win32
) && test "$_gl" != no
; then
4098 #include <windows.h>
4100 #elif defined(GL_SDL)
4102 #ifdef CONFIG_SDL_SDL_H
4103 #include <SDL/SDL.h>
4108 // we allow SDL hacking our main() only on OSX
4113 #include <X11/Xlib.h>
4116 int main(int argc, char *argv[]) {
4119 wglCreateContext(dc);
4120 #elif defined(GL_SDL)
4121 SDL_GL_SwapBuffers();
4123 glXCreateContext(NULL, NULL, NULL, True);
4130 if test "$_x11" = yes ; then
4131 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4132 if cc_check
$_ld_tmp $_ld_lm ; then
4135 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4140 if win32
&& cc_check
-DGL_WIN32 -lopengl32 ; then
4143 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4145 if test "$_cocoa" = yes ; then
4149 # last so it can reuse any linker etc. flags detected before
4150 if test "$_sdl" = yes ; then
4151 if cc_check
-DGL_SDL ||
4152 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4155 elif cc_check
-DGL_SDL -lGL ||
4156 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4159 libs_mplayer
="$libs_mplayer -lGL"
4165 if test "$_gl" = yes ; then
4166 def_gl
='#define CONFIG_GL 1'
4167 res_comment
="backends:"
4168 if test "$_gl_cocoa" = yes ; then
4169 def_gl_cocoa
='#define CONFIG_GL_COCOA 1'
4170 res_comment
="$res_comment cocoa"
4172 if test "$_gl_win32" = yes ; then
4173 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4174 res_comment
="$res_comment win32"
4176 if test "$_gl_x11" = yes ; then
4177 def_gl_x11
='#define CONFIG_GL_X11 1'
4178 res_comment
="$res_comment x11"
4180 if test "$_gl_sdl" = yes ; then
4181 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4182 res_comment
="$res_comment sdl"
4184 vomodules
="opengl $vomodules"
4186 def_gl
='#undef CONFIG_GL'
4187 def_gl_cocoa
='#undef CONFIG_GL_COCOA'
4188 def_gl_win32
='#undef CONFIG_GL_WIN32'
4189 def_gl_x11
='#undef CONFIG_GL_X11'
4190 def_gl_sdl
='#undef CONFIG_GL_SDL'
4191 novomodules
="opengl $novomodules"
4198 echocheck
"Direct3D"
4199 if test "$_direct3d" = auto
; then
4201 header_check d3d9.h
&& _direct3d
=yes
4203 if test "$_direct3d" = yes ; then
4204 def_direct3d
='#define CONFIG_DIRECT3D 1'
4205 vomodules
="direct3d $vomodules"
4207 def_direct3d
='#undef CONFIG_DIRECT3D'
4208 novomodules
="direct3d $novomodules"
4210 echores
"$_direct3d"
4213 if test "$_directx" = auto
; then
4217 int main(void) { return 0; }
4220 cc_check
-lgdi32 && _directx
=yes
4222 if test "$_directx" = yes ; then
4223 def_directx
='#define CONFIG_DIRECTX 1'
4224 libs_mplayer
="$libs_mplayer -lgdi32"
4225 vomodules
="directx $vomodules"
4226 aomodules
="dsound $aomodules"
4228 def_directx
='#undef CONFIG_DIRECTX'
4229 novomodules
="directx $novomodules"
4230 noaomodules
="dsound $noaomodules"
4237 echocheck
"V4L2 MPEG Decoder"
4238 if test "$_v4l2" = auto
; then
4240 #include <sys/time.h>
4241 #include <linux/videodev2.h>
4242 #include <linux/version.h>
4244 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4245 #error kernel headers too old, need 2.6.22
4247 struct v4l2_ext_controls ctrls;
4248 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4253 cc_check
&& _v4l2
=yes
4255 if test "$_v4l2" = yes ; then
4256 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
4257 vomodules
="v4l2 $vomodules"
4258 aomodules
="v4l2 $aomodules"
4260 def_v4l2
='#undef CONFIG_V4L2_DECODER'
4261 novomodules
="v4l2 $novomodules"
4262 noaomodules
="v4l2 $noaomodules"
4273 echocheck
"OSS Audio"
4274 if test "$_ossaudio" = auto
; then
4276 return_check
$_soundcard_header SNDCTL_DSP_SETFRAGMENT
&& _ossaudio
=yes
4278 if test "$_ossaudio" = yes ; then
4279 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
4280 aomodules
="oss $aomodules"
4282 #include <$_soundcard_header>
4283 #ifdef OPEN_SOUND_SYSTEM
4284 int main(void) { return 0; }
4286 #error Not the real thing
4290 cc_check
&& _real_ossaudio
=yes
4291 if test "$_real_ossaudio" = yes; then
4292 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4293 # Check for OSS4 headers (override default headers)
4294 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
4295 if test -f /etc
/oss.conf
; then
4297 _ossinc
="$OSSLIBDIR/include"
4298 if test -f "$_ossinc/sys/soundcard.h"; then
4299 extra_cflags
="-I$_ossinc $extra_cflags"
4302 elif netbsd || openbsd
; then
4303 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4304 extra_ldflags
="$extra_ldflags -lossaudio"
4306 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4308 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4310 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
4311 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4312 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4313 noaomodules
="oss $noaomodules"
4315 echores
"$_ossaudio"
4319 if test "$_rsound" = auto
; then
4321 statement_check rsound.h
'rsd_init(NULL);' -lrsound && _rsound
=yes
4325 if test "$_rsound" = yes ; then
4326 def_rsound
='#define CONFIG_RSOUND 1'
4327 aomodules
="rsound $aomodules"
4328 libs_mplayer
="$libs_mplayer -lrsound"
4330 def_rsound
='#undef CONFIG_RSOUND'
4331 noaomodules
="rsound $noaomodules"
4336 if test "$_pulse" = auto
; then
4338 if pkg_config_add
'libpulse >= 0.9' ; then
4344 if test "$_pulse" = yes ; then
4345 def_pulse
='#define CONFIG_PULSE 1'
4346 aomodules
="pulse $aomodules"
4348 def_pulse
='#undef CONFIG_PULSE'
4349 noaomodules
="pulse $noaomodules"
4353 echocheck
"PortAudio"
4354 if test "$_portaudio" = auto
&& test "$_pthreads" != yes ; then
4356 res_comment
="pthreads not enabled"
4358 if test "$_portaudio" = auto
; then
4360 if pkg_config_add
'portaudio-2.0 >= 19' ; then
4364 echores
"$_portaudio"
4366 if test "$_portaudio" = yes ; then
4367 def_portaudio
='#define CONFIG_PORTAUDIO 1'
4368 aomodules
="portaudio $aomodules"
4370 def_portaudio
='#undef CONFIG_PORTAUDIO'
4371 noaomodules
="portaudio $noaomodules"
4376 if test "$_jack" = auto
; then
4378 if pkg_config_add jack
; then
4383 if test "$_jack" = yes ; then
4384 def_jack
='#define CONFIG_JACK 1'
4385 aomodules
="jack $aomodules"
4387 noaomodules
="jack $noaomodules"
4392 if test "$_openal" = auto
; then
4396 #include <OpenAL/al.h>
4401 alSourceQueueBuffers(0, 0, 0);
4402 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
4406 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
4407 cc_check
$I && _openal
=yes && break
4408 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
4410 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
4412 if test "$_openal" = yes ; then
4413 def_openal
='#define CONFIG_OPENAL 1'
4414 aomodules
="openal $aomodules"
4416 noaomodules
="openal $noaomodules"
4420 echocheck
"ALSA audio"
4421 if test "$_alloca" != yes ; then
4423 res_comment
="alloca missing"
4425 if test "$_alsa" = auto
; then
4427 if pkg_config_add
"alsa >= 1.0.9" ; then
4431 def_alsa
='#undef CONFIG_ALSA'
4432 if test "$_alsa" = yes ; then
4433 aomodules
="alsa $aomodules"
4434 def_alsa
='#define CONFIG_ALSA 1'
4436 noaomodules
="alsa $noaomodules"
4442 echocheck
"CoreAudio"
4443 if test "$_coreaudio" = auto
; then
4445 #include <CoreAudio/CoreAudio.h>
4446 #include <AudioToolbox/AudioToolbox.h>
4447 #include <AudioUnit/AudioUnit.h>
4448 int main(void) { return 0; }
4451 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
4453 if test "$_coreaudio" = yes ; then
4454 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
4455 def_coreaudio
='#define CONFIG_COREAUDIO 1'
4456 aomodules
="coreaudio $aomodules"
4458 def_coreaudio
='#undef CONFIG_COREAUDIO'
4459 noaomodules
="coreaudio $noaomodules"
4465 # set default CD/DVD devices
4467 default_cdrom_device
="D:"
4469 default_cdrom_device
="/dev/disk1"
4470 elif dragonfly
; then
4471 default_cdrom_device
="/dev/cd0"
4473 default_cdrom_device
="/dev/acd0"
4475 default_cdrom_device
="/dev/rcd0c"
4477 default_cdrom_device
="a1ide.device:2"
4479 default_cdrom_device
="/dev/cdrom"
4482 if win32 || dragonfly || freebsd || openbsd || amigaos
; then
4483 default_dvd_device
=$default_cdrom_device
4485 default_dvd_device
="/dev/rdiskN"
4487 default_dvd_device
="/dev/dvd"
4491 echocheck
"VCD support"
4492 if test "$_vcd" = auto
; then
4494 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin
; then
4497 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
4500 if test "$_vcd" = yes; then
4501 inputmodules
="vcd $inputmodules"
4502 def_vcd
='#define CONFIG_VCD 1'
4504 def_vcd
='#undef CONFIG_VCD'
4505 noinputmodules
="vcd $noinputmodules"
4506 res_comment
="not supported on this OS"
4512 echocheck
"Blu-ray support"
4513 if test "$_bluray" = auto
; then
4515 pkg_config_add
'libbluray >= 0.2.1' && _bluray
=yes
4517 if test "$_bluray" = yes ; then
4518 def_bluray
='#define CONFIG_LIBBLURAY 1'
4519 inputmodules
="bluray $inputmodules"
4521 def_bluray
='#undef CONFIG_LIBBLURAY'
4522 noinputmodules
="bluray $noinputmodules"
4527 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
4528 _dvdread_internal
=no
4530 if test "$_dvdread_internal" = auto
; then
4531 _dvdread_internal
=no
4533 if (linux || freebsd || netbsd || openbsd || dragonfly || hpux
) &&
4534 (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes ||
4535 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) ||
4536 darwin || win32
; then
4537 _dvdread_internal
=yes
4539 extra_cflags
="-Ilibdvdread4 $extra_cflags"
4541 elif test "$_dvdread" = auto
; then
4543 if test "$_dl" = yes; then
4544 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
4545 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
4546 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
4548 extra_cflags
="$extra_cflags $_dvdreadcflags"
4549 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
4550 res_comment
="external"
4555 if test "$_dvdread_internal" = yes; then
4556 def_dvdread
='#define CONFIG_DVDREAD 1'
4557 inputmodules
="dvdread(internal) $inputmodules"
4558 res_comment
="internal"
4559 elif test "$_dvdread" = yes; then
4560 def_dvdread
='#define CONFIG_DVDREAD 1'
4561 extra_ldflags
="$extra_ldflags -ldvdread"
4562 inputmodules
="dvdread(external) $inputmodules"
4563 res_comment
="external"
4565 def_dvdread
='#undef CONFIG_DVDREAD'
4566 noinputmodules
="dvdread $noinputmodules"
4571 echocheck
"internal libdvdcss"
4572 if test "$_libdvdcss_internal" = auto
; then
4573 _libdvdcss_internal
=no
4574 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
4575 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
4577 if test "$_libdvdcss_internal" = yes ; then
4578 if linux || netbsd || openbsd || bsdos
; then
4579 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
4580 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
4581 elif freebsd || dragonfly
; then
4582 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
4584 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
4585 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
4587 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
4589 cflags_libdvdcss
="-DSYS_BEOS"
4591 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
4592 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
4593 inputmodules
="libdvdcss(internal) $inputmodules"
4595 noinputmodules
="libdvdcss(internal) $noinputmodules"
4597 echores
"$_libdvdcss_internal"
4601 if test "$_libcdio" = auto
; then
4603 if pkg_config_add libcdio_paranoia
; then
4607 if test "$_libcdio" = yes ; then
4609 def_cdda
='#define CONFIG_CDDA 1'
4610 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
4611 inputmodules
="cdda $inputmodules"
4615 def_cdda
='#undef CONFIG_CDDA'
4616 noinputmodules
="cdda $noinputmodules"
4620 if test "$_cddb" = yes ; then
4621 def_cddb
='#define CONFIG_CDDB 1'
4622 inputmodules
="cddb $inputmodules"
4625 def_cddb
='#undef CONFIG_CDDB'
4626 noinputmodules
="cddb $noinputmodules"
4630 echocheck
"SSA/ASS support"
4631 if test "$_ass" = auto
; then
4632 if pkg_config_add libass
; then
4634 def_ass
='#define CONFIG_ASS 1'
4636 die
"Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
4639 def_ass
='#undef CONFIG_ASS'
4645 if test "$_enca" = auto
; then
4647 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
4649 if test "$_enca" = yes ; then
4650 def_enca
='#define CONFIG_ENCA 1'
4651 extra_ldflags
="$extra_ldflags -lenca"
4653 def_enca
='#undef CONFIG_ENCA'
4660 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
4661 if test "$_zlib" = yes ; then
4662 def_zlib
='#define CONFIG_ZLIB 1'
4663 extra_ldflags
="$extra_ldflags -lz"
4665 def_zlib
='#define CONFIG_ZLIB 0'
4671 if test "$_rtc" = auto
; then
4673 #include <sys/ioctl.h>
4675 #include <linux/rtc.h>
4678 #define RTC_PIE_ON RTCIO_PIE_ON
4680 int main(void) { return RTC_PIE_ON; }
4683 cc_check
&& _rtc
=yes
4686 if test "$_rtc" = yes ; then
4687 def_rtc
='#define HAVE_RTC 1'
4689 def_rtc
='#undef HAVE_RTC'
4694 echocheck
"mad support"
4695 if test "$_mad" = auto
; then
4697 header_check mad.h
-lmad && _mad
=yes
4699 if test "$_mad" = yes ; then
4700 def_mad
='#define CONFIG_LIBMAD 1'
4701 extra_ldflags
="$extra_ldflags -lmad"
4702 codecmodules
="libmad $codecmodules"
4704 def_mad
='#undef CONFIG_LIBMAD'
4705 nocodecmodules
="libmad $nocodecmodules"
4709 echocheck
"OggVorbis support"
4710 if test "$_libvorbis" = auto
; then
4712 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes && _tremor
=no
4713 elif test "$_libvorbis" = yes ; then
4716 if test "$_tremor" = auto
; then
4718 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes
4720 if test "$_tremor" = yes ; then
4722 def_vorbis
='#define CONFIG_OGGVORBIS 1'
4723 def_tremor
='#define CONFIG_TREMOR 1'
4724 codecmodules
="tremor(external) $codecmodules"
4725 res_comment
="external Tremor"
4726 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
4727 elif test "$_libvorbis" = yes ; then
4729 def_vorbis
='#define CONFIG_OGGVORBIS 1'
4730 codecmodules
="libvorbis $codecmodules"
4731 res_comment
="libvorbis"
4732 extra_ldflags
="$extra_ldflags -lvorbis -logg"
4735 nocodecmodules
="libvorbis $nocodecmodules"
4739 echocheck
"libspeex (version >= 1.1 required)"
4740 if test "$_speex" = auto
; then
4744 #include <speex/speex.h>
4745 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
4747 cc_check
-lspeex $_ld_lm && _speex
=yes
4749 if test "$_speex" = yes ; then
4750 def_speex
='#define CONFIG_SPEEX 1'
4751 extra_ldflags
="$extra_ldflags -lspeex"
4752 codecmodules
="speex $codecmodules"
4754 def_speex
='#undef CONFIG_SPEEX'
4755 nocodecmodules
="speex $nocodecmodules"
4759 echocheck
"OggTheora support"
4760 if test "$_theora" = auto
; then
4762 if pkg_config_add theora
; then
4766 if test "$_theora" = yes ; then
4767 def_theora
='#define CONFIG_OGGTHEORA 1'
4768 codecmodules
="libtheora $codecmodules"
4770 def_theora
='#undef CONFIG_OGGTHEORA'
4771 nocodecmodules
="libtheora $nocodecmodules"
4775 # Any version of libmpg123 that knows MPG123_RESYNC_LIMIT shall be fine.
4776 # That is, 1.2.0 onwards. Recommened is 1.14 onwards, though.
4777 echocheck
"mpg123 support"
4778 def_mpg123
='#undef CONFIG_MPG123'
4779 if test "$_mpg123" = auto
; then
4781 pkg_config_add
'libmpg123 >= 1.2.0' && _mpg123
=yes
4783 if test "$_mpg123" = yes ; then
4784 def_mpg123
='#define CONFIG_MPG123 1'
4785 codecmodules
="mpg123 $codecmodules"
4787 nocodecmodules
="mpg123 $nocodecmodules"
4791 echocheck
"liba52 support"
4792 def_liba52
='#undef CONFIG_LIBA52'
4793 if test "$_liba52" = auto
; then
4796 #include <inttypes.h>
4797 #include <a52dec/a52.h>
4798 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
4800 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
4802 if test "$_liba52" = yes ; then
4803 def_liba52
='#define CONFIG_LIBA52 1'
4804 codecmodules
="liba52 $codecmodules"
4806 nocodecmodules
="liba52 $nocodecmodules"
4810 echocheck
"libdca support"
4811 if test "$_libdca" = auto
; then
4813 for _ld_dca
in -ldca -ldts ; do
4814 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
4815 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
4818 if test "$_libdca" = yes ; then
4819 def_libdca
='#define CONFIG_LIBDCA 1'
4820 codecmodules
="libdca $codecmodules"
4822 def_libdca
='#undef CONFIG_LIBDCA'
4823 nocodecmodules
="libdca $nocodecmodules"
4827 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
4828 if test "$_musepack" = yes ; then
4832 #include <mpcdec/mpcdec.h>
4834 mpc_streaminfo info;
4835 mpc_decoder decoder;
4836 mpc_decoder_set_streaminfo(&decoder, &info);
4837 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
4841 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
4843 if test "$_musepack" = yes ; then
4844 def_musepack
='#define CONFIG_MUSEPACK 1'
4845 extra_ldflags
="$extra_ldflags -lmpcdec"
4846 codecmodules
="musepack $codecmodules"
4848 def_musepack
='#undef CONFIG_MUSEPACK'
4849 nocodecmodules
="musepack $nocodecmodules"
4851 echores
"$_musepack"
4854 echocheck
"FAAD2 support"
4855 if test "$_faad" = auto
; then
4859 #ifndef FAAD_MIN_STREAMSIZE
4860 #error Too old version
4862 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
4863 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
4865 cc_check
-lfaad $_ld_lm && _faad
=yes
4868 def_faad
='#undef CONFIG_FAAD'
4869 if test "$_faad" = yes ; then
4870 def_faad
='#define CONFIG_FAAD 1'
4871 extra_ldflags
="$extra_ldflags -lfaad"
4872 codecmodules
="faad2 $codecmodules"
4874 nocodecmodules
="faad2 $nocodecmodules"
4879 echocheck
"LADSPA plugin support"
4880 if test "$_ladspa" = auto
; then
4882 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
4884 if test "$_ladspa" = yes; then
4885 def_ladspa
="#define CONFIG_LADSPA 1"
4887 def_ladspa
="#undef CONFIG_LADSPA"
4892 echocheck
"libbs2b audio filter support"
4893 if test "$_libbs2b" = auto
; then
4895 if pkg_config_add libbs2b
; then
4899 def_libbs2b
="#undef CONFIG_LIBBS2B"
4900 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
4904 if test -z "$_codecsdir" ; then
4905 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
4906 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
4907 if test -d "$dir" ; then
4913 # Fall back on default directory.
4914 if test -z "$_codecsdir" ; then
4915 _codecsdir
="$_libdir/codecs"
4916 mingw32
&& _codecsdir
="codecs"
4920 echocheck
"Win32 codecs"
4921 if test "$_win32dll" = auto
; then
4923 if x86_32
&& ! qnx
; then
4927 if test "$_win32dll" = yes ; then
4928 def_win32dll
='#define CONFIG_WIN32DLL 1'
4930 def_win32_loader
='#define WIN32_LOADER 1'
4931 _win32_emulation
=yes
4933 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
4934 res_comment
="using native windows"
4936 codecmodules
="win32 $codecmodules"
4938 def_win32dll
='#undef CONFIG_WIN32DLL'
4939 def_win32_loader
='#undef WIN32_LOADER'
4940 nocodecmodules
="win32 $nocodecmodules"
4942 echores
"$_win32dll"
4945 echocheck
"XAnim codecs"
4946 if test "$_xanim" = auto
; then
4948 res_comment
="dynamic loader support needed"
4949 if test "$_dl" = yes ; then
4953 if test "$_xanim" = yes ; then
4954 def_xanim
='#define CONFIG_XANIM 1'
4955 codecmodules
="xanim $codecmodules"
4957 def_xanim
='#undef CONFIG_XANIM'
4958 nocodecmodules
="xanim $nocodecmodules"
4963 echocheck
"RealPlayer codecs"
4964 if test "$_real" = auto
; then
4966 res_comment
="dynamic loader support needed"
4967 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
4968 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32
) ; then
4972 if test "$_real" = yes ; then
4973 def_real
='#define CONFIG_REALCODECS 1'
4974 codecmodules
="real $codecmodules"
4976 def_real
='#undef CONFIG_REALCODECS'
4977 nocodecmodules
="real $nocodecmodules"
4982 echocheck
"QuickTime codecs"
4984 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
4985 if test "$_qtx" = auto
; then
4986 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
4988 if test "$_qtx" = yes ; then
4989 def_qtx
='#define CONFIG_QTX_CODECS 1'
4990 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
4991 codecmodules
="qtx $codecmodules"
4992 darwin || win32 || _qtx_emulation
=yes
4994 def_qtx
='#undef CONFIG_QTX_CODECS'
4995 nocodecmodules
="qtx $nocodecmodules"
4999 echocheck
"LCMS2 support"
5000 if test "$_lcms2" = auto
; then
5002 if pkg_config_add lcms2
; then
5006 if test "$_lcms2" = yes; then
5007 def_lcms2
="#define CONFIG_LCMS2 1"
5009 def_lcms2
="#undef CONFIG_LCMS2"
5014 # Test with > against Libav 0.8 versions which will NOT work rather than
5015 # specify minimum version, to allow (future) point releases to possibly work.
5016 all_libav_libs
="libavutil > 51.21.0:libavcodec > 53.34.0:libavformat > 53.20.0:libswscale >= 2.0.0"
5017 echocheck
"Libav ($all_libav_libs)"
5018 if test "$ffmpeg" = auto
; then
5019 IFS
=":" # shell should not be used for programming
5020 if ! pkg_config_add
$all_libav_libs ; then
5021 die
"Unable to find development files for some of the required Libav libraries above. Aborting."
5026 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
5027 if ! test -z "$_ffmpeg_source" ; then
5028 def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
5031 echocheck
"libpostproc >= 52.0.0"
5032 if test "$libpostproc" = auto
; then
5034 if pkg_config_add
"libpostproc >= 52.0.0" ; then
5038 if test "$libpostproc" = yes ; then
5039 def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
5041 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
5043 echores
"$libpostproc"
5045 echocheck
"libavresample >= 1.0.0"
5046 if test "$libavresample" = auto
; then
5048 if pkg_config_add
"libavresample >= 1.0.0" ; then
5052 if test "$libavresample" = yes ; then
5053 def_libavresample
='#define CONFIG_LIBAVRESAMPLE 1'
5055 def_libavresample
='#undef CONFIG_LIBAVRESAMPLE'
5057 echores
"$libavresample"
5059 echocheck
"libdv-0.9.5+"
5060 if test "$_libdv" = auto
; then
5062 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
5064 if test "$_libdv" = yes ; then
5065 def_libdv
='#define CONFIG_LIBDV095 1'
5066 extra_ldflags
="$extra_ldflags -ldv"
5067 codecmodules
="libdv $codecmodules"
5069 def_libdv
='#undef CONFIG_LIBDV095'
5070 nocodecmodules
="libdv $nocodecmodules"
5076 if test "$_xvid" = auto
; then
5078 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
5079 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
5080 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
5084 if test "$_xvid" = yes ; then
5085 def_xvid
='#define CONFIG_XVID4 1'
5086 codecmodules
="xvid $codecmodules"
5088 def_xvid
='#undef CONFIG_XVID4'
5089 nocodecmodules
="xvid $nocodecmodules"
5095 if test "$_libnut" = auto
; then
5097 statement_check libnut.h
'nut_context_tt * nut; nut_error(0)' -lnut && _libnut
=yes
5100 if test "$_libnut" = yes ; then
5101 def_libnut
='#define CONFIG_LIBNUT 1'
5102 extra_ldflags
="$extra_ldflags -lnut"
5104 def_libnut
='#undef CONFIG_LIBNUT'
5109 echocheck
"UnRAR executable"
5110 if test "$_unrar_exec" = auto
; then
5112 mingw32
&& _unrar_exec
="no"
5114 if test "$_unrar_exec" = yes ; then
5115 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
5117 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
5119 echores
"$_unrar_exec"
5121 echocheck
"TV interface"
5122 if test "$_tv" = yes ; then
5123 def_tv
='#define CONFIG_TV 1'
5124 inputmodules
="tv $inputmodules"
5126 noinputmodules
="tv $noinputmodules"
5127 def_tv
='#undef CONFIG_TV'
5132 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
5133 echocheck
"*BSD BT848 bt8xx header"
5135 for file in "machine/ioctl_bt848.h" \
5136 "dev/bktr/ioctl_bt848.h" \
5137 "dev/video/bktr/ioctl_bt848.h" \
5138 "dev/ic/bt8xx.h" ; do
5140 #include <sys/types.h>
5141 #include <sys/ioctl.h>
5143 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
5147 _ioctl_bt848_h_name
="$file"
5151 if test "$_ioctl_bt848_h" = yes ; then
5152 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
5153 res_comment
="using $_ioctl_bt848_h_name"
5155 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
5157 echores
"$_ioctl_bt848_h"
5159 echocheck
"*BSD ioctl_meteor.h"
5161 for ioctl_meteor_h_path
in "machine/ioctl_meteor.h" "dev/bktr/ioctl_meteor.h" "dev/video/bktr/ioctl_meteor.h" ; do
5162 statement_check_broken
"sys/types.h" "$ioctl_meteor_h_path" 'ioctl(0, METEORSINPUT, 0)' &&
5163 _ioctl_meteor_h
=yes && break
5165 if test "$_ioctl_meteor_h" = yes ; then
5166 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$ioctl_meteor_h_path>"
5167 res_comment
="using $ioctl_meteor_h_path"
5169 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
5171 echores
"$_ioctl_meteor_h"
5173 echocheck
"*BSD BrookTree 848 TV interface"
5174 if test "$_tv_bsdbt848" = auto
; then
5176 if test "$_tv" = yes ; then
5178 #include <sys/types.h>
5179 $def_ioctl_meteor_h_name
5180 $def_ioctl_bt848_h_name
5181 #ifdef IOCTL_METEOR_H_NAME
5182 #include IOCTL_METEOR_H_NAME
5184 #ifdef IOCTL_BT848_H_NAME
5185 #include IOCTL_BT848_H_NAME
5188 ioctl(0, METEORSINPUT, 0);
5189 ioctl(0, TVTUNER_GETFREQ, 0);
5193 cc_check
&& _tv_bsdbt848
=yes
5196 if test "$_tv_bsdbt848" = yes ; then
5197 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
5198 inputmodules
="tv-bsdbt848 $inputmodules"
5200 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
5201 noinputmodules
="tv-bsdbt848 $noinputmodules"
5203 echores
"$_tv_bsdbt848"
5204 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
5207 echocheck
"DirectShow TV interface"
5208 if test "$_tv_dshow" = auto
; then
5210 if test "$_tv" = yes && win32
; then
5211 statement_check ole2.h
'void* p; CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p)' -lole32 -luuid && _tv_dshow
=yes
5214 if test "$_tv_dshow" = yes ; then
5215 inputmodules
="tv-dshow $inputmodules"
5216 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
5217 extra_ldflags
="$extra_ldflags -lole32 -luuid"
5219 noinputmodules
="tv-dshow $noinputmodules"
5220 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
5222 echores
"$_tv_dshow"
5225 echocheck
"Video 4 Linux TV interface"
5226 if test "$_tv_v4l1" = auto
; then
5228 if test "$_tv" = yes && linux
; then
5229 header_check_broken sys
/time.h linux
/videodev.h
&& _tv_v4l1
=yes
5232 if test "$_tv_v4l1" = yes ; then
5235 def_tv_v4l
='#define CONFIG_TV_V4L 1'
5236 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
5237 inputmodules
="tv-v4l $inputmodules"
5239 noinputmodules
="tv-v4l1 $noinputmodules"
5240 def_tv_v4l
='#undef CONFIG_TV_V4L'
5245 echocheck
"Video 4 Linux 2 TV interface"
5246 if test "$_tv_v4l2" = auto
; then
5248 if test "$_tv" = yes && linux
; then
5249 header_check_broken sys
/time.h linux
/videodev2.h
&& _tv_v4l2
=yes
5250 elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then
5254 if test "$_tv_v4l2" = yes ; then
5257 def_tv_v4l
='#define CONFIG_TV_V4L 1'
5258 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
5259 inputmodules
="tv-v4l2 $inputmodules"
5261 noinputmodules
="tv-v4l2 $noinputmodules"
5262 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
5267 echocheck
"Radio interface"
5268 if test "$_radio" = yes ; then
5269 def_radio
='#define CONFIG_RADIO 1'
5270 inputmodules
="radio $inputmodules"
5271 if test "$_alsa" != yes -a "$_ossaudio" != yes ; then
5274 if test "$_radio_capture" = yes ; then
5276 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
5278 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
5281 noinputmodules
="radio $noinputmodules"
5282 def_radio
='#undef CONFIG_RADIO'
5283 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
5287 echocheck
"Capture for Radio interface"
5288 echores
"$_radio_capture"
5290 echocheck
"Video 4 Linux 2 Radio interface"
5291 if test "$_radio_v4l2" = auto
; then
5293 if test "$_radio" = yes && linux
; then
5294 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
5297 if test "$_radio_v4l2" = yes ; then
5298 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
5300 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
5302 echores
"$_radio_v4l2"
5304 echocheck
"Video 4 Linux Radio interface"
5305 if test "$_radio_v4l" = auto
; then
5307 if test "$_radio" = yes && linux
; then
5308 header_check linux
/videodev.h
&& _radio_v4l
=yes
5311 if test "$_radio_v4l" = yes ; then
5312 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
5314 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
5316 echores
"$_radio_v4l"
5318 if freebsd || netbsd || openbsd || dragonfly || bsdos
&&
5319 test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
5320 echocheck
"*BSD BrookTree 848 Radio interface"
5323 #include <sys/types.h>
5324 $def_ioctl_bt848_h_name
5325 #ifdef IOCTL_BT848_H_NAME
5326 #include IOCTL_BT848_H_NAME
5328 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
5330 cc_check
&& _radio_bsdbt848
=yes
5331 echores
"$_radio_bsdbt848"
5332 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
5334 if test "$_radio_bsdbt848" = yes ; then
5335 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
5337 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
5340 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&&
5341 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
5342 die
"Radio driver requires BSD BT848, V4L or V4L2!"
5345 echocheck
"Video 4 Linux 2 MPEG PVR interface"
5346 if test "$_pvr" = auto
; then
5348 if test "$_tv_v4l2" = yes && linux
; then
5350 #include <sys/time.h>
5351 #include <linux/videodev2.h>
5352 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
5354 cc_check
&& _pvr
=yes
5357 if test "$_pvr" = yes ; then
5358 def_pvr
='#define CONFIG_PVR 1'
5359 inputmodules
="pvr $inputmodules"
5361 noinputmodules
="pvr $noinputmodules"
5362 def_pvr
='#undef CONFIG_PVR'
5368 if test "$_ftp" = "auto" ; then
5369 test "$networking" = "yes" && ! beos
&& _ftp
=yes
5371 if test "$_ftp" = yes ; then
5372 def_ftp
='#define CONFIG_FTP 1'
5373 inputmodules
="ftp $inputmodules"
5375 noinputmodules
="ftp $noinputmodules"
5376 def_ftp
='#undef CONFIG_FTP'
5380 echocheck
"vstream client"
5381 if test "$_vstream" = auto
; then
5384 #include <vstream-client.h>
5385 void vstream_error(const char *format, ... ) {}
5386 int main(void) { vstream_start(); return 0; }
5388 cc_check
-lvstream-client && _vstream
=yes
5390 if test "$_vstream" = yes ; then
5391 def_vstream
='#define CONFIG_VSTREAM 1'
5392 inputmodules
="vstream $inputmodules"
5393 extra_ldflags
="$extra_ldflags -lvstream-client"
5395 noinputmodules
="vstream $noinputmodules"
5396 def_vstream
='#undef CONFIG_VSTREAM'
5401 echocheck
"Subtitles sorting"
5402 if test "$_sortsub" = yes ; then
5403 def_sortsub
='#define CONFIG_SORTSUB 1'
5405 def_sortsub
='#undef CONFIG_SORTSUB'
5410 echocheck
"XMMS inputplugin support"
5411 if test "$_xmms" = yes ; then
5412 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
5413 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
5414 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
5416 _xmmsplugindir
=/usr
/lib
/xmms
/Input
5417 _xmmslibdir
=/usr
/lib
5420 def_xmms
='#define CONFIG_XMMS 1'
5422 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
5424 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
5427 def_xmms
='#undef CONFIG_XMMS'
5431 if test "$_charset" != "noconv" ; then
5432 def_charset
="#define MSG_CHARSET \"$_charset\""
5434 def_charset
="#undef MSG_CHARSET"
5438 #############################################################################
5440 echocheck
"automatic gdb attach"
5441 if test "$_crash_debug" = yes ; then
5442 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
5444 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
5447 echores
"$_crash_debug"
5449 echocheck
"compiler support for noexecstack"
5450 if cflag_check
-Wl,-z,noexecstack
; then
5451 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
5457 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
5458 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
5459 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
5466 # Dynamic linking flags
5467 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
5469 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
5470 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
; then
5471 _ld_dl_dynamic
='-rdynamic'
5474 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
5475 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
5476 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
5478 def_debug
='#undef MP_DEBUG'
5479 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
5482 echocheck
"joystick"
5483 def_joystick
='#undef CONFIG_JOYSTICK'
5484 if test "$_joystick" = yes ; then
5485 if linux || freebsd
; then
5486 # TODO add some check
5487 def_joystick
='#define CONFIG_JOYSTICK 1'
5490 res_comment
="unsupported under $system_name"
5493 echores
"$_joystick"
5496 if test "$_lirc" = auto
; then
5498 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
5500 if test "$_lirc" = yes ; then
5501 def_lirc
='#define CONFIG_LIRC 1'
5502 libs_mplayer
="$libs_mplayer -llirc_client"
5504 def_lirc
='#undef CONFIG_LIRC'
5509 if test "$_lircc" = auto
; then
5511 header_check lirc
/lircc.h
-llircc && _lircc
=yes
5513 if test "$_lircc" = yes ; then
5514 def_lircc
='#define CONFIG_LIRCC 1'
5515 libs_mplayer
="$libs_mplayer -llircc"
5517 def_lircc
='#undef CONFIG_LIRCC'
5521 #############################################################################
5523 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
5525 # This must be the last test to be performed. Any other tests following it
5526 # could fail due to linker errors. libdvdnavmini is intentionally not linked
5527 # against libdvdread (to permit MPlayer to use its own copy of the library).
5528 # So any compilation using the flags added here but not linking against
5529 # libdvdread can fail.
5530 echocheck
"DVD support (libdvdnav)"
5531 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
5535 if test "$_dvdnav" = auto
; then
5536 if test "$_dvdread_internal" = yes ; then
5539 res_comment
="internal"
5541 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
5544 if test "$_dvdnav" = auto
; then
5546 _dvdnavdir
=$
($_dvdnavconfig --cflags)
5547 _dvdnavlibs
=$
($_dvdnavconfig --libs)
5548 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
5550 if test "$_dvdnav" = yes ; then
5551 def_dvdnav
='#define CONFIG_DVDNAV 1'
5552 if test "$dvdnav_internal" = yes ; then
5553 cflags_libdvdnav
="-Ilibdvdnav"
5554 inputmodules
="dvdnav(internal) $inputmodules"
5556 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
5557 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
5558 inputmodules
="dvdnav $inputmodules"
5561 def_dvdnav
='#undef CONFIG_DVDNAV'
5562 noinputmodules
="dvdnav $noinputmodules"
5566 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
5567 # Read dvdnav comment above.
5570 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
5571 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
5573 for part
in $list; do
5574 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
5575 echo "${nprefix}_$part = yes"
5580 #############################################################################
5581 echo "Creating config.mak"
5582 cat > config.mak
<< EOF
5583 # -------- Generated by configure -----------
5585 # Ensure that locale settings do not interfere with shell commands.
5588 CONFIGURATION = $configuration
5591 DOC_LANGS = $language_doc
5592 DOC_LANG_ALL = $doc_lang_all
5593 MAN_LANGS = $language_man
5594 MAN_LANG_ALL = $man_lang_all
5595 MSG_LANGS = $language_msg
5596 MSG_LANG_ALL = $msg_lang_all
5598 prefix = \$(DESTDIR)$_prefix
5599 BINDIR = \$(DESTDIR)$_bindir
5600 DATADIR = \$(DESTDIR)$_datadir
5601 LIBDIR = \$(DESTDIR)$_libdir
5602 MANDIR = \$(DESTDIR)$_mandir
5603 CONFDIR = \$(DESTDIR)$_confdir
5604 LOCALEDIR = \$(DESTDIR)$_localedir
5610 INSTALLSTRIP = $_install_strip
5613 CFLAGS = $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
5614 DEPFLAGS = $DEPFLAGS
5616 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
5617 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
5618 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
5619 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
5620 CFLAGS_STACKREALIGN = $cflags_stackrealign
5622 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
5623 EXTRALIBS_MPLAYER = $libs_mplayer
5633 $(mak_enable "$arch_all" "$arch" ARCH)
5634 $(mak_enable "$subarch_all" "$subarch" ARCH)
5635 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
5637 NEED_GETTIMEOFDAY = $need_gettimeofday
5638 NEED_GLOB = $need_glob
5639 NEED_SETENV = $need_setenv
5640 NEED_SHMEM = $need_shmem
5641 NEED_STRSEP = $need_strsep
5642 NEED_SWAB = $need_swab
5643 NEED_VSSCANF = $need_vsscanf
5647 APPLE_IR = $_apple_ir
5648 APPLE_REMOTE = $_apple_remote
5649 AUDIO_INPUT = $_audio_input
5654 COREAUDIO = $_coreaudio
5655 COREVIDEO = $_corevideo
5656 SHAREDBUFFER = $_sharedbuffer
5657 DIRECT3D = $_direct3d
5658 DIRECTFB = $_directfb
5662 DVDNAV_INTERNAL = $dvdnav_internal
5664 DVDREAD_INTERNAL = $_dvdread_internal
5667 FASTMEMCPY = $_fastmemcpy
5671 GL_COCOA = $_gl_cocoa
5672 GL_WIN32 = $_gl_win32
5675 HAVE_POSIX_SELECT = $_posix_select
5676 HAVE_SYS_MMAN_H = $_mman
5678 JOYSTICK = $_joystick
5683 LIBBLURAY = $_bluray
5687 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
5691 LIBPOSTPROC = $libpostproc
5692 LIBAVRESAMPLE = $libavresample
5693 LIBSMBCLIENT = $_smb
5695 LIBTHEORA = $_theora
5697 MACOSX_FINDER = $_macosx_finder
5701 MUSEPACK = $_musepack
5702 NETWORKING = $networking
5705 PE_EXECUTABLE = $_pe_executable
5708 PRIORITY = $_priority
5710 PORTAUDIO = $_portaudio
5713 QTX_CODECS_WIN32 = $_qtx_codecs_win32
5714 QTX_EMULATION = $_qtx_emulation
5716 RADIO_CAPTURE=$_radio_capture
5717 REAL_CODECS = $_real
5721 STREAM_CACHE = $_stream_cache
5724 TV_BSDBT848 = $_tv_bsdbt848
5725 TV_DSHOW = $_tv_dshow
5729 UNRAR_EXEC = $_unrar_exec
5735 WIN32DLL = $_win32dll
5736 WIN32_EMULATION = $_win32_emulation
5738 XANIM_CODECS = $_xanim
5739 XMMS_PLUGINS = $_xmms
5742 YUV4MPEG = $_yuv4mpeg
5745 FFMPEG_INTERNALS = $ffmpeg_internals
5746 FFMPEG_SOURCE_PATH = $_ffmpeg_source
5750 YASMFLAGS = $YASMFLAGS
5752 CONFIG_VDPAU = $_vdpau
5753 CONFIG_ZLIB = $_zlib
5755 HAVE_PTHREADS = $_pthreads
5757 HAVE_W32THREADS = $_w32threads
5758 HAVE_YASM = $have_yasm
5762 #############################################################################
5764 ff_config_enable
() {
5765 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
5766 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
5768 test -z "$_nprefix" && _nprefix
='CONFIG'
5769 for part
in $list; do
5770 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
5771 echo "#define ${_nprefix}_$part 1"
5773 echo "#define ${_nprefix}_$part 0"
5778 echo "Creating config.h"
5780 /*----------------------------------------------------------------------------
5781 ** This file has been automatically generated by configure any changes in it
5782 ** will be lost when you run configure again.
5783 ** Instead of modifying definitions here, use the --enable/--disable options
5784 ** of the configure script! See ./configure --help for details.
5785 *---------------------------------------------------------------------------*/
5787 #ifndef MPLAYER_CONFIG_H
5788 #define MPLAYER_CONFIG_H
5790 #define CONFIGURATION "$configuration"
5792 #define MPLAYER_DATADIR "$_datadir"
5793 #define MPLAYER_CONFDIR "$_confdir"
5794 #define MPLAYER_LOCALEDIR "$_localedir"
5798 /* definitions needed by included libraries */
5799 #define HAVE_INTTYPES_H 1
5801 #define HAVE_ERRNO_H 1
5802 /* libdvdcss + libdvdread */
5803 #define HAVE_LIMITS_H 1
5805 #define HAVE_UNISTD_H 1
5807 #define STDC_HEADERS 1
5808 #define HAVE_MEMCPY 1
5810 #define READ_CACHE_TRACE 0
5812 #define HAVE_DLFCN_H 1
5816 /* system headers */
5821 $def_mman_has_map_failed
5823 $def_sys_soundcard_h
5831 /* system functions */
5854 /* system-specific features */
5867 $def_restrict_keyword
5872 /* configurable options */
5877 $def_runtime_cpudetection
5885 #define __CPU__ $iproc
5889 $(ff_config_enable "$arch_all" "$arch" "ARCH")
5890 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
5891 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
5894 /* Blu-ray/DVD/VCD/CD */
5895 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
5896 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
5916 /* codec libraries */
5944 #define BINARY_CODECS_PATH "$_codecsdir"
5945 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
5948 /* Audio output drivers */
5956 $def_ossaudio_devdsp
5957 $def_ossaudio_devmixer
5969 $def_ioctl_bt848_h_name
5970 $def_ioctl_meteor_h_name
6045 $def_ffmpeg_internals
6069 #define HAVE_INLINE_ASM 1
6071 /* Use these registers in x86 inline asm. No proper detection yet. */
6072 #define HAVE_EBP_AVAILABLE 1
6074 #endif /* MPLAYER_CONFIG_H */
6077 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
6078 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
6080 #############################################################################
6084 Config files successfully generated by ./configure $configuration !
6086 Install prefix: $_prefix
6087 Data directory: $_datadir
6088 Config direct.: $_confdir
6090 Byte order: $_byte_order
6091 Optimizing for: $_optimizing
6094 Messages (in addition to English): $language_msg
6095 Manual pages: $language_man
6096 Documentation: $language_doc
6098 Enabled optional drivers:
6099 Input: $inputmodules
6100 Codecs: $codecmodules
6101 Audio output: $aomodules
6102 Video output: $vomodules
6104 Disabled optional drivers:
6105 Input: $noinputmodules
6106 Codecs: $nocodecmodules
6107 Audio output: $noaomodules
6108 Video output: $novomodules
6110 'config.h' and 'config.mak' contain your configuration options.
6111 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
6112 compile *** DO NOT REPORT BUGS if you tweak these files ***
6114 'make' will now compile MPlayer and 'make install' will install it.
6115 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
6121 Check $TMPLOG if you wonder why an autodetection failed (make sure
6122 development headers/packages are installed).
6124 NOTE: The --enable-* parameters unconditionally force options on, completely
6125 skipping autodetection. This behavior is unlike what you may be used to from
6126 autoconf-based configure scripts that can decide to override you. This greater
6127 level of control comes at a price. You may have to provide the correct compiler
6128 and linker flags yourself.
6129 If you used one of these options (except --enable-runtime-cpudetection and
6130 similar ones that turn on internal features) and experience a compilation or
6131 linking failure, make sure you have passed the necessary compiler/linker flags
6134 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
6138 if test "$warn_cflags" = yes; then
6141 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
6144 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
6146 It is strongly recommended to let MPlayer choose the correct CFLAGS!
6147 To do so, execute 'CFLAGS= ./configure <options>'
6153 rm -rf "$mplayer_tmpdir"