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 "$TMPEXE" >> "$TMPLOG" 2>&1
172 # Display error message, flushes tempfile, exit
177 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
178 echo "Check \"$TMPLOG\" if you do not understand why it failed."
182 # OS test booleans functions
184 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
186 aix
() { issystem
"AIX"; }
187 amigaos
() { issystem
"AmigaOS"; }
188 beos
() { issystem
"BEOS"; }
189 bsdos
() { issystem
"BSD/OS"; }
190 cygwin
() { issystem
"CYGWIN"; }
191 darwin
() { issystem
"Darwin"; }
192 dragonfly
() { issystem
"DragonFly"; }
193 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
194 gnu
() { issystem
"GNU"; }
195 hpux
() { issystem
"HP-UX"; }
196 irix
() { issystem
"IRIX"; }
197 linux
() { issystem
"Linux"; }
198 mingw32
() { issystem
"MINGW32"; }
199 morphos
() { issystem
"MorphOS"; }
200 netbsd
() { issystem
"NetBSD"; }
201 openbsd
() { issystem
"OpenBSD"; }
202 os2
() { issystem
"OS/2"; }
203 qnx
() { issystem
"QNX"; }
204 sunos
() { issystem
"SunOS"; }
205 win32
() { cygwin || mingw32
; }
207 # arch test boolean functions
208 # x86/x86pc is used by QNX
211 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
218 x86_64|amd64
) return 0 ;;
229 ppc|ppc64|powerpc|powerpc64
) return 0;;
248 # Use this before starting a check
250 echo "============ Checking for $@ ============" >> "$TMPLOG"
251 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
254 # Use this to echo the results of a check
256 if test "$res_comment" ; then
257 res_comment
="($res_comment)"
259 echo "Result is: $@ $res_comment" >> "$TMPLOG"
260 echo "##########################################" >> "$TMPLOG"
262 echo "$@ $res_comment"
265 #############################################################################
267 # Check how echo works in this /bin/sh
269 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
270 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
274 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
275 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")
276 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
280 Usage: $0 [OPTIONS]...
283 -h, --help display this help and exit
285 Installation directories:
286 --prefix=DIR prefix directory for installation [/usr/local]
287 --bindir=DIR directory for installing binaries [PREFIX/bin]
288 --datadir=DIR directory for installing machine independent
289 data files (skins, etc) [PREFIX/share/mplayer]
290 --mandir=DIR directory for installing man pages [PREFIX/share/man]
291 --confdir=DIR directory for installing configuration files
293 --localedir=DIR directory for locale tree [PREFIX/share/locale]
294 --libdir=DIR directory for object code libraries [PREFIX/lib]
295 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
298 --disable-mplayer disable MPlayer compilation [enable]
299 --disable-largefiles disable support for files > 2GB [enable]
300 --enable-termcap use termcap database for key codes [autodetect]
301 --enable-termios use termios database for key codes [autodetect]
302 --disable-iconv disable iconv for encoding conversion [autodetect]
303 --disable-langinfo do not use langinfo [autodetect]
304 --enable-lirc enable LIRC (remote control) support [autodetect]
305 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
306 --enable-joystick enable joystick support [disable]
307 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
308 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
309 --disable-vm disable X video mode extensions [autodetect]
310 --disable-xf86keysym disable support for multimedia keys [autodetect]
311 --enable-radio enable radio interface [disable]
312 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
313 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
314 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
315 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
316 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
317 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
318 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
319 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
320 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
321 --disable-networking disable networking [enable]
322 --enable-winsock2_h enable winsock2_h [autodetect]
323 --enable-smb enable Samba (SMB) input [autodetect]
324 --enable-live enable LIVE555 Streaming Media [autodetect]
325 --enable-nemesi enable Nemesi Streaming Media [autodetect]
326 --disable-vcd disable VCD support [autodetect]
327 --disable-bluray disable Blu-ray support [autodetect]
328 --disable-dvdnav disable libdvdnav [autodetect]
329 --disable-dvdread disable libdvdread [autodetect]
330 --disable-dvdread-internal disable internal libdvdread [autodetect]
331 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
332 --disable-cdparanoia disable cdparanoia [autodetect]
333 --disable-cddb disable cddb [autodetect]
334 --disable-bitmap-font disable bitmap font support [enable]
335 --disable-freetype disable FreeType 2 font rendering [autodetect]
336 --disable-fontconfig disable fontconfig font lookup [autodetect]
337 --disable-unrarexec disable using of UnRAR executable [enabled]
338 --enable-menu enable OSD menu (not DVD menu) [disabled]
339 --disable-sortsub disable subtitle sorting [enabled]
340 --enable-fribidi enable the FriBiDi libs [autodetect]
341 --disable-enca disable ENCA charset oracle library [autodetect]
342 --disable-maemo disable maemo specific features [autodetect]
343 --enable-macosx-finder enable Mac OS X Finder invocation parameter
345 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
346 --disable-inet6 disable IPv6 support [autodetect]
347 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
348 --disable-ftp disable FTP support [enabled]
349 --disable-vstream disable TiVo vstream client support [autodetect]
350 --disable-pthreads disable Posix threads support [autodetect]
351 --disable-w32threads disable Win32 threads support [autodetect]
352 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
353 --enable-rpath enable runtime linker path for extra libs [disabled]
356 --enable-gif enable GIF support [autodetect]
357 --enable-png enable PNG input/output support [autodetect]
358 --enable-mng enable MNG input support [autodetect]
359 --enable-jpeg enable JPEG input/output support [autodetect]
360 --enable-libcdio enable libcdio support [autodetect]
361 --enable-liblzo enable liblzo support [autodetect]
362 --disable-win32dll disable Win32 DLL support [autodetect]
363 --disable-qtx disable QuickTime codecs support [enabled]
364 --disable-xanim disable XAnim codecs support [enabled]
365 --disable-real disable RealPlayer codecs support [enabled]
366 --disable-xvid disable Xvid [autodetect]
367 --disable-libnut disable libnut [autodetect]
368 --disable-ffmpeg disable FFmpeg [autodetect]
369 --disable-tremor-internal disable internal Tremor [enabled]
370 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
371 --enable-tremor enable external Tremor [autodetect]
372 --disable-libvorbis disable libvorbis support [autodetect]
373 --disable-speex disable Speex support [autodetect]
374 --enable-theora enable OggTheora libraries [autodetect]
375 --enable-faad enable FAAD2 (AAC) [autodetect]
376 --disable-ladspa disable LADSPA plugin support [autodetect]
377 --disable-libbs2b disable libbs2b audio filter support [autodetect]
378 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
379 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
380 --disable-mad disable libmad (MPEG audio) support [autodetect]
381 --enable-xmms enable XMMS input plugin support [disabled]
382 --enable-libdca enable libdca support [autodetect]
383 --disable-mp3lib disable builtin mp3lib [autodetect]
384 --disable-liba52 disable liba52 [autodetect]
385 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
386 --disable-musepack disable musepack support [autodetect]
389 --disable-vidix disable VIDIX [for x86 *nix]
390 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
391 Available: cyberblade, ivtv, mach64, mga, mga_crtc2,
392 nvidia, pm2, pm3, radeon, rage128, s3, sis, unichrome
393 --disable-vidix-pcidb disable VIDIX PCI device name database
394 --enable-dhahelper enable VIDIX dhahelper support
395 --enable-svgalib_helper enable VIDIX svgalib_helper support
396 --enable-gl enable OpenGL video output [autodetect]
397 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
398 --enable-dga2 enable DGA 2 support [autodetect]
399 --enable-dga1 enable DGA 1 support [autodetect]
400 --enable-vesa enable VESA video output [autodetect]
401 --enable-svga enable SVGAlib video output [autodetect]
402 --enable-sdl enable SDL video output [autodetect]
403 --enable-kva enable KVA 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-dxr2 enable DXR2 video output [autodetect]
411 --enable-dxr3 enable DXR3/H+ video output [autodetect]
412 --enable-ivtv enable IVTV TV-Out video output [autodetect]
413 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
414 --enable-dvb enable DVB video output [autodetect]
415 --enable-mga enable mga_vid video output [autodetect]
416 --enable-xmga enable mga_vid X11 video output [autodetect]
417 --enable-xv enable Xv video output [autodetect]
418 --enable-xvmc enable XvMC acceleration [disable]
419 --enable-vdpau enable VDPAU acceleration [autodetect]
420 --enable-vm enable XF86VidMode support [autodetect]
421 --enable-xinerama enable Xinerama support [autodetect]
422 --enable-x11 enable X11 video output [autodetect]
423 --enable-xshape enable XShape support [autodetect]
424 --disable-xss disable screensaver support via xss [autodetect]
425 --enable-fbdev enable FBDev video output [autodetect]
426 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
427 --enable-tdfxfb enable tdfxfb video output [disable]
428 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
429 --enable-wii enable Nintendo Wii/GameCube video output [disable]
430 --enable-directfb enable DirectFB video output [autodetect]
431 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
432 --enable-bl enable Blinkenlights video output [disable]
433 --enable-tdfxvid enable tdfx_vid video output [disable]
434 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
435 --disable-tga disable Targa video output [enable]
436 --disable-pnm disable PNM video output [enable]
437 --disable-md5sum disable md5sum video output [enable]
438 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
439 --disable-corevideo disable CoreVideo video output [autodetect]
440 --disable-quartz disable Quartz video output [autodetect]
443 --disable-alsa disable ALSA audio output [autodetect]
444 --disable-ossaudio disable OSS audio output [autodetect]
445 --disable-arts disable aRts audio output [autodetect]
446 --disable-esd disable esd audio output [autodetect]
447 --disable-pulse disable Pulseaudio audio output [autodetect]
448 --disable-jack disable JACK audio output [autodetect]
449 --enable-openal enable OpenAL audio output [disable]
450 --disable-nas disable NAS audio output [autodetect]
451 --disable-sgiaudio disable SGI audio output [autodetect]
452 --disable-sunaudio disable Sun audio output [autodetect]
453 --disable-kai disable KAI audio output [autodetect]
454 --disable-dart disable DART audio output [autodetect]
455 --disable-win32waveout disable Windows waveout audio output [autodetect]
456 --disable-coreaudio disable CoreAudio audio output [autodetect]
457 --disable-select disable using select() on the audio device [enable]
460 --enable-translation enable support for translated output [disable]
461 --charset=charset convert the console messages to this character set
462 --language-doc=lang language to use for the documentation [en]
463 --language-man=lang language to use for the man pages [en]
464 --language-msg=lang extra languages for program messages [all]
465 --language=lang default language to use [en]
466 Specific options override --language. You can pass a list of languages separated
467 by whitespace or commas instead of a single language. Nonexisting translations
468 will be dropped from each list. All translations available in the list will be
469 installed. The value "all" will activate all translations. The LINGUAS
470 environment variable is honored. In all cases the fallback is English.
471 The program always supports English-language output; additional message
472 languages are only installed if --enable-translation is also specified.
473 Available values for --language-doc are: all $doc_lang_all
474 Available values for --language-man are: all $man_lang_all
475 Available values for --language-msg are: all $msg_lang_all
477 Miscellaneous options:
478 --enable-runtime-cpudetection enable runtime CPU detection [disable]
479 --enable-cross-compile enable cross-compilation [autodetect]
480 --cc=COMPILER C compiler to build MPlayer [gcc]
481 --host-cc=COMPILER C compiler for tools needed while building [gcc]
482 --as=ASSEMBLER assembler to build MPlayer [as]
483 --nm=NM nm tool to build MPlayer [nm]
484 --yasm=YASM Yasm assembler to build MPlayer [yasm]
485 --ar=AR librarian to build MPlayer [ar]
486 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
487 --windres=WINDRES windres to build MPlayer [windres]
488 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
489 --enable-static build a statically linked binary
490 --with-install=PATH path to a custom install program
493 --enable-mmx enable MMX [autodetect]
494 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
495 --enable-3dnow enable 3DNow! [autodetect]
496 --enable-3dnowext enable extended 3DNow! [autodetect]
497 --enable-sse enable SSE [autodetect]
498 --enable-sse2 enable SSE2 [autodetect]
499 --enable-ssse3 enable SSSE3 [autodetect]
500 --enable-shm enable shm [autodetect]
501 --enable-altivec enable AltiVec (PowerPC) [autodetect]
502 --enable-armv5te enable DSP extensions (ARM) [autodetect]
503 --enable-armv6 enable ARMv6 (ARM) [autodetect]
504 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
505 --enable-armvfp enable ARM VFP (ARM) [autodetect]
506 --enable-neon enable NEON (ARM) [autodetect]
507 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
508 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
509 --enable-big-endian force byte order to big-endian [autodetect]
510 --enable-debug[=1-3] compile-in debugging information [disable]
511 --enable-profile compile-in profiling information [disable]
512 --disable-sighandler disable sighandler for crashes [enable]
513 --enable-crash-debug enable automatic gdb attach on crash [disable]
514 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
515 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
517 Use these options if autodetection fails:
518 --extra-cflags=FLAGS extra CFLAGS
519 --extra-ldflags=FLAGS extra LDFLAGS
520 --extra-libs=FLAGS extra linker flags
521 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
522 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
524 --with-freetype-config=PATH path to freetype-config
525 --with-glib-config=PATH path to glib*-config
526 --with-gtk-config=PATH path to gtk*-config
527 --with-sdl-config=PATH path to sdl*-config
528 --with-dvdnav-config=PATH path to dvdnav-config
529 --with-dvdread-config=PATH path to dvdread-config
531 This configure script is NOT autoconf-based, even though its output is similar.
532 It will try to autodetect all configuration options. If you --enable an option
533 it will be forcefully turned on, skipping autodetection. This can break
534 compilation, so you need to know what you are doing.
539 # GOTCHA: the variables below defines the default behavior for autodetection
540 # and have - unless stated otherwise - at least 2 states : yes no
541 # If autodetection is available then the third state is: auto
565 test "$CC" && _cc
="$CC"
569 _runtime_cpudetection
=no
581 _xvmc
=no
#auto when complete
642 _dvdnavconfig
=dvdnav-config
643 _dvdreadconfig
=dvdread-config
645 _dvdread_internal
=auto
646 _libdvdcss_internal
=auto
728 _freetypeconfig
='freetype-config'
743 def_dos_paths
="#define HAVE_DOS_PATHS 0"
744 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
745 def_priority
="#undef CONFIG_PRIORITY"
746 def_pthread_cache
="#undef PTHREAD_CACHE"
754 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
757 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
760 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
763 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
766 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
769 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
772 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
775 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
779 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
782 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
786 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
788 --with-freetype-config=*)
789 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
792 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
794 --with-glib-config=*)
795 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
797 --with-dvdnav-config=*)
798 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
800 --with-dvdread-config=*)
801 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
805 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
808 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
811 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
813 --extra-libs-mplayer=*)
814 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
818 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
821 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
824 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
827 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
830 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
833 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
836 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
839 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
842 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
845 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
848 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
851 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
854 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
857 language
=$
(echo $ac_option | cut
-d '=' -f 2)
876 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
881 --enable-translation) _translation
=yes ;;
882 --disable-translation) _translation
=no
;;
883 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
884 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
885 --enable-cross-compile) _cross_compile
=yes ;;
886 --disable-cross-compile) _cross_compile
=no
;;
887 --enable-mplayer) _mplayer
=yes ;;
888 --disable-mplayer) _mplayer
=no
;;
889 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
890 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
891 --enable-x11) _x11
=yes ;;
892 --disable-x11) _x11
=no
;;
893 --enable-xshape) _xshape
=yes ;;
894 --disable-xshape) _xshape
=no
;;
895 --enable-xss) _xss
=yes ;;
896 --disable-xss) _xss
=no
;;
897 --enable-xv) _xv
=yes ;;
898 --disable-xv) _xv
=no
;;
899 --enable-xvmc) _xvmc
=yes ;;
900 --disable-xvmc) _xvmc
=no
;;
901 --enable-vdpau) _vdpau
=yes ;;
902 --disable-vdpau) _vdpau
=no
;;
903 --enable-sdl) _sdl
=yes ;;
904 --disable-sdl) _sdl
=no
;;
905 --enable-kva) _kva
=yes ;;
906 --disable-kva) _kva
=no
;;
907 --enable-direct3d) _direct3d
=yes ;;
908 --disable-direct3d) _direct3d
=no
;;
909 --enable-directx) _directx
=yes ;;
910 --disable-directx) _directx
=no
;;
911 --enable-win32waveout) _win32waveout
=yes ;;
912 --disable-win32waveout) _win32waveout
=no
;;
913 --enable-nas) _nas
=yes ;;
914 --disable-nas) _nas
=no
;;
915 --enable-png) _png
=yes ;;
916 --disable-png) _png
=no
;;
917 --enable-mng) _mng
=yes ;;
918 --disable-mng) _mng
=no
;;
919 --enable-jpeg) _jpeg
=yes ;;
920 --disable-jpeg) _jpeg
=no
;;
921 --enable-pnm) _pnm
=yes ;;
922 --disable-pnm) _pnm
=no
;;
923 --enable-md5sum) _md5sum
=yes ;;
924 --disable-md5sum) _md5sum
=no
;;
925 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
926 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
927 --enable-gif) _gif
=yes ;;
928 --disable-gif) _gif
=no
;;
929 --enable-gl) _gl
=yes ;;
930 --disable-gl) _gl
=no
;;
931 --enable-matrixview) matrixview
=yes ;;
932 --disable-matrixview) matrixview
=no
;;
933 --enable-ggi) _ggi
=yes ;;
934 --disable-ggi) _ggi
=no
;;
935 --enable-ggiwmh) _ggiwmh
=yes ;;
936 --disable-ggiwmh) _ggiwmh
=no
;;
937 --enable-aa) _aa
=yes ;;
938 --disable-aa) _aa
=no
;;
939 --enable-caca) _caca
=yes ;;
940 --disable-caca) _caca
=no
;;
941 --enable-svga) _svga
=yes ;;
942 --disable-svga) _svga
=no
;;
943 --enable-vesa) _vesa
=yes ;;
944 --disable-vesa) _vesa
=no
;;
945 --enable-fbdev) _fbdev
=yes ;;
946 --disable-fbdev) _fbdev
=no
;;
947 --enable-dvb) _dvb
=yes ;;
948 --disable-dvb) _dvb
=no
;;
949 --enable-dxr2) _dxr2
=yes ;;
950 --disable-dxr2) _dxr2
=no
;;
951 --enable-dxr3) _dxr3
=yes ;;
952 --disable-dxr3) _dxr3
=no
;;
953 --enable-ivtv) _ivtv
=yes ;;
954 --disable-ivtv) _ivtv
=no
;;
955 --enable-v4l2) _v4l2
=yes ;;
956 --disable-v4l2) _v4l2
=no
;;
957 --enable-iconv) _iconv
=yes ;;
958 --disable-iconv) _iconv
=no
;;
959 --enable-langinfo) _langinfo
=yes ;;
960 --disable-langinfo) _langinfo
=no
;;
961 --enable-rtc) _rtc
=yes ;;
962 --disable-rtc) _rtc
=no
;;
963 --enable-libdv) _libdv
=yes ;;
964 --disable-libdv) _libdv
=no
;;
965 --enable-ossaudio) _ossaudio
=yes ;;
966 --disable-ossaudio) _ossaudio
=no
;;
967 --enable-arts) _arts
=yes ;;
968 --disable-arts) _arts
=no
;;
969 --enable-esd) _esd
=yes ;;
970 --disable-esd) _esd
=no
;;
971 --enable-pulse) _pulse
=yes ;;
972 --disable-pulse) _pulse
=no
;;
973 --enable-jack) _jack
=yes ;;
974 --disable-jack) _jack
=no
;;
975 --enable-openal) _openal
=yes ;;
976 --disable-openal) _openal
=no
;;
977 --enable-kai) _kai
=yes ;;
978 --disable-kai) _kai
=no
;;
979 --enable-dart) _dart
=yes ;;
980 --disable-dart) _dart
=no
;;
981 --enable-mad) _mad
=yes ;;
982 --disable-mad) _mad
=no
;;
983 --enable-libcdio) _libcdio
=yes ;;
984 --disable-libcdio) _libcdio
=no
;;
985 --enable-liblzo) _liblzo
=yes ;;
986 --disable-liblzo) _liblzo
=no
;;
987 --enable-libvorbis) _libvorbis
=yes ;;
988 --disable-libvorbis) _libvorbis
=no
;;
989 --enable-speex) _speex
=yes ;;
990 --disable-speex) _speex
=no
;;
991 --enable-tremor) _tremor
=yes ;;
992 --disable-tremor) _tremor
=no
;;
993 --enable-tremor-internal) _tremor_internal
=yes ;;
994 --disable-tremor-internal) _tremor_internal
=no
;;
995 --enable-tremor-low) _tremor_low
=yes ;;
996 --disable-tremor-low) _tremor_low
=no
;;
997 --enable-theora) _theora
=yes ;;
998 --disable-theora) _theora
=no
;;
999 --enable-mpg123) _mpg123
=yes ;;
1000 --disable-mpg123) _mpg123
=no
;;
1001 --enable-mp3lib) _mp3lib
=yes ;;
1002 --disable-mp3lib) _mp3lib
=no
;;
1003 --enable-liba52) _liba52
=yes ;;
1004 --disable-liba52) _liba52
=no
;;
1005 --enable-libdca) _libdca
=yes ;;
1006 --disable-libdca) _libdca
=no
;;
1007 --enable-libmpeg2) _libmpeg2
=yes ;;
1008 --disable-libmpeg2) _libmpeg2
=no
;;
1009 --enable-musepack) _musepack
=yes ;;
1010 --disable-musepack) _musepack
=no
;;
1011 --enable-faad) _faad
=yes ;;
1012 --disable-faad) _faad
=no
;;
1013 --enable-ladspa) _ladspa
=yes ;;
1014 --disable-ladspa) _ladspa
=no
;;
1015 --enable-libbs2b) _libbs2b
=yes ;;
1016 --disable-libbs2b) _libbs2b
=no
;;
1017 --enable-xmms) _xmms
=yes ;;
1018 --disable-xmms) _xmms
=no
;;
1019 --enable-vcd) _vcd
=yes ;;
1020 --disable-vcd) _vcd
=no
;;
1021 --enable-bluray) _bluray
=yes ;;
1022 --disable-bluray) _bluray
=no
;;
1023 --enable-dvdread) _dvdread
=yes ;;
1024 --disable-dvdread) _dvdread
=no
;;
1025 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1026 --disable-dvdread-internal) _dvdread_internal
=no
;;
1027 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1028 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1029 --enable-dvdnav) _dvdnav
=yes ;;
1030 --disable-dvdnav) _dvdnav
=no
;;
1031 --enable-xanim) _xanim
=yes ;;
1032 --disable-xanim) _xanim
=no
;;
1033 --enable-real) _real
=yes ;;
1034 --disable-real) _real
=no
;;
1035 --enable-live) _live
=yes ;;
1036 --disable-live) _live
=no
;;
1037 --enable-nemesi) _nemesi
=yes ;;
1038 --disable-nemesi) _nemesi
=no
;;
1039 --enable-xinerama) _xinerama
=yes ;;
1040 --disable-xinerama) _xinerama
=no
;;
1041 --enable-mga) _mga
=yes ;;
1042 --disable-mga) _mga
=no
;;
1043 --enable-xmga) _xmga
=yes ;;
1044 --disable-xmga) _xmga
=no
;;
1045 --enable-vm) _vm
=yes ;;
1046 --disable-vm) _vm
=no
;;
1047 --enable-xf86keysym) _xf86keysym
=yes ;;
1048 --disable-xf86keysym) _xf86keysym
=no
;;
1049 --enable-sunaudio) _sunaudio
=yes ;;
1050 --disable-sunaudio) _sunaudio
=no
;;
1051 --enable-sgiaudio) _sgiaudio
=yes ;;
1052 --disable-sgiaudio) _sgiaudio
=no
;;
1053 --enable-alsa) _alsa
=yes ;;
1054 --disable-alsa) _alsa
=no
;;
1055 --enable-tv) _tv
=yes ;;
1056 --disable-tv) _tv
=no
;;
1057 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1058 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1059 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1060 --disable-tv-v4l1) _tv_v4l1
=no
;;
1061 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1062 --disable-tv-v4l2) _tv_v4l2
=no
;;
1063 --enable-tv-dshow) _tv_dshow
=yes ;;
1064 --disable-tv-dshow) _tv_dshow
=no
;;
1065 --enable-radio) _radio
=yes ;;
1066 --enable-radio-capture) _radio_capture
=yes ;;
1067 --disable-radio-capture) _radio_capture
=no
;;
1068 --disable-radio) _radio
=no
;;
1069 --enable-radio-v4l) _radio_v4l
=yes ;;
1070 --disable-radio-v4l) _radio_v4l
=no
;;
1071 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1072 --disable-radio-v4l2) _radio_v4l2
=no
;;
1073 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1074 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1075 --enable-pvr) _pvr
=yes ;;
1076 --disable-pvr) _pvr
=no
;;
1077 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1078 --disable-fastmemcpy) _fastmemcpy
=no
;;
1079 --enable-networking) networking
=yes ;;
1080 --disable-networking) networking
=no
;;
1081 --enable-winsock2_h) _winsock2_h
=yes ;;
1082 --disable-winsock2_h) _winsock2_h
=no
;;
1083 --enable-smb) _smb
=yes ;;
1084 --disable-smb) _smb
=no
;;
1085 --enable-vidix) _vidix
=yes ;;
1086 --disable-vidix) _vidix
=no
;;
1087 --with-vidix-drivers=*)
1088 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1090 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1091 --enable-dhahelper) _dhahelper
=yes ;;
1092 --disable-dhahelper) _dhahelper
=no
;;
1093 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1094 --disable-svgalib_helper) _svgalib_helper
=no
;;
1095 --enable-joystick) _joystick
=yes ;;
1096 --disable-joystick) _joystick
=no
;;
1097 --enable-xvid) _xvid
=yes ;;
1098 --disable-xvid) _xvid
=no
;;
1099 --enable-libnut) _libnut
=yes ;;
1100 --disable-libnut) _libnut
=no
;;
1101 --enable-ffmpeg) ffmpeg
=yes ;;
1102 --disable-ffmpeg) ffmpeg
=no
;;
1103 --ffmpeg-source-dir=*)
1104 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1106 --enable-lirc) _lirc
=yes ;;
1107 --disable-lirc) _lirc
=no
;;
1108 --enable-lircc) _lircc
=yes ;;
1109 --disable-lircc) _lircc
=no
;;
1110 --enable-apple-remote) _apple_remote
=yes ;;
1111 --disable-apple-remote) _apple_remote
=no
;;
1112 --enable-apple-ir) _apple_ir
=yes ;;
1113 --disable-apple-ir) _apple_ir
=no
;;
1114 --enable-gui) _gui
=yes ;;
1115 --disable-gui) _gui
=no
;;
1116 --enable-gtk1) _gtk1
=yes ;;
1117 --disable-gtk1) _gtk1
=no
;;
1118 --enable-termcap) _termcap
=yes ;;
1119 --disable-termcap) _termcap
=no
;;
1120 --enable-termios) _termios
=yes ;;
1121 --disable-termios) _termios
=no
;;
1122 --enable-3dfx) _3dfx
=yes ;;
1123 --disable-3dfx) _3dfx
=no
;;
1124 --enable-s3fb) _s3fb
=yes ;;
1125 --disable-s3fb) _s3fb
=no
;;
1126 --enable-wii) _wii
=yes ;;
1127 --disable-wii) _wii
=no
;;
1128 --enable-tdfxfb) _tdfxfb
=yes ;;
1129 --disable-tdfxfb) _tdfxfb
=no
;;
1130 --disable-tdfxvid) _tdfxvid
=no
;;
1131 --enable-tdfxvid) _tdfxvid
=yes ;;
1132 --disable-xvr100) _xvr100
=no
;;
1133 --enable-xvr100) _xvr100
=yes ;;
1134 --disable-tga) _tga
=no
;;
1135 --enable-tga) _tga
=yes ;;
1136 --enable-directfb) _directfb
=yes ;;
1137 --disable-directfb) _directfb
=no
;;
1138 --enable-zr) _zr
=yes ;;
1139 --disable-zr) _zr
=no
;;
1140 --enable-bl) _bl
=yes ;;
1141 --disable-bl) _bl
=no
;;
1142 --enable-mtrr) _mtrr
=yes ;;
1143 --disable-mtrr) _mtrr
=no
;;
1144 --enable-largefiles) _largefiles
=yes ;;
1145 --disable-largefiles) _largefiles
=no
;;
1146 --enable-shm) _shm
=yes ;;
1147 --disable-shm) _shm
=no
;;
1148 --enable-select) _select
=yes ;;
1149 --disable-select) _select
=no
;;
1150 --enable-cdparanoia) _cdparanoia
=yes ;;
1151 --disable-cdparanoia) _cdparanoia
=no
;;
1152 --enable-cddb) _cddb
=yes ;;
1153 --disable-cddb) _cddb
=no
;;
1154 --enable-big-endian) _big_endian
=yes ;;
1155 --disable-big-endian) _big_endian
=no
;;
1156 --enable-bitmap-font) _bitmap_font
=yes ;;
1157 --disable-bitmap-font) _bitmap_font
=no
;;
1158 --enable-freetype) _freetype
=yes ;;
1159 --disable-freetype) _freetype
=no
;;
1160 --enable-fontconfig) _fontconfig
=yes ;;
1161 --disable-fontconfig) _fontconfig
=no
;;
1162 --enable-unrarexec) _unrar_exec
=yes ;;
1163 --disable-unrarexec) _unrar_exec
=no
;;
1164 --enable-ftp) _ftp
=yes ;;
1165 --disable-ftp) _ftp
=no
;;
1166 --enable-vstream) _vstream
=yes ;;
1167 --disable-vstream) _vstream
=no
;;
1168 --enable-pthreads) _pthreads
=yes ;;
1169 --disable-pthreads) _pthreads
=no
;;
1170 --enable-w32threads) _w32threads
=yes ;;
1171 --disable-w32threads) _w32threads
=no
;;
1172 --enable-ass) _ass
=yes ;;
1173 --disable-ass) _ass
=no
;;
1174 --enable-rpath) _rpath
=yes ;;
1175 --disable-rpath) _rpath
=no
;;
1177 --enable-fribidi) _fribidi
=yes ;;
1178 --disable-fribidi) _fribidi
=no
;;
1180 --enable-enca) _enca
=yes ;;
1181 --disable-enca) _enca
=no
;;
1183 --enable-inet6) _inet6
=yes ;;
1184 --disable-inet6) _inet6
=no
;;
1186 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1187 --disable-gethostbyname2) _gethostbyname2
=no
;;
1189 --enable-dga1) _dga1
=yes ;;
1190 --disable-dga1) _dga1
=no
;;
1191 --enable-dga2) _dga2
=yes ;;
1192 --disable-dga2) _dga2
=no
;;
1194 --enable-menu) _menu
=yes ;;
1195 --disable-menu) _menu
=no
;;
1197 --enable-qtx) _qtx
=yes ;;
1198 --disable-qtx) _qtx
=no
;;
1200 --enable-coreaudio) _coreaudio
=yes ;;
1201 --disable-coreaudio) _coreaudio
=no
;;
1202 --enable-corevideo) _corevideo
=yes ;;
1203 --disable-corevideo) _corevideo
=no
;;
1204 --enable-quartz) _quartz
=yes ;;
1205 --disable-quartz) _quartz
=no
;;
1206 --enable-macosx-finder) _macosx_finder
=yes ;;
1207 --disable-macosx-finder) _macosx_finder
=no
;;
1208 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1209 --disable-macosx-bundle) _macosx_bundle
=no
;;
1211 --enable-maemo) _maemo
=yes ;;
1212 --disable-maemo) _maemo
=no
;;
1214 --enable-sortsub) _sortsub
=yes ;;
1215 --disable-sortsub) _sortsub
=no
;;
1217 --enable-crash-debug) _crash_debug
=yes ;;
1218 --disable-crash-debug) _crash_debug
=no
;;
1219 --enable-sighandler) _sighandler
=yes ;;
1220 --disable-sighandler) _sighandler
=no
;;
1221 --enable-win32dll) _win32dll
=yes ;;
1222 --disable-win32dll) _win32dll
=no
;;
1224 --enable-sse) _sse
=yes ;;
1225 --disable-sse) _sse
=no
;;
1226 --enable-sse2) _sse2
=yes ;;
1227 --disable-sse2) _sse2
=no
;;
1228 --enable-ssse3) _ssse3
=yes ;;
1229 --disable-ssse3) _ssse3
=no
;;
1230 --enable-mmxext) _mmxext
=yes ;;
1231 --disable-mmxext) _mmxext
=no
;;
1232 --enable-3dnow) _3dnow
=yes ;;
1233 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1234 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1235 --disable-3dnowext) _3dnowext
=no
;;
1236 --enable-cmov) _cmov
=yes ;;
1237 --disable-cmov) _cmov
=no
;;
1238 --enable-fast-cmov) _fast_cmov
=yes ;;
1239 --disable-fast-cmov) _fast_cmov
=no
;;
1240 --enable-fast-clz) _fast_clz
=yes ;;
1241 --disable-fast-clz) _fast_clz
=no
;;
1242 --enable-altivec) _altivec
=yes ;;
1243 --disable-altivec) _altivec
=no
;;
1244 --enable-armv5te) _armv5te
=yes ;;
1245 --disable-armv5te) _armv5te
=no
;;
1246 --enable-armv6) _armv6
=yes ;;
1247 --disable-armv6) _armv6
=no
;;
1248 --enable-armv6t2) _armv6t2
=yes ;;
1249 --disable-armv6t2) _armv6t2
=no
;;
1250 --enable-armvfp) _armvfp
=yes ;;
1251 --disable-armvfp) _armvfp
=no
;;
1252 --enable-neon) neon
=yes ;;
1253 --disable-neon) neon
=no
;;
1254 --enable-iwmmxt) _iwmmxt
=yes ;;
1255 --disable-iwmmxt) _iwmmxt
=no
;;
1256 --enable-mmx) _mmx
=yes ;;
1257 --disable-mmx) # 3Dnow! and MMX2 require MMX
1258 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1261 echo "Unknown parameter: $ac_option"
1268 if test "$_gui" = yes ; then
1269 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1270 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1273 # Atmos: moved this here, to be correct, if --prefix is specified
1274 test -z "$_bindir" && _bindir
="$_prefix/bin"
1275 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1276 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1277 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1278 test -z "$_libdir" && _libdir
="$_prefix/lib"
1279 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1281 # Determine our OS name and CPU architecture
1282 if test -z "$_target" ; then
1284 system_name
=$
(uname
-s 2>&1)
1285 case "$system_name" in
1286 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1300 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1310 system_name
="$system_name-UNKNOWN"
1315 # host's CPU/instruction set
1316 host_arch
=$
(uname
-p 2>&1)
1317 case "$host_arch" in
1318 i386|sparc|ppc|alpha|arm|mips|vax
)
1320 powerpc
) # Darwin returns 'powerpc'
1323 *) # uname -p on Linux returns 'unknown' for the processor type,
1324 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1326 # Maybe uname -m (machine hardware name) returns something we
1329 # x86/x86pc is used by QNX
1330 case "$(uname -m 2>&1)" in
1331 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
;;
1332 ia64
) host_arch
=ia64
;;
1333 macppc|ppc
) host_arch
=ppc
;;
1334 ppc64
) host_arch
=ppc64
;;
1335 alpha
) host_arch
=alpha
;;
1336 sparc
) host_arch
=sparc
;;
1337 sparc64
) host_arch
=sparc64
;;
1338 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1339 arm
*|zaurus|cats
) host_arch
=arm
;;
1340 sh3|sh4|sh4a
) host_arch
=sh
;;
1341 s390
) host_arch
=s390
;;
1342 s390x
) host_arch
=s390x
;;
1343 *mips
*) host_arch
=mips
;;
1344 vax
) host_arch
=vax
;;
1345 xtensa
*) host_arch
=xtensa
;;
1346 *) host_arch
=UNKNOWN
;;
1350 else # if test -z "$_target"
1351 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1352 case "$(echo $system_name | tr A-Z a-z)" in
1353 linux
) system_name
=Linux
;;
1354 freebsd
) system_name
=FreeBSD
;;
1355 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1356 netbsd
) system_name
=NetBSD
;;
1357 bsd
/os
) system_name
=BSD
/OS
;;
1358 openbsd
) system_name
=OpenBSD
;;
1359 dragonfly
) system_name
=DragonFly
;;
1360 sunos
) system_name
=SunOS
;;
1361 qnx
) system_name
=QNX
;;
1362 morphos
) system_name
=MorphOS
;;
1363 amigaos
) system_name
=AmigaOS
;;
1364 mingw32
*) system_name
=MINGW32
;;
1366 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1367 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1368 if test $
(echo $host_arch) != "x86_64" ; then
1369 host_arch
=$
(echo $host_arch |
tr '_' '-')
1373 extra_cflags
="-I. $extra_cflags"
1374 _timer
=timer-linux.c
1377 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1378 extra_cflags
="$extra_cflags -I/usr/local/include"
1381 if netbsd || dragonfly
; then
1382 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1383 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1387 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1388 if test "$(basename $_cc)" != "clang" ; then
1389 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
1391 _timer
=timer-darwin.c
1395 extra_ldflags
="$extra_ldflags -lC"
1406 extra_cflags
="$extra_cflags -fno-common"
1407 # -lwinmm is always needed for osdep/timer-win2.c
1408 extra_ldflags
="$extra_ldflags -lwinmm"
1412 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1413 def_priority
="#define CONFIG_PRIORITY 1"
1425 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1426 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1430 extra_ldflags
="$extra_ldflags -lph"
1438 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1439 def_priority
="#define CONFIG_PRIORITY 1"
1442 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1443 test "$tmpdir" && break
1446 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1447 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1450 TMPC
="$mplayer_tmpdir/tmp.c"
1451 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1452 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1453 TMPH
="$mplayer_tmpdir/tmp.h"
1454 TMPS
="$mplayer_tmpdir/tmp.S"
1457 echo configuration
: $configuration > "$TMPLOG"
1461 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1462 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1466 # Checking CC version...
1467 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1468 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1469 echocheck
"$_cc version"
1471 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1472 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1473 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1474 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1475 # TODO verify older icc/ecc compatibility
1478 cc_version
="v. ?.??, bad"
1482 cc_version
="$cc_version, ok"
1485 cc_version
="$cc_version, bad"
1489 echores
"$cc_version"
1491 for _cc
in "$_cc" gcc cc
; do
1492 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1493 if test "$cc_name_tmp" = "gcc"; then
1494 cc_name
=$cc_name_tmp
1495 echocheck
"$_cc version"
1497 cc_version
=$
($_cc -dumpversion 2>&1)
1503 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1504 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1505 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1508 echores
"$cc_version"
1511 cc_name_tmp
=$
($_cc -v 2>&1 |
head -n 1 | cut
-d ' ' -f 1)
1512 if test "$cc_name_tmp" = "clang"; then
1513 echocheck
"$_cc version"
1515 cc_version
=$
($_cc -dumpversion 2>&1)
1516 res_comment
="experimental support only"
1517 echores
"clang $cc_version"
1520 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1521 if test "$cc_name_tmp" = "Sun C"; then
1522 echocheck
"$_cc version"
1524 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1525 res_comment
="experimental support only"
1526 echores
"Sun C $cc_version"
1531 test "$cc_fail" = yes && die
"unsupported compiler version"
1533 if test -z "$_target" && x86
; then
1536 int test[(int)sizeof(char *)-7];
1540 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1543 echo "Detected operating system: $system_name"
1544 echo "Detected host architecture: $host_arch"
1547 test "$_host_cc" || _host_cc
=$_cc
1550 echocheck
"cross compilation"
1551 if test $_cross_compile = auto
; then
1553 cflag_check
"" && "$TMPEXE" && _cross_compile
=no
1555 echores
$_cross_compile
1557 if test $_cross_compile = yes; then
1565 # now that we know what compiler should be used for compilation, try to find
1566 # out which assembler is used by the $_cc compiler
1567 if test "$_as" = auto
; then
1568 _as
=$
($_cc -print-prog-name=as
)
1569 test -z "$_as" && _as
=as
1572 if test "$_nm" = auto
; then
1573 _nm
=$
($_cc -print-prog-name=nm
)
1574 test -z "$_nm" && _nm
=nm
1577 # XXX: this should be ok..
1580 if test "$_runtime_cpudetection" = no
; then
1582 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1583 # FIXME: Remove the cygwin check once AMD CPUs are supported
1584 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1585 # Linux with /proc mounted, extract CPU information from it
1586 _cpuinfo
="cat /proc/cpuinfo"
1587 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1588 # FreeBSD with Linux emulation /proc mounted,
1589 # extract CPU information from it
1590 # Don't use it on x86 though, it never reports 3Dnow
1591 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1592 elif darwin
&& ! x86
; then
1593 # use hostinfo on Darwin
1596 # use 'lsattr' on AIX
1597 _cpuinfo
="lsattr -E -l proc0 -a type"
1599 # all other OSes try to extract CPU information from a small helper
1600 # program cpuinfo instead
1601 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1602 _cpuinfo
="./cpuinfo$_exesuf"
1606 # gather more CPU information
1607 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1608 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1609 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1610 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1611 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1613 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1615 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1616 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1618 for ext
in $pparam ; do
1619 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1622 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1623 test $_sse = kernel_check
&& _mmxext
=kernel_check
1625 echocheck
"CPU vendor"
1626 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1628 echocheck
"CPU type"
1632 fi # test "$_runtime_cpudetection" = no
1634 if x86
&& test "$_runtime_cpudetection" = no
; then
1636 if test "$1" = kernel_check
; then
1637 echocheck
"kernel support of $2"
1641 static void catch(int sig) { exit(1); }
1643 signal(SIGILL, catch);
1644 __asm__ volatile ("$3":::"memory"); return 0;
1648 if cc_check
&& tmp_run
; then
1651 _optimizing
="$_optimizing $2"
1656 echo "It seems that your kernel does not correctly support $2."
1657 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1664 extcheck
$_mmx "mmx" "emms"
1665 extcheck
$_mmxext "mmxext" "sfence"
1666 extcheck
$_3dnow "3dnow" "femms"
1667 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1668 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1669 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1670 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1671 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1673 echocheck
"mtrr support"
1674 if test "$_mtrr" = kernel_check
; then
1676 _optimizing
="$_optimizing mtrr"
1680 if test "$_gcc3_ext" != ""; then
1681 # if we had to disable sse/sse2 because the active kernel does not
1682 # support this instruction set extension, we also have to tell
1683 # gcc3 to not generate sse/sse2 instructions for normal C code
1684 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1690 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1691 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1692 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1693 subarch_all
='X86_32 X86_64 PPC64'
1694 case "$host_arch" in
1695 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1698 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1703 if test "$_runtime_cpudetection" = no
; then
1707 3) proc
=i386 iproc
=386 ;;
1708 4) proc
=i486 iproc
=486 ;;
1709 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1710 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1711 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1713 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1715 elif test "$pmodel" -ge 8; then
1717 elif test "$pmodel" -ge 6; then
1724 # It's a bit difficult to determine the correct type of Family 6
1725 # AMD CPUs just from their signature. Instead, we check directly
1726 # whether it supports SSE.
1727 if test "$_sse" = yes; then
1728 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1731 # Again, gcc treats athlon and athlon-tbird similarly.
1736 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1737 # caught and remedied in the optimization tests below.
1741 *) proc
=amdfam10 iproc
=686
1742 test $_fast_clz = "auto" && _fast_clz
=yes
1748 3) proc
=i386 iproc
=386 ;;
1749 4) proc
=i486 iproc
=486 ;;
1751 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1752 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1758 if test "$pmodel" -ge 15; then
1760 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1762 elif test "$pmodel" -ge 7; then
1764 elif test "$pmodel" -ge 3; then
1769 test $_fast_clz = "auto" && _fast_clz
=yes
1772 # A nocona in 32-bit mode has no more capabilities than a prescott.
1773 if test "$pmodel" -ge 3; then
1777 test $_fast_clz = "auto" && _fast_clz
=yes
1779 test $_fast_cmov = "auto" && _fast_cmov
=no
1781 *) proc
=prescott iproc
=686 ;;
1787 if test "$pmodel" -ge 8; then
1789 elif test "$pmodel" -ge 4; then
1796 if test "$pmodel" -ge 9; then
1803 *) proc
=i686 iproc
=i686
;;
1808 3) proc
=i386 iproc
=386 ;;
1809 4) proc
=i486 iproc
=486 ;;
1810 *) proc
=i586 iproc
=586 ;;
1814 proc
=i586 iproc
=586 ;;
1816 test $_fast_clz = "auto" && _fast_clz
=no
1817 fi # test "$_runtime_cpudetection" = no
1820 # check that gcc supports our CPU, if not, fall back to earlier ones
1821 # LGB: check -mcpu and -march swithing step by step with enabling
1822 # to fall back till 386.
1824 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1826 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1832 echocheck
"GCC & CPU optimization abilities"
1833 if test "$_runtime_cpudetection" = no
; then
1834 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1835 cflag_check
-march=native
&& proc
=native
1837 if test "$proc" = "amdfam10"; then
1838 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1840 if test "$proc" = "k8"; then
1841 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1843 if test "$proc" = "athlon-xp"; then
1844 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1846 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1847 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1849 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1850 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1851 if cflag_check
-march=i586
$cpuopt=i686
; then
1858 if test "$proc" = "prescott" ; then
1859 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1861 if test "$proc" = "core2" ; then
1862 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1864 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
1865 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1867 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1868 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1870 if test "$proc" = "i586"; then
1871 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1873 if test "$proc" = "i486" ; then
1874 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1876 if test "$proc" = "i386" ; then
1877 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1879 if test "$proc" = "error" ; then
1880 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1884 elif test "$proc" = "i586-i686"; then
1885 _march
="-march=i586"
1886 _mcpu
="$cpuopt=i686"
1889 _march
="-march=$proc"
1890 _mcpu
="$cpuopt=$proc"
1893 else # if test "$_runtime_cpudetection" = no
1894 _mcpu
="$cpuopt=generic"
1895 # at least i486 required, for bswap instruction
1896 _march
="-march=i486"
1897 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1898 cflag_check
$_mcpu || _mcpu
=""
1899 cflag_check
$_march $_mcpu || _march
=""
1902 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1903 ## autodetected mcpu/march parameters
1904 if test "$_target" ; then
1905 # TODO: it may be a good idea to check GCC and fall back in all cases
1906 if test "$host_arch" = "i586-i686"; then
1907 _march
="-march=i586"
1908 _mcpu
="$cpuopt=i686"
1910 _march
="-march=$host_arch"
1911 _mcpu
="$cpuopt=$host_arch"
1919 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1920 i686|athlon
*|pentium
*) iproc
=686 ;;
1925 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1930 test $_fast_clz = "auto" && _fast_clz
=yes
1937 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1944 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1945 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1948 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1949 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1954 if test "$_runtime_cpudetection" = no
; then
1959 test $_fast_clz = "auto" && _fast_clz
=no
1968 # 64-bit prescotts exist, but as far as GCC is concerned they
1969 # have the same capabilities as a nocona.
1971 test $_fast_cmov = "auto" && _fast_cmov
=no
1972 test $_fast_clz = "auto" && _fast_clz
=no
1979 fi # test "$_runtime_cpudetection" = no
1981 echocheck
"GCC & CPU optimization abilities"
1982 # This is a stripped-down version of the i386 fallback.
1983 if test "$_runtime_cpudetection" = no
; then
1984 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1985 cflag_check
-march=native
&& proc
=native
1987 # --- AMD processors ---
1988 if test "$proc" = "amdfam10"; then
1989 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1991 if test "$proc" = "k8"; then
1992 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1994 # This will fail if gcc version < 3.3, which is ok because earlier
1995 # versions don't really support 64-bit on amd64.
1996 # Is this a valid assumption? -Corey
1997 if test "$proc" = "athlon-xp"; then
1998 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
2000 # --- Intel processors ---
2001 if test "$proc" = "core2"; then
2002 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2004 if test "$proc" = "x86-64"; then
2005 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
2007 if test "$proc" = "nocona"; then
2008 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2010 if test "$proc" = "pentium4"; then
2011 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
2014 _march
="-march=$proc"
2015 _mcpu
="$cpuopt=$proc"
2016 if test "$proc" = "error" ; then
2017 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2021 else # if test "$_runtime_cpudetection" = no
2022 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2023 _march
="-march=x86-64"
2024 _mcpu
="$cpuopt=generic"
2025 cflag_check
$_mcpu || _mcpu
="x86-64"
2026 cflag_check
$_mcpu || _mcpu
=""
2027 cflag_check
$_march $_mcpu || _march
=""
2031 test $_fast_cmov = "auto" && _fast_cmov
=yes
2032 test $_fast_clz = "auto" && _fast_clz
=yes
2040 if test "$host_arch" = "sparc64" ; then
2043 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2045 echocheck
"CPU type"
2047 case "$(echo $karch)" in
2052 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2071 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2073 test $_fast_clz = "auto" && _fast_clz
=yes
2081 ppc|ppc64|powerpc|powerpc64
)
2083 def_dcbzl
='#define HAVE_DCBZL 0'
2084 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2087 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2089 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2091 echocheck
"CPU type"
2092 case $system_name in
2094 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2095 if test -n "$($_cpuinfo | grep altivec)"; then
2096 test $_altivec = auto
&& _altivec
=yes
2100 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2101 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2102 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2103 test $_altivec = auto
&& _altivec
=yes
2107 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2109 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2112 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2113 test $_altivec = auto
&& _altivec
=yes
2119 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2122 if test "$_altivec" = yes; then
2123 echores
"$proc altivec"
2129 echocheck
"GCC & CPU optimization abilities"
2131 if test -n "$proc"; then
2133 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2134 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2135 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2136 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2137 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2138 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2139 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2140 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2141 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2144 # gcc 3.1(.1) and up supports 7400 and 7450
2145 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2147 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2148 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2152 # gcc 3.2 and up supports 970
2153 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2155 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2156 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2160 # gcc 3.3 and up supports POWER4
2161 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2163 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2167 # gcc 3.4 and up supports 440*
2168 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2170 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2171 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2175 # gcc 4.0 and up supports POWER5
2176 if test "$_cc_major" -ge "4"; then
2178 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2184 if test -n "$_mcpu"; then
2185 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2186 echores
"$_optimizing"
2191 test $_fast_clz = "auto" && _fast_clz
=yes
2198 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2200 echocheck
"CPU type"
2203 unsigned long ver, mask;
2204 __asm__ ("implver %0" : "=r" (ver));
2205 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2206 printf("%ld-%x\n", ver, ~mask);
2210 $_cc -o "$TMPEXE" "$TMPC"
2211 case $
("$TMPEXE") in
2213 0-0) proc
="ev4"; _mvi
="0";;
2214 1-0) proc
="ev5"; _mvi
="0";;
2215 1-1) proc
="ev56"; _mvi
="0";;
2216 1-101) proc
="pca56"; _mvi
="1";;
2217 2-303) proc
="ev6"; _mvi
="1";;
2218 2-307) proc
="ev67"; _mvi
="1";;
2219 2-1307) proc
="ev68"; _mvi
="1";;
2223 echocheck
"GCC & CPU optimization abilities"
2224 if test "$proc" = "ev68" ; then
2225 cc_check
-mcpu=$proc || proc
=ev67
2227 if test "$proc" = "ev67" ; then
2228 cc_check
-mcpu=$proc || proc
=ev6
2233 test $_fast_clz = "auto" && _fast_clz
=yes
2243 echocheck
"CPU type"
2244 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2245 case "$(echo $proc)" in
2246 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2247 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2248 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2249 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2250 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2251 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2253 # gcc < 3.x does not support -mtune.
2254 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2260 test $_fast_clz = "auto" && _fast_clz
=yes
2294 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2295 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2296 die
"unsupported architecture $host_arch"
2298 esac # case "$host_arch" in
2300 if test "$_runtime_cpudetection" = yes ; then
2302 test "$_cmov" != no
&& _cmov
=yes
2304 test "$_mmx" != no
&& _mmx
=yes
2305 test "$_3dnow" != no
&& _3dnow
=yes
2306 test "$_3dnowext" != no
&& _3dnowext
=yes
2307 test "$_mmxext" != no
&& _mmxext
=yes
2308 test "$_sse" != no
&& _sse
=yes
2309 test "$_sse2" != no
&& _sse2
=yes
2310 test "$_ssse3" != no
&& _ssse3
=yes
2311 test "$_mtrr" != no
&& _mtrr
=yes
2320 echocheck
"byte order"
2321 if test "$_big_endian" = auto
; then
2323 short ascii_name[] = {
2324 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2325 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2326 int main(void) { return (long)ascii_name; }
2329 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2335 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2338 if test "$_big_endian" = yes ; then
2339 _byte_order
='big-endian'
2340 def_words_endian
='#define WORDS_BIGENDIAN 1'
2341 def_bigendian
='#define HAVE_BIGENDIAN 1'
2343 _byte_order
='little-endian'
2344 def_words_endian
='#undef WORDS_BIGENDIAN'
2345 def_bigendian
='#define HAVE_BIGENDIAN 0'
2347 echores
"$_byte_order"
2350 echocheck
"extern symbol prefix"
2354 cc_check
-c || die
"Symbol mangling check failed."
2355 sym
=$
($_nm -P -g $TMPEXE)
2356 extern_prefix
=${sym%%ff_extern*}
2357 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2358 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2359 echores
$extern_prefix
2362 echocheck
"assembler support of -pipe option"
2363 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2364 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2367 echocheck
"compiler support of named assembler arguments"
2369 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2370 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2371 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2373 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2375 echores
$_named_asm_args
2378 if darwin
&& test "$cc_vendor" = "gnu" ; then
2379 echocheck
"GCC support of -mstackrealign"
2380 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2381 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2382 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2383 # wrong code with this flag, but this can be worked around by adding
2384 # -fno-unit-at-a-time as described in the blog post at
2385 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2387 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2388 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2390 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2391 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time &&
2392 tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2393 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2394 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2397 # Checking for CFLAGS
2399 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2400 CFLAGS
="-O2 $_march $_mcpu $_pipe $_debug $_profile"
2401 WARNFLAGS
="-W -Wall"
2403 elif test -z "$CFLAGS" ; then
2404 if test "$cc_vendor" = "intel" ; then
2405 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2406 WARNFLAGS
="-wd167 -wd556 -wd144"
2407 elif test "$cc_vendor" = "sun" ; then
2408 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2409 elif test "$cc_vendor" = "clang"; then
2410 CFLAGS
="-O2 $_march $_pipe"
2411 elif test "$cc_vendor" != "gnu" ; then
2412 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2414 CFLAGS
="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2415 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2416 extra_ldflags
="$extra_ldflags -ffast-math"
2422 if test "$cc_vendor" = "gnu" ; then
2423 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2424 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2425 # that's the only variable specific to C now, and this option is not valid
2427 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2428 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2429 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2430 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2431 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2433 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2436 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2437 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2440 if test -n "$LDFLAGS" ; then
2441 extra_ldflags
="$extra_ldflags $LDFLAGS"
2443 elif test "$cc_vendor" = "intel" ; then
2444 extra_ldflags
="$extra_ldflags -i-static"
2446 if test -n "$CPPFLAGS" ; then
2447 extra_cflags
="$extra_cflags $CPPFLAGS"
2454 # Checking assembler (_as) compatibility...
2455 # Added workaround for older as that reads from stdin by default - atmos
2456 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2457 echocheck
"assembler ($_as $as_version)"
2459 _pref_as_version
='2.9.1'
2461 if test "$_mmx" = yes ; then
2462 echo 'emms' >> $TMPS
2464 if test "$_3dnow" = yes ; then
2465 _pref_as_version
='2.10.1'
2466 echo 'femms' >> $TMPS
2468 if test "$_3dnowext" = yes ; then
2469 _pref_as_version
='2.10.1'
2470 echo 'pswapd %mm0, %mm0' >> $TMPS
2472 if test "$_mmxext" = yes ; then
2473 _pref_as_version
='2.10.1'
2474 echo 'movntq %mm0, (%eax)' >> $TMPS
2476 if test "$_sse" = yes ; then
2477 _pref_as_version
='2.10.1'
2478 echo 'xorps %xmm0, %xmm0' >> $TMPS
2480 #if test "$_sse2" = yes ; then
2481 # _pref_as_version='2.11'
2482 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2484 if test "$_cmov" = yes ; then
2485 _pref_as_version
='2.10.1'
2486 echo 'cmovb %eax, %ebx' >> $TMPS
2488 if test "$_ssse3" = yes ; then
2489 _pref_as_version
='2.16.92'
2490 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2492 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2494 if test "$as_verc_fail" != yes ; then
2497 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2499 die
"obsolete binutils version"
2509 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2510 #error PIC not enabled
2515 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2521 echocheck
".align is a power of two"
2522 if test "$_asmalign_pot" = auto
; then
2524 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2526 if test "$_asmalign_pot" = "yes" ; then
2527 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2529 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2531 echores
$_asmalign_pot
2534 echocheck
"10 assembler operands"
2536 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2542 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2547 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2548 echores
$ten_operands
2550 echocheck
"ebx availability"
2552 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2559 // just adding ebx to clobber list seems unreliable with some
2560 // compilers, e.g. Haiku's gcc 2.95
2562 // and the above check does not work for OSX 64 bit...
2563 __asm__ volatile("":::"%ebx");
2567 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2568 echores
$ebx_available
2572 if test -z "$YASMFLAGS" ; then
2574 x86_64
&& objformat
="macho64" || objformat
="macho"
2580 # currently tested for Linux x86, x86_64
2581 YASMFLAGS
="-f $objformat"
2582 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2583 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2584 case "$objformat" in
2585 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2586 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2592 echo "pabsw xmm0, xmm0" > $TMPS
2593 yasm_check || _yasm
=""
2594 if test $_yasm ; then
2595 def_yasm
='#define HAVE_YASM 1'
2599 def_yasm
='#define HAVE_YASM 0'
2605 def_bswap
='#define HAVE_BSWAP 0'
2606 echo 'bswap %eax' > $TMPS
2607 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2612 #FIXME: This should happen before the check for CFLAGS..
2613 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2614 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2616 # check if AltiVec is supported by the compiler, and how to enable it
2617 echocheck
"GCC AltiVec flags"
2618 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2619 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2620 # check if <altivec.h> should be included
2621 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2622 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2623 inc_altivec_h
='#include <altivec.h>'
2625 if $
(cflag_check
-faltivec) ; then
2626 _altivec_gcc_flags
="-faltivec"
2629 _altivec_gcc_flags
="none, AltiVec disabled"
2633 echores
"$_altivec_gcc_flags"
2635 # check if the compiler supports braces for vector declarations
2638 int main(void) { (vector int) {1}; return 0; }
2640 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2642 # Disable runtime cpudetection if we cannot generate AltiVec code or
2643 # AltiVec is disabled by the user.
2644 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2645 && _runtime_cpudetection
=no
2647 # Show that we are optimizing for AltiVec (if enabled and supported).
2648 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2649 && _optimizing
="$_optimizing altivec"
2651 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2652 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2656 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2658 echocheck
"XFORM ASM support"
2659 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2660 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2661 echores
"$xform_asm"
2665 echocheck
"ARM pld instruction"
2667 inline_asm_check
'"pld [r0]"' && pld
=yes
2670 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2671 if test $_armv5te = "auto" ; then
2673 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2677 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2679 echocheck
"ARMv6 (SIMD instructions)"
2680 if test $_armv6 = "auto" ; then
2682 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2686 echocheck
"ARMv6t2 (SIMD instructions)"
2687 if test $_armv6t2 = "auto" ; then
2689 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2694 if test $_armvfp = "auto" ; then
2696 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2700 echocheck
"ARM NEON"
2701 if test $neon = "auto" ; then
2703 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2707 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2708 if test $_iwmmxt = "auto" ; then
2710 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2715 cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2716 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2717 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2718 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2719 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2720 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2721 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2722 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2723 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2724 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2725 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2726 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2727 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2728 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2729 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2730 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2731 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2732 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2733 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2734 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2735 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2737 # Checking kernel version...
2738 if x86_32
&& linux
; then
2740 kernel_version
=$
(uname
-r 2>&1)
2741 echocheck
"$system_name kernel version"
2742 case "$kernel_version" in
2743 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2744 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2745 _k_verc_problem
=yes;;
2747 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2750 if test "$_k_verc_fail" ; then
2751 echores
"$kernel_version, fail"
2752 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2753 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2754 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2755 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2756 echo "2.2.x you must upgrade it to get SSE support!"
2757 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2759 echores
"$kernel_version, ok"
2763 ######################
2764 # MAIN TESTS GO HERE #
2765 ######################
2769 if cflag_check
-lposix ; then
2770 extra_ldflags
="$extra_ldflags -lposix"
2777 if cflag_check
-lm ; then
2786 echocheck
"langinfo"
2787 if test "$_langinfo" = auto
; then
2789 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2791 if test "$_langinfo" = yes ; then
2792 def_langinfo
='#define HAVE_LANGINFO 1'
2794 def_langinfo
='#undef HAVE_LANGINFO'
2796 echores
"$_langinfo"
2799 echocheck
"translation support"
2800 if test "$_translation" = yes; then
2801 def_translation
="#define CONFIG_TRANSLATION 1"
2803 def_translation
="#undef CONFIG_TRANSLATION"
2805 echores
"$_translation"
2807 echocheck
"language"
2808 # Set preferred languages, "all" uses English as main language.
2809 test -z "$language" && language
=$LINGUAS
2810 test -z "$language_doc" && language_doc
=$language
2811 test -z "$language_man" && language_man
=$language
2812 test -z "$language_msg" && language_msg
="all"
2813 language_doc
=$
(echo $language_doc |
tr , " ")
2814 language_man
=$
(echo $language_man |
tr , " ")
2815 language_msg
=$
(echo $language_msg |
tr , " ")
2817 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2818 test "$language_man" = "all" && language_man
=$man_lang_all
2819 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2821 if test "$_translation" != yes ; then
2825 # Prune non-existing translations from language lists.
2826 # Set message translation to the first available language.
2827 # Fall back on English.
2828 for lang
in $language_doc ; do
2829 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2831 language_doc
=$tmp_language_doc
2832 test -z "$language_doc" && language_doc
=en
2834 for lang
in $language_man ; do
2835 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2837 language_man
=$tmp_language_man
2838 test -z "$language_man" && language_man
=en
2840 for lang
in $language_msg ; do
2841 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2843 language_msg
=$tmp_language_msg
2845 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2848 echocheck
"enable sighandler"
2849 if test "$_sighandler" = yes ; then
2850 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2852 def_sighandler
='#undef CONFIG_SIGHANDLER'
2854 echores
"$_sighandler"
2856 echocheck
"runtime cpudetection"
2857 if test "$_runtime_cpudetection" = yes ; then
2858 _optimizing
="Runtime CPU-Detection enabled"
2859 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2861 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2863 echores
"$_runtime_cpudetection"
2866 echocheck
"restrict keyword"
2867 for restrict_keyword
in restrict __restrict __restrict__
; do
2868 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2870 def_restrict_keyword
=$restrict_keyword
2874 if [ -n "$def_restrict_keyword" ]; then
2875 echores
"$def_restrict_keyword"
2879 # Avoid infinite recursion loop ("#define restrict restrict")
2880 if [ "$def_restrict_keyword" != "restrict" ]; then
2881 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2883 def_restrict_keyword
=""
2887 echocheck
"__builtin_expect"
2888 # GCC branch prediction hint
2890 static int foo(int a) {
2891 a = __builtin_expect(a, 10);
2892 return a == 10 ? 0 : 1;
2894 int main(void) { return foo(10) && foo(0); }
2897 cc_check
&& _builtin_expect
=yes
2898 if test "$_builtin_expect" = yes ; then
2899 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2901 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2903 echores
"$_builtin_expect"
2908 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2909 if test "$_kstat" = yes ; then
2910 def_kstat
="#define HAVE_LIBKSTAT 1"
2911 extra_ldflags
="$extra_ldflags -lkstat"
2913 def_kstat
="#undef HAVE_LIBKSTAT"
2919 # required for nanosleep on some systems
2921 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2922 if test "$_posix4" = yes ; then
2923 extra_ldflags
="$extra_ldflags -lposix4"
2927 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2930 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2931 if eval test "x\$_$func" = "xyes"; then
2932 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2935 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2943 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp
=yes
2944 if test "$_mkstemp" = yes ; then
2945 def_mkstemp
='#define HAVE_MKSTEMP 1'
2947 def_mkstemp
='#define HAVE_MKSTEMP 0'
2952 echocheck
"nanosleep"
2954 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2955 if test "$_nanosleep" = yes ; then
2956 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2958 def_nanosleep
='#undef HAVE_NANOSLEEP'
2960 echores
"$_nanosleep"
2964 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2965 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2968 #include <sys/socket.h>
2969 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2972 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2973 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2975 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2976 if test $_winsock2_h = auto
; then
2978 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2980 test "$_ld_sock" && res_comment
="using $_ld_sock"
2984 if test $_winsock2_h = yes ; then
2986 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2988 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2992 echocheck
"arpa/inet.h"
2994 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2995 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2996 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2997 echores
"$arpa_inet_h"
3000 echocheck
"inet_pton()"
3001 def_inet_pton
='#define HAVE_INET_PTON 0'
3003 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3004 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
3006 if test $inet_pton = yes ; then
3007 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3008 def_inet_pton
='#define HAVE_INET_PTON 1'
3010 echores
"$inet_pton"
3013 echocheck
"inet_aton()"
3014 def_inet_aton
='#define HAVE_INET_ATON 0'
3016 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3017 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
3019 if test $inet_aton = yes ; then
3020 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3021 def_inet_aton
='#define HAVE_INET_ATON 1'
3023 echores
"$inet_aton"
3026 echocheck
"socklen_t"
3028 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3029 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
3031 if test "$_socklen_t" = yes ; then
3032 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3034 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3036 echores
"$_socklen_t"
3039 echocheck
"closesocket()"
3041 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
3042 if test "$_closesocket" = yes ; then
3043 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3045 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3047 echores
"$_closesocket"
3050 echocheck
"networking"
3051 test $_winsock2_h = no
&& test $inet_pton = no
&&
3052 test $inet_aton = no
&& networking
=no
3053 if test "$networking" = yes ; then
3054 def_network
='#define CONFIG_NETWORK 1'
3055 def_networking
='#define CONFIG_NETWORKING 1'
3056 extra_ldflags
="$extra_ldflags $_ld_sock"
3057 inputmodules
="networking $inputmodules"
3059 noinputmodules
="networking $noinputmodules"
3060 def_network
='#define CONFIG_NETWORK 0'
3061 def_networking
='#undef CONFIG_NETWORKING'
3063 echores
"$networking"
3067 if test "$_inet6" = auto
; then
3069 #include <sys/types.h>
3070 #if !defined(_WIN32)
3071 #include <sys/socket.h>
3072 #include <netinet/in.h>
3074 #include <ws2tcpip.h>
3076 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3079 if cc_check
$_ld_sock ; then
3083 if test "$_inet6" = yes ; then
3084 def_inet6
='#define HAVE_AF_INET6 1'
3086 def_inet6
='#undef HAVE_AF_INET6'
3091 echocheck
"gethostbyname2"
3092 if test "$_gethostbyname2" = auto
; then
3094 #include <sys/types.h>
3095 #include <sys/socket.h>
3097 int main(void) { gethostbyname2("", AF_INET); return 0; }
3104 if test "$_gethostbyname2" = yes ; then
3105 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3107 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3109 echores
"$_gethostbyname2"
3112 echocheck
"inttypes.h (required)"
3114 header_check inttypes.h
&& _inttypes
=yes
3115 echores
"$_inttypes"
3117 if test "$_inttypes" = no
; then
3118 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3119 header_check sys
/bitypes.h
&& _inttypes
=yes
3120 if test "$_inttypes" = yes ; then
3121 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."
3123 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3128 echocheck
"int_fastXY_t in inttypes.h"
3130 statement_check
"inttypes.h" 'volatile int_fast16_t v = 0' && _fast_inttypes
=yes
3131 if test "$_fast_inttypes" = no
; then
3133 typedef signed char int_fast8_t;
3134 typedef signed int int_fast16_t;
3135 typedef signed int int_fast32_t;
3136 typedef signed long long int_fast64_t;
3137 typedef unsigned char uint_fast8_t;
3138 typedef unsigned int uint_fast16_t;
3139 typedef unsigned int uint_fast32_t;
3140 typedef unsigned long long uint_fast64_t;'
3142 echores
"$_fast_inttypes"
3145 echocheck
"malloc.h"
3147 header_check malloc.h
&& _malloc
=yes
3148 if test "$_malloc" = yes ; then
3149 def_malloc_h
='#define HAVE_MALLOC_H 1'
3151 def_malloc_h
='#define HAVE_MALLOC_H 0'
3156 echocheck
"memalign()"
3157 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3158 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3160 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3161 if test "$_memalign" = yes ; then
3162 def_memalign
='#define HAVE_MEMALIGN 1'
3164 def_memalign
='#define HAVE_MEMALIGN 0'
3165 def_map_memalign
='#define memalign(a, b) malloc(b)'
3166 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3168 echores
"$_memalign"
3171 echocheck
"posix_memalign()"
3173 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3174 define_statement_check
"_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' &&
3175 posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3176 echores
"$posix_memalign"
3179 echocheck
"alloca.h"
3181 statement_check alloca.h
'alloca(0)' && _alloca
=yes
3183 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3185 def_alloca_h
='#undef HAVE_ALLOCA_H'
3190 echocheck
"fastmemcpy"
3191 if test "$_fastmemcpy" = yes ; then
3192 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3194 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3196 echores
"$_fastmemcpy"
3201 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
3202 if test "$_mman" = yes ; then
3203 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3205 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3206 os2
&& _need_mmap
=yes
3210 _mman_has_map_failed
=no
3211 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
3212 if test "$_mman_has_map_failed" = yes ; then
3213 def_mman_has_map_failed
=''
3215 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3218 echocheck
"dynamic loader"
3220 for _ld_tmp
in "" "-ldl"; do
3221 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3223 if test "$_dl" = yes ; then
3224 def_dl
='#define HAVE_LIBDL 1'
3226 def_dl
='#undef HAVE_LIBDL'
3231 echocheck
"dynamic a/v plugins support"
3232 if test "$_dl" = no
; then
3235 if test "$_dynamic_plugins" = yes ; then
3236 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3238 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3240 echores
"$_dynamic_plugins"
3243 def_threads
='#define HAVE_THREADS 0'
3247 THREAD_CFLAGS
=-D_REENTRANT
3248 elif freebsd || netbsd || openbsd || bsdos
; then
3249 THREAD_CFLAGS
=-D_THREAD_SAFE
3251 if test "$_pthreads" = auto
; then
3253 #include <pthread.h>
3254 static void *func(void *arg) { return arg; }
3255 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3259 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3260 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3261 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3265 if test "$_pthreads" = yes ; then
3266 test $_ld_pthread && res_comment
="using $_ld_pthread"
3267 def_pthreads
='#define HAVE_PTHREADS 1'
3268 def_threads
='#define HAVE_THREADS 1'
3269 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3271 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3272 def_pthreads
='#undef HAVE_PTHREADS'
3273 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3274 mingw32 || _win32dll
=no
3276 echores
"$_pthreads"
3279 if test "$_pthreads" = yes ; then
3280 def_pthread_cache
="#define PTHREAD_CACHE 1"
3283 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3287 echocheck
"w32threads"
3288 if test "$_pthreads" = yes ; then
3289 res_comment
="using pthread instead"
3292 if test "$_w32threads" = auto
; then
3294 mingw32
&& _w32threads
=yes
3296 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3297 echores
"$_w32threads"
3300 if test "$_rpath" = yes ; then
3301 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3302 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3309 if test "$_iconv" = auto
; then
3314 #define INBUFSIZE 1024
3315 #define OUTBUFSIZE 4096
3317 char inbuffer[INBUFSIZE];
3318 char outbuffer[OUTBUFSIZE];
3323 char *tocode="UTF-8";
3324 char *fromcode="cp1250";
3325 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3326 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3327 char *iptr=inbuffer;
3328 char *optr=outbuffer;
3329 size_t inleft=numread;
3330 size_t outleft=OUTBUFSIZE;
3331 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3333 write(1, outbuffer, OUTBUFSIZE - outleft);
3336 if (iconv_close(icdsc) == -1)
3343 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3344 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
3348 if test "$_iconv" = yes ; then
3349 def_iconv
='#define CONFIG_ICONV 1'
3351 def_iconv
='#undef CONFIG_ICONV'
3356 echocheck
"soundcard.h"
3358 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3359 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3360 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3361 header_check
$_soundcard_header && _soundcard_h
=yes &&
3362 res_comment
="$_soundcard_header" && break
3365 if test "$_soundcard_h" = yes ; then
3366 if test $_soundcard_header = "sys/soundcard.h"; then
3367 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3369 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3372 echores
"$_soundcard_h"
3375 echocheck
"sys/dvdio.h"
3377 # FreeBSD 8.1 has broken dvdio.h
3378 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3379 if test "$_dvdio" = yes ; then
3380 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3382 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3387 echocheck
"sys/cdio.h"
3389 # at least OpenSolaris has a broken cdio.h
3390 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3391 if test "$_cdio" = yes ; then
3392 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3394 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3399 echocheck
"linux/cdrom.h"
3401 header_check linux
/cdrom.h
&& _cdrom
=yes
3402 if test "$_cdrom" = yes ; then
3403 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3405 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3412 header_check dvd.h
&& _dvd
=yes
3413 if test "$_dvd" = yes ; then
3414 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3416 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3422 echocheck
"BSDI dvd.h"
3424 header_check dvd.h
&& _bsdi_dvd
=yes
3425 if test "$_bsdi_dvd" = yes ; then
3426 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3428 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3430 echores
"$_bsdi_dvd"
3435 # also used by AIX, but AIX does not support VCD and/or libdvdread
3436 echocheck
"HP-UX SCSI header"
3438 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3439 if test "$_hpux_scsi_h" = yes ; then
3440 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3442 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3444 echores
"$_hpux_scsi_h"
3449 echocheck
"userspace SCSI headers (Solaris)"
3451 header_check sys
/scsi
/scsi_types.h
&&
3452 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3454 if test "$_sol_scsi_h" = yes ; then
3455 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3457 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3459 echores
"$_sol_scsi_h"
3464 if test "$_termcap" = auto
; then
3466 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3467 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3468 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3471 if test "$_termcap" = yes ; then
3472 def_termcap
='#define HAVE_TERMCAP 1'
3473 test $_ld_tmp && res_comment
="using $_ld_tmp"
3475 def_termcap
='#undef HAVE_TERMCAP'
3481 def_termios
='#undef HAVE_TERMIOS'
3482 def_termios_h
='#undef HAVE_TERMIOS_H'
3483 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3484 if test "$_termios" = auto
; then
3486 for _termios_header
in "termios.h" "sys/termios.h"; do
3487 header_check
$_termios_header && _termios
=yes &&
3488 res_comment
="using $_termios_header" && break
3492 if test "$_termios" = yes ; then
3493 def_termios
='#define HAVE_TERMIOS 1'
3494 if test "$_termios_header" = "termios.h" ; then
3495 def_termios_h
='#define HAVE_TERMIOS_H 1'
3497 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3504 if test "$_shm" = auto
; then
3506 statement_check sys
/shm.h
'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm
=yes
3508 if test "$_shm" = yes ; then
3509 def_shm
='#define HAVE_SHM 1'
3511 def_shm
='#undef HAVE_SHM'
3516 echocheck
"strsep()"
3518 statement_check string.h
'char *s = "Hello, world!"; strsep(&s, ",")' && _strsep
=yes
3519 if test "$_strsep" = yes ; then
3520 def_strsep
='#define HAVE_STRSEP 1'
3523 def_strsep
='#undef HAVE_STRSEP'
3529 echocheck
"vsscanf()"
3531 #define _ISOC99_SOURCE
3534 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3537 cc_check
&& _vsscanf
=yes
3538 if test "$_vsscanf" = yes ; then
3539 def_vsscanf
='#define HAVE_VSSCANF 1'
3542 def_vsscanf
='#undef HAVE_VSSCANF'
3550 define_statement_check
"_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' && _swab
=yes
3551 if test "$_swab" = yes ; then
3552 def_swab
='#define HAVE_SWAB 1'
3555 def_swab
='#undef HAVE_SWAB'
3560 echocheck
"POSIX select()"
3564 #include <sys/types.h>
3566 #include <sys/time.h>
3568 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3571 def_posix_select
='#undef HAVE_POSIX_SELECT'
3572 #select() of kLIBC (OS/2) supports socket only
3573 ! os2
&& cc_check
&& _posix_select
=yes &&
3574 def_posix_select
='#define HAVE_POSIX_SELECT 1'
3575 echores
"$_posix_select"
3578 echocheck
"audio select()"
3579 if test "$_select" = no
; then
3580 def_select
='#undef HAVE_AUDIO_SELECT'
3581 elif test "$_select" = yes ; then
3582 def_select
='#define HAVE_AUDIO_SELECT 1'
3587 echocheck
"gettimeofday()"
3589 statement_check sys
/time.h
'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' && _gettimeofday
=yes
3590 if test "$_gettimeofday" = yes ; then
3591 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3592 _need_gettimeofday
=no
3594 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3595 _need_gettimeofday
=yes
3597 echores
"$_gettimeofday"
3602 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3603 if test "$_glob" = yes ; then
3604 def_glob
='#define HAVE_GLOB 1'
3607 def_glob
='#undef HAVE_GLOB'
3613 echocheck
"setenv()"
3615 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3616 if test "$_setenv" = yes ; then
3617 def_setenv
='#define HAVE_SETENV 1'
3620 def_setenv
='#undef HAVE_SETENV'
3626 echocheck
"setmode()"
3628 def_setmode
='#define HAVE_SETMODE 0'
3629 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3634 echocheck
"sysi86()"
3636 statement_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3637 if test "$_sysi86" = yes ; then
3638 def_sysi86
='#define HAVE_SYSI86 1'
3639 statement_check sys
/sysi86.h
'int sysi86(int, void*); sysi86(0)' && def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3641 def_sysi86
='#undef HAVE_SYSI86'
3647 echocheck
"sys/sysinfo.h"
3649 statement_check sys
/sysinfo.h
'struct sysinfo s_info; sysinfo(&s_info)' && _sys_sysinfo
=yes
3650 if test "$_sys_sysinfo" = yes ; then
3651 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3653 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3655 echores
"$_sys_sysinfo"
3660 echocheck
"Mac OS X Finder Support"
3661 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3662 if test "$_macosx_finder" = yes ; then
3663 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3664 extra_ldflags
="$extra_ldflags -framework Carbon"
3666 echores
"$_macosx_finder"
3668 echocheck
"Mac OS X Bundle file locations"
3669 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3670 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3671 if test "$_macosx_bundle" = yes ; then
3672 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3673 extra_ldflags
="$extra_ldflags -framework Carbon"
3675 echores
"$_macosx_bundle"
3677 echocheck
"Apple Remote"
3678 if test "$_apple_remote" = auto
; then
3682 #include <IOKit/IOCFPlugIn.h>
3684 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3685 CFMutableDictionaryRef hidMatchDictionary;
3686 IOReturn ioReturnValue;
3688 // Set up a matching dictionary to search the I/O Registry by class.
3689 // name for all HID class devices
3690 hidMatchDictionary = IOServiceMatching("AppleIRController");
3692 // Now search I/O Registry for matching devices.
3693 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3694 hidMatchDictionary, &hidObjectIterator);
3696 // If search is unsuccessful, return nonzero.
3697 if (ioReturnValue != kIOReturnSuccess ||
3698 !IOIteratorIsValid(hidObjectIterator)) {
3704 cc_check
-framework IOKit
&& _apple_remote
=yes
3706 if test "$_apple_remote" = yes ; then
3707 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3708 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3710 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3712 echores
"$_apple_remote"
3718 echocheck
"Apple IR"
3719 if test "$_apple_ir" = auto
; then
3721 statement_check linux
/input.h
'struct input_event ev; struct input_id id' && _apple_ir
=yes
3723 if test "$_apple_ir" = yes ; then
3724 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3726 def_apple_ir
='#undef CONFIG_APPLE_IR'
3728 echores
"$_apple_ir"
3731 echocheck
"pkg-config"
3732 _pkg_config
=pkg-config
3733 if $
($_pkg_config --version > /dev
/null
2>&1); then
3734 if test "$_ld_static"; then
3735 _pkg_config
="$_pkg_config --static"
3744 echocheck
"Samba support (libsmbclient)"
3745 if test "$_smb" = yes; then
3746 extra_ldflags
="$extra_ldflags -lsmbclient"
3748 if test "$_smb" = auto
; then
3750 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3751 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3752 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3756 if test "$_smb" = yes; then
3757 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3758 inputmodules
="smb $inputmodules"
3760 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3761 noinputmodules
="smb $noinputmodules"
3772 if test "$_tdfxfb" = yes ; then
3773 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3774 vomodules
="tdfxfb $vomodules"
3776 def_tdfxfb
='#undef CONFIG_TDFXFB'
3777 novomodules
="tdfxfb $novomodules"
3782 if test "$_s3fb" = yes ; then
3783 def_s3fb
='#define CONFIG_S3FB 1'
3784 vomodules
="s3fb $vomodules"
3786 def_s3fb
='#undef CONFIG_S3FB'
3787 novomodules
="s3fb $novomodules"
3792 if test "$_wii" = yes ; then
3793 def_wii
='#define CONFIG_WII 1'
3794 vomodules
="wii $vomodules"
3796 def_wii
='#undef CONFIG_WII'
3797 novomodules
="wii $novomodules"
3802 if test "$_tdfxvid" = yes ; then
3803 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3804 vomodules
="tdfx_vid $vomodules"
3806 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3807 novomodules
="tdfx_vid $novomodules"
3812 if test "$_xvr100" = auto
; then
3815 #include <sys/fbio.h>
3816 #include <sys/visual_io.h>
3818 struct vis_identifier ident;
3819 struct fbgattr attr;
3820 ioctl(0, VIS_GETIDENTIFIER, &ident);
3821 ioctl(0, FBIOGATTR, &attr);
3826 cc_check
&& _xvr100
=yes
3828 if test "$_xvr100" = yes ; then
3829 def_xvr100
='#define CONFIG_XVR100 1'
3830 vomodules
="xvr100 $vomodules"
3832 def_tdfxvid
='#undef CONFIG_XVR100'
3833 novomodules
="xvr100 $novomodules"
3838 if test "$_tga" = yes ; then
3839 def_tga
='#define CONFIG_TGA 1'
3840 vomodules
="tga $vomodules"
3842 def_tga
='#undef CONFIG_TGA'
3843 novomodules
="tga $novomodules"
3848 echocheck
"md5sum support"
3849 if test "$_md5sum" = yes; then
3850 def_md5sum
="#define CONFIG_MD5SUM 1"
3851 vomodules
="md5sum $vomodules"
3853 def_md5sum
="#undef CONFIG_MD5SUM"
3854 novomodules
="md5sum $novomodules"
3859 echocheck
"yuv4mpeg support"
3860 if test "$_yuv4mpeg" = yes; then
3861 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3862 vomodules
="yuv4mpeg $vomodules"
3864 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3865 novomodules
="yuv4mpeg $novomodules"
3867 echores
"$_yuv4mpeg"
3871 if test "$_bl" = yes ; then
3872 def_bl
='#define CONFIG_BL 1'
3873 vomodules
="bl $vomodules"
3875 def_bl
='#undef CONFIG_BL'
3876 novomodules
="bl $novomodules"
3881 echocheck
"DirectFB"
3882 if test "$_directfb" = auto
; then
3885 #include <directfb.h>
3886 #include <directfb_version.h>
3887 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3888 #error "DirectFB version too old."
3890 int main(void) { DirectFBInit(0, 0); return 0; }
3892 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3893 cc_check
$_inc_tmp -ldirectfb &&
3894 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3897 if test "$_directfb" = yes ; then
3898 def_directfb
='#define CONFIG_DIRECTFB 1'
3899 vomodules
="directfb dfbmga $vomodules"
3900 libs_mplayer
="$libs_mplayer -ldirectfb"
3902 def_directfb
='#undef CONFIG_DIRECTFB'
3903 novomodules
="directfb dfbmga $novomodules"
3905 echores
"$_directfb"
3908 echocheck
"X11 headers presence"
3910 res_comment
="check if the dev(el) packages are installed"
3911 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3912 if test -f "$I/X11/Xlib.h" ; then
3918 if test $_cross_compile = no
; then
3919 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3920 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3921 if test -f "$I/X11/Xlib.h" ; then
3922 extra_cflags
="$extra_cflags -I$I"
3924 res_comment
="using $I"
3929 echores
"$_x11_headers"
3933 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3934 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3935 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3938 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3940 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3942 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3943 libs_mplayer
="$libs_mplayer $_ld_tmp" && _x11
=yes && break
3946 if test "$_x11" = yes ; then
3947 def_x11
='#define CONFIG_X11 1'
3948 vomodules
="x11 xover $vomodules"
3951 def_x11
='#undef CONFIG_X11'
3952 novomodules
="x11 $novomodules"
3953 res_comment
="check if the dev(el) packages are installed"
3954 # disable stuff that depends on X
3955 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
3959 echocheck
"Xss screensaver extensions"
3960 if test "$_xss" = auto
; then
3962 statement_check
"X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss
=yes
3964 if test "$_xss" = yes ; then
3965 def_xss
='#define CONFIG_XSS 1'
3966 libs_mplayer
="$libs_mplayer -lXss"
3968 def_xss
='#undef CONFIG_XSS'
3975 if test "$_x11" = yes ; then
3977 #include <X11/Xmd.h>
3978 #include <X11/Xlib.h>
3979 #include <X11/Xutil.h>
3980 #include <X11/Xatom.h>
3981 #include <X11/extensions/dpms.h>
3982 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
3984 cc_check
-lXdpms && _xdpms3
=yes
3985 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
3987 if test "$_xdpms4" = yes ; then
3988 def_xdpms
='#define CONFIG_XDPMS 1'
3989 res_comment
="using Xdpms 4"
3991 elif test "$_xdpms3" = yes ; then
3992 def_xdpms
='#define CONFIG_XDPMS 1'
3993 libs_mplayer
="$libs_mplayer -lXdpms"
3994 res_comment
="using Xdpms 3"
3997 def_xdpms
='#undef CONFIG_XDPMS'
4003 if test "$_xv" = auto
; then
4005 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
4008 if test "$_xv" = yes ; then
4009 def_xv
='#define CONFIG_XV 1'
4010 libs_mplayer
="$libs_mplayer -lXv"
4011 vomodules
="xv $vomodules"
4013 def_xv
='#undef CONFIG_XV'
4014 novomodules
="xv $novomodules"
4020 if test "$_xv" = yes && test "$_xvmc" != no
; then
4023 #include <X11/Xlib.h>
4024 #include <X11/extensions/Xvlib.h>
4025 #include <X11/extensions/XvMClib.h>
4027 XvMCQueryExtension(0, 0, 0);
4028 XvMCCreateContext(0, 0, 0, 0, 0, 0, 0);
4031 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4032 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4035 if test "$_xvmc" = yes ; then
4036 def_xvmc
='#define CONFIG_XVMC 1'
4037 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4038 vomodules
="xvmc $vomodules"
4039 res_comment
="using $_xvmclib"
4041 def_xvmc
='#define CONFIG_XVMC 0'
4042 novomodules
="xvmc $novomodules"
4048 if test "$_vdpau" = auto
; then
4050 if test "$_dl" = yes ; then
4051 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
4054 if test "$_vdpau" = yes ; then
4055 def_vdpau
='#define CONFIG_VDPAU 1'
4056 libs_mplayer
="$libs_mplayer -lvdpau"
4057 vomodules
="vdpau $vomodules"
4059 def_vdpau
='#define CONFIG_VDPAU 0'
4060 novomodules
="vdpau $novomodules"
4065 echocheck
"Xinerama"
4066 if test "$_xinerama" = auto
; then
4068 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
4071 if test "$_xinerama" = yes ; then
4072 def_xinerama
='#define CONFIG_XINERAMA 1'
4073 libs_mplayer
="$libs_mplayer -lXinerama"
4075 def_xinerama
='#undef CONFIG_XINERAMA'
4077 echores
"$_xinerama"
4080 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4081 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4082 # named 'X extensions' or something similar.
4083 # This check may be useful for future mplayer versions (to change resolution)
4084 # If you run into problems, remove '-lXxf86vm'.
4086 if test "$_vm" = auto
; then
4088 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
4090 if test "$_vm" = yes ; then
4091 def_vm
='#define CONFIG_XF86VM 1'
4092 libs_mplayer
="$libs_mplayer -lXxf86vm"
4094 def_vm
='#undef CONFIG_XF86VM'
4098 # Check for the presence of special keycodes, like audio control buttons
4099 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4100 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4101 # have these new keycodes.
4102 echocheck
"XF86keysym"
4103 if test "$_xf86keysym" = auto
; then
4105 return_check X11
/XF86keysym.h XF86XK_AudioPause
&& _xf86keysym
=yes
4107 if test "$_xf86keysym" = yes ; then
4108 def_xf86keysym
='#define CONFIG_XF86XK 1'
4110 def_xf86keysym
='#undef CONFIG_XF86XK'
4112 echores
"$_xf86keysym"
4115 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4117 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2
=yes
4119 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4121 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XF86DGASetViewPort(0, 0, 0, 0)' -lXxf86dga -lXxf86vm && _dga1
=yes
4125 def_dga
='#undef CONFIG_DGA'
4126 def_dga1
='#undef CONFIG_DGA1'
4127 def_dga2
='#undef CONFIG_DGA2'
4128 if test "$_dga1" = yes ; then
4130 def_dga1
='#define CONFIG_DGA1 1'
4131 res_comment
="using DGA 1.0"
4132 elif test "$_dga2" = yes ; then
4134 def_dga2
='#define CONFIG_DGA2 1'
4135 res_comment
="using DGA 2.0"
4137 if test "$_dga" = yes ; then
4138 def_dga
='#define CONFIG_DGA 1'
4139 libs_mplayer
="$libs_mplayer -lXxf86dga"
4140 vomodules
="dga $vomodules"
4142 novomodules
="dga $novomodules"
4148 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4149 def_3dfx
='#define CONFIG_3DFX 1'
4150 vomodules
="3dfx $vomodules"
4152 def_3dfx
='#undef CONFIG_3DFX'
4153 novomodules
="3dfx $novomodules"
4159 def_vidix
='#undef CONFIG_VIDIX'
4160 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4161 _vidix_drv_cyberblade
=no
4162 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4164 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4165 _vidix_drv_mach64
=no
4166 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4168 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4169 _vidix_drv_mga_crtc2
=no
4170 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4171 _vidix_drv_nvidia
=no
4172 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4174 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4176 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4177 _vidix_drv_radeon
=no
4178 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4179 _vidix_drv_rage128
=no
4180 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4182 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4183 _vidix_drv_sh_veu
=no
4184 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4186 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4187 _vidix_drv_unichrome
=no
4188 if test "$_vidix" = auto
; then
4190 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4192 x86_64
&& ! linux
&& _vidix
=no
4193 (ppc || alpha
) && linux
&& _vidix
=yes
4197 if test "$_vidix" = yes ; then
4198 def_vidix
='#define CONFIG_VIDIX 1'
4199 vomodules
="cvidix $vomodules"
4200 # FIXME: ivtv driver temporarily disabled until we have a proper test
4201 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4202 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4204 # some vidix drivers are architecture and os specific, discard them elsewhere
4205 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4206 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4208 for driver
in $_vidix_drivers ; do
4209 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4210 eval _vidix_drv_
${driver}=yes
4211 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4214 echocheck
"VIDIX PCI device name database"
4215 echores
"$_vidix_pcidb"
4216 if test "$_vidix_pcidb" = yes ; then
4222 echocheck
"VIDIX dhahelper support"
4223 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4224 echores
"$_dhahelper"
4226 echocheck
"VIDIX svgalib_helper support"
4227 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4228 echores
"$_svgalib_helper"
4231 novomodules
="cvidix $novomodules"
4234 if test "$_vidix" = yes && win32
; then
4236 vomodules
="winvidix $vomodules"
4237 libs_mplayer
="$libs_mplayer -lgdi32"
4239 novomodules
="winvidix $novomodules"
4241 if test "$_vidix" = yes && test "$_x11" = yes; then
4243 vomodules
="xvidix $vomodules"
4245 novomodules
="xvidix $novomodules"
4249 if test "$_ggi" = auto
; then
4251 statement_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4253 if test "$_ggi" = yes ; then
4254 def_ggi
='#define CONFIG_GGI 1'
4255 libs_mplayer
="$libs_mplayer -lggi"
4256 vomodules
="ggi $vomodules"
4258 def_ggi
='#undef CONFIG_GGI'
4259 novomodules
="ggi $novomodules"
4263 echocheck
"GGI extension: libggiwmh"
4264 if test "$_ggiwmh" = auto
; then
4266 statement_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4268 # needed to get right output on obscure combination
4269 # like --disable-ggi --enable-ggiwmh
4270 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4271 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4272 libs_mplayer
="$libs_mplayer -lggiwmh"
4275 def_ggiwmh
='#undef CONFIG_GGIWMH'
4281 if test "$_aa" = auto
; then
4288 c = aa_autoinit(&aa_defparams);
4289 p = aa_getrenderparams();
4290 aa_autoinitkbd(c, 0);
4294 for _ld_tmp
in "-laa" ; do
4295 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4298 if test "$_aa" = yes ; then
4299 def_aa
='#define CONFIG_AA 1'
4301 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4303 vomodules
="aa $vomodules"
4305 def_aa
='#undef CONFIG_AA'
4306 novomodules
="aa $novomodules"
4312 if test "$_caca" = auto
; then
4314 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4317 #ifdef CACA_API_VERSION_1
4320 int main(void) { caca_init(); return 0; }
4322 cc_check $
(caca-config
--libs) && _caca
=yes
4325 if test "$_caca" = yes ; then
4326 def_caca
='#define CONFIG_CACA 1'
4327 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4328 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4329 vomodules
="caca $vomodules"
4331 def_caca
='#undef CONFIG_CACA'
4332 novomodules
="caca $novomodules"
4338 if test "$_svga" = auto
; then
4340 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4342 if test "$_svga" = yes ; then
4343 def_svga
='#define CONFIG_SVGALIB 1'
4344 libs_mplayer
="$libs_mplayer -lvga"
4345 vomodules
="svga $vomodules"
4347 def_svga
='#undef CONFIG_SVGALIB'
4348 novomodules
="svga $novomodules"
4354 if test "$_fbdev" = auto
; then
4358 if test "$_fbdev" = yes ; then
4359 def_fbdev
='#define CONFIG_FBDEV 1'
4360 vomodules
="fbdev $vomodules"
4362 def_fbdev
='#undef CONFIG_FBDEV'
4363 novomodules
="fbdev $novomodules"
4370 if test "$_dvb" = auto
; then
4374 #include <sys/ioctl.h>
4378 #include <linux/dvb/dmx.h>
4379 #include <linux/dvb/frontend.h>
4380 #include <linux/dvb/video.h>
4381 #include <linux/dvb/audio.h>
4382 int main(void) {return 0;}
4384 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4385 cc_check
$_inc_tmp && _dvb
=yes &&
4386 extra_cflags
="$extra_cflags $_inc_tmp" && break
4390 if test "$_dvb" = yes ; then
4392 inputmodules
="dvb $inputmodules"
4393 def_dvb
='#define CONFIG_DVB 1'
4394 def_dvbin
='#define CONFIG_DVBIN 1'
4395 aomodules
="mpegpes(dvb) $aomodules"
4396 vomodules
="mpegpes(dvb) $vomodules"
4399 noinputmodules
="dvb $noinputmodules"
4400 def_dvb
='#undef CONFIG_DVB'
4401 def_dvbin
='#undef CONFIG_DVBIN '
4402 aomodules
="mpegpes(file) $aomodules"
4403 vomodules
="mpegpes(file) $vomodules"
4409 echocheck
"QuickTime"
4410 if test "$quicktime" = auto
; then
4412 statement_check QuickTime
/QuickTime.h
'ImageDescription *desc; EnterMovies(); ExitMovies()' -framework QuickTime
&& quicktime
=yes
4414 if test "$quicktime" = yes ; then
4415 extra_ldflags
="$extra_ldflags -framework QuickTime"
4416 def_quicktime
='#define CONFIG_QUICKTIME 1'
4418 def_quicktime
='#undef CONFIG_QUICKTIME'
4424 if test "$_quartz" = auto
; then
4426 statement_check Carbon
/Carbon.h
'CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false)' -framework Carbon
&& _quartz
=yes
4428 if test "$_quartz" = yes ; then
4429 libs_mplayer
="$libs_mplayer -framework Carbon"
4430 def_quartz
='#define CONFIG_QUARTZ 1'
4431 vomodules
="quartz $vomodules"
4433 def_quartz
='#undef CONFIG_QUARTZ'
4434 novomodules
="quartz $novomodules"
4438 echocheck
"CoreVideo"
4439 if test "$_corevideo" = auto
; then
4441 #include <Carbon/Carbon.h>
4442 #include <CoreServices/CoreServices.h>
4443 #include <OpenGL/OpenGL.h>
4444 #include <QuartzCore/CoreVideo.h>
4445 int main(void) { return 0; }
4448 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4450 if test "$_corevideo" = yes ; then
4451 vomodules
="corevideo $vomodules"
4452 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4453 def_corevideo
='#define CONFIG_COREVIDEO 1'
4455 novomodules
="corevideo $novomodules"
4456 def_corevideo
='#undef CONFIG_COREVIDEO'
4458 echores
"$_corevideo"
4463 echocheck
"PNG support"
4464 if test "$_png" = auto
; then
4467 # Don't check for -lpng on irix since it has its own libpng
4468 # incompatible with the GNU libpng
4469 res_comment
="disabled on irix (not GNU libpng)"
4476 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4477 printf("libpng: %s\n", png_libpng_ver);
4478 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4481 cc_check
-lpng -lz $_ld_lm && _png
=yes
4485 if test "$_png" = yes ; then
4486 def_png
='#define CONFIG_PNG 1'
4487 extra_ldflags
="$extra_ldflags -lpng -lz"
4489 def_png
='#undef CONFIG_PNG'
4492 echocheck
"MNG support"
4493 if test "$_mng" = auto
; then
4495 return_statement_check libmng.h
'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng
=yes
4498 if test "$_mng" = yes ; then
4499 def_mng
='#define CONFIG_MNG 1'
4500 extra_ldflags
="$extra_ldflags -lmng -lz"
4502 def_mng
='#undef CONFIG_MNG'
4505 echocheck
"JPEG support"
4506 if test "$_jpeg" = auto
; then
4508 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
4512 if test "$_jpeg" = yes ; then
4513 def_jpeg
='#define CONFIG_JPEG 1'
4514 vomodules
="jpeg $vomodules"
4515 extra_ldflags
="$extra_ldflags -ljpeg"
4517 def_jpeg
='#undef CONFIG_JPEG'
4518 novomodules
="jpeg $novomodules"
4523 echocheck
"PNM support"
4524 if test "$_pnm" = yes; then
4525 def_pnm
="#define CONFIG_PNM 1"
4526 vomodules
="pnm $vomodules"
4528 def_pnm
="#undef CONFIG_PNM"
4529 novomodules
="pnm $novomodules"
4535 echocheck
"GIF support"
4536 # This is to appease people who want to force gif support.
4537 # If it is forced to yes, then we still do checks to determine
4538 # which gif library to use.
4539 if test "$_gif" = yes ; then
4544 if test "$_gif" = auto
; then
4546 for _ld_gif
in "-lungif" "-lgif" ; do
4547 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4551 # If no library was found, and the user wants support forced,
4552 # then we force it on with libgif, as this is the safest
4553 # assumption IMHO. (libungif & libregif both create symbolic
4554 # links to libgif. We also assume that no x11 support is needed,
4555 # because if you are forcing this, then you _should_ know what
4556 # you are doing. [ Besides, package maintainers should never
4557 # have compiled x11 deps into libungif in the first place. ] )
4560 if test "$_force_gif" = yes && test "$_gif" = no
; then
4565 if test "$_gif" = yes ; then
4566 def_gif
='#define CONFIG_GIF 1'
4567 codecmodules
="gif $codecmodules"
4568 vomodules
="gif89a $vomodules"
4569 res_comment
="old version, some encoding functions disabled"
4570 def_gif_4
='#undef CONFIG_GIF_4'
4571 extra_ldflags
="$extra_ldflags $_ld_gif"
4577 #include <gif_lib.h>
4578 static void catch(int sig) { exit(1); }
4580 signal(SIGSEGV, catch); // catch segfault
4581 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4582 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4586 if cc_check
"$_ld_gif" ; then
4587 def_gif_4
='#define CONFIG_GIF_4 1'
4591 def_gif
='#undef CONFIG_GIF'
4592 def_gif_4
='#undef CONFIG_GIF_4'
4593 novomodules
="gif89a $novomodules"
4594 nocodecmodules
="gif $nocodecmodules"
4599 case "$_gif" in yes*)
4600 echocheck
"broken giflib workaround"
4601 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4605 #include <gif_lib.h>
4607 GifFileType gif = {.UserData = NULL};
4608 printf("UserData is at address %p\n", gif.UserData);
4612 if cc_check
"$_ld_gif" ; then
4613 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4622 echocheck
"VESA support"
4623 if test "$_vesa" = auto
; then
4625 statement_check vbe.h
'vbeInit()' -lvbe -llrmi && _vesa
=yes
4627 if test "$_vesa" = yes ; then
4628 def_vesa
='#define CONFIG_VESA 1'
4629 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4630 vomodules
="vesa $vomodules"
4632 def_vesa
='#undef CONFIG_VESA'
4633 novomodules
="vesa $novomodules"
4645 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4646 if test -z "$_sdlconfig" ; then
4647 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4648 _sdlconfig
="sdl-config"
4649 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4650 _sdlconfig
="sdl11-config"
4655 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4657 #ifdef CONFIG_SDL_SDL_H
4658 #include <SDL/SDL.h>
4663 // we allow SDL hacking our main() only on OSX
4666 int main(int argc, char *argv[]) {
4667 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4672 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4673 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4675 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4679 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4680 res_comment
="using $_sdlconfig"
4682 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4683 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4685 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4686 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4688 _inc_tmp
="$($_sdlconfig --cflags)"
4689 _ld_tmp
="$($_sdlconfig --libs)"
4691 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4693 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4694 # HACK for BeOS/Haiku SDL
4695 _ld_tmp
="$_ld_tmp -lstdc++"
4700 if test "$_sdl" = yes ; then
4701 def_sdl
='#define CONFIG_SDL 1'
4702 extra_cflags
="$extra_cflags $_inc_tmp"
4703 libs_mplayer
="$libs_mplayer $_ld_tmp"
4704 vomodules
="sdl $vomodules"
4705 aomodules
="sdl $aomodules"
4707 def_sdl
='#undef CONFIG_SDL'
4708 novomodules
="sdl $novomodules"
4709 noaomodules
="sdl $noaomodules"
4714 # make sure this stays below CoreVideo to avoid issues due to namespace
4715 # conflicts between -lGL and -framework OpenGL
4717 #Note: this test is run even with --enable-gl since we autodetect linker flags
4718 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
4721 #include <windows.h>
4723 #elif defined(GL_SDL)
4725 #ifdef CONFIG_SDL_SDL_H
4726 #include <SDL/SDL.h>
4731 // we allow SDL hacking our main() only on OSX
4736 #include <X11/Xlib.h>
4739 int main(int argc, char *argv[]) {
4742 wglCreateContext(dc);
4743 #elif defined(GL_SDL)
4744 SDL_GL_SwapBuffers();
4746 glXCreateContext(NULL, NULL, NULL, True);
4753 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4754 if cc_check
$_ld_tmp $_ld_lm ; then
4757 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4761 if cc_check
-DGL_WIN32 -lopengl32 ; then
4764 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4766 # last so it can reuse any linker etc. flags detected before
4767 if test "$_sdl" = yes ; then
4768 if cc_check
-DGL_SDL ||
4769 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4772 elif cc_check
-DGL_SDL -lGL ||
4773 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4776 libs_mplayer
="$libs_mplayer -lGL"
4782 if test "$_gl" = yes ; then
4783 def_gl
='#define CONFIG_GL 1'
4784 res_comment
="backends:"
4785 if test "$_gl_win32" = yes ; then
4786 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4787 res_comment
="$res_comment win32"
4789 if test "$_gl_x11" = yes ; then
4790 def_gl_x11
='#define CONFIG_GL_X11 1'
4791 res_comment
="$res_comment x11"
4793 if test "$_gl_sdl" = yes ; then
4794 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4795 res_comment
="$res_comment sdl"
4797 vomodules
="opengl $vomodules"
4799 def_gl
='#undef CONFIG_GL'
4800 def_gl_win32
='#undef CONFIG_GL_WIN32'
4801 def_gl_x11
='#undef CONFIG_GL_X11'
4802 def_gl_sdl
='#undef CONFIG_GL_SDL'
4803 novomodules
="opengl $novomodules"
4808 echocheck
"MatrixView"
4809 if test "$_gl" = no
; then
4812 if test "$matrixview" = yes ; then
4813 vomodules
="matrixview $vomodules"
4814 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
4816 novomodules
="matrixview $novomodules"
4817 def_matrixview
='#undef CONFIG_MATRIXVIEW'
4819 echores
"$matrixview"
4823 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
4824 if test "$_kva" = auto
; then
4826 header_check_broken os2.h kva.h
-lkva && _kva
=yes
4828 if test "$_kva" = yes ; then
4829 def_kva
='#define CONFIG_KVA 1'
4830 libs_mplayer
="$libs_mplayer -lkva"
4831 vomodules
="kva $vomodules"
4833 def_kva
='#undef CONFIG_KVA'
4834 novomodules
="kva $novomodules"
4842 echocheck
"Windows waveout"
4843 if test "$_win32waveout" = auto
; then
4845 header_check_broken windows.h mmsystem.h
-lwinmm && _win32waveout
=yes
4847 if test "$_win32waveout" = yes ; then
4848 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
4849 libs_mplayer
="$libs_mplayer -lwinmm"
4850 aomodules
="win32 $aomodules"
4852 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
4853 noaomodules
="win32 $noaomodules"
4855 echores
"$_win32waveout"
4857 echocheck
"Direct3D"
4858 if test "$_direct3d" = auto
; then
4860 header_check d3d9.h
&& _direct3d
=yes
4862 if test "$_direct3d" = yes ; then
4863 def_direct3d
='#define CONFIG_DIRECT3D 1'
4864 vomodules
="direct3d $vomodules"
4866 def_direct3d
='#undef CONFIG_DIRECT3D'
4867 novomodules
="direct3d $novomodules"
4869 echores
"$_direct3d"
4872 if test "$_directx" = auto
; then
4876 int main(void) { return 0; }
4879 cc_check
-lgdi32 && _directx
=yes
4881 if test "$_directx" = yes ; then
4882 def_directx
='#define CONFIG_DIRECTX 1'
4883 libs_mplayer
="$libs_mplayer -lgdi32"
4884 vomodules
="directx $vomodules"
4885 aomodules
="dsound $aomodules"
4887 def_directx
='#undef CONFIG_DIRECTX'
4888 novomodules
="directx $novomodules"
4889 noaomodules
="dsound $noaomodules"
4897 if test "$_dxr2" = auto
; then
4899 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4900 header_check dxr2ioctl.h
$_inc_tmp && _dxr2
=yes &&
4901 extra_cflags
="$extra_cflags $_inc_tmp" && break
4904 if test "$_dxr2" = yes; then
4905 def_dxr2
='#define CONFIG_DXR2 1'
4906 aomodules
="dxr2 $aomodules"
4907 vomodules
="dxr2 $vomodules"
4909 def_dxr2
='#undef CONFIG_DXR2'
4910 noaomodules
="dxr2 $noaomodules"
4911 novomodules
="dxr2 $novomodules"
4916 if test "$_dxr3" = auto
; then
4918 header_check linux
/em8300.h
&& _dxr3
=yes
4920 if test "$_dxr3" = yes ; then
4921 def_dxr3
='#define CONFIG_DXR3 1'
4922 vomodules
="dxr3 $vomodules"
4924 def_dxr3
='#undef CONFIG_DXR3'
4925 novomodules
="dxr3 $novomodules"
4930 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
4931 if test "$_ivtv" = auto
; then
4933 #include <sys/time.h>
4934 #include <linux/videodev2.h>
4935 #include <linux/ivtv.h>
4936 #include <sys/ioctl.h>
4938 struct ivtv_cfg_stop_decode sd;
4939 struct ivtv_cfg_start_decode sd1;
4940 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
4941 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
4945 cc_check
&& _ivtv
=yes
4947 if test "$_ivtv" = yes ; then
4948 def_ivtv
='#define CONFIG_IVTV 1'
4949 vomodules
="ivtv $vomodules"
4950 aomodules
="ivtv $aomodules"
4952 def_ivtv
='#undef CONFIG_IVTV'
4953 novomodules
="ivtv $novomodules"
4954 noaomodules
="ivtv $noaomodules"
4959 echocheck
"V4L2 MPEG Decoder"
4960 if test "$_v4l2" = auto
; then
4962 #include <sys/time.h>
4963 #include <linux/videodev2.h>
4964 #include <linux/version.h>
4966 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4967 #error kernel headers too old, need 2.6.22
4969 struct v4l2_ext_controls ctrls;
4970 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4975 cc_check
&& _v4l2
=yes
4977 if test "$_v4l2" = yes ; then
4978 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
4979 vomodules
="v4l2 $vomodules"
4980 aomodules
="v4l2 $aomodules"
4982 def_v4l2
='#undef CONFIG_V4L2_DECODER'
4983 novomodules
="v4l2 $novomodules"
4984 noaomodules
="v4l2 $noaomodules"
4995 echocheck
"OSS Audio"
4996 if test "$_ossaudio" = auto
; then
4998 return_check
$_soundcard_header SNDCTL_DSP_SETFRAGMENT
&& _ossaudio
=yes
5000 if test "$_ossaudio" = yes ; then
5001 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5002 aomodules
="oss $aomodules"
5004 #include <$_soundcard_header>
5005 #ifdef OPEN_SOUND_SYSTEM
5006 int main(void) { return 0; }
5008 #error Not the real thing
5012 cc_check
&& _real_ossaudio
=yes
5013 if test "$_real_ossaudio" = yes; then
5014 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5015 # Check for OSS4 headers (override default headers)
5016 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5017 if test -f /etc
/oss.conf
; then
5019 _ossinc
="$OSSLIBDIR/include"
5020 if test -f "$_ossinc/sys/soundcard.h"; then
5021 extra_cflags
="-I$_ossinc $extra_cflags"
5024 elif netbsd || openbsd
; then
5025 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5026 extra_ldflags
="$extra_ldflags -lossaudio"
5028 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5030 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5032 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5033 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5034 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5035 noaomodules
="oss $noaomodules"
5037 echores
"$_ossaudio"
5041 if test "$_arts" = auto
; then
5043 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5044 statement_check artsc.h
'arts_init()' $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
5049 if test "$_arts" = yes ; then
5050 def_arts
='#define CONFIG_ARTS 1'
5051 aomodules
="arts $aomodules"
5052 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5053 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5055 noaomodules
="arts $noaomodules"
5061 if test "$_esd" = auto
; then
5063 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5064 statement_check esd.h
'esd_open_sound("test")' $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5069 if test "$_esd" = yes ; then
5070 def_esd
='#define CONFIG_ESD 1'
5071 aomodules
="esd $aomodules"
5072 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5073 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5075 echocheck
"esd_get_latency()"
5076 statement_check esd.h
'esd_get_latency(0)' $
(esd-config
--libs) $
(esd-config
--cflags) &&
5077 _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5078 echores
"$_esd_latency"
5080 def_esd
='#undef CONFIG_ESD'
5081 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5082 noaomodules
="esd $noaomodules"
5087 if test "$_nas" = auto
; then
5089 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
5091 if test "$_nas" = yes ; then
5092 def_nas
='#define CONFIG_NAS 1'
5093 libs_mplayer
="$libs_mplayer -laudio -lXt"
5094 aomodules
="nas $aomodules"
5096 noaomodules
="nas $noaomodules"
5097 def_nas
='#undef CONFIG_NAS'
5103 if test "$_pulse" = auto
; then
5105 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5106 header_check pulse
/pulseaudio.h $
($_pkg_config --libs --cflags libpulse
) &&
5112 if test "$_pulse" = yes ; then
5113 def_pulse
='#define CONFIG_PULSE 1'
5114 aomodules
="pulse $aomodules"
5115 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5116 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5118 def_pulse
='#undef CONFIG_PULSE'
5119 noaomodules
="pulse $noaomodules"
5124 if test "$_jack" = auto
; then
5126 if statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' -ljack ; then
5127 libs_mplayer
="$libs_mplayer -ljack"
5128 elif statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5129 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5130 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5136 if test "$_jack" = yes ; then
5137 def_jack
='#define CONFIG_JACK 1'
5138 aomodules
="jack $aomodules"
5140 noaomodules
="jack $noaomodules"
5145 if test "$_openal" = auto
; then
5149 #include <OpenAL/al.h>
5154 alSourceQueueBuffers(0, 0, 0);
5155 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5159 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5160 cc_check
$I && _openal
=yes && break
5161 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5163 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5165 if test "$_openal" = yes ; then
5166 def_openal
='#define CONFIG_OPENAL 1'
5167 aomodules
="openal $aomodules"
5169 noaomodules
="openal $noaomodules"
5173 echocheck
"ALSA audio"
5174 if test "$_alloca" != yes ; then
5176 res_comment
="alloca missing"
5178 if test "$_alsa" != no
; then
5181 #include <sys/asoundlib.h>
5182 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5183 #error "alsa version != 0.5.x"
5185 int main(void) { return 0; }
5187 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5190 #include <sys/asoundlib.h>
5191 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5192 #error "alsa version != 0.9.x"
5194 int main(void) { return 0; }
5196 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5198 #include <alsa/asoundlib.h>
5199 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5200 #error "alsa version != 0.9.x"
5202 int main(void) { return 0; }
5204 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5207 #include <sys/asoundlib.h>
5208 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5209 #error "alsa version != 1.0.x"
5211 int main(void) { return 0; }
5213 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5215 #include <alsa/asoundlib.h>
5216 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5217 #error "alsa version != 1.0.x"
5219 int main(void) { return 0; }
5221 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5223 def_alsa
='#undef CONFIG_ALSA'
5224 def_alsa5
='#undef CONFIG_ALSA5'
5225 def_alsa9
='#undef CONFIG_ALSA9'
5226 def_alsa1x
='#undef CONFIG_ALSA1X'
5227 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5228 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5229 if test "$_alsaver" ; then
5231 if test "$_alsaver" = '0.5.x' ; then
5233 aomodules
="alsa5 $aomodules"
5234 def_alsa5
='#define CONFIG_ALSA5 1'
5235 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5236 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5237 elif test "$_alsaver" = '0.9.x-sys' ; then
5239 aomodules
="alsa $aomodules"
5240 def_alsa
='#define CONFIG_ALSA 1'
5241 def_alsa9
='#define CONFIG_ALSA9 1'
5242 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5243 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5244 elif test "$_alsaver" = '0.9.x-alsa' ; then
5246 aomodules
="alsa $aomodules"
5247 def_alsa
='#define CONFIG_ALSA 1'
5248 def_alsa9
='#define CONFIG_ALSA9 1'
5249 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5250 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5251 elif test "$_alsaver" = '1.0.x-sys' ; then
5253 aomodules
="alsa $aomodules"
5254 def_alsa
='#define CONFIG_ALSA 1'
5255 def_alsa1x
="#define CONFIG_ALSA1X 1"
5256 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5257 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5258 elif test "$_alsaver" = '1.0.x-alsa' ; then
5260 aomodules
="alsa $aomodules"
5261 def_alsa
='#define CONFIG_ALSA 1'
5262 def_alsa1x
="#define CONFIG_ALSA1X 1"
5263 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5264 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5267 res_comment
="unknown version"
5269 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5271 noaomodules
="alsa $noaomodules"
5276 echocheck
"Sun audio"
5277 if test "$_sunaudio" = auto
; then
5279 #include <sys/types.h>
5280 #include <sys/audioio.h>
5281 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5284 cc_check
&& _sunaudio
=yes
5286 if test "$_sunaudio" = yes ; then
5287 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5288 aomodules
="sun $aomodules"
5290 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5291 noaomodules
="sun $noaomodules"
5293 echores
"$_sunaudio"
5297 echocheck
"CoreAudio"
5298 if test "$_coreaudio" = auto
; then
5300 #include <CoreAudio/CoreAudio.h>
5301 #include <AudioToolbox/AudioToolbox.h>
5302 #include <AudioUnit/AudioUnit.h>
5303 int main(void) { return 0; }
5306 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5308 if test "$_coreaudio" = yes ; then
5309 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5310 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5311 aomodules
="coreaudio $aomodules"
5313 def_coreaudio
='#undef CONFIG_COREAUDIO'
5314 noaomodules
="coreaudio $noaomodules"
5321 echocheck
"SGI audio"
5322 if test "$_sgiaudio" = auto
; then
5324 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5326 if test "$_sgiaudio" = "yes" ; then
5327 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5328 libs_mplayer
="$libs_mplayer -laudio"
5329 aomodules
="sgi $aomodules"
5331 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5332 noaomodules
="sgi $noaomodules"
5334 echores
"$_sgiaudio"
5339 echocheck
"KAI (UNIAUD/DART)"
5340 if test "$_kai" = auto
; then
5342 header_check_broken os2.h kai.h
-lkai && _kai
=yes
5344 if test "$_kai" = yes ; then
5345 def_kai
='#define CONFIG_KAI 1'
5346 libs_mplayer
="$libs_mplayer -lkai"
5347 aomodules
="kai $aomodules"
5349 def_kai
='#undef CONFIG_KAI'
5350 noaomodules
="kai $noaomodules"
5355 if test "$_dart" = auto
; then
5357 header_check_broken os2.h dart.h
-ldart && _dart
=yes
5359 if test "$_dart" = yes ; then
5360 def_dart
='#define CONFIG_DART 1'
5361 libs_mplayer
="$libs_mplayer -ldart"
5362 aomodules
="dart $aomodules"
5364 def_dart
='#undef CONFIG_DART'
5365 noaomodules
="dart $noaomodules"
5371 # set default CD/DVD devices
5372 if win32 || os2
; then
5373 default_cdrom_device
="D:"
5375 default_cdrom_device
="/dev/disk1"
5376 elif dragonfly
; then
5377 default_cdrom_device
="/dev/cd0"
5379 default_cdrom_device
="/dev/acd0"
5381 default_cdrom_device
="/dev/rcd0c"
5383 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5384 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5385 # file system and the volfs service.
5386 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5388 default_cdrom_device
="a1ide.device:2"
5390 default_cdrom_device
="/dev/cdrom"
5393 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5394 default_dvd_device
=$default_cdrom_device
5396 default_dvd_device
="/dev/rdiskN"
5398 default_dvd_device
="/dev/dvd"
5402 echocheck
"VCD support"
5403 if test "$_vcd" = auto
; then
5405 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
5408 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5411 if test "$_vcd" = yes; then
5412 inputmodules
="vcd $inputmodules"
5413 def_vcd
='#define CONFIG_VCD 1'
5415 def_vcd
='#undef CONFIG_VCD'
5416 noinputmodules
="vcd $noinputmodules"
5417 res_comment
="not supported on this OS"
5423 echocheck
"Blu-ray support"
5424 if test "$_bluray" = auto
; then
5426 statement_check libbluray
/bluray.h
'bd_get_title_info(0, 0)' -lbluray && _bluray
=yes
5428 if test "$_bluray" = yes ; then
5429 def_bluray
='#define CONFIG_LIBBLURAY 1'
5430 extra_ldflags
="$extra_ldflags -lbluray"
5431 inputmodules
="bluray $inputmodules"
5433 def_bluray
='#undef CONFIG_LIBBLURAY'
5434 noinputmodules
="bluray $noinputmodules"
5439 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5440 _dvdread_internal
=no
5442 if test "$_dvdread_internal" = auto
; then
5443 _dvdread_internal
=no
5445 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) &&
5446 (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes ||
5447 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) ||
5448 darwin || win32 || os2
; then
5449 _dvdread_internal
=yes
5451 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5453 elif test "$_dvdread" = auto
; then
5455 if test "$_dl" = yes; then
5456 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
5457 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
5458 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5460 extra_cflags
="$extra_cflags $_dvdreadcflags"
5461 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5462 res_comment
="external"
5467 if test "$_dvdread_internal" = yes; then
5468 def_dvdread
='#define CONFIG_DVDREAD 1'
5469 inputmodules
="dvdread(internal) $inputmodules"
5471 res_comment
="internal"
5472 elif test "$_dvdread" = yes; then
5473 def_dvdread
='#define CONFIG_DVDREAD 1'
5475 extra_ldflags
="$extra_ldflags -ldvdread"
5476 inputmodules
="dvdread(external) $inputmodules"
5477 res_comment
="external"
5479 def_dvdread
='#undef CONFIG_DVDREAD'
5480 noinputmodules
="dvdread $noinputmodules"
5485 echocheck
"internal libdvdcss"
5486 if test "$_libdvdcss_internal" = auto
; then
5487 _libdvdcss_internal
=no
5488 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
5489 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5491 if test "$_libdvdcss_internal" = yes ; then
5492 if linux || netbsd || openbsd || bsdos
; then
5493 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5494 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5495 elif freebsd || dragonfly
; then
5496 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5498 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5499 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5501 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5503 cflags_libdvdcss
="-DSYS_BEOS"
5505 cflags_libdvdcss
="-DSYS_OS2"
5507 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5508 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5509 inputmodules
="libdvdcss(internal) $inputmodules"
5512 noinputmodules
="libdvdcss(internal) $noinputmodules"
5514 echores
"$_libdvdcss_internal"
5517 echocheck
"cdparanoia"
5518 if test "$_cdparanoia" = auto
; then
5520 #include <cdda_interface.h>
5521 #include <cdda_paranoia.h>
5522 // This need a better test. How ?
5523 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5526 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5527 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm &&
5528 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5531 if test "$_cdparanoia" = yes ; then
5533 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5534 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5536 echores
"$_cdparanoia"
5540 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5543 #include <cdio/version.h>
5544 #include <cdio/cdda.h>
5545 #include <cdio/paranoia.h>
5547 void *test = cdda_verbose_set;
5548 printf("%s\n", CDIO_VERSION);
5549 return test == (void *)1;
5553 for _ld_tmp
in "" "-lwinmm" ; do
5554 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5555 cc_check
$_ld_tmp $_ld_lm && _libcdio
=yes &&
5556 extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5558 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5559 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5560 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5561 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes &&
5562 extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5565 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5567 def_libcdio
='#define CONFIG_LIBCDIO 1'
5568 def_havelibcdio
='yes'
5570 if test "$_cdparanoia" = yes ; then
5571 res_comment
="using cdparanoia"
5573 def_libcdio
='#undef CONFIG_LIBCDIO'
5574 def_havelibcdio
='no'
5578 if test "$_cdda" = yes ; then
5579 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5580 def_cdparanoia
='#define CONFIG_CDDA 1'
5581 inputmodules
="cdda $inputmodules"
5583 def_cdparanoia
='#undef CONFIG_CDDA'
5584 noinputmodules
="cdda $noinputmodules"
5587 if test "$_cddb" = yes ; then
5588 def_cddb
='#define CONFIG_CDDB 1'
5589 inputmodules
="cddb $inputmodules"
5592 def_cddb
='#undef CONFIG_CDDB'
5593 noinputmodules
="cddb $noinputmodules"
5596 echocheck
"bitmap font support"
5597 if test "$_bitmap_font" = yes ; then
5598 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5600 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5602 echores
"$_bitmap_font"
5605 echocheck
"freetype >= 2.0.9"
5607 # freetype depends on iconv
5608 if test "$_iconv" = no
; then
5610 res_comment
="iconv support needed"
5613 if test "$_freetype" = auto
; then
5614 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5617 #include <ft2build.h>
5618 #include FT_FREETYPE_H
5619 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5620 #error "Need FreeType 2.0.9 or newer"
5624 FT_Init_FreeType(&library);
5629 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
5634 if test "$_freetype" = yes ; then
5635 def_freetype
='#define CONFIG_FREETYPE 1'
5636 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
5637 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
5639 def_freetype
='#undef CONFIG_FREETYPE'
5641 echores
"$_freetype"
5643 if test "$_freetype" = no
; then
5645 res_comment
="FreeType support needed"
5647 echocheck
"fontconfig"
5648 if test "$_fontconfig" = auto
; then
5652 #include <fontconfig/fontconfig.h>
5653 #if FC_VERSION < 20402
5654 #error At least version 2.4.2 of fontconfig required
5658 if (err == FcFalse) {
5659 printf("Couldn't initialize fontconfig lib\n");
5666 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
5667 _ld_tmp
="-lfontconfig $_ld_tmp"
5668 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5670 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5671 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
5672 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
5673 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes &&
5674 extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5677 if test "$_fontconfig" = yes ; then
5678 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5680 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5682 echores
"$_fontconfig"
5685 echocheck
"SSA/ASS support"
5686 if test "$_ass" = auto
-o "$_ass" = yes ; then
5687 if $_pkg_config libass
; then
5689 def_ass
='#define CONFIG_ASS 1'
5690 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
5691 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
5694 def_ass
='#undef CONFIG_ASS'
5697 def_ass
='#undef CONFIG_ASS'
5702 echocheck
"fribidi with charsets"
5705 if test "$_fribidi" = auto
; then
5708 /* workaround for fribidi 0.10.4 and below */
5709 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5710 #include <fribidi/fribidi.h>
5712 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
5720 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5721 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
5722 test "$_fribidi" = no
; then
5723 _inc_tmp
="$($_pkg_config --cflags)"
5724 _ld_tmp
="$($_pkg_config --libs)"
5725 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5728 if test "$_fribidi" = yes ; then
5729 def_fribidi
='#define CONFIG_FRIBIDI 1'
5730 extra_cflags
="$extra_cflags $_inc_tmp"
5731 extra_ldflags
="$extra_ldflags $_ld_tmp"
5733 def_fribidi
='#undef CONFIG_FRIBIDI'
5739 if test "$_enca" = auto
; then
5741 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
5743 if test "$_enca" = yes ; then
5744 def_enca
='#define CONFIG_ENCA 1'
5745 extra_ldflags
="$extra_ldflags -lenca"
5747 def_enca
='#undef CONFIG_ENCA'
5754 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
5755 if test "$_zlib" = yes ; then
5756 def_zlib
='#define CONFIG_ZLIB 1'
5757 extra_ldflags
="$extra_ldflags -lz"
5759 def_zlib
='#define CONFIG_ZLIB 0'
5766 def_bzlib
='#define CONFIG_BZLIB 0'
5767 statement_check bzlib.h
'BZ2_bzlibVersion()' -lbz2 && bzlib
=yes
5768 if test "$bzlib" = yes ; then
5769 def_bzlib
='#define CONFIG_BZLIB 1'
5770 extra_ldflags
="$extra_ldflags -lbz2"
5776 if test "$_rtc" = auto
; then
5778 #include <sys/ioctl.h>
5780 #include <linux/rtc.h>
5783 #define RTC_PIE_ON RTCIO_PIE_ON
5785 int main(void) { return RTC_PIE_ON; }
5788 cc_check
&& _rtc
=yes
5791 if test "$_rtc" = yes ; then
5792 def_rtc
='#define HAVE_RTC 1'
5794 def_rtc
='#undef HAVE_RTC'
5799 echocheck
"liblzo2 support"
5800 if test "$_liblzo" = auto
; then
5802 statement_check lzo
/lzo1x.h
'lzo_init()' -llzo2 && _liblzo
=yes
5804 if test "$_liblzo" = yes ; then
5805 def_liblzo
='#define CONFIG_LIBLZO 1'
5806 extra_ldflags
="$extra_ldflags -llzo2"
5807 codecmodules
="liblzo $codecmodules"
5809 def_liblzo
='#undef CONFIG_LIBLZO'
5810 nocodecmodules
="liblzo $nocodecmodules"
5815 echocheck
"mad support"
5816 if test "$_mad" = auto
; then
5818 header_check mad.h
-lmad && _mad
=yes
5820 if test "$_mad" = yes ; then
5821 def_mad
='#define CONFIG_LIBMAD 1'
5822 extra_ldflags
="$extra_ldflags -lmad"
5823 codecmodules
="libmad $codecmodules"
5825 def_mad
='#undef CONFIG_LIBMAD'
5826 nocodecmodules
="libmad $nocodecmodules"
5830 echocheck
"OggVorbis support"
5831 if test "$_tremor_internal" = yes; then
5833 elif test "$_tremor" = auto
; then
5835 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
5837 if test "$_libvorbis" = auto
; then
5839 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes
5841 if test "$_tremor_internal" = yes ; then
5843 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5844 def_tremor
='#define CONFIG_TREMOR 1'
5845 codecmodules
="tremor(internal) $codecmodules"
5846 res_comment
="internal Tremor"
5847 if test "$_tremor_low" = yes ; then
5848 cflags_tremor_low
="-D_LOW_ACCURACY_"
5849 res_comment
="internal low accuracy Tremor"
5851 elif test "$_tremor" = yes ; then
5853 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5854 def_tremor
='#define CONFIG_TREMOR 1'
5855 codecmodules
="tremor(external) $codecmodules"
5856 res_comment
="external Tremor"
5857 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
5858 elif test "$_libvorbis" = yes ; then
5860 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5861 codecmodules
="libvorbis $codecmodules"
5862 res_comment
="libvorbis"
5863 extra_ldflags
="$extra_ldflags -lvorbis -logg"
5866 nocodecmodules
="libvorbis $nocodecmodules"
5870 echocheck
"libspeex (version >= 1.1 required)"
5871 if test "$_speex" = auto
; then
5875 #include <speex/speex.h>
5876 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
5878 cc_check
-lspeex $_ld_lm && _speex
=yes
5880 if test "$_speex" = yes ; then
5881 def_speex
='#define CONFIG_SPEEX 1'
5882 extra_ldflags
="$extra_ldflags -lspeex"
5883 codecmodules
="speex $codecmodules"
5885 def_speex
='#undef CONFIG_SPEEX'
5886 nocodecmodules
="speex $nocodecmodules"
5890 echocheck
"OggTheora support"
5891 if test "$_theora" = auto
; then
5894 #include <theora/theora.h>
5897 /* Theora is in flux, make sure that all interface routines and datatypes
5898 * exist and work the way we expect it, so we don't break MPlayer. */
5907 theora_info_init(&inf);
5908 theora_comment_init(&tc);
5912 /* we don't want to execute this kind of nonsense; just for making sure
5913 * that compilation works... */
5914 memset(&op, 0, sizeof(op));
5915 r = theora_decode_header(&inf, &tc, &op);
5916 r = theora_decode_init(&st, &inf);
5917 t = theora_granule_time(&st, op.granulepos);
5918 r = theora_decode_packetin(&st, &op);
5919 r = theora_decode_YUVout(&st, &yuv);
5925 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
5926 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
5927 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
5928 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
5929 if test _theora
= no
; then
5930 _ld_theora
="-ltheora -logg"
5931 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
5933 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5934 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
5935 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
5936 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
5937 extra_ldflags
="$extra_ldflags $_ld_theora" &&
5938 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
5939 if test _theora
= no
; then
5940 _ld_theora
="-ltheora -logg"
5941 cc_check tremor
/bitwise.c
$_ld_theora &&
5942 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
5946 if test "$_theora" = yes ; then
5947 def_theora
='#define CONFIG_OGGTHEORA 1'
5948 codecmodules
="libtheora $codecmodules"
5949 # when --enable-theora is forced, we'd better provide a probably sane
5950 # $_ld_theora than nothing
5951 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
5953 def_theora
='#undef CONFIG_OGGTHEORA'
5954 nocodecmodules
="libtheora $nocodecmodules"
5958 echocheck
"mp3lib support"
5959 if test "$_mp3lib" = auto
; then
5960 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
5962 if test "$_mp3lib" = yes ; then
5963 def_mp3lib
='#define CONFIG_MP3LIB 1'
5964 codecmodules
="mp3lib(internal) $codecmodules"
5966 def_mp3lib
='#undef CONFIG_MP3LIB'
5967 nocodecmodules
="mp3lib(internal) $nocodecmodules"
5971 # Any version of libmpg123 shall be fine.
5972 echocheck
"mpg123 support"
5973 def_mpg123
='#undef CONFIG_MPG123'
5974 if test "$_mpg123" = auto
; then
5976 statement_check mpg123.h
'mpg123_init()' -lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
5978 if test "$_mpg123" = yes ; then
5979 def_mpg123
='#define CONFIG_MPG123 1'
5980 codecmodules
="mpg123 $codecmodules"
5982 nocodecmodules
="mpg123 $nocodecmodules"
5986 echocheck
"liba52 support"
5987 def_liba52
='#undef CONFIG_LIBA52'
5988 if test "$_liba52" = auto
; then
5991 #include <inttypes.h>
5992 #include <a52dec/a52.h>
5993 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
5995 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
5997 if test "$_liba52" = yes ; then
5998 def_liba52
='#define CONFIG_LIBA52 1'
5999 codecmodules
="liba52 $codecmodules"
6001 nocodecmodules
="liba52 $nocodecmodules"
6005 echocheck
"internal libmpeg2 support"
6006 if test "$_libmpeg2" = auto
; then
6008 if alpha
&& test cc_vendor
=gnu
; then
6010 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6012 res_comment
="broken gcc"
6017 if test "$_libmpeg2" = yes ; then
6018 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6019 codecmodules
="libmpeg2(internal) $codecmodules"
6021 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6022 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6024 echores
"$_libmpeg2"
6026 echocheck
"libdca support"
6027 if test "$_libdca" = auto
; then
6029 for _ld_dca
in -ldca -ldts ; do
6030 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
6031 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
6034 if test "$_libdca" = yes ; then
6035 def_libdca
='#define CONFIG_LIBDCA 1'
6036 codecmodules
="libdca $codecmodules"
6038 def_libdca
='#undef CONFIG_LIBDCA'
6039 nocodecmodules
="libdca $nocodecmodules"
6043 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6044 if test "$_musepack" = auto
; then
6048 #include <mpcdec/mpcdec.h>
6050 mpc_streaminfo info;
6051 mpc_decoder decoder;
6052 mpc_decoder_set_streaminfo(&decoder, &info);
6053 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6057 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6059 if test "$_musepack" = yes ; then
6060 def_musepack
='#define CONFIG_MUSEPACK 1'
6061 extra_ldflags
="$extra_ldflags -lmpcdec"
6062 codecmodules
="musepack $codecmodules"
6064 def_musepack
='#undef CONFIG_MUSEPACK'
6065 nocodecmodules
="musepack $nocodecmodules"
6067 echores
"$_musepack"
6070 echocheck
"FAAD2 support"
6071 if test "$_faad" = auto
; then
6075 #ifndef FAAD_MIN_STREAMSIZE
6076 #error Too old version
6078 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6079 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6081 cc_check
-lfaad $_ld_lm && _faad
=yes
6084 def_faad
='#undef CONFIG_FAAD'
6085 if test "$_faad" = yes ; then
6086 def_faad
='#define CONFIG_FAAD 1'
6087 extra_ldflags
="$extra_ldflags -lfaad"
6088 codecmodules
="faad2 $codecmodules"
6090 nocodecmodules
="faad2 $nocodecmodules"
6095 echocheck
"LADSPA plugin support"
6096 if test "$_ladspa" = auto
; then
6098 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
6100 if test "$_ladspa" = yes; then
6101 def_ladspa
="#define CONFIG_LADSPA 1"
6103 def_ladspa
="#undef CONFIG_LADSPA"
6108 echocheck
"libbs2b audio filter support"
6109 if test "$_libbs2b" = auto
; then
6112 #if BS2B_VERSION_MAJOR < 3
6113 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6123 if $_pkg_config --exists libbs2b
; then
6124 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6125 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6126 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6127 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6129 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6130 -I/usr
/local
/include
/bs2b
; do
6131 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6132 extra_ldflags
="$extra_ldflags -lbs2b"
6133 extra_cflags
="$extra_cflags $_inc_tmp"
6140 def_libbs2b
="#undef CONFIG_LIBBS2B"
6141 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6145 if test -z "$_codecsdir" ; then
6146 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6147 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6148 if test -d "$dir" ; then
6154 # Fall back on default directory.
6155 if test -z "$_codecsdir" ; then
6156 _codecsdir
="$_libdir/codecs"
6157 mingw32 || os2
&& _codecsdir
="codecs"
6161 echocheck
"Win32 codecs"
6162 if test "$_win32dll" = auto
; then
6164 if x86_32
&& ! qnx
; then
6168 if test "$_win32dll" = yes ; then
6169 def_win32dll
='#define CONFIG_WIN32DLL 1'
6171 def_win32_loader
='#define WIN32_LOADER 1'
6172 _win32_emulation
=yes
6174 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6175 res_comment
="using native windows"
6177 codecmodules
="win32 $codecmodules"
6179 def_win32dll
='#undef CONFIG_WIN32DLL'
6180 def_win32_loader
='#undef WIN32_LOADER'
6181 nocodecmodules
="win32 $nocodecmodules"
6183 echores
"$_win32dll"
6186 echocheck
"XAnim codecs"
6187 if test "$_xanim" = auto
; then
6189 res_comment
="dynamic loader support needed"
6190 if test "$_dl" = yes ; then
6194 if test "$_xanim" = yes ; then
6195 def_xanim
='#define CONFIG_XANIM 1'
6196 codecmodules
="xanim $codecmodules"
6198 def_xanim
='#undef CONFIG_XANIM'
6199 nocodecmodules
="xanim $nocodecmodules"
6204 echocheck
"RealPlayer codecs"
6205 if test "$_real" = auto
; then
6207 res_comment
="dynamic loader support needed"
6208 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6209 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
6213 if test "$_real" = yes ; then
6214 def_real
='#define CONFIG_REALCODECS 1'
6215 codecmodules
="real $codecmodules"
6217 def_real
='#undef CONFIG_REALCODECS'
6218 nocodecmodules
="real $nocodecmodules"
6223 echocheck
"QuickTime codecs"
6225 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6226 if test "$_qtx" = auto
; then
6227 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6229 if test "$_qtx" = yes ; then
6230 def_qtx
='#define CONFIG_QTX_CODECS 1'
6231 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6232 codecmodules
="qtx $codecmodules"
6233 darwin || win32 || _qtx_emulation
=yes
6235 def_qtx
='#undef CONFIG_QTX_CODECS'
6236 nocodecmodules
="qtx $nocodecmodules"
6240 echocheck
"Nemesi Streaming Media libraries"
6241 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
6243 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6244 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6245 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6249 if test "$_nemesi" = yes; then
6251 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6252 inputmodules
="nemesi $inputmodules"
6254 _native_rtsp
="$networking"
6256 def_nemesi
='#undef CONFIG_LIBNEMESI'
6257 noinputmodules
="nemesi $noinputmodules"
6261 echocheck
"LIVE555 Streaming Media libraries"
6262 if test "$_live" = auto
&& test "$networking" = yes ; then
6263 cat > $TMPCPP << EOF
6264 #include <liveMedia.hh>
6265 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6266 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6268 int main(void) { return 0; }
6272 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
6273 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include
$I/groupsock
/include
&&
6274 _livelibdir
=$
(echo $I|
sed s
/-I//) &&
6275 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6276 $_livelibdir/groupsock/libgroupsock.a \
6277 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6278 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6279 $extra_ldflags -lstdc++" \
6280 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6281 -I$_livelibdir/UsageEnvironment/include \
6282 -I$_livelibdir/BasicUsageEnvironment/include \
6283 -I$_livelibdir/groupsock/include" &&
6286 if test "$_live" != yes ; then
6287 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6288 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6293 if test "$_live" = yes && test "$networking" = yes; then
6294 test $_livelibdir && res_comment
="using $_livelibdir"
6295 def_live
='#define CONFIG_LIVE555 1'
6296 inputmodules
="live555 $inputmodules"
6297 elif test "$_live_dist" = yes && test "$networking" = yes; then
6298 res_comment
="using distribution version"
6300 def_live
='#define CONFIG_LIVE555 1'
6301 extra_ldflags
="$extra_ldflags $ld_tmp"
6302 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6303 inputmodules
="live555 $inputmodules"
6306 def_live
='#undef CONFIG_LIVE555'
6307 noinputmodules
="live555 $noinputmodules"
6313 all_ffmpeg_libs
="libavutil libavcodec libavformat libswscale libpostproc"
6314 echocheck
"FFmpeg ($all_ffmpeg_libs)"
6315 if test "$ffmpeg" = auto
; then
6317 if $_pkg_config --exists $all_ffmpeg_libs ; then
6318 inc_ffmpeg
=$
($_pkg_config --cflags $all_ffmpeg_libs)
6319 _ld_tmp
=$
($_pkg_config --libs $all_ffmpeg_libs)
6320 extra_ldflags
="$extra_ldflags $_ld_tmp"
6321 extra_cflags
="$extra_cflags $inc_ffmpeg"
6323 elif header_check libavcore
/avutil.h
-lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
6324 extra_ldflags
="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
6330 def_ffmpeg_eval_api
="#undef CONFIG_FFMPEG_EVAL_API"
6331 if test "$ffmpeg" = yes; then
6332 def_ffmpeg
='#define CONFIG_FFMPEG 1'
6333 codecmodules
="ffmpeg $codecmodules"
6334 if $_pkg_config --atleast-version=50.18.0 libavutil
; then
6336 def_ffmpeg_eval_api
="#define CONFIG_FFMPEG_EVAL_API 1"
6339 def_ffmpeg
='#undef CONFIG_FFMPEG'
6340 nocodecmodules
="ffmpeg $nocodecmodules"
6344 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
6345 if ! test -z "$_ffmpeg_source" ; then
6346 test "$ffmpeg" = yes && def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
6351 echocheck
"libdv-0.9.5+"
6352 if test "$_libdv" = auto
; then
6354 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
6356 if test "$_libdv" = yes ; then
6357 def_libdv
='#define CONFIG_LIBDV095 1'
6358 extra_ldflags
="$extra_ldflags -ldv"
6359 codecmodules
="libdv $codecmodules"
6361 def_libdv
='#undef CONFIG_LIBDV095'
6362 nocodecmodules
="libdv $nocodecmodules"
6368 if test "$_xvid" = auto
; then
6370 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6371 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
6372 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
6376 if test "$_xvid" = yes ; then
6377 def_xvid
='#define CONFIG_XVID4 1'
6378 codecmodules
="xvid $codecmodules"
6380 def_xvid
='#undef CONFIG_XVID4'
6381 nocodecmodules
="xvid $nocodecmodules"
6387 if test "$_libnut" = auto
; then
6389 statement_check libnut.h
'nut_context_tt * nut; nut_error(0)' -lnut && _libnut
=yes
6392 if test "$_libnut" = yes ; then
6393 def_libnut
='#define CONFIG_LIBNUT 1'
6394 extra_ldflags
="$extra_ldflags -lnut"
6396 def_libnut
='#undef CONFIG_LIBNUT'
6400 # These VO checks must be done after the FFmpeg one
6401 echocheck
"/dev/mga_vid"
6402 if test "$_mga" = auto
; then
6404 test -c /dev
/mga_vid
&& _mga
=yes
6406 if test "$_mga" = yes ; then
6407 def_mga
='#define CONFIG_MGA 1'
6408 vomodules
="mga $vomodules"
6410 def_mga
='#undef CONFIG_MGA'
6411 novomodules
="mga $novomodules"
6417 if test "$_xmga" = auto
; then
6419 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
6421 if test "$_xmga" = yes ; then
6422 def_xmga
='#define CONFIG_XMGA 1'
6423 vomodules
="xmga $vomodules"
6425 def_xmga
='#undef CONFIG_XMGA'
6426 novomodules
="xmga $novomodules"
6431 if test "$_zr" = auto
; then
6432 #36067's seem to identify themselves as 36057PQC's, so the line
6433 #below should work for 36067's and 36057's.
6434 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
6440 if test "$_zr" = yes ; then
6441 if test "$ffmpeg_internals" = yes ; then
6442 def_zr
='#define CONFIG_ZR 1'
6443 vomodules
="zr zr2 $vomodules"
6445 res_comment
="FFmpeg internal headers are required by zr, sorry"
6446 novomodules
="zr $novomodules"
6447 def_zr
='#undef CONFIG_ZR'
6450 def_zr
='#undef CONFIG_ZR'
6451 novomodules
="zr zr2 $novomodules"
6456 echocheck
"UnRAR executable"
6457 if test "$_unrar_exec" = auto
; then
6459 mingw32
&& _unrar_exec
="no"
6461 if test "$_unrar_exec" = yes ; then
6462 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
6464 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
6466 echores
"$_unrar_exec"
6468 echocheck
"TV interface"
6469 if test "$_tv" = yes ; then
6470 def_tv
='#define CONFIG_TV 1'
6471 inputmodules
="tv $inputmodules"
6473 noinputmodules
="tv $noinputmodules"
6474 def_tv
='#undef CONFIG_TV'
6479 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
6480 echocheck
"*BSD BT848 bt8xx header"
6482 for file in "machine/ioctl_bt848.h" \
6483 "dev/bktr/ioctl_bt848.h" \
6484 "dev/video/bktr/ioctl_bt848.h" \
6485 "dev/ic/bt8xx.h" ; do
6487 #include <sys/types.h>
6488 #include <sys/ioctl.h>
6490 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
6494 _ioctl_bt848_h_name
="$file"
6498 if test "$_ioctl_bt848_h" = yes ; then
6499 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6500 res_comment
="using $_ioctl_bt848_h_name"
6502 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6504 echores
"$_ioctl_bt848_h"
6506 echocheck
"*BSD ioctl_meteor.h"
6508 for ioctl_meteor_h_path
in "machine/ioctl_meteor.h" "dev/bktr/ioctl_meteor.h" "dev/video/bktr/ioctl_meteor.h" ; do
6509 statement_check_broken
"sys/types.h" "$ioctl_meteor_h_path" 'ioctl(0, METEORSINPUT, 0)' &&
6510 _ioctl_meteor_h
=yes && break
6512 if test "$_ioctl_meteor_h" = yes ; then
6513 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$ioctl_meteor_h_path>"
6514 res_comment
="using $ioctl_meteor_h_path"
6516 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6518 echores
"$_ioctl_meteor_h"
6520 echocheck
"*BSD BrookTree 848 TV interface"
6521 if test "$_tv_bsdbt848" = auto
; then
6523 if test "$_tv" = yes ; then
6525 #include <sys/types.h>
6526 $def_ioctl_meteor_h_name
6527 $def_ioctl_bt848_h_name
6528 #ifdef IOCTL_METEOR_H_NAME
6529 #include IOCTL_METEOR_H_NAME
6531 #ifdef IOCTL_BT848_H_NAME
6532 #include IOCTL_BT848_H_NAME
6535 ioctl(0, METEORSINPUT, 0);
6536 ioctl(0, TVTUNER_GETFREQ, 0);
6540 cc_check
&& _tv_bsdbt848
=yes
6543 if test "$_tv_bsdbt848" = yes ; then
6544 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
6545 inputmodules
="tv-bsdbt848 $inputmodules"
6547 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
6548 noinputmodules
="tv-bsdbt848 $noinputmodules"
6550 echores
"$_tv_bsdbt848"
6551 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
6554 echocheck
"DirectShow TV interface"
6555 if test "$_tv_dshow" = auto
; then
6557 if test "$_tv" = yes && win32
; then
6558 statement_check ole2.h
'void* p; CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p)' -lole32 -luuid && _tv_dshow
=yes
6561 if test "$_tv_dshow" = yes ; then
6562 inputmodules
="tv-dshow $inputmodules"
6563 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
6564 extra_ldflags
="$extra_ldflags -lole32 -luuid"
6566 noinputmodules
="tv-dshow $noinputmodules"
6567 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
6569 echores
"$_tv_dshow"
6572 echocheck
"Video 4 Linux TV interface"
6573 if test "$_tv_v4l1" = auto
; then
6575 if test "$_tv" = yes && linux
; then
6576 header_check_broken sys
/time.h linux
/videodev.h
&& _tv_v4l1
=yes
6579 if test "$_tv_v4l1" = yes ; then
6582 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6583 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
6584 inputmodules
="tv-v4l $inputmodules"
6586 noinputmodules
="tv-v4l1 $noinputmodules"
6587 def_tv_v4l
='#undef CONFIG_TV_V4L'
6592 echocheck
"Video 4 Linux 2 TV interface"
6593 if test "$_tv_v4l2" = auto
; then
6595 if test "$_tv" = yes && linux
; then
6596 header_check_broken sys
/time.h linux
/videodev2.h
&& _tv_v4l2
=yes
6599 if test "$_tv_v4l2" = yes ; then
6602 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6603 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
6604 inputmodules
="tv-v4l2 $inputmodules"
6606 noinputmodules
="tv-v4l2 $noinputmodules"
6607 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
6612 echocheck
"Radio interface"
6613 if test "$_radio" = yes ; then
6614 def_radio
='#define CONFIG_RADIO 1'
6615 inputmodules
="radio $inputmodules"
6616 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6619 if test "$_radio_capture" = yes ; then
6621 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
6623 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6626 noinputmodules
="radio $noinputmodules"
6627 def_radio
='#undef CONFIG_RADIO'
6628 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6632 echocheck
"Capture for Radio interface"
6633 echores
"$_radio_capture"
6635 echocheck
"Video 4 Linux 2 Radio interface"
6636 if test "$_radio_v4l2" = auto
; then
6638 if test "$_radio" = yes && linux
; then
6639 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
6642 if test "$_radio_v4l2" = yes ; then
6643 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
6645 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
6647 echores
"$_radio_v4l2"
6649 echocheck
"Video 4 Linux Radio interface"
6650 if test "$_radio_v4l" = auto
; then
6652 if test "$_radio" = yes && linux
; then
6653 header_check linux
/videodev.h
&& _radio_v4l
=yes
6656 if test "$_radio_v4l" = yes ; then
6657 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
6659 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
6661 echores
"$_radio_v4l"
6663 if freebsd || netbsd || openbsd || dragonfly || bsdos
&&
6664 test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6665 echocheck
"*BSD BrookTree 848 Radio interface"
6668 #include <sys/types.h>
6669 $def_ioctl_bt848_h_name
6670 #ifdef IOCTL_BT848_H_NAME
6671 #include IOCTL_BT848_H_NAME
6673 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
6675 cc_check
&& _radio_bsdbt848
=yes
6676 echores
"$_radio_bsdbt848"
6677 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
6679 if test "$_radio_bsdbt848" = yes ; then
6680 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
6682 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
6685 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&&
6686 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6687 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6690 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6691 if test "$_pvr" = auto
; then
6693 if test "$_tv_v4l2" = yes && linux
; then
6695 #include <sys/time.h>
6696 #include <linux/videodev2.h>
6697 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
6699 cc_check
&& _pvr
=yes
6702 if test "$_pvr" = yes ; then
6703 def_pvr
='#define CONFIG_PVR 1'
6704 inputmodules
="pvr $inputmodules"
6706 noinputmodules
="pvr $noinputmodules"
6707 def_pvr
='#undef CONFIG_PVR'
6713 if test "$_ftp" = "auto" ; then
6714 test "$networking" = "yes" && ! beos
&& _ftp
=yes
6716 if test "$_ftp" = yes ; then
6717 def_ftp
='#define CONFIG_FTP 1'
6718 inputmodules
="ftp $inputmodules"
6720 noinputmodules
="ftp $noinputmodules"
6721 def_ftp
='#undef CONFIG_FTP'
6725 echocheck
"vstream client"
6726 if test "$_vstream" = auto
; then
6729 #include <vstream-client.h>
6730 void vstream_error(const char *format, ... ) {}
6731 int main(void) { vstream_start(); return 0; }
6733 cc_check
-lvstream-client && _vstream
=yes
6735 if test "$_vstream" = yes ; then
6736 def_vstream
='#define CONFIG_VSTREAM 1'
6737 inputmodules
="vstream $inputmodules"
6738 extra_ldflags
="$extra_ldflags -lvstream-client"
6740 noinputmodules
="vstream $noinputmodules"
6741 def_vstream
='#undef CONFIG_VSTREAM'
6746 echocheck
"OSD menu"
6747 if test "$_menu" = yes ; then
6748 def_menu
='#define CONFIG_MENU 1'
6749 test $_dvbin = "yes" && _menu_dvbin
=yes
6751 def_menu
='#undef CONFIG_MENU'
6757 echocheck
"Subtitles sorting"
6758 if test "$_sortsub" = yes ; then
6759 def_sortsub
='#define CONFIG_SORTSUB 1'
6761 def_sortsub
='#undef CONFIG_SORTSUB'
6766 echocheck
"XMMS inputplugin support"
6767 if test "$_xmms" = yes ; then
6768 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6769 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
6770 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
6772 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6773 _xmmslibdir
=/usr
/lib
6776 def_xmms
='#define CONFIG_XMMS 1'
6778 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
6780 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6783 def_xmms
='#undef CONFIG_XMMS'
6787 if test "$_charset" != "noconv" ; then
6788 def_charset
="#define MSG_CHARSET \"$_charset\""
6790 def_charset
="#undef MSG_CHARSET"
6794 #############################################################################
6796 echocheck
"automatic gdb attach"
6797 if test "$_crash_debug" = yes ; then
6798 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
6800 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
6803 echores
"$_crash_debug"
6805 echocheck
"compiler support for noexecstack"
6806 if cflag_check
-Wl,-z,noexecstack
; then
6807 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
6813 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
6814 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
6815 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
6822 # Dynamic linking flags
6823 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6825 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
6826 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
6827 _ld_dl_dynamic
='-rdynamic'
6830 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6831 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
6832 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
6834 def_debug
='#undef MP_DEBUG'
6835 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
6838 echocheck
"joystick"
6839 def_joystick
='#undef CONFIG_JOYSTICK'
6840 if test "$_joystick" = yes ; then
6841 if linux || freebsd
; then
6842 # TODO add some check
6843 def_joystick
='#define CONFIG_JOYSTICK 1'
6846 res_comment
="unsupported under $system_name"
6849 echores
"$_joystick"
6852 if test "$_lirc" = auto
; then
6854 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
6856 if test "$_lirc" = yes ; then
6857 def_lirc
='#define CONFIG_LIRC 1'
6858 libs_mplayer
="$libs_mplayer -llirc_client"
6860 def_lirc
='#undef CONFIG_LIRC'
6865 if test "$_lircc" = auto
; then
6867 header_check lirc
/lircc.h
-llircc && _lircc
=yes
6869 if test "$_lircc" = yes ; then
6870 def_lircc
='#define CONFIG_LIRCC 1'
6871 libs_mplayer
="$libs_mplayer -llircc"
6873 def_lircc
='#undef CONFIG_LIRCC'
6878 # Detect maemo development platform libraries availability (http://www.maemo.org),
6879 # they are used when run on Nokia 770|8x0
6880 echocheck
"maemo (Nokia 770|8x0)"
6881 if test "$_maemo" = auto
; then
6883 statement_check libosso.h
'osso_initialize('', '', 0, NULL)' $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
6885 if test "$_maemo" = yes ; then
6886 def_maemo
='#define CONFIG_MAEMO 1'
6887 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
6888 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
6890 def_maemo
='#undef CONFIG_MAEMO'
6895 #############################################################################
6897 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
6898 # the OMF format needs to come after the 'extern symbol prefix' check, which
6901 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
6904 #############################################################################
6905 # 64 bit file offsets?
6906 if test "$_largefiles" = yes || freebsd
; then
6907 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
6908 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
6909 # dvdread support requires this (for off64_t)
6910 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
6914 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
6916 # This must be the last test to be performed. Any other tests following it
6917 # could fail due to linker errors. libdvdnavmini is intentionally not linked
6918 # against libdvdread (to permit MPlayer to use its own copy of the library).
6919 # So any compilation using the flags added here but not linking against
6920 # libdvdread can fail.
6921 echocheck
"DVD support (libdvdnav)"
6922 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
6926 if test "$_dvdnav" = auto
; then
6927 if test "$_dvdread_internal" = yes ; then
6930 res_comment
="internal"
6932 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
6935 if test "$_dvdnav" = auto
; then
6937 _dvdnavdir
=$
($_dvdnavconfig --cflags)
6938 _dvdnavlibs
=$
($_dvdnavconfig --libs)
6939 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
6941 if test "$_dvdnav" = yes ; then
6943 def_dvdnav
='#define CONFIG_DVDNAV 1'
6944 if test "$dvdnav_internal" = yes ; then
6945 cflags_libdvdnav
="-Ilibdvdnav"
6946 inputmodules
="dvdnav(internal) $inputmodules"
6948 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
6949 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
6950 inputmodules
="dvdnav $inputmodules"
6953 def_dvdnav
='#undef CONFIG_DVDNAV'
6954 noinputmodules
="dvdnav $noinputmodules"
6958 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
6959 # Read dvdnav comment above.
6962 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
6963 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
6965 for part
in $list; do
6966 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
6967 echo "${nprefix}_$part = yes"
6972 #############################################################################
6973 echo "Creating config.mak"
6974 cat > config.mak
<< EOF
6975 # -------- Generated by configure -----------
6977 # Ensure that locale settings do not interfere with shell commands.
6980 CONFIGURATION = $configuration
6983 DOC_LANGS = $language_doc
6984 DOC_LANG_ALL = $doc_lang_all
6985 MAN_LANGS = $language_man
6986 MAN_LANG_ALL = $man_lang_all
6987 MSG_LANGS = $language_msg
6988 MSG_LANG_ALL = $msg_lang_all
6990 prefix = \$(DESTDIR)$_prefix
6991 BINDIR = \$(DESTDIR)$_bindir
6992 DATADIR = \$(DESTDIR)$_datadir
6993 LIBDIR = \$(DESTDIR)$_libdir
6994 MANDIR = \$(DESTDIR)$_mandir
6995 CONFDIR = \$(DESTDIR)$_confdir
6996 LOCALEDIR = \$(DESTDIR)$_localedir
7004 INSTALLSTRIP = $_install_strip
7007 CFLAGS = $WARNFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
7008 CXXFLAGS = $WARNFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
7009 DEPFLAGS = $DEPFLAGS
7011 CFLAGS_DHAHELPER = $cflags_dhahelper
7012 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7013 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7014 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7015 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7016 CFLAGS_STACKREALIGN = $cflags_stackrealign
7017 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7018 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7020 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7021 EXTRALIBS_MPLAYER = $libs_mplayer
7030 $(mak_enable "$arch_all" "$arch" ARCH)
7031 $(mak_enable "$subarch_all" "$subarch" ARCH)
7032 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
7036 NEED_GETTIMEOFDAY = $_need_gettimeofday
7037 NEED_GLOB = $_need_glob
7038 NEED_MMAP = $_need_mmap
7039 NEED_SETENV = $_need_setenv
7040 NEED_SHMEM = $_need_shmem
7041 NEED_STRSEP = $_need_strsep
7042 NEED_SWAB = $_need_swab
7043 NEED_VSSCANF = $_need_vsscanf
7051 APPLE_IR = $_apple_ir
7052 APPLE_REMOTE = $_apple_remote
7054 AUDIO_INPUT = $_audio_input
7055 BITMAP_FONT = $_bitmap_font
7060 COREAUDIO = $_coreaudio
7061 COREVIDEO = $_corevideo
7064 DIRECT3D = $_direct3d
7065 DIRECTFB = $_directfb
7069 DVDNAV_INTERNAL = $dvdnav_internal
7071 DVDREAD_INTERNAL = $_dvdread_internal
7076 FASTMEMCPY = $_fastmemcpy
7078 FREETYPE = $_freetype
7083 GL_WIN32 = $_gl_win32
7086 MATRIXVIEW = $matrixview
7087 HAVE_POSIX_SELECT = $_posix_select
7088 HAVE_SYS_MMAN_H = $_mman
7091 JOYSTICK = $_joystick
7098 LIBBLURAY = $_bluray
7102 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7106 LIBMENU_DVBIN = $_menu_dvbin
7107 LIBMPEG2 = $_libmpeg2
7108 LIBNEMESI = $_nemesi
7110 LIBSMBCLIENT = $_smb
7111 LIBTHEORA = $_theora
7114 MACOSX_FINDER = $_macosx_finder
7120 MUSEPACK = $_musepack
7122 NATIVE_RTSP = $_native_rtsp
7123 NETWORKING = $networking
7126 PE_EXECUTABLE = $_pe_executable
7129 PRIORITY = $_priority
7133 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7134 QTX_EMULATION = $_qtx_emulation
7137 RADIO_CAPTURE=$_radio_capture
7138 REAL_CODECS = $_real
7142 STREAM_CACHE = $_stream_cache
7143 SGIAUDIO = $_sgiaudio
7144 SUNAUDIO = $_sunaudio
7149 TREMOR_INTERNAL = $_tremor_internal
7151 TV_BSDBT848 = $_tv_bsdbt848
7152 TV_DSHOW = $_tv_dshow
7156 UNRAR_EXEC = $_unrar_exec
7162 VIDIX_PCIDB = $_vidix_pcidb_val
7163 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7164 VIDIX_IVTV=$_vidix_drv_ivtv
7165 VIDIX_MACH64=$_vidix_drv_mach64
7166 VIDIX_MGA=$_vidix_drv_mga
7167 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7168 VIDIX_NVIDIA=$_vidix_drv_nvidia
7169 VIDIX_PM2=$_vidix_drv_pm2
7170 VIDIX_PM3=$_vidix_drv_pm3
7171 VIDIX_RADEON=$_vidix_drv_radeon
7172 VIDIX_RAGE128=$_vidix_drv_rage128
7173 VIDIX_S3=$_vidix_drv_s3
7174 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7175 VIDIX_SIS=$_vidix_drv_sis
7176 VIDIX_UNICHROME=$_vidix_drv_unichrome
7180 WIN32DLL = $_win32dll
7181 WIN32WAVEOUT = $_win32waveout
7182 WIN32_EMULATION = $_win32_emulation
7183 WINVIDIX = $winvidix
7185 XANIM_CODECS = $_xanim
7187 XMMS_PLUGINS = $_xmms
7193 YUV4MPEG = $_yuv4mpeg
7198 FFMPEG_EVAL_API = $ffmpeg_eval_api
7199 FFMPEG_INTERNALS = $ffmpeg_internals
7200 FFMPEG_SOURCE_PATH = $_ffmpeg_source
7204 YASMFLAGS = $YASMFLAGS
7206 CONFIG_BZLIB = $bzlib
7207 CONFIG_VDPAU = $_vdpau
7208 CONFIG_XVMC = $_xvmc
7209 CONFIG_ZLIB = $_zlib
7211 HAVE_PTHREADS = $_pthreads
7213 HAVE_W32THREADS = $_w32threads
7214 HAVE_YASM = $have_yasm
7218 #############################################################################
7220 ff_config_enable
() {
7221 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7222 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7224 test -z "$_nprefix" && _nprefix
='CONFIG'
7225 for part
in $list; do
7226 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7227 echo "#define ${_nprefix}_$part 1"
7229 echo "#define ${_nprefix}_$part 0"
7234 echo "Creating config.h"
7236 /*----------------------------------------------------------------------------
7237 ** This file has been automatically generated by configure any changes in it
7238 ** will be lost when you run configure again.
7239 ** Instead of modifying definitions here, use the --enable/--disable options
7240 ** of the configure script! See ./configure --help for details.
7241 *---------------------------------------------------------------------------*/
7243 #ifndef MPLAYER_CONFIG_H
7244 #define MPLAYER_CONFIG_H
7246 /* Undefine this if you do not want to select mono audio (left or right)
7247 with a stereo MPEG layer 2/3 audio stream. The command line option
7248 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7249 right-only), with 0 being the default.
7251 #define CONFIG_FAKE_MONO 1
7253 /* set up audio OUTBURST. Do not change this! */
7254 #define OUTBURST 512
7256 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7258 #undef FAST_OSD_TABLE
7260 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
7261 #define MPEG12_POSTPROC 1
7262 #define ATTRIBUTE_ALIGNED_MAX 16
7266 #define CONFIGURATION "$configuration"
7268 #define MPLAYER_DATADIR "$_datadir"
7269 #define MPLAYER_CONFDIR "$_confdir"
7270 #define MPLAYER_LIBDIR "$_libdir"
7271 #define MPLAYER_LOCALEDIR "$_localedir"
7275 /* definitions needed by included libraries */
7276 #define HAVE_INTTYPES_H 1
7277 /* libmpeg2 + FFmpeg */
7280 #define HAVE_ERRNO_H 1
7281 /* libdvdcss + libdvdread */
7282 #define HAVE_LIMITS_H 1
7284 #define HAVE_UNISTD_H 1
7286 #define STDC_HEADERS 1
7287 #define HAVE_MEMCPY 1
7289 #define READ_CACHE_TRACE 0
7291 #define HAVE_DLFCN_H 1
7295 /* system headers */
7297 $def_alsa_asoundlib_h
7301 $def_mman_has_map_failed
7303 $def_sys_asoundlib_h
7304 $def_sys_soundcard_h
7311 /* system functions */
7334 /* system-specific features */
7349 $def_restrict_keyword
7354 /* configurable options */
7358 $def_dynamic_plugins
7361 $def_runtime_cpudetection
7369 #define __CPU__ $iproc
7373 $(ff_config_enable "$arch_all" "$arch" "ARCH")
7374 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
7375 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
7378 /* Blu-ray/DVD/VCD/CD */
7379 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
7380 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
7401 /* codec libraries */
7430 #define BINARY_CODECS_PATH "$_codecsdir"
7431 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7434 /* Audio output drivers */
7450 $def_ossaudio_devdsp
7451 $def_ossaudio_devmixer
7464 $def_ioctl_bt848_h_name
7465 $def_ioctl_meteor_h_name
7553 $def_vidix_drv_cyberblade
7555 $def_vidix_drv_mach64
7557 $def_vidix_drv_mga_crtc2
7558 $def_vidix_drv_nvidia
7560 $def_vidix_drv_radeon
7561 $def_vidix_drv_rage128
7563 $def_vidix_drv_sh_veu
7565 $def_vidix_drv_unichrome
7584 $def_ffmpeg_eval_api
7585 $def_ffmpeg_internals
7611 #define HAVE_INLINE_ASM 1
7613 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
7615 #define HAVE_EBP_AVAILABLE 1
7617 #define HAVE_EBP_AVAILABLE 0
7620 #endif /* MPLAYER_CONFIG_H */
7623 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
7624 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
7626 #############################################################################
7628 .
/version.sh
`$_cc -dumpversion`
7632 Config files successfully generated by ./configure $configuration !
7634 Install prefix: $_prefix
7635 Data directory: $_datadir
7636 Config direct.: $_confdir
7638 Byte order: $_byte_order
7639 Optimizing for: $_optimizing
7642 Messages (in addition to English): $language_msg
7643 Manual pages: $language_man
7644 Documentation: $language_doc
7646 Enabled optional drivers:
7647 Input: $inputmodules
7648 Codecs: $codecmodules
7649 Audio output: $aomodules
7650 Video output: $vomodules
7652 Disabled optional drivers:
7653 Input: $noinputmodules
7654 Codecs: $nocodecmodules
7655 Audio output: $noaomodules
7656 Video output: $novomodules
7658 'config.h' and 'config.mak' contain your configuration options.
7659 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7660 compile *** DO NOT REPORT BUGS if you tweak these files ***
7662 'make' will now compile MPlayer and 'make install' will install it.
7663 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7668 if test "$_mtrr" = yes ; then
7669 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)"
7675 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7676 operating system ($system_name). You may encounter a few files that cannot
7677 be played due to missing open source video/audio codec support.
7684 Check $TMPLOG if you wonder why an autodetection failed (make sure
7685 development headers/packages are installed).
7687 NOTE: The --enable-* parameters unconditionally force options on, completely
7688 skipping autodetection. This behavior is unlike what you may be used to from
7689 autoconf-based configure scripts that can decide to override you. This greater
7690 level of control comes at a price. You may have to provide the correct compiler
7691 and linker flags yourself.
7692 If you used one of these options (except --enable-menu and similar ones that
7693 turn on internal features) and experience a compilation or linking failure,
7694 make sure you have passed the necessary compiler/linker flags to configure.
7696 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
7700 if test "$warn_cflags" = yes; then
7703 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
7706 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7708 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7709 To do so, execute 'CFLAGS= ./configure <options>'
7715 rm -rf "$mplayer_tmpdir"