3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: Check the Subversion log.
8 # Cleanups all over the place (c) 2001 pl
11 # This configure script is *not* autoconf-based and has different semantics.
12 # It attempts to autodetect all settings and options where possible. It is
13 # possible to override autodetection with the --enable-option/--disable-option
14 # command line parameters. --enable-option forces the option on skipping
15 # autodetection. Yes, this means that compilation may fail and yes, this is not
16 # how autoconf-based configure scripts behave.
18 # configure generates a series of configuration files:
19 # - config.h contains #defines that are used in the C code.
20 # - config.mak is included from the Makefiles.
22 # If you want to add a new check for $feature, look at the existing checks
23 # and try to use helper functions where you can.
25 # Furthermore you need to add the variable _feature to the list of default
26 # settings and set it to one of yes/no/auto. Also add appropriate
27 # --enable-feature/--disable-feature command line options.
28 # The results of the check should be written to config.h and config.mak
29 # at the end of this script. The variable names used for this should be
30 # uniform, i.e. if the option is named 'feature':
32 # _feature : should have a value of yes/no/auto
33 # def_feature : '#define ... 1' or '#undef ...' for conditional compilation
34 # _ld_feature : '-L/path/dir -lfeature' GCC options
36 #############################################################################
38 # Prevent locale nonsense from breaking basic text processing utils
41 # Store the configure line that was used
44 # Prefer these macros to full length text !
45 # These macros only return an error code - NO display is done
50 cat "$source" >> "$TMPLOG"
52 echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o $TMPEXE $@" >> "$TMPLOG"
54 $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
62 compile_check
$TMPC $@
66 compile_check
$TMPCPP $@
-lstdc++
71 int main(void) { return 0; }
73 compile_check
$TMPC $@
79 int main(void) { return 0; }
82 compile_check
$TMPC $@
88 int main(void) { return $2; }
91 compile_check
$TMPC $@
97 int main(void) { $2; return 0; }
101 compile_check
$TMPC $@
104 define_statement_check
() {
108 int main(void) { $3; return 0; }
111 compile_check
$TMPC $@
114 return_statement_check
() {
117 int main(void) { $2; return $3; }
120 compile_check
$TMPC $@
125 int main(void) { __asm__ volatile ($1); return 0; }
128 compile_check
$TMPC $@
131 # The following checks are special and should only be used with broken and
132 # non-selfsufficient headers that do not include all of their dependencies.
134 header_check_broken
() {
138 int main(void) { return 0; }
142 compile_check
$TMPC $@
145 statement_check_broken
() {
149 int main(void) { $3; return 0; }
152 compile_check
$TMPC $@
157 cat "$TMPS" >> "$TMPLOG"
159 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
161 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
169 unset IFS
# shell should not be used for programming
171 echo "$_pkg_config --cflags $@" >> "$TMPLOG"
172 ctmp
=$
($_pkg_config --cflags "$@" 2>> "$TMPLOG") ||
return $?
174 echo "$_pkg_config --libs $@" >> "$TMPLOG"
175 ltmp
=$
($_pkg_config --libs "$@" 2>> "$TMPLOG") ||
return $?
177 echo "cflags: $ctmp" >> "$TMPLOG"
178 echo "libs: $ltmp" >> "$TMPLOG"
180 extra_cflags
="$extra_cflags $ctmp"
181 extra_ldflags
="$extra_ldflags $ltmp"
185 "$TMPEXE" >> "$TMPLOG" 2>&1
188 # Display error message, flushes tempfile, exit
193 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
194 echo "Check \"$TMPLOG\" if you do not understand why it failed."
198 # OS test booleans functions
200 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
202 aix
() { issystem
"AIX"; }
203 amigaos
() { issystem
"AmigaOS"; }
204 beos
() { issystem
"BEOS"; }
205 bsdos
() { issystem
"BSD/OS"; }
206 cygwin
() { issystem
"CYGWIN"; }
207 darwin
() { issystem
"Darwin"; }
208 dragonfly
() { issystem
"DragonFly"; }
209 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
210 gnu
() { issystem
"GNU"; }
211 hpux
() { issystem
"HP-UX"; }
212 irix
() { issystem
"IRIX"; }
213 linux
() { issystem
"Linux"; }
214 mingw32
() { issystem
"MINGW32"; }
215 morphos
() { issystem
"MorphOS"; }
216 netbsd
() { issystem
"NetBSD"; }
217 openbsd
() { issystem
"OpenBSD"; }
218 qnx
() { issystem
"QNX"; }
219 sunos
() { issystem
"SunOS"; }
220 win32
() { cygwin || mingw32
; }
222 # arch test boolean functions
223 # x86/x86pc is used by QNX
226 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
233 x86_64|amd64
) return 0 ;;
244 ppc|ppc64|powerpc|powerpc64
) return 0;;
263 # Use this before starting a check
265 echo "============ Checking for $@ ============" >> "$TMPLOG"
266 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
269 # Use this to echo the results of a check
271 if test "$res_comment" ; then
272 res_comment
="($res_comment)"
274 echo "Result is: $@ $res_comment" >> "$TMPLOG"
275 echo "##########################################" >> "$TMPLOG"
277 echo "$@ $res_comment"
280 #############################################################################
282 # Check how echo works in this /bin/sh
284 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
285 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
289 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
290 man_lang_all
=$
(echo DOCS
/man
/??
/mplayer
.1 DOCS
/man
/??_??
/mplayer
.1 |
sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g")
291 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
295 Usage: $0 [OPTIONS]...
298 -h, --help display this help and exit
300 Installation directories:
301 --prefix=DIR prefix directory for installation [/usr/local]
302 --bindir=DIR directory for installing binaries [PREFIX/bin]
303 --datadir=DIR directory for installing machine independent
304 data files (skins, etc) [PREFIX/share/mplayer]
305 --mandir=DIR directory for installing man pages [PREFIX/share/man]
306 --confdir=DIR directory for installing configuration files
308 --localedir=DIR directory for locale tree [PREFIX/share/locale]
309 --libdir=DIR directory for object code libraries [PREFIX/lib]
310 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
313 --disable-mplayer disable MPlayer compilation [enable]
314 --enable-termcap use termcap database for key codes [autodetect]
315 --enable-termios use termios database for key codes [autodetect]
316 --disable-iconv disable iconv for encoding conversion [autodetect]
317 --disable-langinfo do not use langinfo [autodetect]
318 --enable-lirc enable LIRC (remote control) support [autodetect]
319 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
320 --enable-joystick enable joystick support [disable]
321 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
322 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
323 --disable-vm disable X video mode extensions [autodetect]
324 --disable-xf86keysym disable support for multimedia keys [autodetect]
325 --enable-radio enable radio interface [disable]
326 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
327 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
328 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
329 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
330 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
331 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
332 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
333 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
334 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
335 --disable-networking disable networking [enable]
336 --enable-winsock2_h enable winsock2_h [autodetect]
337 --enable-smb enable Samba (SMB) input [autodetect]
338 --enable-live enable LIVE555 Streaming Media [disable]
339 --enable-nemesi enable Nemesi Streaming Media [autodetect]
340 --disable-vcd disable VCD support [autodetect]
341 --disable-bluray disable Blu-ray support [autodetect]
342 --disable-dvdnav disable libdvdnav [autodetect]
343 --disable-dvdread disable libdvdread [autodetect]
344 --disable-dvdread-internal disable internal libdvdread [autodetect]
345 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
346 --disable-cdparanoia disable cdparanoia [autodetect]
347 --disable-cddb disable cddb [autodetect]
348 --disable-bitmap-font disable bitmap font support [enable]
349 --disable-freetype disable FreeType 2 font rendering [autodetect]
350 --disable-fontconfig disable fontconfig font lookup [autodetect]
351 --disable-unrarexec disable using of UnRAR executable [enabled]
352 --disable-sortsub disable subtitle sorting [enabled]
353 --enable-fribidi enable the FriBiDi libs [autodetect]
354 --disable-enca disable ENCA charset oracle library [autodetect]
355 --enable-macosx-finder enable Mac OS X Finder invocation parameter
357 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
358 --disable-inet6 disable IPv6 support [autodetect]
359 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
360 --disable-ftp disable FTP support [enabled]
361 --disable-vstream disable TiVo vstream client support [autodetect]
362 --disable-pthreads disable Posix threads support [autodetect]
363 --disable-w32threads disable Win32 threads support [autodetect]
364 --disable-libass disable subtitle rendering with libass [autodetect]
365 --enable-rpath enable runtime linker path for extra libs [disabled]
366 --disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
369 --enable-gif enable GIF support [autodetect]
370 --enable-png enable PNG input/output support [autodetect]
371 --enable-mng enable MNG input support [autodetect]
372 --enable-jpeg enable JPEG input/output support [autodetect]
373 --enable-libcdio enable libcdio support [autodetect]
374 --disable-win32dll disable Win32 DLL support [autodetect]
375 --disable-qtx disable QuickTime codecs support [enabled]
376 --disable-xanim disable XAnim codecs support [enabled]
377 --disable-real disable RealPlayer codecs support [enabled]
378 --disable-xvid disable Xvid [autodetect]
379 --disable-libnut disable libnut [autodetect]
380 --enable-libav skip Libav autodetection [autodetect]
381 --disable-libvorbis disable libvorbis support [autodetect]
382 --disable-tremor disable Tremor [autodetect if no libvorbis]
383 --disable-speex disable Speex support [autodetect]
384 --enable-theora enable OggTheora libraries [autodetect]
385 --enable-faad enable FAAD2 (AAC) [autodetect]
386 --disable-ladspa disable LADSPA plugin support [autodetect]
387 --disable-libbs2b disable libbs2b audio filter support [autodetect]
388 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
389 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
390 --disable-mad disable libmad (MPEG audio) support [autodetect]
391 --enable-xmms enable XMMS input plugin support [disabled]
392 --enable-libdca enable libdca support [autodetect]
393 --disable-liba52 disable liba52 [autodetect]
394 --enable-musepack enable libmpcdec support (deprecated, libavcodec
395 Musepack decoder is preferred) [disabled]
398 --enable-gl enable OpenGL video output [autodetect]
399 --enable-dga2 enable DGA 2 support [autodetect]
400 --enable-dga1 enable DGA 1 support [autodetect]
401 --enable-vesa enable VESA video output [autodetect]
402 --enable-svga enable SVGAlib video output [autodetect]
403 --enable-sdl enable SDL video output [autodetect]
404 --enable-aa enable AAlib video output [autodetect]
405 --enable-caca enable CACA video output [autodetect]
406 --enable-ggi enable GGI video output [autodetect]
407 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
408 --enable-direct3d enable Direct3D video output [autodetect]
409 --enable-directx enable DirectX video output [autodetect]
410 --enable-dxr3 enable DXR3/H+ video output [autodetect]
411 --enable-ivtv enable IVTV TV-Out video output [autodetect]
412 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
413 --enable-dvb enable DVB video output [autodetect]
414 --enable-mga enable mga_vid video output [autodetect]
415 --enable-xmga enable mga_vid X11 video output [autodetect]
416 --enable-xv enable Xv video output [autodetect]
417 --enable-vdpau enable VDPAU acceleration [autodetect]
418 --enable-vm enable XF86VidMode support [autodetect]
419 --enable-xinerama enable Xinerama support [autodetect]
420 --enable-x11 enable X11 video output [autodetect]
421 --enable-xshape enable XShape support [autodetect]
422 --disable-xss disable screensaver support via xss [autodetect]
423 --enable-fbdev enable FBDev video output [autodetect]
424 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
425 --enable-tdfxfb enable tdfxfb video output [disable]
426 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
427 --enable-wii enable Nintendo Wii/GameCube video output [disable]
428 --enable-directfb enable DirectFB video output [autodetect]
429 --enable-bl enable Blinkenlights video output [disable]
430 --enable-tdfxvid enable tdfx_vid video output [disable]
431 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
432 --disable-tga disable Targa video output [enable]
433 --disable-pnm disable PNM video output [enable]
434 --disable-md5sum disable md5sum video output [enable]
435 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
436 --disable-corevideo disable CoreVideo video output [autodetect]
437 --disable-cocoa disable Cocoa OpenGL backend [autodetect]
438 --disable-sharedbuffer disable OSX shared buffer video output [autodetect]
441 --disable-alsa disable ALSA audio output [autodetect]
442 --disable-ossaudio disable OSS audio output [autodetect]
443 --disable-arts disable aRts audio output [autodetect]
444 --disable-esd disable esd audio output [autodetect]
445 --disable-rsound disable RSound audio output [autodetect]
446 --disable-pulse disable Pulseaudio audio output [autodetect]
447 --disable-jack disable JACK audio output [autodetect]
448 --enable-openal enable OpenAL audio output [disable]
449 --disable-nas disable NAS audio output [autodetect]
450 --disable-sgiaudio disable SGI audio output [autodetect]
451 --disable-sunaudio disable Sun audio output [autodetect]
452 --disable-win32waveout disable Windows waveout audio output [autodetect]
453 --disable-coreaudio disable CoreAudio audio output [autodetect]
454 --disable-select disable using select() on the audio device [enable]
457 --enable-translation enable support for translated output [disable]
458 --charset=charset convert the console messages to this character set
459 --language-doc=lang language to use for the documentation [en]
460 --language-man=lang language to use for the man pages [en]
461 --language-msg=lang extra languages for program messages [all]
462 --language=lang default language to use [en]
463 Specific options override --language. You can pass a list of languages separated
464 by whitespace or commas instead of a single language. Nonexisting translations
465 will be dropped from each list. All translations available in the list will be
466 installed. The value "all" will activate all translations. The LINGUAS
467 environment variable is honored. In all cases the fallback is English.
468 The program always supports English-language output; additional message
469 languages are only installed if --enable-translation is also specified.
470 Available values for --language-doc are: all $doc_lang_all
471 Available values for --language-man are: all $man_lang_all
472 Available values for --language-msg are: all $msg_lang_all
474 Miscellaneous options:
475 --enable-runtime-cpudetection enable runtime CPU detection [disable]
476 --enable-cross-compile enable cross-compilation [disable]
477 --cc=COMPILER C compiler to build MPlayer [gcc]
478 --host-cc=COMPILER C compiler for tools needed while building [gcc]
479 --as=ASSEMBLER assembler to build MPlayer [as]
480 --nm=NM nm tool to build MPlayer [nm]
481 --yasm=YASM Yasm assembler to build MPlayer [yasm]
482 --ar=AR librarian to build MPlayer [ar]
483 --pkg-config=PKGCONFIG pkg-config to find some libraries [pkg-config]
484 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
485 --windres=WINDRES windres to build MPlayer [windres]
486 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
487 --enable-static build a statically linked binary
488 --with-install=PATH path to a custom install program
491 --enable-mmx enable MMX [autodetect]
492 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
493 --enable-3dnow enable 3DNow! [autodetect]
494 --enable-3dnowext enable extended 3DNow! [autodetect]
495 --enable-sse enable SSE [autodetect]
496 --enable-sse2 enable SSE2 [autodetect]
497 --enable-ssse3 enable SSSE3 [autodetect]
498 --enable-shm enable shm [autodetect]
499 --enable-altivec enable AltiVec (PowerPC) [autodetect]
500 --enable-armv5te enable DSP extensions (ARM) [autodetect]
501 --enable-armv6 enable ARMv6 (ARM) [autodetect]
502 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
503 --enable-armvfp enable ARM VFP (ARM) [autodetect]
504 --enable-neon enable NEON (ARM) [autodetect]
505 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
506 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
507 --enable-big-endian force byte order to big-endian [autodetect]
508 --enable-debug[=1-3] compile-in debugging information [disable]
509 --enable-profile compile-in profiling information [disable]
510 --disable-sighandler disable sighandler for crashes [enable]
511 --enable-crash-debug enable automatic gdb attach on crash [disable]
513 Use these options if autodetection fails:
514 --extra-cflags=FLAGS extra CFLAGS
515 --extra-ldflags=FLAGS extra LDFLAGS
516 --extra-libs=FLAGS extra linker flags
517 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
519 --with-sdl-config=PATH path to sdl*-config
520 --with-dvdnav-config=PATH path to dvdnav-config
521 --with-dvdread-config=PATH path to dvdread-config
523 This configure script is NOT autoconf-based, even though its output is similar.
524 It will try to autodetect all configuration options. If you --enable an option
525 it will be forcefully turned on, skipping autodetection. This can break
526 compilation, so you need to know what you are doing.
531 # GOTCHA: the variables below defines the default behavior for autodetection
532 # and have - unless stated otherwise - at least 2 states : yes no
533 # If autodetection is available then the third state is: auto
557 test "$CC" && _cc
="$CC"
561 _runtime_cpudetection
=no
624 _dvdnavconfig
=dvdnav-config
625 _dvdreadconfig
=dvdread-config
627 _dvdread_internal
=auto
628 _libdvdcss_internal
=auto
715 def_dos_paths
="#define HAVE_DOS_PATHS 0"
716 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
717 def_priority
="#undef CONFIG_PRIORITY"
718 def_pthread_cache
="#undef PTHREAD_CACHE"
726 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
729 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
732 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
735 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
738 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
741 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
744 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
747 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
751 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
755 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
757 --with-dvdnav-config=*)
758 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
760 --with-dvdread-config=*)
761 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
765 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
768 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
771 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
773 --extra-libs-mplayer=*)
774 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
778 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
781 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
784 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
787 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
790 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
793 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
796 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
799 _pkg_config
=$
(echo $ac_option | cut
-d '=' -f 2)
802 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
805 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
808 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
811 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
814 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
817 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
820 language
=$
(echo $ac_option | cut
-d '=' -f 2)
839 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
844 --enable-translation) _translation
=yes ;;
845 --disable-translation) _translation
=no
;;
846 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
847 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
848 --enable-cross-compile) _cross_compile
=yes ;;
849 --disable-cross-compile) _cross_compile
=no
;;
850 --enable-mplayer) _mplayer
=yes ;;
851 --disable-mplayer) _mplayer
=no
;;
852 --enable-x11) _x11
=yes ;;
853 --disable-x11) _x11
=no
;;
854 --enable-xshape) _xshape
=yes ;;
855 --disable-xshape) _xshape
=no
;;
856 --enable-xss) _xss
=yes ;;
857 --disable-xss) _xss
=no
;;
858 --enable-xv) _xv
=yes ;;
859 --disable-xv) _xv
=no
;;
860 --enable-vdpau) _vdpau
=yes ;;
861 --disable-vdpau) _vdpau
=no
;;
862 --enable-sdl) _sdl
=yes ;;
863 --disable-sdl) _sdl
=no
;;
864 --enable-direct3d) _direct3d
=yes ;;
865 --disable-direct3d) _direct3d
=no
;;
866 --enable-directx) _directx
=yes ;;
867 --disable-directx) _directx
=no
;;
868 --enable-win32waveout) _win32waveout
=yes ;;
869 --disable-win32waveout) _win32waveout
=no
;;
870 --enable-nas) _nas
=yes ;;
871 --disable-nas) _nas
=no
;;
872 --enable-png) _png
=yes ;;
873 --disable-png) _png
=no
;;
874 --enable-mng) _mng
=yes ;;
875 --disable-mng) _mng
=no
;;
876 --enable-jpeg) _jpeg
=yes ;;
877 --disable-jpeg) _jpeg
=no
;;
878 --enable-pnm) _pnm
=yes ;;
879 --disable-pnm) _pnm
=no
;;
880 --enable-md5sum) _md5sum
=yes ;;
881 --disable-md5sum) _md5sum
=no
;;
882 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
883 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
884 --enable-gif) _gif
=yes ;;
885 --disable-gif) _gif
=no
;;
886 --enable-gl) _gl
=yes ;;
887 --disable-gl) _gl
=no
;;
888 --enable-ggi) _ggi
=yes ;;
889 --disable-ggi) _ggi
=no
;;
890 --enable-ggiwmh) _ggiwmh
=yes ;;
891 --disable-ggiwmh) _ggiwmh
=no
;;
892 --enable-aa) _aa
=yes ;;
893 --disable-aa) _aa
=no
;;
894 --enable-caca) _caca
=yes ;;
895 --disable-caca) _caca
=no
;;
896 --enable-svga) _svga
=yes ;;
897 --disable-svga) _svga
=no
;;
898 --enable-vesa) _vesa
=yes ;;
899 --disable-vesa) _vesa
=no
;;
900 --enable-fbdev) _fbdev
=yes ;;
901 --disable-fbdev) _fbdev
=no
;;
902 --enable-dvb) _dvb
=yes ;;
903 --disable-dvb) _dvb
=no
;;
904 --enable-dxr3) _dxr3
=yes ;;
905 --disable-dxr3) _dxr3
=no
;;
906 --enable-ivtv) _ivtv
=yes ;;
907 --disable-ivtv) _ivtv
=no
;;
908 --enable-v4l2) _v4l2
=yes ;;
909 --disable-v4l2) _v4l2
=no
;;
910 --enable-iconv) _iconv
=yes ;;
911 --disable-iconv) _iconv
=no
;;
912 --enable-langinfo) _langinfo
=yes ;;
913 --disable-langinfo) _langinfo
=no
;;
914 --enable-rtc) _rtc
=yes ;;
915 --disable-rtc) _rtc
=no
;;
916 --enable-libdv) _libdv
=yes ;;
917 --disable-libdv) _libdv
=no
;;
918 --enable-ossaudio) _ossaudio
=yes ;;
919 --disable-ossaudio) _ossaudio
=no
;;
920 --enable-arts) _arts
=yes ;;
921 --disable-arts) _arts
=no
;;
922 --enable-esd) _esd
=yes ;;
923 --disable-esd) _esd
=no
;;
924 --enable-rsound) _rsound
=yes ;;
925 --disable-rsound) _rsound
=no
;;
926 --enable-pulse) _pulse
=yes ;;
927 --disable-pulse) _pulse
=no
;;
928 --enable-jack) _jack
=yes ;;
929 --disable-jack) _jack
=no
;;
930 --enable-openal) _openal
=yes ;;
931 --disable-openal) _openal
=no
;;
932 --enable-mad) _mad
=yes ;;
933 --disable-mad) _mad
=no
;;
934 --enable-libcdio) _libcdio
=yes ;;
935 --disable-libcdio) _libcdio
=no
;;
936 --enable-libvorbis) _libvorbis
=yes ;;
937 --disable-libvorbis) _libvorbis
=no
;;
938 --enable-speex) _speex
=yes ;;
939 --disable-speex) _speex
=no
;;
940 --enable-tremor) _tremor
=yes ;;
941 --disable-tremor) _tremor
=no
;;
942 --enable-theora) _theora
=yes ;;
943 --disable-theora) _theora
=no
;;
944 --enable-mpg123) _mpg123
=yes ;;
945 --disable-mpg123) _mpg123
=no
;;
946 --enable-liba52) _liba52
=yes ;;
947 --disable-liba52) _liba52
=no
;;
948 --enable-libdca) _libdca
=yes ;;
949 --disable-libdca) _libdca
=no
;;
950 --enable-musepack) _musepack
=yes ;;
951 --disable-musepack) _musepack
=no
;;
952 --enable-faad) _faad
=yes ;;
953 --disable-faad) _faad
=no
;;
954 --enable-ladspa) _ladspa
=yes ;;
955 --disable-ladspa) _ladspa
=no
;;
956 --enable-libbs2b) _libbs2b
=yes ;;
957 --disable-libbs2b) _libbs2b
=no
;;
958 --enable-xmms) _xmms
=yes ;;
959 --disable-xmms) _xmms
=no
;;
960 --enable-vcd) _vcd
=yes ;;
961 --disable-vcd) _vcd
=no
;;
962 --enable-bluray) _bluray
=yes ;;
963 --disable-bluray) _bluray
=no
;;
964 --enable-dvdread) _dvdread
=yes ;;
965 --disable-dvdread) _dvdread
=no
;;
966 --enable-dvdread-internal) _dvdread_internal
=yes ;;
967 --disable-dvdread-internal) _dvdread_internal
=no
;;
968 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
969 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
970 --enable-dvdnav) _dvdnav
=yes ;;
971 --disable-dvdnav) _dvdnav
=no
;;
972 --enable-xanim) _xanim
=yes ;;
973 --disable-xanim) _xanim
=no
;;
974 --enable-real) _real
=yes ;;
975 --disable-real) _real
=no
;;
976 --enable-live) _live
=yes ;;
977 --disable-live) _live
=no
;;
978 --enable-nemesi) _nemesi
=yes ;;
979 --disable-nemesi) _nemesi
=no
;;
980 --enable-xinerama) _xinerama
=yes ;;
981 --disable-xinerama) _xinerama
=no
;;
982 --enable-mga) _mga
=yes ;;
983 --disable-mga) _mga
=no
;;
984 --enable-xmga) _xmga
=yes ;;
985 --disable-xmga) _xmga
=no
;;
986 --enable-vm) _vm
=yes ;;
987 --disable-vm) _vm
=no
;;
988 --enable-xf86keysym) _xf86keysym
=yes ;;
989 --disable-xf86keysym) _xf86keysym
=no
;;
990 --enable-sunaudio) _sunaudio
=yes ;;
991 --disable-sunaudio) _sunaudio
=no
;;
992 --enable-sgiaudio) _sgiaudio
=yes ;;
993 --disable-sgiaudio) _sgiaudio
=no
;;
994 --enable-alsa) _alsa
=yes ;;
995 --disable-alsa) _alsa
=no
;;
996 --enable-tv) _tv
=yes ;;
997 --disable-tv) _tv
=no
;;
998 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
999 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1000 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1001 --disable-tv-v4l1) _tv_v4l1
=no
;;
1002 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1003 --disable-tv-v4l2) _tv_v4l2
=no
;;
1004 --enable-tv-dshow) _tv_dshow
=yes ;;
1005 --disable-tv-dshow) _tv_dshow
=no
;;
1006 --enable-radio) _radio
=yes ;;
1007 --enable-radio-capture) _radio_capture
=yes ;;
1008 --disable-radio-capture) _radio_capture
=no
;;
1009 --disable-radio) _radio
=no
;;
1010 --enable-radio-v4l) _radio_v4l
=yes ;;
1011 --disable-radio-v4l) _radio_v4l
=no
;;
1012 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1013 --disable-radio-v4l2) _radio_v4l2
=no
;;
1014 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1015 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1016 --enable-pvr) _pvr
=yes ;;
1017 --disable-pvr) _pvr
=no
;;
1018 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1019 --disable-fastmemcpy) _fastmemcpy
=no
;;
1020 --enable-networking) networking
=yes ;;
1021 --disable-networking) networking
=no
;;
1022 --enable-winsock2_h) _winsock2_h
=yes ;;
1023 --disable-winsock2_h) _winsock2_h
=no
;;
1024 --enable-smb) _smb
=yes ;;
1025 --disable-smb) _smb
=no
;;
1026 --enable-joystick) _joystick
=yes ;;
1027 --disable-joystick) _joystick
=no
;;
1028 --enable-xvid) _xvid
=yes ;;
1029 --disable-xvid) _xvid
=no
;;
1030 --enable-libnut) _libnut
=yes ;;
1031 --disable-libnut) _libnut
=no
;;
1032 --enable-libav) ffmpeg
=yes ;;
1033 --ffmpeg-source-dir=*)
1034 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1036 --enable-lirc) _lirc
=yes ;;
1037 --disable-lirc) _lirc
=no
;;
1038 --enable-lircc) _lircc
=yes ;;
1039 --disable-lircc) _lircc
=no
;;
1040 --enable-apple-remote) _apple_remote
=yes ;;
1041 --disable-apple-remote) _apple_remote
=no
;;
1042 --enable-apple-ir) _apple_ir
=yes ;;
1043 --disable-apple-ir) _apple_ir
=no
;;
1044 --enable-termcap) _termcap
=yes ;;
1045 --disable-termcap) _termcap
=no
;;
1046 --enable-termios) _termios
=yes ;;
1047 --disable-termios) _termios
=no
;;
1048 --enable-3dfx) _3dfx
=yes ;;
1049 --disable-3dfx) _3dfx
=no
;;
1050 --enable-s3fb) _s3fb
=yes ;;
1051 --disable-s3fb) _s3fb
=no
;;
1052 --enable-wii) _wii
=yes ;;
1053 --disable-wii) _wii
=no
;;
1054 --enable-tdfxfb) _tdfxfb
=yes ;;
1055 --disable-tdfxfb) _tdfxfb
=no
;;
1056 --disable-tdfxvid) _tdfxvid
=no
;;
1057 --enable-tdfxvid) _tdfxvid
=yes ;;
1058 --disable-xvr100) _xvr100
=no
;;
1059 --enable-xvr100) _xvr100
=yes ;;
1060 --disable-tga) _tga
=no
;;
1061 --enable-tga) _tga
=yes ;;
1062 --enable-directfb) _directfb
=yes ;;
1063 --disable-directfb) _directfb
=no
;;
1064 --enable-bl) _bl
=yes ;;
1065 --disable-bl) _bl
=no
;;
1066 --enable-shm) _shm
=yes ;;
1067 --disable-shm) _shm
=no
;;
1068 --enable-select) _select
=yes ;;
1069 --disable-select) _select
=no
;;
1070 --enable-cdparanoia) _cdparanoia
=yes ;;
1071 --disable-cdparanoia) _cdparanoia
=no
;;
1072 --enable-cddb) _cddb
=yes ;;
1073 --disable-cddb) _cddb
=no
;;
1074 --enable-big-endian) _big_endian
=yes ;;
1075 --disable-big-endian) _big_endian
=no
;;
1076 --enable-bitmap-font) _bitmap_font
=yes ;;
1077 --disable-bitmap-font) _bitmap_font
=no
;;
1078 --enable-freetype) _freetype
=yes ;;
1079 --disable-freetype) _freetype
=no
;;
1080 --enable-fontconfig) _fontconfig
=yes ;;
1081 --disable-fontconfig) _fontconfig
=no
;;
1082 --enable-unrarexec) _unrar_exec
=yes ;;
1083 --disable-unrarexec) _unrar_exec
=no
;;
1084 --enable-ftp) _ftp
=yes ;;
1085 --disable-ftp) _ftp
=no
;;
1086 --enable-vstream) _vstream
=yes ;;
1087 --disable-vstream) _vstream
=no
;;
1088 --enable-pthreads) _pthreads
=yes ;;
1089 --disable-pthreads) _pthreads
=no
;;
1090 --enable-w32threads) _w32threads
=yes ;;
1091 --disable-w32threads) _w32threads
=no
;;
1092 --enable-libass) _ass
=yes ;;
1093 --disable-libass) _ass
=no
;;
1094 --enable-rpath) _rpath
=yes ;;
1095 --disable-rpath) _rpath
=no
;;
1096 --enable-libpostproc) libpostproc
=yes ;;
1097 --disable-libpostproc) libpostproc
=no
;;
1099 --enable-fribidi) _fribidi
=yes ;;
1100 --disable-fribidi) _fribidi
=no
;;
1102 --enable-enca) _enca
=yes ;;
1103 --disable-enca) _enca
=no
;;
1105 --enable-inet6) _inet6
=yes ;;
1106 --disable-inet6) _inet6
=no
;;
1108 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1109 --disable-gethostbyname2) _gethostbyname2
=no
;;
1111 --enable-dga1) _dga1
=yes ;;
1112 --disable-dga1) _dga1
=no
;;
1113 --enable-dga2) _dga2
=yes ;;
1114 --disable-dga2) _dga2
=no
;;
1116 --enable-qtx) _qtx
=yes ;;
1117 --disable-qtx) _qtx
=no
;;
1119 --enable-coreaudio) _coreaudio
=yes ;;
1120 --disable-coreaudio) _coreaudio
=no
;;
1121 --enable-corevideo) _corevideo
=yes ;;
1122 --disable-corevideo) _corevideo
=no
;;
1123 --enable-cocoa) _cocoa
=yes ;;
1124 --disable-cocoa) _cocoa
=no
;;
1125 --enable-sharedbuffer) _sharedbuffer
=yes ;;
1126 --disable-sharedbuffer) _sharedbuffer
=no
;;
1127 --enable-macosx-finder) _macosx_finder
=yes ;;
1128 --disable-macosx-finder) _macosx_finder
=no
;;
1129 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1130 --disable-macosx-bundle) _macosx_bundle
=no
;;
1132 --enable-sortsub) _sortsub
=yes ;;
1133 --disable-sortsub) _sortsub
=no
;;
1135 --enable-crash-debug) _crash_debug
=yes ;;
1136 --disable-crash-debug) _crash_debug
=no
;;
1137 --enable-sighandler) _sighandler
=yes ;;
1138 --disable-sighandler) _sighandler
=no
;;
1139 --enable-win32dll) _win32dll
=yes ;;
1140 --disable-win32dll) _win32dll
=no
;;
1142 --enable-sse) _sse
=yes ;;
1143 --disable-sse) _sse
=no
;;
1144 --enable-sse2) _sse2
=yes ;;
1145 --disable-sse2) _sse2
=no
;;
1146 --enable-ssse3) _ssse3
=yes ;;
1147 --disable-ssse3) _ssse3
=no
;;
1148 --enable-mmxext) _mmxext
=yes ;;
1149 --disable-mmxext) _mmxext
=no
;;
1150 --enable-3dnow) _3dnow
=yes ;;
1151 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1152 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1153 --disable-3dnowext) _3dnowext
=no
;;
1154 --enable-cmov) _cmov
=yes ;;
1155 --disable-cmov) _cmov
=no
;;
1156 --enable-fast-cmov) _fast_cmov
=yes ;;
1157 --disable-fast-cmov) _fast_cmov
=no
;;
1158 --enable-fast-clz) _fast_clz
=yes ;;
1159 --disable-fast-clz) _fast_clz
=no
;;
1160 --enable-altivec) _altivec
=yes ;;
1161 --disable-altivec) _altivec
=no
;;
1162 --enable-armv5te) _armv5te
=yes ;;
1163 --disable-armv5te) _armv5te
=no
;;
1164 --enable-armv6) _armv6
=yes ;;
1165 --disable-armv6) _armv6
=no
;;
1166 --enable-armv6t2) _armv6t2
=yes ;;
1167 --disable-armv6t2) _armv6t2
=no
;;
1168 --enable-armvfp) _armvfp
=yes ;;
1169 --disable-armvfp) _armvfp
=no
;;
1170 --enable-neon) neon
=yes ;;
1171 --disable-neon) neon
=no
;;
1172 --enable-iwmmxt) _iwmmxt
=yes ;;
1173 --disable-iwmmxt) _iwmmxt
=no
;;
1174 --enable-mmx) _mmx
=yes ;;
1175 --disable-mmx) # 3Dnow! and MMX2 require MMX
1176 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1179 echo "Unknown parameter: $ac_option" >&2
1186 # Atmos: moved this here, to be correct, if --prefix is specified
1187 test -z "$_bindir" && _bindir
="$_prefix/bin"
1188 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1189 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1190 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1191 test -z "$_libdir" && _libdir
="$_prefix/lib"
1192 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1194 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1195 test "$tmpdir" && break
1198 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1199 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1204 echo Parameters configure was run with
: > "$TMPLOG"
1205 if test -n "$CFLAGS" ; then
1206 echo ${_echo_n} CFLAGS
="'$CFLAGS' ${_echo_c}" >> "$TMPLOG"
1208 if test -n "$PKG_CONFIG_PATH" ; then
1209 echo ${_echo_n} PKG_CONFIG_PATH
="'$PKG_CONFIG_PATH' ${_echo_c}" >> "$TMPLOG"
1211 echo .
/configure
$configuration >> "$TMPLOG"
1215 echocheck
"cross compilation"
1216 echores
$_cross_compile
1218 if test $_cross_compile = yes; then
1222 test "$_host_cc" || _host_cc
=cc
1227 if test $_cross_compile = yes ; then
1228 # Usually cross-compiler prefixes match with the target triplet
1229 test -n "$_target" && tool_prefix
="$_target"-
1232 test "$_ranlib" = auto
&& _ranlib
="$tool_prefix"ranlib
1233 test "$_windres" = auto
&& _windres
="$tool_prefix"windres
1234 test "$_ar" = auto
&& _ar
="$tool_prefix"ar
1235 test "$_yasm" = auto
&& _yasm
="$tool_prefix"yasm
1236 test "$_pkg_config" = auto
&& _pkg_config
="$tool_prefix"pkg-config
1238 if test "$_cc" = auto
; then
1239 if test -n "$tool_prefix" ; then
1240 _cc
="$tool_prefix"gcc
1246 # Determine our OS name and CPU architecture
1247 if test -z "$_target" ; then
1249 system_name
=$
(uname
-s 2>&1)
1250 case "$system_name" in
1251 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1265 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1275 system_name
="$system_name-UNKNOWN"
1280 # host's CPU/instruction set
1281 host_arch
=$
(uname
-p 2>&1)
1282 case "$host_arch" in
1283 i386|sparc|ppc|alpha|arm|mips|vax
)
1285 powerpc
) # Darwin returns 'powerpc'
1288 *) # uname -p on Linux returns 'unknown' for the processor type,
1289 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1291 # Maybe uname -m (machine hardware name) returns something we
1294 # x86/x86pc is used by QNX
1295 case "$(uname -m 2>&1)" in
1296 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
;;
1297 ia64
) host_arch
=ia64
;;
1298 macppc|ppc
) host_arch
=ppc
;;
1299 ppc64
) host_arch
=ppc64
;;
1300 alpha
) host_arch
=alpha
;;
1301 sparc
) host_arch
=sparc
;;
1302 sparc64
) host_arch
=sparc64
;;
1303 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1304 arm
*|zaurus|cats
) host_arch
=arm
;;
1305 sh3|sh4|sh4a
) host_arch
=sh
;;
1306 s390
) host_arch
=s390
;;
1307 s390x
) host_arch
=s390x
;;
1308 *mips
*) host_arch
=mips
;;
1309 vax
) host_arch
=vax
;;
1310 xtensa
*) host_arch
=xtensa
;;
1311 *) host_arch
=UNKNOWN
;;
1315 else # if test -z "$_target"
1317 system_name
=$
(echo $_target | cut
-d '-' -f $i)
1318 case "$(echo $system_name | tr A-Z a-z)" in
1319 linux
) system_name
=Linux
;;
1320 freebsd
) system_name
=FreeBSD
;;
1321 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1322 netbsd
) system_name
=NetBSD
;;
1323 bsd
/os
) system_name
=BSD
/OS
;;
1324 openbsd
) system_name
=OpenBSD
;;
1325 dragonfly
) system_name
=DragonFly
;;
1326 sunos
) system_name
=SunOS
;;
1327 qnx
) system_name
=QNX
;;
1328 morphos
) system_name
=MorphOS
;;
1329 amigaos
) system_name
=AmigaOS
;;
1330 mingw32
*) system_name
=MINGW32
;;
1335 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1336 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1337 if test $
(echo $host_arch) != "x86_64" ; then
1338 host_arch
=$
(echo $host_arch |
tr '_' '-')
1342 extra_cflags
="-I. $extra_cflags"
1343 _timer
=timer-linux.c
1346 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1347 extra_cflags
="$extra_cflags -I/usr/local/include"
1350 if netbsd || dragonfly
; then
1351 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1352 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1356 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1357 if test "$(basename $_cc)" != "clang" ; then
1358 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
1360 _timer
=timer-darwin.c
1364 extra_ldflags
="$extra_ldflags -lC"
1375 extra_cflags
="$extra_cflags -fno-common"
1376 # -lwinmm is always needed for osdep/timer-win2.c
1377 extra_ldflags
="$extra_ldflags -lwinmm"
1381 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1382 def_priority
="#define CONFIG_PRIORITY 1"
1388 extra_cflags
="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
1395 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1396 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1400 extra_ldflags
="$extra_ldflags -lph"
1403 TMPC
="$mplayer_tmpdir/tmp.c"
1404 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1405 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1406 TMPH
="$mplayer_tmpdir/tmp.h"
1407 TMPS
="$mplayer_tmpdir/tmp.S"
1409 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1410 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1414 # Checking CC version...
1415 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1416 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1417 echocheck
"$_cc version"
1419 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1420 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1421 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1422 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1423 # TODO verify older icc/ecc compatibility
1426 cc_version
="v. ?.??, bad"
1430 cc_version
="$cc_version, ok"
1433 cc_version
="$cc_version, bad"
1437 echores
"$cc_version"
1439 for _cc
in "$_cc" gcc cc
; do
1440 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1441 if test "$cc_name_tmp" = "gcc"; then
1442 cc_name
=$cc_name_tmp
1443 echocheck
"$_cc version"
1445 cc_version
=$
($_cc -dumpversion 2>&1)
1451 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1452 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1453 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1456 echores
"$cc_version"
1459 if $_cc -v 2>&1 |
grep -q "clang"; then
1460 echocheck
"$_cc version"
1462 cc_version
=$
($_cc -dumpversion 2>&1)
1463 res_comment
="experimental support only"
1464 echores
"clang $cc_version"
1467 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1468 if test "$cc_name_tmp" = "Sun C"; then
1469 echocheck
"$_cc version"
1471 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1472 res_comment
="experimental support only"
1473 echores
"Sun C $cc_version"
1478 test "$cc_fail" = yes && die
"unsupported compiler version"
1480 echocheck
"working compiler"
1481 cflag_check
"" || die
"Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
1484 if test -z "$_target" && x86
; then
1487 int test[(int)sizeof(char *)-7];
1491 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1495 test "$_host_cc" || _host_cc
=$_cc
1498 echo "Detected operating system: $system_name"
1499 echo "Detected host architecture: $host_arch"
1503 # now that we know what compiler should be used for compilation, try to find
1504 # out which assembler is used by the $_cc compiler
1505 if test "$_as" = auto
; then
1506 _as
=$
($_cc -print-prog-name=as
)
1507 test -z "$_as" && _as
=as
1510 if test "$_nm" = auto
; then
1511 _nm
=$
($_cc -print-prog-name=nm
)
1512 test -z "$_nm" && _nm
=nm
1515 # XXX: this should be ok..
1518 if test "$_runtime_cpudetection" = no
; then
1520 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1521 # FIXME: Remove the cygwin check once AMD CPUs are supported
1522 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1523 # Linux with /proc mounted, extract CPU information from it
1524 _cpuinfo
="cat /proc/cpuinfo"
1525 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1526 # FreeBSD with Linux emulation /proc mounted,
1527 # extract CPU information from it
1528 # Don't use it on x86 though, it never reports 3Dnow
1529 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1530 elif darwin
&& ! x86
; then
1531 # use hostinfo on Darwin
1534 # use 'lsattr' on AIX
1535 _cpuinfo
="lsattr -E -l proc0 -a type"
1537 # all other OSes try to extract CPU information from a small helper
1538 # program cpuinfo instead
1539 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1540 _cpuinfo
="./cpuinfo$_exesuf"
1544 # gather more CPU information
1545 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1546 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1547 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1548 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1549 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1551 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1553 pparam
=$
(echo $exts |
sed -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1554 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1555 pparam
=$
(echo $pparam |
sed -e 's/sse/sse mmxext/')
1557 for ext
in $pparam ; do
1558 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1561 echocheck
"CPU vendor"
1562 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1564 echocheck
"CPU type"
1568 fi # test "$_runtime_cpudetection" = no
1570 if x86
&& test "$_runtime_cpudetection" = no
; then
1572 if test "$1" = kernel_check
; then
1573 echocheck
"kernel support of $2"
1577 static void catch(int sig) { exit(1); }
1579 signal(SIGILL, catch);
1580 __asm__ volatile ("$3":::"memory"); return 0;
1584 if cc_check
&& tmp_run
; then
1587 _optimizing
="$_optimizing $2"
1592 echo "It seems that your kernel does not correctly support $2."
1593 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1600 extcheck
$_mmx "mmx" "emms"
1601 extcheck
$_mmxext "mmxext" "sfence"
1602 extcheck
$_3dnow "3dnow" "femms"
1603 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1604 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1605 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1606 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1607 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1609 if test "$_gcc3_ext" != ""; then
1610 # if we had to disable sse/sse2 because the active kernel does not
1611 # support this instruction set extension, we also have to tell
1612 # gcc3 to not generate sse/sse2 instructions for normal C code
1613 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1619 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1620 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1621 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1622 subarch_all
='X86_32 X86_64 PPC64'
1623 case "$host_arch" in
1624 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1627 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1632 if test "$_runtime_cpudetection" = no
; then
1636 3) proc
=i386 iproc
=386 ;;
1637 4) proc
=i486 iproc
=486 ;;
1638 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1639 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1640 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1642 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1644 elif test "$pmodel" -ge 8; then
1646 elif test "$pmodel" -ge 6; then
1653 # It's a bit difficult to determine the correct type of Family 6
1654 # AMD CPUs just from their signature. Instead, we check directly
1655 # whether it supports SSE.
1656 if test "$_sse" = yes; then
1657 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1660 # Again, gcc treats athlon and athlon-tbird similarly.
1665 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1666 # caught and remedied in the optimization tests below.
1670 *) proc
=amdfam10 iproc
=686
1671 test $_fast_clz = "auto" && _fast_clz
=yes
1677 3) proc
=i386 iproc
=386 ;;
1678 4) proc
=i486 iproc
=486 ;;
1680 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1681 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1687 if test "$pmodel" -ge 15; then
1689 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1691 elif test "$pmodel" -ge 7; then
1693 elif test "$pmodel" -ge 3; then
1698 test $_fast_clz = "auto" && _fast_clz
=yes
1701 # A nocona in 32-bit mode has no more capabilities than a prescott.
1702 if test "$pmodel" -ge 3; then
1706 test $_fast_clz = "auto" && _fast_clz
=yes
1708 test $_fast_cmov = "auto" && _fast_cmov
=no
1710 *) proc
=prescott iproc
=686 ;;
1716 if test "$pmodel" -ge 8; then
1718 elif test "$pmodel" -ge 4; then
1725 if test "$pmodel" -ge 9; then
1732 *) proc
=i686 iproc
=i686
;;
1737 3) proc
=i386 iproc
=386 ;;
1738 4) proc
=i486 iproc
=486 ;;
1739 *) proc
=i586 iproc
=586 ;;
1743 proc
=i586 iproc
=586 ;;
1745 test $_fast_clz = "auto" && _fast_clz
=no
1746 fi # test "$_runtime_cpudetection" = no
1749 # check that gcc supports our CPU, if not, fall back to earlier ones
1750 # LGB: check -mcpu and -march swithing step by step with enabling
1751 # to fall back till 386.
1753 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1755 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1761 echocheck
"GCC & CPU optimization abilities"
1762 if test "$_runtime_cpudetection" = no
; then
1763 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1764 cflag_check
-march=native
&& proc
=native
1766 if test "$proc" = "amdfam10"; then
1767 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1769 if test "$proc" = "k8"; then
1770 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1772 if test "$proc" = "athlon-xp"; then
1773 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1775 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1776 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1778 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1779 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1780 if cflag_check
-march=i586
$cpuopt=i686
; then
1787 if test "$proc" = "prescott" ; then
1788 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1790 if test "$proc" = "core2" ; then
1791 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1793 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
1794 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1796 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1797 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1799 if test "$proc" = "i586"; then
1800 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1802 if test "$proc" = "i486" ; then
1803 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1805 if test "$proc" = "i386" ; then
1806 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1808 if test "$proc" = "error" ; then
1809 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1813 elif test "$proc" = "i586-i686"; then
1814 _march
="-march=i586"
1815 _mcpu
="$cpuopt=i686"
1818 _march
="-march=$proc"
1819 _mcpu
="$cpuopt=$proc"
1822 else # if test "$_runtime_cpudetection" = no
1823 _mcpu
="$cpuopt=generic"
1824 # at least i486 required, for bswap instruction
1825 _march
="-march=i486"
1826 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1827 cflag_check
$_mcpu || _mcpu
=""
1828 cflag_check
$_march $_mcpu || _march
=""
1831 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1832 ## autodetected mcpu/march parameters
1833 if test "$_target" ; then
1834 # TODO: it may be a good idea to check GCC and fall back in all cases
1835 if test "$host_arch" = "i586-i686"; then
1836 _march
="-march=i586"
1837 _mcpu
="$cpuopt=i686"
1839 _march
="-march=$host_arch"
1840 _mcpu
="$cpuopt=$host_arch"
1848 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1849 i686|athlon
*|pentium
*) iproc
=686 ;;
1854 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1859 test $_fast_clz = "auto" && _fast_clz
=yes
1866 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1873 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1874 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1877 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1878 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1883 if test "$_runtime_cpudetection" = no
; then
1888 test $_fast_clz = "auto" && _fast_clz
=no
1897 # 64-bit prescotts exist, but as far as GCC is concerned they
1898 # have the same capabilities as a nocona.
1900 test $_fast_cmov = "auto" && _fast_cmov
=no
1901 test $_fast_clz = "auto" && _fast_clz
=no
1908 fi # test "$_runtime_cpudetection" = no
1910 echocheck
"GCC & CPU optimization abilities"
1911 # This is a stripped-down version of the i386 fallback.
1912 if test "$_runtime_cpudetection" = no
; then
1913 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1914 cflag_check
-march=native
&& proc
=native
1916 # --- AMD processors ---
1917 if test "$proc" = "amdfam10"; then
1918 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1920 if test "$proc" = "k8"; then
1921 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1923 # This will fail if gcc version < 3.3, which is ok because earlier
1924 # versions don't really support 64-bit on amd64.
1925 # Is this a valid assumption? -Corey
1926 if test "$proc" = "athlon-xp"; then
1927 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1929 # --- Intel processors ---
1930 if test "$proc" = "core2"; then
1931 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1933 if test "$proc" = "x86-64"; then
1934 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
1936 if test "$proc" = "nocona"; then
1937 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1939 if test "$proc" = "pentium4"; then
1940 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1943 _march
="-march=$proc"
1944 _mcpu
="$cpuopt=$proc"
1945 if test "$proc" = "error" ; then
1946 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1950 else # if test "$_runtime_cpudetection" = no
1951 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1952 _march
="-march=x86-64"
1953 _mcpu
="$cpuopt=generic"
1954 cflag_check
$_mcpu || _mcpu
="x86-64"
1955 cflag_check
$_mcpu || _mcpu
=""
1956 cflag_check
$_march $_mcpu || _march
=""
1960 test $_fast_cmov = "auto" && _fast_cmov
=yes
1961 test $_fast_clz = "auto" && _fast_clz
=yes
1969 if test "$host_arch" = "sparc64" ; then
1972 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1974 echocheck
"CPU type"
1976 case "$(echo $karch)" in
1981 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2000 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2002 test $_fast_clz = "auto" && _fast_clz
=yes
2010 ppc|ppc64|powerpc|powerpc64
)
2012 def_dcbzl
='#define HAVE_DCBZL 0'
2013 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2016 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2018 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2020 echocheck
"CPU type"
2021 case $system_name in
2023 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2024 if test -n "$($_cpuinfo | grep altivec)"; then
2025 test $_altivec = auto
&& _altivec
=yes
2029 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2030 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2031 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2032 test $_altivec = auto
&& _altivec
=yes
2036 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2038 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2041 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2042 test $_altivec = auto
&& _altivec
=yes
2048 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2051 if test "$_altivec" = yes; then
2052 echores
"$proc altivec"
2058 echocheck
"GCC & CPU optimization abilities"
2060 if test -n "$proc"; then
2062 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2063 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2064 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2065 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2066 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2067 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2068 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2069 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2070 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2073 # gcc 3.1(.1) and up supports 7400 and 7450
2074 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2076 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2077 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2081 # gcc 3.2 and up supports 970
2082 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2084 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2085 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2089 # gcc 3.3 and up supports POWER4
2090 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2092 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2096 # gcc 3.4 and up supports 440*
2097 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2099 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2100 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2104 # gcc 4.0 and up supports POWER5
2105 if test "$_cc_major" -ge "4"; then
2107 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2113 if test -n "$_mcpu"; then
2114 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2115 echores
"$_optimizing"
2120 test $_fast_clz = "auto" && _fast_clz
=yes
2127 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2129 echocheck
"CPU type"
2132 unsigned long ver, mask;
2133 __asm__ ("implver %0" : "=r" (ver));
2134 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2135 printf("%ld-%x\n", ver, ~mask);
2139 $_cc -o "$TMPEXE" "$TMPC"
2140 case $
("$TMPEXE") in
2142 0-0) proc
="ev4"; _mvi
="0";;
2143 1-0) proc
="ev5"; _mvi
="0";;
2144 1-1) proc
="ev56"; _mvi
="0";;
2145 1-101) proc
="pca56"; _mvi
="1";;
2146 2-303) proc
="ev6"; _mvi
="1";;
2147 2-307) proc
="ev67"; _mvi
="1";;
2148 2-1307) proc
="ev68"; _mvi
="1";;
2152 echocheck
"GCC & CPU optimization abilities"
2153 if test "$proc" = "ev68" ; then
2154 cc_check
-mcpu=$proc || proc
=ev67
2156 if test "$proc" = "ev67" ; then
2157 cc_check
-mcpu=$proc || proc
=ev6
2162 test $_fast_clz = "auto" && _fast_clz
=yes
2172 echocheck
"CPU type"
2173 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2174 case "$(echo $proc)" in
2175 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2176 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2177 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2178 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2179 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2180 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2182 # gcc < 3.x does not support -mtune.
2183 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2189 test $_fast_clz = "auto" && _fast_clz
=yes
2223 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2224 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2225 die
"unsupported architecture $host_arch"
2227 esac # case "$host_arch" in
2229 if test "$_runtime_cpudetection" = yes ; then
2231 test "$_cmov" != no
&& _cmov
=yes
2233 test "$_mmx" != no
&& _mmx
=yes
2234 test "$_3dnow" != no
&& _3dnow
=yes
2235 test "$_3dnowext" != no
&& _3dnowext
=yes
2236 test "$_mmxext" != no
&& _mmxext
=yes
2237 test "$_sse" != no
&& _sse
=yes
2238 test "$_sse2" != no
&& _sse2
=yes
2239 test "$_ssse3" != no
&& _ssse3
=yes
2248 echocheck
"byte order"
2249 if test "$_big_endian" = auto
; then
2251 short ascii_name[] = {
2252 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2253 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2254 int main(void) { return (long)ascii_name; }
2257 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2263 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2266 if test "$_big_endian" = yes ; then
2267 _byte_order
='big-endian'
2268 def_words_endian
='#define WORDS_BIGENDIAN 1'
2269 def_bigendian
='#define HAVE_BIGENDIAN 1'
2271 _byte_order
='little-endian'
2272 def_words_endian
='#undef WORDS_BIGENDIAN'
2273 def_bigendian
='#define HAVE_BIGENDIAN 0'
2275 echores
"$_byte_order"
2278 echocheck
"extern symbol prefix"
2282 cc_check
-c || die
"Symbol mangling check failed."
2283 sym
=$
($_nm -P -g $TMPEXE)
2284 extern_prefix
=${sym%%ff_extern*}
2285 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2286 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2287 echores
$extern_prefix
2290 echocheck
"assembler support of -pipe option"
2291 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2292 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2295 if darwin
&& test "$cc_vendor" = "gnu" ; then
2296 echocheck
"GCC support of -mstackrealign"
2297 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2298 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2299 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2300 # wrong code with this flag, but this can be worked around by adding
2301 # -fno-unit-at-a-time as described in the blog post at
2302 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2304 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2305 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2307 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2308 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time &&
2309 tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2310 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2311 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2314 # Checking for CFLAGS
2316 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2319 if test -z "$CFLAGS" ; then
2320 if test "$cc_vendor" = "intel" ; then
2321 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer"
2322 WARNFLAGS
="-wd167 -wd556 -wd144"
2323 elif test "$cc_vendor" = "sun" ; then
2324 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2325 elif test "$cc_vendor" = "clang"; then
2326 CFLAGS
="-O2 $_debug $_profile $_march $_pipe"
2327 WARNFLAGS
="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
2328 ERRORFLAGS
="-Werror=implicit-function-declaration"
2329 elif test "$cc_vendor" != "gnu" ; then
2330 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe"
2332 CFLAGS
="-O2 $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2333 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2334 ERRORFLAGS
="-Werror-implicit-function-declaration"
2335 extra_ldflags
="$extra_ldflags -ffast-math"
2341 if test "$cc_vendor" = "gnu" ; then
2342 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2343 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2344 # that's the only variable specific to C now, and this option is not valid
2346 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2347 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2348 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2349 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2350 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2352 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2355 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2356 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2359 if test -n "$LDFLAGS" ; then
2360 extra_ldflags
="$extra_ldflags $LDFLAGS"
2362 elif test "$cc_vendor" = "intel" ; then
2363 extra_ldflags
="$extra_ldflags -i-static"
2365 if test -n "$CPPFLAGS" ; then
2366 extra_cflags
="$extra_cflags $CPPFLAGS"
2373 # Checking assembler (_as) compatibility...
2374 # Added workaround for older as that reads from stdin by default - atmos
2375 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2376 echocheck
"assembler ($_as $as_version)"
2378 _pref_as_version
='2.9.1'
2380 if test "$_mmx" = yes ; then
2381 echo 'emms' >> $TMPS
2383 if test "$_3dnow" = yes ; then
2384 _pref_as_version
='2.10.1'
2385 echo 'femms' >> $TMPS
2387 if test "$_3dnowext" = yes ; then
2388 _pref_as_version
='2.10.1'
2389 echo 'pswapd %mm0, %mm0' >> $TMPS
2391 if test "$_mmxext" = yes ; then
2392 _pref_as_version
='2.10.1'
2393 echo 'movntq %mm0, (%eax)' >> $TMPS
2395 if test "$_sse" = yes ; then
2396 _pref_as_version
='2.10.1'
2397 echo 'xorps %xmm0, %xmm0' >> $TMPS
2399 #if test "$_sse2" = yes ; then
2400 # _pref_as_version='2.11'
2401 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2403 if test "$_cmov" = yes ; then
2404 _pref_as_version
='2.10.1'
2405 echo 'cmovb %eax, %ebx' >> $TMPS
2407 if test "$_ssse3" = yes ; then
2408 _pref_as_version
='2.16.92'
2409 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2411 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2413 if test "$as_verc_fail" != yes ; then
2416 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2418 die
"obsolete binutils version"
2428 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2429 #error PIC not enabled
2434 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2440 echocheck
".align is a power of two"
2441 if test "$_asmalign_pot" = auto
; then
2443 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2445 if test "$_asmalign_pot" = "yes" ; then
2446 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2448 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2450 echores
$_asmalign_pot
2453 echocheck
"ebx availability"
2455 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2462 // just adding ebx to clobber list seems unreliable with some
2463 // compilers, e.g. Haiku's gcc 2.95
2465 // and the above check does not work for OSX 64 bit...
2466 __asm__ volatile("":::"%ebx");
2470 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2471 echores
$ebx_available
2475 if test -z "$YASMFLAGS" ; then
2477 x86_64
&& objformat
="macho64" || objformat
="macho"
2483 # currently tested for Linux x86, x86_64
2484 YASMFLAGS
="-f $objformat"
2485 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2486 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2487 case "$objformat" in
2488 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2489 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2495 echo "pabsw xmm0, xmm0" > $TMPS
2496 yasm_check || _yasm
=""
2497 if test $_yasm ; then
2498 def_yasm
='#define HAVE_YASM 1'
2502 def_yasm
='#define HAVE_YASM 0'
2508 def_bswap
='#define HAVE_BSWAP 0'
2509 echo 'bswap %eax' > $TMPS
2510 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2515 #FIXME: This should happen before the check for CFLAGS..
2516 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2517 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2519 # check if AltiVec is supported by the compiler, and how to enable it
2520 echocheck
"GCC AltiVec flags"
2521 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2522 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2523 # check if <altivec.h> should be included
2524 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2525 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2526 inc_altivec_h
='#include <altivec.h>'
2528 if $
(cflag_check
-faltivec) ; then
2529 _altivec_gcc_flags
="-faltivec"
2532 _altivec_gcc_flags
="none, AltiVec disabled"
2536 echores
"$_altivec_gcc_flags"
2538 # check if the compiler supports braces for vector declarations
2541 int main(void) { (vector int) {1}; return 0; }
2543 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2545 # Disable runtime cpudetection if we cannot generate AltiVec code or
2546 # AltiVec is disabled by the user.
2547 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2548 && _runtime_cpudetection
=no
2550 # Show that we are optimizing for AltiVec (if enabled and supported).
2551 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2552 && _optimizing
="$_optimizing altivec"
2554 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2555 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2559 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2561 echocheck
"XFORM ASM support"
2562 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2563 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2564 echores
"$xform_asm"
2568 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2569 if test $_armv5te = "auto" ; then
2571 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2575 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2577 echocheck
"ARMv6 (SIMD instructions)"
2578 if test $_armv6 = "auto" ; then
2580 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2584 echocheck
"ARMv6t2 (SIMD instructions)"
2585 if test $_armv6t2 = "auto" ; then
2587 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2592 if test $_armvfp = "auto" ; then
2594 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2598 echocheck
"ARM NEON"
2599 if test $neon = "auto" ; then
2601 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2605 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2606 if test $_iwmmxt = "auto" ; then
2608 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2613 cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2614 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2615 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2616 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2617 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2618 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2619 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2620 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2621 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2622 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2623 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2624 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2625 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2626 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2627 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2628 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2629 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2630 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2631 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2632 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2634 # Checking kernel version...
2635 if x86_32
&& linux
; then
2637 kernel_version
=$
(uname
-r 2>&1)
2638 echocheck
"$system_name kernel version"
2639 case "$kernel_version" in
2640 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2641 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2642 _k_verc_problem
=yes;;
2644 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2647 if test "$_k_verc_fail" ; then
2648 echores
"$kernel_version, fail"
2649 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2650 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2651 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2652 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2653 echo "2.2.x you must upgrade it to get SSE support!"
2654 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2656 echores
"$kernel_version, ok"
2660 ######################
2661 # MAIN TESTS GO HERE #
2662 ######################
2666 if cflag_check
-lposix ; then
2667 extra_ldflags
="$extra_ldflags -lposix"
2674 if cflag_check
-lm ; then
2683 echocheck
"langinfo"
2684 if test "$_langinfo" = auto
; then
2686 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2688 if test "$_langinfo" = yes ; then
2689 def_langinfo
='#define HAVE_LANGINFO 1'
2691 def_langinfo
='#undef HAVE_LANGINFO'
2693 echores
"$_langinfo"
2696 echocheck
"translation support"
2697 if test "$_translation" = yes; then
2698 def_translation
="#define CONFIG_TRANSLATION 1"
2700 def_translation
="#undef CONFIG_TRANSLATION"
2702 echores
"$_translation"
2704 echocheck
"language"
2705 # Set preferred languages, "all" uses English as main language.
2706 test -z "$language" && language
=$LINGUAS
2707 test -z "$language_doc" && language_doc
=$language
2708 test -z "$language_man" && language_man
=$language
2709 test -z "$language_msg" && language_msg
=$language
2710 test -z "$language_msg" && language_msg
="all"
2711 language_doc
=$
(echo $language_doc |
tr , " ")
2712 language_man
=$
(echo $language_man |
tr , " ")
2713 language_msg
=$
(echo $language_msg |
tr , " ")
2715 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2716 test "$language_man" = "all" && language_man
=$man_lang_all
2717 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2719 if test "$_translation" != yes ; then
2723 # Prune non-existing translations from language lists.
2724 # Set message translation to the first available language.
2725 # Fall back on English.
2726 for lang
in $language_doc ; do
2727 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2729 language_doc
=$tmp_language_doc
2730 test -z "$language_doc" && language_doc
=en
2732 for lang
in $language_man ; do
2733 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2735 language_man
=$tmp_language_man
2736 test -z "$language_man" && language_man
=en
2738 for lang
in $language_msg ; do
2739 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2741 language_msg
=$tmp_language_msg
2743 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2746 echocheck
"enable sighandler"
2747 if test "$_sighandler" = yes ; then
2748 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2750 def_sighandler
='#undef CONFIG_SIGHANDLER'
2752 echores
"$_sighandler"
2754 echocheck
"runtime cpudetection"
2755 if test "$_runtime_cpudetection" = yes ; then
2756 _optimizing
="Runtime CPU-Detection enabled"
2757 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2759 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2761 echores
"$_runtime_cpudetection"
2764 echocheck
"restrict keyword"
2765 for restrict_keyword
in restrict __restrict __restrict__
; do
2766 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2768 def_restrict_keyword
=$restrict_keyword
2772 if [ -n "$def_restrict_keyword" ]; then
2773 echores
"$def_restrict_keyword"
2777 # Avoid infinite recursion loop ("#define restrict restrict")
2778 if [ "$def_restrict_keyword" != "restrict" ]; then
2779 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2781 def_restrict_keyword
=""
2785 echocheck
"__builtin_expect"
2786 # GCC branch prediction hint
2788 static int foo(int a) {
2789 a = __builtin_expect(a, 10);
2790 return a == 10 ? 0 : 1;
2792 int main(void) { return foo(10) && foo(0); }
2795 cc_check
&& _builtin_expect
=yes
2796 if test "$_builtin_expect" = yes ; then
2797 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2799 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2801 echores
"$_builtin_expect"
2806 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2807 if test "$_kstat" = yes ; then
2808 def_kstat
="#define HAVE_LIBKSTAT 1"
2809 extra_ldflags
="$extra_ldflags -lkstat"
2811 def_kstat
="#undef HAVE_LIBKSTAT"
2817 # required for nanosleep on some systems
2819 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2820 if test "$_posix4" = yes ; then
2821 extra_ldflags
="$extra_ldflags -lposix4"
2825 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2828 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2829 if eval test "x\$_$func" = "xyes"; then
2830 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2833 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2841 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp
=yes
2842 if test "$_mkstemp" = yes ; then
2843 def_mkstemp
='#define HAVE_MKSTEMP 1'
2845 def_mkstemp
='#define HAVE_MKSTEMP 0'
2850 echocheck
"nanosleep"
2852 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2853 if test "$_nanosleep" = yes ; then
2854 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2856 def_nanosleep
='#undef HAVE_NANOSLEEP'
2858 echores
"$_nanosleep"
2862 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2863 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2866 #include <sys/socket.h>
2867 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2870 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2871 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2873 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2874 if test $_winsock2_h = auto
; then
2876 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2878 test "$_ld_sock" && res_comment
="using $_ld_sock"
2882 if test $_winsock2_h = yes ; then
2884 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2886 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2890 echocheck
"arpa/inet.h"
2892 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2893 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2894 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2895 echores
"$arpa_inet_h"
2898 echocheck
"inet_pton()"
2899 def_inet_pton
='#define HAVE_INET_PTON 0'
2901 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2902 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
2904 if test $inet_pton = yes ; then
2905 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2906 def_inet_pton
='#define HAVE_INET_PTON 1'
2908 echores
"$inet_pton"
2911 echocheck
"inet_aton()"
2912 def_inet_aton
='#define HAVE_INET_ATON 0'
2914 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2915 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
2917 if test $inet_aton = yes ; then
2918 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2919 def_inet_aton
='#define HAVE_INET_ATON 1'
2921 echores
"$inet_aton"
2924 echocheck
"socklen_t"
2926 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
2927 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
2929 if test "$_socklen_t" = yes ; then
2930 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
2932 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
2934 echores
"$_socklen_t"
2937 echocheck
"closesocket()"
2939 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
2940 if test "$_closesocket" = yes ; then
2941 def_closesocket
='#define HAVE_CLOSESOCKET 1'
2943 def_closesocket
='#define HAVE_CLOSESOCKET 0'
2945 echores
"$_closesocket"
2948 echocheck
"networking"
2949 test $_winsock2_h = no
&& test $inet_pton = no
&&
2950 test $inet_aton = no
&& networking
=no
2951 if test "$networking" = yes ; then
2952 def_network
='#define CONFIG_NETWORK 1'
2953 def_networking
='#define CONFIG_NETWORKING 1'
2954 extra_ldflags
="$extra_ldflags $_ld_sock"
2955 inputmodules
="networking $inputmodules"
2957 noinputmodules
="networking $noinputmodules"
2958 def_network
='#define CONFIG_NETWORK 0'
2959 def_networking
='#undef CONFIG_NETWORKING'
2961 echores
"$networking"
2965 if test "$_inet6" = auto
; then
2967 #include <sys/types.h>
2968 #if !defined(_WIN32)
2969 #include <sys/socket.h>
2970 #include <netinet/in.h>
2972 #include <ws2tcpip.h>
2974 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
2977 if cc_check
$_ld_sock ; then
2981 if test "$_inet6" = yes ; then
2982 def_inet6
='#define HAVE_AF_INET6 1'
2984 def_inet6
='#undef HAVE_AF_INET6'
2989 echocheck
"gethostbyname2"
2990 if test "$_gethostbyname2" = auto
; then
2992 #include <sys/types.h>
2993 #include <sys/socket.h>
2995 int main(void) { gethostbyname2("", AF_INET); return 0; }
3002 if test "$_gethostbyname2" = yes ; then
3003 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3005 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3007 echores
"$_gethostbyname2"
3010 echocheck
"inttypes.h (required)"
3012 header_check inttypes.h
&& _inttypes
=yes
3013 echores
"$_inttypes"
3015 if test "$_inttypes" = no
; then
3016 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3017 header_check sys
/bitypes.h
&& _inttypes
=yes
3018 if test "$_inttypes" = yes ; then
3019 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."
3021 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3026 echocheck
"malloc.h"
3028 header_check malloc.h
&& _malloc
=yes
3029 if test "$_malloc" = yes ; then
3030 def_malloc_h
='#define HAVE_MALLOC_H 1'
3032 def_malloc_h
='#define HAVE_MALLOC_H 0'
3037 echocheck
"memalign()"
3038 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3039 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3041 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3042 if test "$_memalign" = yes ; then
3043 def_memalign
='#define HAVE_MEMALIGN 1'
3045 def_memalign
='#define HAVE_MEMALIGN 0'
3046 def_map_memalign
='#define memalign(a, b) malloc(b)'
3047 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3049 echores
"$_memalign"
3052 echocheck
"posix_memalign()"
3054 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3055 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' &&
3056 posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3057 echores
"$posix_memalign"
3060 echocheck
"alloca.h"
3062 statement_check alloca.h
'alloca(0)' && _alloca
=yes
3064 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3066 def_alloca_h
='#undef HAVE_ALLOCA_H'
3071 echocheck
"fastmemcpy"
3072 if test "$_fastmemcpy" = yes ; then
3073 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3075 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3077 echores
"$_fastmemcpy"
3082 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
3083 if test "$_mman" = yes ; then
3084 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3086 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3090 _mman_has_map_failed
=no
3091 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
3092 if test "$_mman_has_map_failed" = yes ; then
3093 def_mman_has_map_failed
=''
3095 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3098 echocheck
"dynamic loader"
3100 for _ld_tmp
in "" "-ldl"; do
3101 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3103 if test "$_dl" = yes ; then
3104 def_dl
='#define HAVE_LIBDL 1'
3106 def_dl
='#undef HAVE_LIBDL'
3111 def_threads
='#define HAVE_THREADS 0'
3115 THREAD_CFLAGS
=-D_REENTRANT
3116 elif freebsd || netbsd || openbsd || bsdos
; then
3117 THREAD_CFLAGS
=-D_THREAD_SAFE
3119 if test "$_pthreads" = auto
; then
3121 #include <pthread.h>
3122 static void *func(void *arg) { return arg; }
3125 #ifdef PTW32_STATIC_LIB
3126 pthread_win32_process_attach_np();
3127 pthread_win32_thread_attach_np();
3129 return pthread_create (&tid, 0, func, 0) != 0;
3134 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3135 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3136 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3138 if test "$_pthreads" = no
&& mingw32
; then
3139 _ld_tmp
="-lpthreadGC2 -lws2_32"
3140 cc_check
$_ld_tmp -DPTW32_STATIC_LIB && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && CFLAGS
="$CFLAGS -DPTW32_STATIC_LIB"
3144 if test "$_pthreads" = yes ; then
3145 test $_ld_pthread && res_comment
="using $_ld_pthread"
3146 def_pthreads
='#define HAVE_PTHREADS 1'
3147 def_threads
='#define HAVE_THREADS 1'
3148 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3150 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3151 def_pthreads
='#undef HAVE_PTHREADS'
3152 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3153 mingw32 || _win32dll
=no
3155 echores
"$_pthreads"
3158 if test "$_pthreads" = yes ; then
3159 def_pthread_cache
="#define PTHREAD_CACHE 1"
3162 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3166 echocheck
"w32threads"
3167 if test "$_pthreads" = yes ; then
3168 res_comment
="using pthread instead"
3171 if test "$_w32threads" = auto
; then
3173 mingw32
&& _w32threads
=yes
3175 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3176 echores
"$_w32threads"
3179 if test "$_rpath" = yes ; then
3180 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3181 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3188 if test "$_iconv" = auto
; then
3193 #define INBUFSIZE 1024
3194 #define OUTBUFSIZE 4096
3196 char inbuffer[INBUFSIZE];
3197 char outbuffer[OUTBUFSIZE];
3202 char *tocode="UTF-8";
3203 char *fromcode="cp1250";
3204 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3205 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3206 char *iptr=inbuffer;
3207 char *optr=outbuffer;
3208 size_t inleft=numread;
3209 size_t outleft=OUTBUFSIZE;
3210 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3212 write(1, outbuffer, OUTBUFSIZE - outleft);
3215 if (iconv_close(icdsc) == -1)
3222 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3223 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
3226 if test "$_iconv" != yes ; then
3227 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."
3230 if test "$_iconv" = yes ; then
3231 def_iconv
='#define CONFIG_ICONV 1'
3233 def_iconv
='#undef CONFIG_ICONV'
3238 echocheck
"soundcard.h"
3240 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3241 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3242 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3243 header_check
$_soundcard_header && _soundcard_h
=yes &&
3244 res_comment
="$_soundcard_header" && break
3247 if test "$_soundcard_h" = yes ; then
3248 if test $_soundcard_header = "sys/soundcard.h"; then
3249 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3251 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3254 echores
"$_soundcard_h"
3257 echocheck
"sys/videoio.h"
3259 def_sys_videoio_h
='#undef HAVE_SYS_VIDEOIO_H'
3260 header_check sys
/videoio.h
&& sys_videoio_h
=yes &&
3261 def_sys_videoio_h
='#define HAVE_SYS_VIDEOIO_H 1'
3262 echores
"$sys_videoio_h"
3265 echocheck
"sys/dvdio.h"
3267 # FreeBSD 8.1 has broken dvdio.h
3268 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3269 if test "$_dvdio" = yes ; then
3270 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3272 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3277 echocheck
"sys/cdio.h"
3279 # at least OpenSolaris has a broken cdio.h
3280 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3281 if test "$_cdio" = yes ; then
3282 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3284 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3289 echocheck
"linux/cdrom.h"
3291 header_check linux
/cdrom.h
&& _cdrom
=yes
3292 if test "$_cdrom" = yes ; then
3293 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3295 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3302 header_check dvd.h
&& _dvd
=yes
3303 if test "$_dvd" = yes ; then
3304 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3306 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3312 echocheck
"BSDI dvd.h"
3314 header_check dvd.h
&& _bsdi_dvd
=yes
3315 if test "$_bsdi_dvd" = yes ; then
3316 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3318 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3320 echores
"$_bsdi_dvd"
3325 # also used by AIX, but AIX does not support VCD and/or libdvdread
3326 echocheck
"HP-UX SCSI header"
3328 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3329 if test "$_hpux_scsi_h" = yes ; then
3330 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3332 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3334 echores
"$_hpux_scsi_h"
3339 echocheck
"userspace SCSI headers (Solaris)"
3341 header_check sys
/scsi
/scsi_types.h
&&
3342 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3344 if test "$_sol_scsi_h" = yes ; then
3345 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3347 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3349 echores
"$_sol_scsi_h"
3354 if test "$_termcap" = auto
; then
3356 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3357 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3358 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3361 if test "$_termcap" = yes ; then
3362 def_termcap
='#define HAVE_TERMCAP 1'
3363 test $_ld_tmp && res_comment
="using $_ld_tmp"
3365 def_termcap
='#undef HAVE_TERMCAP'
3371 def_termios
='#undef HAVE_TERMIOS'
3372 def_termios_h
='#undef HAVE_TERMIOS_H'
3373 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3374 if test "$_termios" = auto
; then
3376 for _termios_header
in "termios.h" "sys/termios.h"; do
3377 header_check
$_termios_header && _termios
=yes &&
3378 res_comment
="using $_termios_header" && break
3382 if test "$_termios" = yes ; then
3383 def_termios
='#define HAVE_TERMIOS 1'
3384 if test "$_termios_header" = "termios.h" ; then
3385 def_termios_h
='#define HAVE_TERMIOS_H 1'
3387 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3394 if test "$_shm" = auto
; then
3396 statement_check sys
/shm.h
'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm
=yes
3398 if test "$_shm" = yes ; then
3399 def_shm
='#define HAVE_SHM 1'
3401 def_shm
='#undef HAVE_SHM'
3406 echocheck
"strsep()"
3408 statement_check string.h
'char *s = "Hello, world!"; strsep(&s, ",")' && _strsep
=yes
3409 if test "$_strsep" = yes ; then
3410 def_strsep
='#define HAVE_STRSEP 1'
3413 def_strsep
='#undef HAVE_STRSEP'
3419 echocheck
"vsscanf()"
3421 #define _ISOC99_SOURCE
3424 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3427 cc_check
&& _vsscanf
=yes
3428 if test "$_vsscanf" = yes ; then
3429 def_vsscanf
='#define HAVE_VSSCANF 1'
3432 def_vsscanf
='#undef HAVE_VSSCANF'
3440 define_statement_check
"_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' ||
3441 statement_check
"string.h" 'int a, b; swab(&a, &b, 0)' && _swab
=yes
3442 if test "$_swab" = yes ; then
3443 def_swab
='#define HAVE_SWAB 1'
3446 def_swab
='#undef HAVE_SWAB'
3451 echocheck
"POSIX select()"
3455 #include <sys/types.h>
3457 #include <sys/time.h>
3459 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3462 def_posix_select
='#undef HAVE_POSIX_SELECT'
3463 cc_check
&& _posix_select
=yes &&
3464 def_posix_select
='#define HAVE_POSIX_SELECT 1'
3465 echores
"$_posix_select"
3468 echocheck
"audio select()"
3469 if test "$_select" = no
; then
3470 def_select
='#undef HAVE_AUDIO_SELECT'
3471 elif test "$_select" = yes ; then
3472 def_select
='#define HAVE_AUDIO_SELECT 1'
3477 echocheck
"gettimeofday()"
3479 statement_check sys
/time.h
'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' && _gettimeofday
=yes
3480 if test "$_gettimeofday" = yes ; then
3481 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3482 need_gettimeofday
=no
3484 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3485 need_gettimeofday
=yes
3487 echores
"$_gettimeofday"
3492 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3494 if test "$_glob" = yes ; then
3495 def_glob
='#define HAVE_GLOB 1'
3497 def_glob
='#undef HAVE_GLOB'
3498 # HACK! need_glob currently enables compilation of a
3499 # win32-specific glob()-replacement.
3500 # Other OS neither need it nor can they use it (mf:// is disabled for them).
3501 win32
&& need_glob
=yes
3506 echocheck
"setenv()"
3508 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3509 if test "$_setenv" = yes ; then
3510 def_setenv
='#define HAVE_SETENV 1'
3513 def_setenv
='#undef HAVE_SETENV'
3519 echocheck
"setmode()"
3521 def_setmode
='#define HAVE_SETMODE 0'
3522 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3527 echocheck
"sysi86()"
3529 statement_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3530 if test "$_sysi86" = yes ; then
3531 def_sysi86
='#define HAVE_SYSI86 1'
3532 statement_check sys
/sysi86.h
'int sysi86(int, void*); sysi86(0)' && def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3534 def_sysi86
='#undef HAVE_SYSI86'
3540 echocheck
"sys/sysinfo.h"
3542 statement_check sys
/sysinfo.h
'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo
=yes
3543 if test "$_sys_sysinfo" = yes ; then
3544 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3546 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3548 echores
"$_sys_sysinfo"
3553 echocheck
"Mac OS X Finder Support"
3554 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3555 if test "$_macosx_finder" = yes ; then
3556 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3557 extra_ldflags
="$extra_ldflags -framework Cocoa"
3559 echores
"$_macosx_finder"
3561 echocheck
"Mac OS X Bundle file locations"
3562 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3563 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3564 if test "$_macosx_bundle" = yes ; then
3565 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3567 echores
"$_macosx_bundle"
3569 echocheck
"Apple Remote"
3570 if test "$_apple_remote" = auto
; then
3574 #include <IOKit/IOCFPlugIn.h>
3576 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3577 CFMutableDictionaryRef hidMatchDictionary;
3578 IOReturn ioReturnValue;
3580 // Set up a matching dictionary to search the I/O Registry by class.
3581 // name for all HID class devices
3582 hidMatchDictionary = IOServiceMatching("AppleIRController");
3584 // Now search I/O Registry for matching devices.
3585 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3586 hidMatchDictionary, &hidObjectIterator);
3588 // If search is unsuccessful, return nonzero.
3589 if (ioReturnValue != kIOReturnSuccess ||
3590 !IOIteratorIsValid(hidObjectIterator)) {
3596 cc_check
-framework IOKit
&& _apple_remote
=yes
3598 if test "$_apple_remote" = yes ; then
3599 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3600 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3602 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3604 echores
"$_apple_remote"
3610 echocheck
"Apple IR"
3611 if test "$_apple_ir" = auto
; then
3613 statement_check linux
/input.h
'struct input_event ev; struct input_id id' && _apple_ir
=yes
3615 if test "$_apple_ir" = yes ; then
3616 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3618 def_apple_ir
='#undef CONFIG_APPLE_IR'
3620 echores
"$_apple_ir"
3623 echocheck
"pkg-config"
3624 if $
($_pkg_config --version > /dev
/null
2>&1); then
3625 if test "$_ld_static"; then
3626 _pkg_config
="$_pkg_config --static"
3635 echocheck
"Samba support (libsmbclient)"
3636 if test "$_smb" = yes; then
3637 extra_ldflags
="$extra_ldflags -lsmbclient"
3639 if test "$_smb" = auto
; then
3641 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3642 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3643 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3647 if test "$_smb" = yes; then
3648 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3649 inputmodules
="smb $inputmodules"
3651 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3652 noinputmodules
="smb $noinputmodules"
3663 if test "$_tdfxfb" = yes ; then
3664 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3665 vomodules
="tdfxfb $vomodules"
3667 def_tdfxfb
='#undef CONFIG_TDFXFB'
3668 novomodules
="tdfxfb $novomodules"
3673 if test "$_s3fb" = yes ; then
3674 def_s3fb
='#define CONFIG_S3FB 1'
3675 vomodules
="s3fb $vomodules"
3677 def_s3fb
='#undef CONFIG_S3FB'
3678 novomodules
="s3fb $novomodules"
3683 if test "$_wii" = yes ; then
3684 def_wii
='#define CONFIG_WII 1'
3685 vomodules
="wii $vomodules"
3687 def_wii
='#undef CONFIG_WII'
3688 novomodules
="wii $novomodules"
3693 if test "$_tdfxvid" = yes ; then
3694 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3695 vomodules
="tdfx_vid $vomodules"
3697 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3698 novomodules
="tdfx_vid $novomodules"
3703 if test "$_xvr100" = auto
; then
3706 #include <sys/fbio.h>
3707 #include <sys/visual_io.h>
3709 struct vis_identifier ident;
3710 struct fbgattr attr;
3711 ioctl(0, VIS_GETIDENTIFIER, &ident);
3712 ioctl(0, FBIOGATTR, &attr);
3717 cc_check
&& _xvr100
=yes
3719 if test "$_xvr100" = yes ; then
3720 def_xvr100
='#define CONFIG_XVR100 1'
3721 vomodules
="xvr100 $vomodules"
3723 def_tdfxvid
='#undef CONFIG_XVR100'
3724 novomodules
="xvr100 $novomodules"
3729 if test "$_tga" = yes ; then
3730 def_tga
='#define CONFIG_TGA 1'
3731 vomodules
="tga $vomodules"
3733 def_tga
='#undef CONFIG_TGA'
3734 novomodules
="tga $novomodules"
3739 echocheck
"md5sum support"
3740 if test "$_md5sum" = yes; then
3741 def_md5sum
="#define CONFIG_MD5SUM 1"
3742 vomodules
="md5sum $vomodules"
3744 def_md5sum
="#undef CONFIG_MD5SUM"
3745 novomodules
="md5sum $novomodules"
3750 echocheck
"yuv4mpeg support"
3751 if test "$_yuv4mpeg" = yes; then
3752 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3753 vomodules
="yuv4mpeg $vomodules"
3755 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3756 novomodules
="yuv4mpeg $novomodules"
3758 echores
"$_yuv4mpeg"
3762 if test "$_bl" = yes ; then
3763 def_bl
='#define CONFIG_BL 1'
3764 vomodules
="bl $vomodules"
3766 def_bl
='#undef CONFIG_BL'
3767 novomodules
="bl $novomodules"
3772 echocheck
"DirectFB"
3773 if test "$_directfb" = auto
; then
3776 #include <directfb.h>
3777 #include <directfb_version.h>
3778 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3779 #error "DirectFB version too old."
3781 int main(void) { DirectFBInit(0, 0); return 0; }
3783 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3784 cc_check
$_inc_tmp -ldirectfb &&
3785 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3788 if test "$_directfb" = yes ; then
3789 def_directfb
='#define CONFIG_DIRECTFB 1'
3790 vomodules
="directfb dfbmga $vomodules"
3791 libs_mplayer
="$libs_mplayer -ldirectfb"
3793 def_directfb
='#undef CONFIG_DIRECTFB'
3794 novomodules
="directfb dfbmga $novomodules"
3796 echores
"$_directfb"
3801 echocheck
"QuickTime"
3802 if test "$quicktime" = auto
; then
3804 statement_check QuickTime
/QuickTime.h
'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime
&& quicktime
=yes
3806 if test "$quicktime" = yes ; then
3807 extra_ldflags
="$extra_ldflags -framework QuickTime"
3808 def_quicktime
='#define CONFIG_QUICKTIME 1'
3810 def_quicktime
='#undef CONFIG_QUICKTIME'
3815 if test "$_cocoa" = auto
; then
3817 #include <CoreServices/CoreServices.h>
3818 #include <OpenGL/OpenGL.h>
3820 NSApplicationLoad();
3824 cc_check
-framework Cocoa
-framework OpenGL
&& _cocoa
=yes
3826 if test "$_cocoa" = yes ; then
3827 libs_mplayer
="$libs_mplayer -framework Cocoa -framework OpenGL"
3828 def_cocoa
='#define CONFIG_COCOA 1'
3830 def_cocoa
='#undef CONFIG_COCOA'
3834 echocheck
"CoreVideo"
3835 if test "$_cocoa" = yes && test "$_corevideo" = auto
; then
3837 #include <QuartzCore/CoreVideo.h>
3838 int main(void) { return 0; }
3841 cc_check
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
3843 if test "$_corevideo" = yes ; then
3844 vomodules
="corevideo $vomodules"
3845 libs_mplayer
="$libs_mplayer -framework QuartzCore"
3846 def_corevideo
='#define CONFIG_COREVIDEO 1'
3848 novomodules
="corevideo $novomodules"
3849 def_corevideo
='#undef CONFIG_COREVIDEO'
3851 echores
"$_corevideo"
3853 echocheck
"SharedBuffer"
3854 if test "$_sharedbuffer" = auto
; then
3857 NSApplicationLoad();
3861 cc_check
-framework Cocoa
&& _sharedbuffer
=yes
3863 if test "$_sharedbuffer" = yes ; then
3864 vomodules
="sharedbuffer $vomodules"
3865 libs_mplayer
="$libs_mplayer -framework Cocoa"
3866 def_sharedbuffer
='#define CONFIG_SHAREDBUFFER 1'
3868 novomodules
="sharedbuffer $novomodules"
3869 def_sharedbuffer
='#undef CONFIG_SHAREDBUFFER'
3871 echores
"$_sharedbuffer"
3873 depends_on_application_services
(){
3874 test "$_corevideo" = yes
3880 echocheck
"X11 headers presence"
3882 res_comment
="check if the dev(el) packages are installed"
3883 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3884 if test -f "$I/X11/Xlib.h" ; then
3890 if test $_cross_compile = no
; then
3891 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3892 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3893 if test -f "$I/X11/Xlib.h" ; then
3894 extra_cflags
="$extra_cflags -I$I"
3896 res_comment
="using $I"
3901 echores
"$_x11_headers"
3905 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3906 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3907 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3910 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3912 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3914 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3916 # Check that there aren't conflicting headers between ApplicationServices
3917 # and X11. On versions of Mac OSX prior to 10.7 the deprecated QuickDraw API
3918 # is included by -framework ApplicationServices and clashes with the X11
3919 # definition of the "Cursor" type.
3920 if darwin
&& depends_on_application_services
&& test "$_x11" = yes ; then
3922 header_check_broken ApplicationServices
/ApplicationServices.h \
3923 X11
/Xutil.h
$_ld_tmp && _x11
=yes
3925 if test "$_x11" = yes ; then
3926 libs_mplayer
="$libs_mplayer $_ld_tmp"
3931 if test "$_x11" = yes ; then
3932 def_x11
='#define CONFIG_X11 1'
3933 vomodules
="x11 xover $vomodules"
3936 def_x11
='#undef CONFIG_X11'
3937 novomodules
="x11 $novomodules"
3938 res_comment
="check if the dev(el) packages are installed"
3942 echocheck
"Xss screensaver extensions"
3943 if test "$_xss" = auto
; then
3945 statement_check
"X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss
=yes
3947 if test "$_xss" = yes ; then
3948 def_xss
='#define CONFIG_XSS 1'
3949 libs_mplayer
="$libs_mplayer -lXss"
3951 def_xss
='#undef CONFIG_XSS'
3958 if test "$_x11" = yes ; then
3960 #include <X11/Xmd.h>
3961 #include <X11/Xlib.h>
3962 #include <X11/Xutil.h>
3963 #include <X11/Xatom.h>
3964 #include <X11/extensions/dpms.h>
3965 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
3967 cc_check
-lXdpms && _xdpms3
=yes
3968 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
3970 if test "$_xdpms4" = yes ; then
3971 def_xdpms
='#define CONFIG_XDPMS 1'
3972 res_comment
="using Xdpms 4"
3974 elif test "$_xdpms3" = yes ; then
3975 def_xdpms
='#define CONFIG_XDPMS 1'
3976 libs_mplayer
="$libs_mplayer -lXdpms"
3977 res_comment
="using Xdpms 3"
3980 def_xdpms
='#undef CONFIG_XDPMS'
3986 if test "$_xv" = auto
&& test "$_x11" = yes ; then
3988 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
3991 if test "$_xv" = yes ; then
3992 def_xv
='#define CONFIG_XV 1'
3993 libs_mplayer
="$libs_mplayer -lXv"
3994 vomodules
="xv $vomodules"
3996 def_xv
='#undef CONFIG_XV'
3997 novomodules
="xv $novomodules"
4003 if test "$_vdpau" = auto
&& test "$_x11" = yes ; then
4005 if test "$_dl" = yes ; then
4006 return_statement_check vdpau
/vdpau_x11.h
'vdp_device_create_x11(0, 0, 0, 0)' VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1
-lvdpau && _vdpau
=yes
4009 if test "$_vdpau" = yes ; then
4010 def_vdpau
='#define CONFIG_VDPAU 1'
4011 libs_mplayer
="$libs_mplayer -lvdpau"
4012 vomodules
="vdpau $vomodules"
4014 def_vdpau
='#define CONFIG_VDPAU 0'
4015 novomodules
="vdpau $novomodules"
4020 echocheck
"Xinerama"
4021 if test "$_xinerama" = auto
&& test "$_x11" = yes ; then
4023 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
4026 if test "$_xinerama" = yes ; then
4027 def_xinerama
='#define CONFIG_XINERAMA 1'
4028 libs_mplayer
="$libs_mplayer -lXinerama"
4030 def_xinerama
='#undef CONFIG_XINERAMA'
4032 echores
"$_xinerama"
4035 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4036 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4037 # named 'X extensions' or something similar.
4038 # This check may be useful for future mplayer versions (to change resolution)
4039 # If you run into problems, remove '-lXxf86vm'.
4041 if test "$_vm" = auto
&& test "$_x11" = yes ; then
4043 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
4045 if test "$_vm" = yes ; then
4046 def_vm
='#define CONFIG_XF86VM 1'
4047 libs_mplayer
="$libs_mplayer -lXxf86vm"
4049 def_vm
='#undef CONFIG_XF86VM'
4053 # Check for the presence of special keycodes, like audio control buttons
4054 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4055 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4056 # have these new keycodes.
4057 echocheck
"XF86keysym"
4058 if test "$_xf86keysym" = auto
&& test "$_x11" = yes ; then
4060 return_check X11
/XF86keysym.h XF86XK_AudioPause
&& _xf86keysym
=yes
4062 if test "$_xf86keysym" = yes ; then
4063 def_xf86keysym
='#define CONFIG_XF86XK 1'
4065 def_xf86keysym
='#undef CONFIG_XF86XK'
4067 echores
"$_xf86keysym"
4070 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4072 statement_check_broken X11
/Xlib.h X11
/extensions
/Xxf86dga.h
'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2
=yes
4074 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4076 statement_check_broken X11
/Xlib.h X11
/extensions
/Xxf86dga.h
'XF86DGASetViewPort(0, 0, 0, 0)' -lXxf86dga -lXxf86vm && _dga1
=yes
4080 def_dga
='#undef CONFIG_DGA'
4081 def_dga1
='#undef CONFIG_DGA1'
4082 def_dga2
='#undef CONFIG_DGA2'
4083 if test "$_dga1" = yes ; then
4085 def_dga1
='#define CONFIG_DGA1 1'
4086 res_comment
="using DGA 1.0"
4087 elif test "$_dga2" = yes ; then
4089 def_dga2
='#define CONFIG_DGA2 1'
4090 res_comment
="using DGA 2.0"
4092 if test "$_dga" = yes ; then
4093 def_dga
='#define CONFIG_DGA 1'
4094 libs_mplayer
="$libs_mplayer -lXxf86dga"
4095 vomodules
="dga $vomodules"
4097 novomodules
="dga $novomodules"
4103 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4104 def_3dfx
='#define CONFIG_3DFX 1'
4105 vomodules
="3dfx $vomodules"
4108 def_3dfx
='#undef CONFIG_3DFX'
4109 novomodules
="3dfx $novomodules"
4115 if test "$_ggi" = auto
; then
4117 statement_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4119 if test "$_ggi" = yes ; then
4120 def_ggi
='#define CONFIG_GGI 1'
4121 libs_mplayer
="$libs_mplayer -lggi"
4122 vomodules
="ggi $vomodules"
4124 def_ggi
='#undef CONFIG_GGI'
4125 novomodules
="ggi $novomodules"
4129 echocheck
"GGI extension: libggiwmh"
4130 if test "$_ggiwmh" = auto
; then
4132 statement_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4134 # needed to get right output on obscure combination
4135 # like --disable-ggi --enable-ggiwmh
4136 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4137 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4138 libs_mplayer
="$libs_mplayer -lggiwmh"
4141 def_ggiwmh
='#undef CONFIG_GGIWMH'
4147 if test "$_aa" = auto
; then
4154 c = aa_autoinit(&aa_defparams);
4155 p = aa_getrenderparams();
4156 aa_autoinitkbd(c, 0);
4160 for _ld_tmp
in "-laa" ; do
4161 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4164 if test "$_aa" = yes ; then
4165 def_aa
='#define CONFIG_AA 1'
4167 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4169 vomodules
="aa $vomodules"
4171 def_aa
='#undef CONFIG_AA'
4172 novomodules
="aa $novomodules"
4178 if test "$_caca" = auto
; then
4180 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4183 #ifdef CACA_API_VERSION_1
4186 int main(void) { caca_init(); return 0; }
4188 cc_check $
(caca-config
--libs) && _caca
=yes
4191 if test "$_caca" = yes ; then
4192 def_caca
='#define CONFIG_CACA 1'
4193 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4194 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4195 vomodules
="caca $vomodules"
4197 def_caca
='#undef CONFIG_CACA'
4198 novomodules
="caca $novomodules"
4204 if test "$_svga" = auto
; then
4206 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4208 if test "$_svga" = yes ; then
4209 def_svga
='#define CONFIG_SVGALIB 1'
4210 libs_mplayer
="$libs_mplayer -lvga"
4211 vomodules
="svga $vomodules"
4213 def_svga
='#undef CONFIG_SVGALIB'
4214 novomodules
="svga $novomodules"
4220 if test "$_fbdev" = auto
; then
4224 if test "$_fbdev" = yes ; then
4225 def_fbdev
='#define CONFIG_FBDEV 1'
4226 vomodules
="fbdev $vomodules"
4228 def_fbdev
='#undef CONFIG_FBDEV'
4229 novomodules
="fbdev $novomodules"
4236 if test "$_dvb" = auto
; then
4240 #include <sys/ioctl.h>
4244 #include <linux/dvb/dmx.h>
4245 #include <linux/dvb/frontend.h>
4246 #include <linux/dvb/video.h>
4247 #include <linux/dvb/audio.h>
4248 int main(void) {return 0;}
4250 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4251 cc_check
$_inc_tmp && _dvb
=yes &&
4252 extra_cflags
="$extra_cflags $_inc_tmp" && break
4256 if test "$_dvb" = yes ; then
4258 inputmodules
="dvb $inputmodules"
4259 def_dvb
='#define CONFIG_DVB 1'
4260 def_dvbin
='#define CONFIG_DVBIN 1'
4261 aomodules
="mpegpes(dvb) $aomodules"
4262 vomodules
="mpegpes(dvb) $vomodules"
4265 noinputmodules
="dvb $noinputmodules"
4266 def_dvb
='#undef CONFIG_DVB'
4267 def_dvbin
='#undef CONFIG_DVBIN '
4268 aomodules
="mpegpes(file) $aomodules"
4269 vomodules
="mpegpes(file) $vomodules"
4273 echocheck
"PNG support"
4274 if test "$_png" = auto
; then
4277 # Don't check for -lpng on irix since it has its own libpng
4278 # incompatible with the GNU libpng
4279 res_comment
="disabled on irix (not GNU libpng)"
4286 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4287 printf("libpng: %s\n", png_libpng_ver);
4288 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4291 cc_check
-lpng -lz $_ld_lm && _png
=yes
4295 if test "$_png" = yes ; then
4296 def_png
='#define CONFIG_PNG 1'
4297 extra_ldflags
="$extra_ldflags -lpng -lz"
4299 def_png
='#undef CONFIG_PNG'
4302 echocheck
"MNG support"
4303 if test "$_mng" = auto
; then
4305 return_statement_check libmng.h
'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng
=yes
4308 if test "$_mng" = yes ; then
4309 def_mng
='#define CONFIG_MNG 1'
4310 extra_ldflags
="$extra_ldflags -lmng -lz"
4312 def_mng
='#undef CONFIG_MNG'
4315 echocheck
"JPEG support"
4316 if test "$_jpeg" = auto
; then
4318 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
4322 if test "$_jpeg" = yes ; then
4323 def_jpeg
='#define CONFIG_JPEG 1'
4324 vomodules
="jpeg $vomodules"
4325 extra_ldflags
="$extra_ldflags -ljpeg"
4327 def_jpeg
='#undef CONFIG_JPEG'
4328 novomodules
="jpeg $novomodules"
4333 echocheck
"PNM support"
4334 if test "$_pnm" = yes; then
4335 def_pnm
="#define CONFIG_PNM 1"
4336 vomodules
="pnm $vomodules"
4338 def_pnm
="#undef CONFIG_PNM"
4339 novomodules
="pnm $novomodules"
4345 echocheck
"GIF support"
4346 # This is to appease people who want to force gif support.
4347 # If it is forced to yes, then we still do checks to determine
4348 # which gif library to use.
4349 if test "$_gif" = yes ; then
4354 if test "$_gif" = auto
; then
4356 for _ld_gif
in "-lungif" "-lgif" ; do
4357 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4361 # If no library was found, and the user wants support forced,
4362 # then we force it on with libgif, as this is the safest
4363 # assumption IMHO. (libungif & libregif both create symbolic
4364 # links to libgif. We also assume that no x11 support is needed,
4365 # because if you are forcing this, then you _should_ know what
4366 # you are doing. [ Besides, package maintainers should never
4367 # have compiled x11 deps into libungif in the first place. ] )
4370 if test "$_force_gif" = yes && test "$_gif" = no
; then
4375 if test "$_gif" = yes ; then
4376 def_gif
='#define CONFIG_GIF 1'
4377 codecmodules
="gif $codecmodules"
4378 vomodules
="gif89a $vomodules"
4379 res_comment
="old version, some encoding functions disabled"
4380 def_gif_4
='#undef CONFIG_GIF_4'
4381 extra_ldflags
="$extra_ldflags $_ld_gif"
4387 #include <gif_lib.h>
4388 static void catch(int sig) { exit(1); }
4390 signal(SIGSEGV, catch); // catch segfault
4391 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4392 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4396 if cc_check
"$_ld_gif" ; then
4397 def_gif_4
='#define CONFIG_GIF_4 1'
4401 def_gif
='#undef CONFIG_GIF'
4402 def_gif_4
='#undef CONFIG_GIF_4'
4403 novomodules
="gif89a $novomodules"
4404 nocodecmodules
="gif $nocodecmodules"
4409 case "$_gif" in yes*)
4410 echocheck
"broken giflib workaround"
4411 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4415 #include <gif_lib.h>
4417 GifFileType gif = {.UserData = NULL};
4418 printf("UserData is at address %p\n", gif.UserData);
4422 if cc_check
"$_ld_gif" ; then
4423 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4432 echocheck
"VESA support"
4433 if test "$_vesa" = auto
; then
4435 statement_check vbe.h
'vbeInit()' -lvbe -llrmi && _vesa
=yes
4437 if test "$_vesa" = yes ; then
4438 def_vesa
='#define CONFIG_VESA 1'
4439 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4440 vomodules
="vesa $vomodules"
4442 def_vesa
='#undef CONFIG_VESA'
4443 novomodules
="vesa $novomodules"
4455 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4456 if test -z "$_sdlconfig" ; then
4457 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4458 _sdlconfig
="sdl-config"
4459 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4460 _sdlconfig
="sdl11-config"
4465 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4467 #ifdef CONFIG_SDL_SDL_H
4468 #include <SDL/SDL.h>
4473 // we allow SDL hacking our main() only on OSX
4476 int main(int argc, char *argv[]) {
4477 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4482 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4483 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4485 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4489 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4490 res_comment
="using $_sdlconfig"
4492 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4493 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4495 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4496 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4498 _inc_tmp
="$($_sdlconfig --cflags)"
4499 _ld_tmp
="$($_sdlconfig --libs)"
4501 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4503 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4504 # HACK for BeOS/Haiku SDL
4505 _ld_tmp
="$_ld_tmp -lstdc++"
4510 if test "$_sdl" = yes ; then
4511 def_sdl
='#define CONFIG_SDL 1'
4512 extra_cflags
="$extra_cflags $_inc_tmp"
4513 libs_mplayer
="$libs_mplayer $_ld_tmp"
4514 vomodules
="sdl $vomodules"
4515 aomodules
="sdl $aomodules"
4517 def_sdl
='#undef CONFIG_SDL'
4518 novomodules
="sdl $novomodules"
4519 noaomodules
="sdl $noaomodules"
4524 # make sure this stays below CoreVideo to avoid issues due to namespace
4525 # conflicts between -lGL and -framework OpenGL
4527 #Note: this test is run even with --enable-gl since we autodetect linker flags
4528 if (test "$_x11" = yes ||
test "$_sdl" = yes ||
test "$_cocoa" = yes || win32
) && test "$_gl" != no
; then
4531 #include <windows.h>
4533 #elif defined(GL_SDL)
4535 #ifdef CONFIG_SDL_SDL_H
4536 #include <SDL/SDL.h>
4541 // we allow SDL hacking our main() only on OSX
4546 #include <X11/Xlib.h>
4549 int main(int argc, char *argv[]) {
4552 wglCreateContext(dc);
4553 #elif defined(GL_SDL)
4554 SDL_GL_SwapBuffers();
4556 glXCreateContext(NULL, NULL, NULL, True);
4563 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4564 if cc_check
$_ld_tmp $_ld_lm ; then
4567 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4571 if cc_check
-DGL_WIN32 -lopengl32 ; then
4574 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4576 if test "$_cocoa" = yes ; then
4580 # last so it can reuse any linker etc. flags detected before
4581 if test "$_sdl" = yes ; then
4582 if cc_check
-DGL_SDL ||
4583 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4586 elif cc_check
-DGL_SDL -lGL ||
4587 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4590 libs_mplayer
="$libs_mplayer -lGL"
4596 if test "$_gl" = yes ; then
4597 def_gl
='#define CONFIG_GL 1'
4598 res_comment
="backends:"
4599 if test "$_gl_cocoa" = yes ; then
4600 def_gl_cocoa
='#define CONFIG_GL_COCOA 1'
4601 res_comment
="$res_comment cocoa"
4603 if test "$_gl_win32" = yes ; then
4604 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4605 res_comment
="$res_comment win32"
4607 if test "$_gl_x11" = yes ; then
4608 def_gl_x11
='#define CONFIG_GL_X11 1'
4609 res_comment
="$res_comment x11"
4611 if test "$_gl_sdl" = yes ; then
4612 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4613 res_comment
="$res_comment sdl"
4615 vomodules
="opengl $vomodules"
4617 def_gl
='#undef CONFIG_GL'
4618 def_gl_cocoa
='#undef CONFIG_GL_COCOA'
4619 def_gl_win32
='#undef CONFIG_GL_WIN32'
4620 def_gl_x11
='#undef CONFIG_GL_X11'
4621 def_gl_sdl
='#undef CONFIG_GL_SDL'
4622 novomodules
="opengl $novomodules"
4629 echocheck
"Windows waveout"
4630 if test "$_win32waveout" = auto
; then
4632 header_check_broken windows.h mmsystem.h
-lwinmm && _win32waveout
=yes
4634 if test "$_win32waveout" = yes ; then
4635 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
4636 libs_mplayer
="$libs_mplayer -lwinmm"
4637 aomodules
="win32 $aomodules"
4639 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
4640 noaomodules
="win32 $noaomodules"
4642 echores
"$_win32waveout"
4644 echocheck
"Direct3D"
4645 if test "$_direct3d" = auto
; then
4647 header_check d3d9.h
&& _direct3d
=yes
4649 if test "$_direct3d" = yes ; then
4650 def_direct3d
='#define CONFIG_DIRECT3D 1'
4651 vomodules
="direct3d $vomodules"
4653 def_direct3d
='#undef CONFIG_DIRECT3D'
4654 novomodules
="direct3d $novomodules"
4656 echores
"$_direct3d"
4659 if test "$_directx" = auto
; then
4663 int main(void) { return 0; }
4666 cc_check
-lgdi32 && _directx
=yes
4668 if test "$_directx" = yes ; then
4669 def_directx
='#define CONFIG_DIRECTX 1'
4670 libs_mplayer
="$libs_mplayer -lgdi32"
4671 vomodules
="directx $vomodules"
4672 aomodules
="dsound $aomodules"
4674 def_directx
='#undef CONFIG_DIRECTX'
4675 novomodules
="directx $novomodules"
4676 noaomodules
="dsound $noaomodules"
4684 if test "$_dxr3" = auto
; then
4686 header_check linux
/em8300.h
&& _dxr3
=yes
4688 if test "$_dxr3" = yes ; then
4689 def_dxr3
='#define CONFIG_DXR3 1'
4690 vomodules
="dxr3 $vomodules"
4692 def_dxr3
='#undef CONFIG_DXR3'
4693 novomodules
="dxr3 $novomodules"
4698 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
4699 if test "$_ivtv" = auto
; then
4701 #include <sys/time.h>
4702 #include <linux/videodev2.h>
4703 #include <linux/ivtv.h>
4704 #include <sys/ioctl.h>
4706 struct ivtv_cfg_stop_decode sd;
4707 struct ivtv_cfg_start_decode sd1;
4708 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
4709 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
4713 cc_check
&& _ivtv
=yes
4715 if test "$_ivtv" = yes ; then
4716 def_ivtv
='#define CONFIG_IVTV 1'
4717 vomodules
="ivtv $vomodules"
4718 aomodules
="ivtv $aomodules"
4720 def_ivtv
='#undef CONFIG_IVTV'
4721 novomodules
="ivtv $novomodules"
4722 noaomodules
="ivtv $noaomodules"
4727 echocheck
"V4L2 MPEG Decoder"
4728 if test "$_v4l2" = auto
; then
4730 #include <sys/time.h>
4731 #include <linux/videodev2.h>
4732 #include <linux/version.h>
4734 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4735 #error kernel headers too old, need 2.6.22
4737 struct v4l2_ext_controls ctrls;
4738 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4743 cc_check
&& _v4l2
=yes
4745 if test "$_v4l2" = yes ; then
4746 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
4747 vomodules
="v4l2 $vomodules"
4748 aomodules
="v4l2 $aomodules"
4750 def_v4l2
='#undef CONFIG_V4L2_DECODER'
4751 novomodules
="v4l2 $novomodules"
4752 noaomodules
="v4l2 $noaomodules"
4763 echocheck
"OSS Audio"
4764 if test "$_ossaudio" = auto
; then
4766 return_check
$_soundcard_header SNDCTL_DSP_SETFRAGMENT
&& _ossaudio
=yes
4768 if test "$_ossaudio" = yes ; then
4769 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
4770 aomodules
="oss $aomodules"
4772 #include <$_soundcard_header>
4773 #ifdef OPEN_SOUND_SYSTEM
4774 int main(void) { return 0; }
4776 #error Not the real thing
4780 cc_check
&& _real_ossaudio
=yes
4781 if test "$_real_ossaudio" = yes; then
4782 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4783 # Check for OSS4 headers (override default headers)
4784 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
4785 if test -f /etc
/oss.conf
; then
4787 _ossinc
="$OSSLIBDIR/include"
4788 if test -f "$_ossinc/sys/soundcard.h"; then
4789 extra_cflags
="-I$_ossinc $extra_cflags"
4792 elif netbsd || openbsd
; then
4793 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4794 extra_ldflags
="$extra_ldflags -lossaudio"
4796 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4798 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4800 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
4801 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4802 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4803 noaomodules
="oss $noaomodules"
4805 echores
"$_ossaudio"
4809 if test "$_arts" = auto
; then
4811 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4812 statement_check artsc.h
'arts_init()' $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
4817 if test "$_arts" = yes ; then
4818 def_arts
='#define CONFIG_ARTS 1'
4819 aomodules
="arts $aomodules"
4820 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
4821 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
4823 noaomodules
="arts $noaomodules"
4829 if test "$_esd" = auto
; then
4831 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4832 statement_check esd.h
'esd_open_sound("test")' $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
4837 if test "$_esd" = yes ; then
4838 def_esd
='#define CONFIG_ESD 1'
4839 aomodules
="esd $aomodules"
4840 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
4841 extra_cflags
="$extra_cflags $(esd-config --cflags)"
4843 echocheck
"esd_get_latency()"
4844 statement_check esd.h
'esd_get_latency(0)' $
(esd-config
--libs) $
(esd-config
--cflags) &&
4845 _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
4846 echores
"$_esd_latency"
4848 def_esd
='#undef CONFIG_ESD'
4849 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
4850 noaomodules
="esd $noaomodules"
4854 if test "$_rsound" = auto
; then
4856 statement_check rsound.h
'rsd_init(NULL);' -lrsound && _rsound
=yes
4860 if test "$_rsound" = yes ; then
4861 def_rsound
='#define CONFIG_RSOUND 1'
4862 aomodules
="rsound $aomodules"
4863 libs_mplayer
="$libs_mplayer -lrsound"
4865 def_rsound
='#undef CONFIG_RSOUND'
4866 noaomodules
="rsound $noaomodules"
4871 if test "$_nas" = auto
; then
4873 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
4875 if test "$_nas" = yes ; then
4876 def_nas
='#define CONFIG_NAS 1'
4877 libs_mplayer
="$libs_mplayer -laudio -lXt"
4878 aomodules
="nas $aomodules"
4880 noaomodules
="nas $noaomodules"
4881 def_nas
='#undef CONFIG_NAS'
4887 if test "$_pulse" = auto
; then
4889 if pkg_config_add
'libpulse >= 0.9' ; then
4895 if test "$_pulse" = yes ; then
4896 def_pulse
='#define CONFIG_PULSE 1'
4897 aomodules
="pulse $aomodules"
4899 def_pulse
='#undef CONFIG_PULSE'
4900 noaomodules
="pulse $noaomodules"
4905 if test "$_jack" = auto
; then
4907 if pkg_config_add jack
; then
4912 if test "$_jack" = yes ; then
4913 def_jack
='#define CONFIG_JACK 1'
4914 aomodules
="jack $aomodules"
4916 noaomodules
="jack $noaomodules"
4921 if test "$_openal" = auto
; then
4925 #include <OpenAL/al.h>
4930 alSourceQueueBuffers(0, 0, 0);
4931 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
4935 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
4936 cc_check
$I && _openal
=yes && break
4937 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
4939 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
4941 if test "$_openal" = yes ; then
4942 def_openal
='#define CONFIG_OPENAL 1'
4943 aomodules
="openal $aomodules"
4945 noaomodules
="openal $noaomodules"
4949 echocheck
"ALSA audio"
4950 if test "$_alloca" != yes ; then
4952 res_comment
="alloca missing"
4954 if test "$_alsa" = auto
; then
4956 if pkg_config_add
"alsa >= 1.0.9" ; then
4960 def_alsa
='#undef CONFIG_ALSA'
4961 if test "$_alsa" = yes ; then
4962 aomodules
="alsa $aomodules"
4963 def_alsa
='#define CONFIG_ALSA 1'
4965 noaomodules
="alsa $noaomodules"
4970 echocheck
"Sun audio"
4971 if test "$_sunaudio" = auto
; then
4973 #include <sys/types.h>
4974 #include <sys/audioio.h>
4975 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4978 cc_check
&& _sunaudio
=yes
4980 if test "$_sunaudio" = yes ; then
4981 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
4982 aomodules
="sun $aomodules"
4984 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
4985 noaomodules
="sun $noaomodules"
4987 echores
"$_sunaudio"
4991 echocheck
"CoreAudio"
4992 if test "$_coreaudio" = auto
; then
4994 #include <CoreAudio/CoreAudio.h>
4995 #include <AudioToolbox/AudioToolbox.h>
4996 #include <AudioUnit/AudioUnit.h>
4997 int main(void) { return 0; }
5000 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5002 if test "$_coreaudio" = yes ; then
5003 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5004 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5005 aomodules
="coreaudio $aomodules"
5007 def_coreaudio
='#undef CONFIG_COREAUDIO'
5008 noaomodules
="coreaudio $noaomodules"
5015 echocheck
"SGI audio"
5016 if test "$_sgiaudio" = auto
; then
5018 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5020 if test "$_sgiaudio" = "yes" ; then
5021 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5022 libs_mplayer
="$libs_mplayer -laudio"
5023 aomodules
="sgi $aomodules"
5025 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5026 noaomodules
="sgi $noaomodules"
5028 echores
"$_sgiaudio"
5032 # set default CD/DVD devices
5034 default_cdrom_device
="D:"
5036 default_cdrom_device
="/dev/disk1"
5037 elif dragonfly
; then
5038 default_cdrom_device
="/dev/cd0"
5040 default_cdrom_device
="/dev/acd0"
5042 default_cdrom_device
="/dev/rcd0c"
5044 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5045 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5046 # file system and the volfs service.
5047 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5049 default_cdrom_device
="a1ide.device:2"
5051 default_cdrom_device
="/dev/cdrom"
5054 if win32 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5055 default_dvd_device
=$default_cdrom_device
5057 default_dvd_device
="/dev/rdiskN"
5059 default_dvd_device
="/dev/dvd"
5063 echocheck
"VCD support"
5064 if test "$_vcd" = auto
; then
5066 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos
; then
5069 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5072 if test "$_vcd" = yes; then
5073 inputmodules
="vcd $inputmodules"
5074 def_vcd
='#define CONFIG_VCD 1'
5076 def_vcd
='#undef CONFIG_VCD'
5077 noinputmodules
="vcd $noinputmodules"
5078 res_comment
="not supported on this OS"
5084 echocheck
"Blu-ray support"
5085 if test "$_bluray" = auto
; then
5087 statement_check libbluray
/bluray.h
'bd_get_title_info(0, 0, 0)' -lbluray && _bluray
=yes
5089 if test "$_bluray" = yes ; then
5090 def_bluray
='#define CONFIG_LIBBLURAY 1'
5091 extra_ldflags
="$extra_ldflags -lbluray"
5092 inputmodules
="bluray $inputmodules"
5094 def_bluray
='#undef CONFIG_LIBBLURAY'
5095 noinputmodules
="bluray $noinputmodules"
5100 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5101 _dvdread_internal
=no
5103 if test "$_dvdread_internal" = auto
; then
5104 _dvdread_internal
=no
5106 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) &&
5107 (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes ||
5108 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) ||
5109 darwin || win32
; then
5110 _dvdread_internal
=yes
5112 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5114 elif test "$_dvdread" = auto
; then
5116 if test "$_dl" = yes; then
5117 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
5118 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
5119 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5121 extra_cflags
="$extra_cflags $_dvdreadcflags"
5122 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5123 res_comment
="external"
5128 if test "$_dvdread_internal" = yes; then
5129 def_dvdread
='#define CONFIG_DVDREAD 1'
5130 inputmodules
="dvdread(internal) $inputmodules"
5131 res_comment
="internal"
5132 elif test "$_dvdread" = yes; then
5133 def_dvdread
='#define CONFIG_DVDREAD 1'
5134 extra_ldflags
="$extra_ldflags -ldvdread"
5135 inputmodules
="dvdread(external) $inputmodules"
5136 res_comment
="external"
5138 def_dvdread
='#undef CONFIG_DVDREAD'
5139 noinputmodules
="dvdread $noinputmodules"
5144 echocheck
"internal libdvdcss"
5145 if test "$_libdvdcss_internal" = auto
; then
5146 _libdvdcss_internal
=no
5147 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
5148 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5150 if test "$_libdvdcss_internal" = yes ; then
5151 if linux || netbsd || openbsd || bsdos
; then
5152 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5153 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5154 elif freebsd || dragonfly
; then
5155 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5157 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5158 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5160 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5162 cflags_libdvdcss
="-DSYS_BEOS"
5164 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5165 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5166 inputmodules
="libdvdcss(internal) $inputmodules"
5168 noinputmodules
="libdvdcss(internal) $noinputmodules"
5170 echores
"$_libdvdcss_internal"
5173 echocheck
"cdparanoia"
5174 if test "$_cdparanoia" = auto
; then
5176 #include <cdda_interface.h>
5177 #include <cdda_paranoia.h>
5178 // This need a better test. How ?
5179 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5182 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5183 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm &&
5184 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5187 if test "$_cdparanoia" = yes ; then
5189 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5190 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5192 echores
"$_cdparanoia"
5196 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5198 if pkg_config_add libcdio_paranoia
; then
5202 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5204 def_libcdio
='#define CONFIG_LIBCDIO 1'
5205 def_havelibcdio
='yes'
5208 if test "$_cdparanoia" = yes ; then
5209 res_comment
="using cdparanoia"
5211 def_libcdio
='#undef CONFIG_LIBCDIO'
5212 def_havelibcdio
='no'
5216 if test "$_cdda" = yes ; then
5217 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5218 def_cdparanoia
='#define CONFIG_CDDA 1'
5219 inputmodules
="cdda $inputmodules"
5221 def_cdparanoia
='#undef CONFIG_CDDA'
5222 noinputmodules
="cdda $noinputmodules"
5225 if test "$_cddb" = yes ; then
5226 def_cddb
='#define CONFIG_CDDB 1'
5227 inputmodules
="cddb $inputmodules"
5230 def_cddb
='#undef CONFIG_CDDB'
5231 noinputmodules
="cddb $noinputmodules"
5234 echocheck
"bitmap font support"
5235 if test "$_bitmap_font" = yes ; then
5236 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5238 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5240 echores
"$_bitmap_font"
5243 echocheck
"freetype >= 2.0.9"
5245 # freetype depends on iconv
5246 if test "$_iconv" = no
; then
5248 res_comment
="iconv support needed"
5251 if test "$_freetype" = auto
; then
5252 if pkg_config_add freetype2
; then
5255 die
"Unable to find development files for libfreetype. Aborting. If you really mean to compile without FreeType support use --disable-freetype."
5258 if test "$_freetype" = yes ; then
5259 def_freetype
='#define CONFIG_FREETYPE 1'
5261 def_freetype
='#undef CONFIG_FREETYPE'
5263 echores
"$_freetype"
5265 if test "$_freetype" = no
; then
5267 res_comment
="FreeType support needed"
5269 echocheck
"fontconfig"
5270 if test "$_fontconfig" = auto
; then
5271 if pkg_config_add
'fontconfig >= 2.4.2' ; then
5274 die
"Unable to find development files for libfontconfig. Aborting. If you really mean to compile without fontconfig support use --disable-fontconfig."
5277 if test "$_fontconfig" = yes ; then
5278 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5280 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5282 echores
"$_fontconfig"
5285 echocheck
"SSA/ASS support"
5286 if test "$_ass" = auto
; then
5287 if pkg_config_add libass
; then
5289 def_ass
='#define CONFIG_ASS 1'
5291 die
"Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
5294 def_ass
='#undef CONFIG_ASS'
5299 echocheck
"fribidi with charsets"
5300 if test "$_fribidi" = auto
; then
5302 if pkg_config_add fribidi
; then
5306 if test "$_fribidi" = yes ; then
5307 def_fribidi
='#define CONFIG_FRIBIDI 1'
5309 def_fribidi
='#undef CONFIG_FRIBIDI'
5315 if test "$_enca" = auto
; then
5317 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
5319 if test "$_enca" = yes ; then
5320 def_enca
='#define CONFIG_ENCA 1'
5321 extra_ldflags
="$extra_ldflags -lenca"
5323 def_enca
='#undef CONFIG_ENCA'
5330 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
5331 if test "$_zlib" = yes ; then
5332 def_zlib
='#define CONFIG_ZLIB 1'
5333 extra_ldflags
="$extra_ldflags -lz"
5335 def_zlib
='#define CONFIG_ZLIB 0'
5341 if test "$_rtc" = auto
; then
5343 #include <sys/ioctl.h>
5345 #include <linux/rtc.h>
5348 #define RTC_PIE_ON RTCIO_PIE_ON
5350 int main(void) { return RTC_PIE_ON; }
5353 cc_check
&& _rtc
=yes
5356 if test "$_rtc" = yes ; then
5357 def_rtc
='#define HAVE_RTC 1'
5359 def_rtc
='#undef HAVE_RTC'
5364 echocheck
"mad support"
5365 if test "$_mad" = auto
; then
5367 header_check mad.h
-lmad && _mad
=yes
5369 if test "$_mad" = yes ; then
5370 def_mad
='#define CONFIG_LIBMAD 1'
5371 extra_ldflags
="$extra_ldflags -lmad"
5372 codecmodules
="libmad $codecmodules"
5374 def_mad
='#undef CONFIG_LIBMAD'
5375 nocodecmodules
="libmad $nocodecmodules"
5379 echocheck
"OggVorbis support"
5380 if test "$_libvorbis" = auto
; then
5382 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes && _tremor
=no
5383 elif test "$_libvorbis" = yes ; then
5386 if test "$_tremor" = auto
; then
5388 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes
5390 if test "$_tremor" = yes ; then
5392 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5393 def_tremor
='#define CONFIG_TREMOR 1'
5394 codecmodules
="tremor(external) $codecmodules"
5395 res_comment
="external Tremor"
5396 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
5397 elif test "$_libvorbis" = yes ; then
5399 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5400 codecmodules
="libvorbis $codecmodules"
5401 res_comment
="libvorbis"
5402 extra_ldflags
="$extra_ldflags -lvorbis -logg"
5405 nocodecmodules
="libvorbis $nocodecmodules"
5409 echocheck
"libspeex (version >= 1.1 required)"
5410 if test "$_speex" = auto
; then
5414 #include <speex/speex.h>
5415 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
5417 cc_check
-lspeex $_ld_lm && _speex
=yes
5419 if test "$_speex" = yes ; then
5420 def_speex
='#define CONFIG_SPEEX 1'
5421 extra_ldflags
="$extra_ldflags -lspeex"
5422 codecmodules
="speex $codecmodules"
5424 def_speex
='#undef CONFIG_SPEEX'
5425 nocodecmodules
="speex $nocodecmodules"
5429 echocheck
"OggTheora support"
5430 if test "$_theora" = auto
; then
5432 if pkg_config_add theora
; then
5436 if test "$_theora" = yes ; then
5437 def_theora
='#define CONFIG_OGGTHEORA 1'
5438 codecmodules
="libtheora $codecmodules"
5440 def_theora
='#undef CONFIG_OGGTHEORA'
5441 nocodecmodules
="libtheora $nocodecmodules"
5445 # Any version of libmpg123 shall be fine.
5446 echocheck
"mpg123 support"
5447 def_mpg123
='#undef CONFIG_MPG123'
5448 if test "$_mpg123" = auto
; then
5450 statement_check mpg123.h
'mpg123_init()' -lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
5452 if test "$_mpg123" = yes ; then
5453 def_mpg123
='#define CONFIG_MPG123 1'
5454 codecmodules
="mpg123 $codecmodules"
5456 nocodecmodules
="mpg123 $nocodecmodules"
5460 echocheck
"liba52 support"
5461 def_liba52
='#undef CONFIG_LIBA52'
5462 if test "$_liba52" = auto
; then
5465 #include <inttypes.h>
5466 #include <a52dec/a52.h>
5467 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
5469 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
5471 if test "$_liba52" = yes ; then
5472 def_liba52
='#define CONFIG_LIBA52 1'
5473 codecmodules
="liba52 $codecmodules"
5475 nocodecmodules
="liba52 $nocodecmodules"
5479 echocheck
"libdca support"
5480 if test "$_libdca" = auto
; then
5482 for _ld_dca
in -ldca -ldts ; do
5483 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
5484 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
5487 if test "$_libdca" = yes ; then
5488 def_libdca
='#define CONFIG_LIBDCA 1'
5489 codecmodules
="libdca $codecmodules"
5491 def_libdca
='#undef CONFIG_LIBDCA'
5492 nocodecmodules
="libdca $nocodecmodules"
5496 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5497 if test "$_musepack" = yes ; then
5501 #include <mpcdec/mpcdec.h>
5503 mpc_streaminfo info;
5504 mpc_decoder decoder;
5505 mpc_decoder_set_streaminfo(&decoder, &info);
5506 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5510 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5512 if test "$_musepack" = yes ; then
5513 def_musepack
='#define CONFIG_MUSEPACK 1'
5514 extra_ldflags
="$extra_ldflags -lmpcdec"
5515 codecmodules
="musepack $codecmodules"
5517 def_musepack
='#undef CONFIG_MUSEPACK'
5518 nocodecmodules
="musepack $nocodecmodules"
5520 echores
"$_musepack"
5523 echocheck
"FAAD2 support"
5524 if test "$_faad" = auto
; then
5528 #ifndef FAAD_MIN_STREAMSIZE
5529 #error Too old version
5531 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
5532 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5534 cc_check
-lfaad $_ld_lm && _faad
=yes
5537 def_faad
='#undef CONFIG_FAAD'
5538 if test "$_faad" = yes ; then
5539 def_faad
='#define CONFIG_FAAD 1'
5540 extra_ldflags
="$extra_ldflags -lfaad"
5541 codecmodules
="faad2 $codecmodules"
5543 nocodecmodules
="faad2 $nocodecmodules"
5548 echocheck
"LADSPA plugin support"
5549 if test "$_ladspa" = auto
; then
5551 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
5553 if test "$_ladspa" = yes; then
5554 def_ladspa
="#define CONFIG_LADSPA 1"
5556 def_ladspa
="#undef CONFIG_LADSPA"
5561 echocheck
"libbs2b audio filter support"
5562 if test "$_libbs2b" = auto
; then
5564 if pkg_config_add libbs2b
; then
5568 def_libbs2b
="#undef CONFIG_LIBBS2B"
5569 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
5573 if test -z "$_codecsdir" ; then
5574 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
5575 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5576 if test -d "$dir" ; then
5582 # Fall back on default directory.
5583 if test -z "$_codecsdir" ; then
5584 _codecsdir
="$_libdir/codecs"
5585 mingw32
&& _codecsdir
="codecs"
5589 echocheck
"Win32 codecs"
5590 if test "$_win32dll" = auto
; then
5592 if x86_32
&& ! qnx
; then
5596 if test "$_win32dll" = yes ; then
5597 def_win32dll
='#define CONFIG_WIN32DLL 1'
5599 def_win32_loader
='#define WIN32_LOADER 1'
5600 _win32_emulation
=yes
5602 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
5603 res_comment
="using native windows"
5605 codecmodules
="win32 $codecmodules"
5607 def_win32dll
='#undef CONFIG_WIN32DLL'
5608 def_win32_loader
='#undef WIN32_LOADER'
5609 nocodecmodules
="win32 $nocodecmodules"
5611 echores
"$_win32dll"
5614 echocheck
"XAnim codecs"
5615 if test "$_xanim" = auto
; then
5617 res_comment
="dynamic loader support needed"
5618 if test "$_dl" = yes ; then
5622 if test "$_xanim" = yes ; then
5623 def_xanim
='#define CONFIG_XANIM 1'
5624 codecmodules
="xanim $codecmodules"
5626 def_xanim
='#undef CONFIG_XANIM'
5627 nocodecmodules
="xanim $nocodecmodules"
5632 echocheck
"RealPlayer codecs"
5633 if test "$_real" = auto
; then
5635 res_comment
="dynamic loader support needed"
5636 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
5637 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32
) ; then
5641 if test "$_real" = yes ; then
5642 def_real
='#define CONFIG_REALCODECS 1'
5643 codecmodules
="real $codecmodules"
5645 def_real
='#undef CONFIG_REALCODECS'
5646 nocodecmodules
="real $nocodecmodules"
5651 echocheck
"QuickTime codecs"
5653 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
5654 if test "$_qtx" = auto
; then
5655 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
5657 if test "$_qtx" = yes ; then
5658 def_qtx
='#define CONFIG_QTX_CODECS 1'
5659 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
5660 codecmodules
="qtx $codecmodules"
5661 darwin || win32 || _qtx_emulation
=yes
5663 def_qtx
='#undef CONFIG_QTX_CODECS'
5664 nocodecmodules
="qtx $nocodecmodules"
5668 echocheck
"Nemesi Streaming Media libraries"
5669 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
5671 if pkg_config_add libnemesi
; then
5675 if test "$_nemesi" = yes; then
5677 def_nemesi
='#define CONFIG_LIBNEMESI 1'
5678 inputmodules
="nemesi $inputmodules"
5680 _native_rtsp
="$networking"
5682 def_nemesi
='#undef CONFIG_LIBNEMESI'
5683 noinputmodules
="nemesi $noinputmodules"
5687 echocheck
"LIVE555 Streaming Media libraries"
5688 if test "$_live" != no
&& test "$networking" = yes ; then
5689 cat > $TMPCPP << EOF
5690 #include <liveMedia.hh>
5691 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
5692 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
5694 int main(void) { return 0; }
5698 for I
in $extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
5699 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include
$I/groupsock
/include
&&
5700 _livelibdir
=$
(echo $I|
sed s
/-I//) &&
5701 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
5702 $_livelibdir/groupsock/libgroupsock.a \
5703 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
5704 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
5705 $extra_ldflags -lstdc++" \
5706 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
5707 -I$_livelibdir/UsageEnvironment/include \
5708 -I$_livelibdir/BasicUsageEnvironment/include \
5709 -I$_livelibdir/groupsock/include" &&
5712 if test "$_live" != yes ; then
5713 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
5714 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
5719 if test "$_live" = yes && test "$networking" = yes; then
5720 test $_livelibdir && res_comment
="using $_livelibdir"
5721 def_live
='#define CONFIG_LIVE555 1'
5722 inputmodules
="live555 $inputmodules"
5723 elif test "$_live_dist" = yes && test "$networking" = yes; then
5724 res_comment
="using distribution version"
5726 def_live
='#define CONFIG_LIVE555 1'
5727 extra_ldflags
="$extra_ldflags $ld_tmp"
5728 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
5729 inputmodules
="live555 $inputmodules"
5732 def_live
='#undef CONFIG_LIVE555'
5733 noinputmodules
="live555 $noinputmodules"
5739 # Test with > against Libav 0.8 versions which will NOT work rather than
5740 # specify minimum version, to allow (future) point releases to possibly work.
5741 all_libav_libs
="libavutil > 51.21.0:libavcodec > 53.34.0:libavformat > 53.20.0:libswscale >= 2.0.0"
5742 echocheck
"Libav ($all_libav_libs)"
5743 if test "$ffmpeg" = auto
; then
5744 IFS
=":" # shell should not be used for programming
5745 if ! pkg_config_add
$all_libav_libs ; then
5746 die
"Unable to find development files for some of the required Libav libraries above. Aborting."
5751 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
5752 if ! test -z "$_ffmpeg_source" ; then
5753 def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
5756 echocheck
"libpostproc >= 52.0.0"
5757 if test "$libpostproc" = auto
; then
5759 if pkg_config_add
"libpostproc >= 52.0.0" ; then
5763 if test "$libpostproc" = yes ; then
5764 def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
5766 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
5768 echores
"$libpostproc"
5771 echocheck
"libdv-0.9.5+"
5772 if test "$_libdv" = auto
; then
5774 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
5776 if test "$_libdv" = yes ; then
5777 def_libdv
='#define CONFIG_LIBDV095 1'
5778 extra_ldflags
="$extra_ldflags -ldv"
5779 codecmodules
="libdv $codecmodules"
5781 def_libdv
='#undef CONFIG_LIBDV095'
5782 nocodecmodules
="libdv $nocodecmodules"
5788 if test "$_xvid" = auto
; then
5790 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
5791 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
5792 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
5796 if test "$_xvid" = yes ; then
5797 def_xvid
='#define CONFIG_XVID4 1'
5798 codecmodules
="xvid $codecmodules"
5800 def_xvid
='#undef CONFIG_XVID4'
5801 nocodecmodules
="xvid $nocodecmodules"
5807 if test "$_libnut" = auto
; then
5809 statement_check libnut.h
'nut_context_tt * nut; nut_error(0)' -lnut && _libnut
=yes
5812 if test "$_libnut" = yes ; then
5813 def_libnut
='#define CONFIG_LIBNUT 1'
5814 extra_ldflags
="$extra_ldflags -lnut"
5816 def_libnut
='#undef CONFIG_LIBNUT'
5820 # These VO checks must be done after the FFmpeg one
5821 echocheck
"/dev/mga_vid"
5822 if test "$_mga" = auto
; then
5824 test -c /dev
/mga_vid
&& _mga
=yes
5826 if test "$_mga" = yes ; then
5827 def_mga
='#define CONFIG_MGA 1'
5828 vomodules
="mga $vomodules"
5830 def_mga
='#undef CONFIG_MGA'
5831 novomodules
="mga $novomodules"
5837 if test "$_xmga" = auto
; then
5839 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
5841 if test "$_xmga" = yes ; then
5842 def_xmga
='#define CONFIG_XMGA 1'
5843 vomodules
="xmga $vomodules"
5845 def_xmga
='#undef CONFIG_XMGA'
5846 novomodules
="xmga $novomodules"
5851 echocheck
"UnRAR executable"
5852 if test "$_unrar_exec" = auto
; then
5854 mingw32
&& _unrar_exec
="no"
5856 if test "$_unrar_exec" = yes ; then
5857 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
5859 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
5861 echores
"$_unrar_exec"
5863 echocheck
"TV interface"
5864 if test "$_tv" = yes ; then
5865 def_tv
='#define CONFIG_TV 1'
5866 inputmodules
="tv $inputmodules"
5868 noinputmodules
="tv $noinputmodules"
5869 def_tv
='#undef CONFIG_TV'
5874 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
5875 echocheck
"*BSD BT848 bt8xx header"
5877 for file in "machine/ioctl_bt848.h" \
5878 "dev/bktr/ioctl_bt848.h" \
5879 "dev/video/bktr/ioctl_bt848.h" \
5880 "dev/ic/bt8xx.h" ; do
5882 #include <sys/types.h>
5883 #include <sys/ioctl.h>
5885 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
5889 _ioctl_bt848_h_name
="$file"
5893 if test "$_ioctl_bt848_h" = yes ; then
5894 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
5895 res_comment
="using $_ioctl_bt848_h_name"
5897 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
5899 echores
"$_ioctl_bt848_h"
5901 echocheck
"*BSD ioctl_meteor.h"
5903 for ioctl_meteor_h_path
in "machine/ioctl_meteor.h" "dev/bktr/ioctl_meteor.h" "dev/video/bktr/ioctl_meteor.h" ; do
5904 statement_check_broken
"sys/types.h" "$ioctl_meteor_h_path" 'ioctl(0, METEORSINPUT, 0)' &&
5905 _ioctl_meteor_h
=yes && break
5907 if test "$_ioctl_meteor_h" = yes ; then
5908 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$ioctl_meteor_h_path>"
5909 res_comment
="using $ioctl_meteor_h_path"
5911 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
5913 echores
"$_ioctl_meteor_h"
5915 echocheck
"*BSD BrookTree 848 TV interface"
5916 if test "$_tv_bsdbt848" = auto
; then
5918 if test "$_tv" = yes ; then
5920 #include <sys/types.h>
5921 $def_ioctl_meteor_h_name
5922 $def_ioctl_bt848_h_name
5923 #ifdef IOCTL_METEOR_H_NAME
5924 #include IOCTL_METEOR_H_NAME
5926 #ifdef IOCTL_BT848_H_NAME
5927 #include IOCTL_BT848_H_NAME
5930 ioctl(0, METEORSINPUT, 0);
5931 ioctl(0, TVTUNER_GETFREQ, 0);
5935 cc_check
&& _tv_bsdbt848
=yes
5938 if test "$_tv_bsdbt848" = yes ; then
5939 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
5940 inputmodules
="tv-bsdbt848 $inputmodules"
5942 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
5943 noinputmodules
="tv-bsdbt848 $noinputmodules"
5945 echores
"$_tv_bsdbt848"
5946 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
5949 echocheck
"DirectShow TV interface"
5950 if test "$_tv_dshow" = auto
; then
5952 if test "$_tv" = yes && win32
; then
5953 statement_check ole2.h
'void* p; CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p)' -lole32 -luuid && _tv_dshow
=yes
5956 if test "$_tv_dshow" = yes ; then
5957 inputmodules
="tv-dshow $inputmodules"
5958 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
5959 extra_ldflags
="$extra_ldflags -lole32 -luuid"
5961 noinputmodules
="tv-dshow $noinputmodules"
5962 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
5964 echores
"$_tv_dshow"
5967 echocheck
"Video 4 Linux TV interface"
5968 if test "$_tv_v4l1" = auto
; then
5970 if test "$_tv" = yes && linux
; then
5971 header_check_broken sys
/time.h linux
/videodev.h
&& _tv_v4l1
=yes
5974 if test "$_tv_v4l1" = yes ; then
5977 def_tv_v4l
='#define CONFIG_TV_V4L 1'
5978 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
5979 inputmodules
="tv-v4l $inputmodules"
5981 noinputmodules
="tv-v4l1 $noinputmodules"
5982 def_tv_v4l
='#undef CONFIG_TV_V4L'
5987 echocheck
"Video 4 Linux 2 TV interface"
5988 if test "$_tv_v4l2" = auto
; then
5990 if test "$_tv" = yes && linux
; then
5991 header_check_broken sys
/time.h linux
/videodev2.h
&& _tv_v4l2
=yes
5992 elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then
5996 if test "$_tv_v4l2" = yes ; then
5999 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6000 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
6001 inputmodules
="tv-v4l2 $inputmodules"
6003 noinputmodules
="tv-v4l2 $noinputmodules"
6004 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
6009 echocheck
"Radio interface"
6010 if test "$_radio" = yes ; then
6011 def_radio
='#define CONFIG_RADIO 1'
6012 inputmodules
="radio $inputmodules"
6013 if test "$_alsa" != yes -a "$_ossaudio" != yes ; then
6016 if test "$_radio_capture" = yes ; then
6018 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
6020 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6023 noinputmodules
="radio $noinputmodules"
6024 def_radio
='#undef CONFIG_RADIO'
6025 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6029 echocheck
"Capture for Radio interface"
6030 echores
"$_radio_capture"
6032 echocheck
"Video 4 Linux 2 Radio interface"
6033 if test "$_radio_v4l2" = auto
; then
6035 if test "$_radio" = yes && linux
; then
6036 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
6039 if test "$_radio_v4l2" = yes ; then
6040 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
6042 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
6044 echores
"$_radio_v4l2"
6046 echocheck
"Video 4 Linux Radio interface"
6047 if test "$_radio_v4l" = auto
; then
6049 if test "$_radio" = yes && linux
; then
6050 header_check linux
/videodev.h
&& _radio_v4l
=yes
6053 if test "$_radio_v4l" = yes ; then
6054 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
6056 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
6058 echores
"$_radio_v4l"
6060 if freebsd || netbsd || openbsd || dragonfly || bsdos
&&
6061 test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6062 echocheck
"*BSD BrookTree 848 Radio interface"
6065 #include <sys/types.h>
6066 $def_ioctl_bt848_h_name
6067 #ifdef IOCTL_BT848_H_NAME
6068 #include IOCTL_BT848_H_NAME
6070 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
6072 cc_check
&& _radio_bsdbt848
=yes
6073 echores
"$_radio_bsdbt848"
6074 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
6076 if test "$_radio_bsdbt848" = yes ; then
6077 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
6079 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
6082 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&&
6083 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6084 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6087 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6088 if test "$_pvr" = auto
; then
6090 if test "$_tv_v4l2" = yes && linux
; then
6092 #include <sys/time.h>
6093 #include <linux/videodev2.h>
6094 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
6096 cc_check
&& _pvr
=yes
6099 if test "$_pvr" = yes ; then
6100 def_pvr
='#define CONFIG_PVR 1'
6101 inputmodules
="pvr $inputmodules"
6103 noinputmodules
="pvr $noinputmodules"
6104 def_pvr
='#undef CONFIG_PVR'
6110 if test "$_ftp" = "auto" ; then
6111 test "$networking" = "yes" && ! beos
&& _ftp
=yes
6113 if test "$_ftp" = yes ; then
6114 def_ftp
='#define CONFIG_FTP 1'
6115 inputmodules
="ftp $inputmodules"
6117 noinputmodules
="ftp $noinputmodules"
6118 def_ftp
='#undef CONFIG_FTP'
6122 echocheck
"vstream client"
6123 if test "$_vstream" = auto
; then
6126 #include <vstream-client.h>
6127 void vstream_error(const char *format, ... ) {}
6128 int main(void) { vstream_start(); return 0; }
6130 cc_check
-lvstream-client && _vstream
=yes
6132 if test "$_vstream" = yes ; then
6133 def_vstream
='#define CONFIG_VSTREAM 1'
6134 inputmodules
="vstream $inputmodules"
6135 extra_ldflags
="$extra_ldflags -lvstream-client"
6137 noinputmodules
="vstream $noinputmodules"
6138 def_vstream
='#undef CONFIG_VSTREAM'
6143 echocheck
"Subtitles sorting"
6144 if test "$_sortsub" = yes ; then
6145 def_sortsub
='#define CONFIG_SORTSUB 1'
6147 def_sortsub
='#undef CONFIG_SORTSUB'
6152 echocheck
"XMMS inputplugin support"
6153 if test "$_xmms" = yes ; then
6154 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6155 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
6156 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
6158 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6159 _xmmslibdir
=/usr
/lib
6162 def_xmms
='#define CONFIG_XMMS 1'
6164 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
6166 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6169 def_xmms
='#undef CONFIG_XMMS'
6173 if test "$_charset" != "noconv" ; then
6174 def_charset
="#define MSG_CHARSET \"$_charset\""
6176 def_charset
="#undef MSG_CHARSET"
6180 #############################################################################
6182 echocheck
"automatic gdb attach"
6183 if test "$_crash_debug" = yes ; then
6184 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
6186 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
6189 echores
"$_crash_debug"
6191 echocheck
"compiler support for noexecstack"
6192 if cflag_check
-Wl,-z,noexecstack
; then
6193 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
6199 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
6200 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
6201 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
6208 # Dynamic linking flags
6209 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6211 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
6212 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! sunos
; then
6213 _ld_dl_dynamic
='-rdynamic'
6216 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6217 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
6218 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
6220 def_debug
='#undef MP_DEBUG'
6221 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
6224 echocheck
"joystick"
6225 def_joystick
='#undef CONFIG_JOYSTICK'
6226 if test "$_joystick" = yes ; then
6227 if linux || freebsd
; then
6228 # TODO add some check
6229 def_joystick
='#define CONFIG_JOYSTICK 1'
6232 res_comment
="unsupported under $system_name"
6235 echores
"$_joystick"
6238 if test "$_lirc" = auto
; then
6240 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
6242 if test "$_lirc" = yes ; then
6243 def_lirc
='#define CONFIG_LIRC 1'
6244 libs_mplayer
="$libs_mplayer -llirc_client"
6246 def_lirc
='#undef CONFIG_LIRC'
6251 if test "$_lircc" = auto
; then
6253 header_check lirc
/lircc.h
-llircc && _lircc
=yes
6255 if test "$_lircc" = yes ; then
6256 def_lircc
='#define CONFIG_LIRCC 1'
6257 libs_mplayer
="$libs_mplayer -llircc"
6259 def_lircc
='#undef CONFIG_LIRCC'
6263 #############################################################################
6265 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
6267 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
6269 # This must be the last test to be performed. Any other tests following it
6270 # could fail due to linker errors. libdvdnavmini is intentionally not linked
6271 # against libdvdread (to permit MPlayer to use its own copy of the library).
6272 # So any compilation using the flags added here but not linking against
6273 # libdvdread can fail.
6274 echocheck
"DVD support (libdvdnav)"
6275 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
6279 if test "$_dvdnav" = auto
; then
6280 if test "$_dvdread_internal" = yes ; then
6283 res_comment
="internal"
6285 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
6288 if test "$_dvdnav" = auto
; then
6290 _dvdnavdir
=$
($_dvdnavconfig --cflags)
6291 _dvdnavlibs
=$
($_dvdnavconfig --libs)
6292 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
6294 if test "$_dvdnav" = yes ; then
6295 def_dvdnav
='#define CONFIG_DVDNAV 1'
6296 if test "$dvdnav_internal" = yes ; then
6297 cflags_libdvdnav
="-Ilibdvdnav"
6298 inputmodules
="dvdnav(internal) $inputmodules"
6300 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
6301 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
6302 inputmodules
="dvdnav $inputmodules"
6305 def_dvdnav
='#undef CONFIG_DVDNAV'
6306 noinputmodules
="dvdnav $noinputmodules"
6310 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
6311 # Read dvdnav comment above.
6314 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
6315 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
6317 for part
in $list; do
6318 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
6319 echo "${nprefix}_$part = yes"
6324 #############################################################################
6325 echo "Creating config.mak"
6326 cat > config.mak
<< EOF
6327 # -------- Generated by configure -----------
6329 # Ensure that locale settings do not interfere with shell commands.
6332 CONFIGURATION = $configuration
6335 DOC_LANGS = $language_doc
6336 DOC_LANG_ALL = $doc_lang_all
6337 MAN_LANGS = $language_man
6338 MAN_LANG_ALL = $man_lang_all
6339 MSG_LANGS = $language_msg
6340 MSG_LANG_ALL = $msg_lang_all
6342 prefix = \$(DESTDIR)$_prefix
6343 BINDIR = \$(DESTDIR)$_bindir
6344 DATADIR = \$(DESTDIR)$_datadir
6345 LIBDIR = \$(DESTDIR)$_libdir
6346 MANDIR = \$(DESTDIR)$_mandir
6347 CONFDIR = \$(DESTDIR)$_confdir
6348 LOCALEDIR = \$(DESTDIR)$_localedir
6356 INSTALLSTRIP = $_install_strip
6359 CFLAGS = $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
6360 CXXFLAGS = $WARNFLAGS $ERRORFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
6361 DEPFLAGS = $DEPFLAGS
6363 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
6364 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
6365 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
6366 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
6367 CFLAGS_STACKREALIGN = $cflags_stackrealign
6369 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
6370 EXTRALIBS_MPLAYER = $libs_mplayer
6379 $(mak_enable "$arch_all" "$arch" ARCH)
6380 $(mak_enable "$subarch_all" "$subarch" ARCH)
6381 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
6385 NEED_GETTIMEOFDAY = $need_gettimeofday
6386 NEED_GLOB = $need_glob
6387 NEED_SETENV = $need_setenv
6388 NEED_SHMEM = $need_shmem
6389 NEED_STRSEP = $need_strsep
6390 NEED_SWAB = $need_swab
6391 NEED_VSSCANF = $need_vsscanf
6397 APPLE_IR = $_apple_ir
6398 APPLE_REMOTE = $_apple_remote
6400 AUDIO_INPUT = $_audio_input
6401 BITMAP_FONT = $_bitmap_font
6407 COREAUDIO = $_coreaudio
6408 COREVIDEO = $_corevideo
6409 SHAREDBUFFER = $_sharedbuffer
6411 DIRECT3D = $_direct3d
6412 DIRECTFB = $_directfb
6416 DVDNAV_INTERNAL = $dvdnav_internal
6418 DVDREAD_INTERNAL = $_dvdread_internal
6422 FASTMEMCPY = $_fastmemcpy
6424 FREETYPE = $_freetype
6429 GL_COCOA = $_gl_cocoa
6430 GL_WIN32 = $_gl_win32
6433 HAVE_POSIX_SELECT = $_posix_select
6434 HAVE_SYS_MMAN_H = $_mman
6437 JOYSTICK = $_joystick
6442 LIBBLURAY = $_bluray
6446 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
6448 LIBNEMESI = $_nemesi
6450 LIBPOSTPROC = $libpostproc
6451 LIBSMBCLIENT = $_smb
6452 LIBTHEORA = $_theora
6455 MACOSX_FINDER = $_macosx_finder
6460 MUSEPACK = $_musepack
6462 NATIVE_RTSP = $_native_rtsp
6463 NETWORKING = $networking
6466 PE_EXECUTABLE = $_pe_executable
6469 PRIORITY = $_priority
6473 QTX_CODECS_WIN32 = $_qtx_codecs_win32
6474 QTX_EMULATION = $_qtx_emulation
6476 RADIO_CAPTURE=$_radio_capture
6477 REAL_CODECS = $_real
6482 STREAM_CACHE = $_stream_cache
6483 SGIAUDIO = $_sgiaudio
6484 SUNAUDIO = $_sunaudio
6490 TV_BSDBT848 = $_tv_bsdbt848
6491 TV_DSHOW = $_tv_dshow
6495 UNRAR_EXEC = $_unrar_exec
6503 WIN32DLL = $_win32dll
6504 WIN32WAVEOUT = $_win32waveout
6505 WIN32_EMULATION = $_win32_emulation
6507 XANIM_CODECS = $_xanim
6509 XMMS_PLUGINS = $_xmms
6513 YUV4MPEG = $_yuv4mpeg
6516 FFMPEG_INTERNALS = $ffmpeg_internals
6517 FFMPEG_SOURCE_PATH = $_ffmpeg_source
6521 YASMFLAGS = $YASMFLAGS
6523 CONFIG_VDPAU = $_vdpau
6524 CONFIG_ZLIB = $_zlib
6526 HAVE_PTHREADS = $_pthreads
6528 HAVE_W32THREADS = $_w32threads
6529 HAVE_YASM = $have_yasm
6533 #############################################################################
6535 ff_config_enable
() {
6536 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
6537 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
6539 test -z "$_nprefix" && _nprefix
='CONFIG'
6540 for part
in $list; do
6541 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
6542 echo "#define ${_nprefix}_$part 1"
6544 echo "#define ${_nprefix}_$part 0"
6549 echo "Creating config.h"
6551 /*----------------------------------------------------------------------------
6552 ** This file has been automatically generated by configure any changes in it
6553 ** will be lost when you run configure again.
6554 ** Instead of modifying definitions here, use the --enable/--disable options
6555 ** of the configure script! See ./configure --help for details.
6556 *---------------------------------------------------------------------------*/
6558 #ifndef MPLAYER_CONFIG_H
6559 #define MPLAYER_CONFIG_H
6561 /* Undefine this if you do not want to select mono audio (left or right)
6562 with a stereo MPEG layer 2/3 audio stream. The command line option
6563 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
6564 right-only), with 0 being the default.
6566 #define CONFIG_FAKE_MONO 1
6568 /* set up audio OUTBURST. Do not change this! */
6569 #define OUTBURST 512
6571 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
6573 #undef FAST_OSD_TABLE
6577 #define CONFIGURATION "$configuration"
6579 #define MPLAYER_DATADIR "$_datadir"
6580 #define MPLAYER_CONFDIR "$_confdir"
6581 #define MPLAYER_LOCALEDIR "$_localedir"
6585 /* definitions needed by included libraries */
6586 #define HAVE_INTTYPES_H 1
6588 #define HAVE_ERRNO_H 1
6589 /* libdvdcss + libdvdread */
6590 #define HAVE_LIMITS_H 1
6592 #define HAVE_UNISTD_H 1
6594 #define STDC_HEADERS 1
6595 #define HAVE_MEMCPY 1
6597 #define READ_CACHE_TRACE 0
6599 #define HAVE_DLFCN_H 1
6603 /* system headers */
6608 $def_mman_has_map_failed
6610 $def_sys_soundcard_h
6618 /* system functions */
6641 /* system-specific features */
6654 $def_restrict_keyword
6659 /* configurable options */
6664 $def_runtime_cpudetection
6672 #define __CPU__ $iproc
6676 $(ff_config_enable "$arch_all" "$arch" "ARCH")
6677 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
6678 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
6681 /* Blu-ray/DVD/VCD/CD */
6682 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
6683 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
6704 /* codec libraries */
6731 #define BINARY_CODECS_PATH "$_codecsdir"
6732 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
6735 /* Audio output drivers */
6746 $def_ossaudio_devdsp
6747 $def_ossaudio_devmixer
6761 $def_ioctl_bt848_h_name
6762 $def_ioctl_meteor_h_name
6862 $def_ffmpeg_internals
6886 #define HAVE_INLINE_ASM 1
6888 /* Use these registers in x86 inline asm. No proper detection yet. */
6889 #define HAVE_EBP_AVAILABLE 1
6891 #endif /* MPLAYER_CONFIG_H */
6894 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
6895 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
6897 #############################################################################
6901 Config files successfully generated by ./configure $configuration !
6903 Install prefix: $_prefix
6904 Data directory: $_datadir
6905 Config direct.: $_confdir
6907 Byte order: $_byte_order
6908 Optimizing for: $_optimizing
6911 Messages (in addition to English): $language_msg
6912 Manual pages: $language_man
6913 Documentation: $language_doc
6915 Enabled optional drivers:
6916 Input: $inputmodules
6917 Codecs: $codecmodules
6918 Audio output: $aomodules
6919 Video output: $vomodules
6921 Disabled optional drivers:
6922 Input: $noinputmodules
6923 Codecs: $nocodecmodules
6924 Audio output: $noaomodules
6925 Video output: $novomodules
6927 'config.h' and 'config.mak' contain your configuration options.
6928 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
6929 compile *** DO NOT REPORT BUGS if you tweak these files ***
6931 'make' will now compile MPlayer and 'make install' will install it.
6932 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
6938 Check $TMPLOG if you wonder why an autodetection failed (make sure
6939 development headers/packages are installed).
6941 NOTE: The --enable-* parameters unconditionally force options on, completely
6942 skipping autodetection. This behavior is unlike what you may be used to from
6943 autoconf-based configure scripts that can decide to override you. This greater
6944 level of control comes at a price. You may have to provide the correct compiler
6945 and linker flags yourself.
6946 If you used one of these options (except --enable-runtime-cpudetection and
6947 similar ones that turn on internal features) and experience a compilation or
6948 linking failure, make sure you have passed the necessary compiler/linker flags
6951 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
6955 if test "$warn_cflags" = yes; then
6958 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
6961 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
6963 It is strongly recommended to let MPlayer choose the correct CFLAGS!
6964 To do so, execute 'CFLAGS= ./configure <options>'
6970 rm -rf "$mplayer_tmpdir"