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) { $2; return 0; }
83 compile_check
$TMPC $@
89 int main(void) { return 0; }
92 compile_check
$TMPC $@
97 int main(void) { __asm__ volatile ($1); return 0; }
100 compile_check
$TMPC $@
103 # The following checks are special and should only be used with broken and
104 # non-selfsufficient headers that do not include all of their dependencies.
106 header_check_broken
() {
110 int main(void) { return 0; }
114 compile_check
$TMPC $@
117 statement_check_broken
() {
121 int main(void) { $3; return 0; }
124 compile_check
$TMPC $@
129 cat "$TMPS" >> "$TMPLOG"
131 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
133 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
141 "$TMPEXE" >> "$TMPLOG" 2>&1
144 # Display error message, flushes tempfile, exit
149 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
150 echo "Check \"$TMPLOG\" if you do not understand why it failed."
154 # OS test booleans functions
156 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
158 aix
() { issystem
"AIX"; }
159 amigaos
() { issystem
"AmigaOS"; }
160 beos
() { issystem
"BEOS"; }
161 bsdos
() { issystem
"BSD/OS"; }
162 cygwin
() { issystem
"CYGWIN"; }
163 darwin
() { issystem
"Darwin"; }
164 dragonfly
() { issystem
"DragonFly"; }
165 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
166 gnu
() { issystem
"GNU"; }
167 hpux
() { issystem
"HP-UX"; }
168 irix
() { issystem
"IRIX"; }
169 linux
() { issystem
"Linux"; }
170 mingw32
() { issystem
"MINGW32"; }
171 morphos
() { issystem
"MorphOS"; }
172 netbsd
() { issystem
"NetBSD"; }
173 openbsd
() { issystem
"OpenBSD"; }
174 os2
() { issystem
"OS/2"; }
175 qnx
() { issystem
"QNX"; }
176 sunos
() { issystem
"SunOS"; }
177 win32
() { cygwin || mingw32
; }
179 # arch test boolean functions
180 # x86/x86pc is used by QNX
183 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
190 x86_64|amd64
) return 0 ;;
201 ppc|ppc64|powerpc|powerpc64
) return 0;;
220 # Use this before starting a check
222 echo "============ Checking for $@ ============" >> "$TMPLOG"
223 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
226 # Use this to echo the results of a check
228 if test "$res_comment" ; then
229 res_comment
="($res_comment)"
231 echo "Result is: $@ $res_comment" >> "$TMPLOG"
232 echo "##########################################" >> "$TMPLOG"
234 echo "$@ $res_comment"
237 #############################################################################
239 # Check how echo works in this /bin/sh
241 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
242 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
246 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
247 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")
248 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
252 Usage: $0 [OPTIONS]...
255 -h, --help display this help and exit
257 Installation directories:
258 --prefix=DIR prefix directory for installation [/usr/local]
259 --bindir=DIR directory for installing binaries [PREFIX/bin]
260 --datadir=DIR directory for installing machine independent
261 data files (skins, etc) [PREFIX/share/mplayer]
262 --mandir=DIR directory for installing man pages [PREFIX/share/man]
263 --confdir=DIR directory for installing configuration files
265 --localedir=DIR directory for locale tree [PREFIX/share/locale]
266 --libdir=DIR directory for object code libraries [PREFIX/lib]
267 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
270 --disable-mplayer disable MPlayer compilation [enable]
271 --disable-largefiles disable support for files > 2GB [enable]
272 --enable-termcap use termcap database for key codes [autodetect]
273 --enable-termios use termios database for key codes [autodetect]
274 --disable-iconv disable iconv for encoding conversion [autodetect]
275 --disable-langinfo do not use langinfo [autodetect]
276 --enable-lirc enable LIRC (remote control) support [autodetect]
277 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
278 --enable-joystick enable joystick support [disable]
279 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
280 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
281 --disable-vm disable X video mode extensions [autodetect]
282 --disable-xf86keysym disable support for multimedia keys [autodetect]
283 --enable-radio enable radio interface [disable]
284 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
285 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
286 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
287 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
288 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
289 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
290 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
291 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
292 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
293 --disable-networking disable networking [enable]
294 --enable-winsock2_h enable winsock2_h [autodetect]
295 --enable-smb enable Samba (SMB) input [autodetect]
296 --enable-live enable LIVE555 Streaming Media [autodetect]
297 --enable-nemesi enable Nemesi Streaming Media [autodetect]
298 --disable-vcd disable VCD support [autodetect]
299 --disable-bluray disable Blu-ray support [autodetect]
300 --disable-dvdnav disable libdvdnav [autodetect]
301 --disable-dvdread disable libdvdread [autodetect]
302 --disable-dvdread-internal disable internal libdvdread [autodetect]
303 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
304 --disable-cdparanoia disable cdparanoia [autodetect]
305 --disable-cddb disable cddb [autodetect]
306 --disable-bitmap-font disable bitmap font support [enable]
307 --disable-freetype disable FreeType 2 font rendering [autodetect]
308 --disable-fontconfig disable fontconfig font lookup [autodetect]
309 --disable-unrarexec disable using of UnRAR executable [enabled]
310 --enable-menu enable OSD menu (not DVD menu) [disabled]
311 --disable-sortsub disable subtitle sorting [enabled]
312 --enable-fribidi enable the FriBiDi libs [autodetect]
313 --disable-enca disable ENCA charset oracle library [autodetect]
314 --disable-maemo disable maemo specific features [autodetect]
315 --enable-macosx-finder enable Mac OS X Finder invocation parameter
317 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
318 --disable-inet6 disable IPv6 support [autodetect]
319 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
320 --disable-ftp disable FTP support [enabled]
321 --disable-vstream disable TiVo vstream client support [autodetect]
322 --disable-pthreads disable Posix threads support [autodetect]
323 --disable-w32threads disable Win32 threads support [autodetect]
324 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
325 --enable-rpath enable runtime linker path for extra libs [disabled]
328 --enable-gif enable GIF support [autodetect]
329 --enable-png enable PNG input/output support [autodetect]
330 --enable-mng enable MNG input support [autodetect]
331 --enable-jpeg enable JPEG input/output support [autodetect]
332 --enable-libcdio enable libcdio support [autodetect]
333 --enable-liblzo enable liblzo support [autodetect]
334 --disable-win32dll disable Win32 DLL support [autodetect]
335 --disable-qtx disable QuickTime codecs support [enabled]
336 --disable-xanim disable XAnim codecs support [enabled]
337 --disable-real disable RealPlayer codecs support [enabled]
338 --disable-xvid disable Xvid [autodetect]
339 --disable-libnut disable libnut [autodetect]
340 --disable-ffmpeg disable FFmpeg [autodetect]
341 --disable-tremor-internal disable internal Tremor [enabled]
342 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
343 --enable-tremor enable external Tremor [autodetect]
344 --disable-libvorbis disable libvorbis support [autodetect]
345 --disable-speex disable Speex support [autodetect]
346 --enable-theora enable OggTheora libraries [autodetect]
347 --enable-faad enable external FAAD2 (AAC) [autodetect]
348 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
349 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
350 --disable-ladspa disable LADSPA plugin support [autodetect]
351 --disable-libbs2b disable libbs2b audio filter support [autodetect]
352 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
353 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
354 --disable-mad disable libmad (MPEG audio) support [autodetect]
355 --enable-xmms enable XMMS input plugin support [disabled]
356 --enable-libdca enable libdca support [autodetect]
357 --disable-mp3lib disable builtin mp3lib [autodetect]
358 --disable-liba52 disable liba52 [autodetect]
359 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
360 --disable-musepack disable musepack support [autodetect]
363 --disable-vidix disable VIDIX [for x86 *nix]
364 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
365 Available: cyberblade, ivtv, mach64, mga, mga_crtc2,
366 nvidia, pm2, pm3, radeon, rage128, s3, sis, unichrome
367 --disable-vidix-pcidb disable VIDIX PCI device name database
368 --enable-dhahelper enable VIDIX dhahelper support
369 --enable-svgalib_helper enable VIDIX svgalib_helper support
370 --enable-gl enable OpenGL video output [autodetect]
371 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
372 --enable-dga2 enable DGA 2 support [autodetect]
373 --enable-dga1 enable DGA 1 support [autodetect]
374 --enable-vesa enable VESA video output [autodetect]
375 --enable-svga enable SVGAlib video output [autodetect]
376 --enable-sdl enable SDL video output [autodetect]
377 --enable-kva enable KVA video output [autodetect]
378 --enable-aa enable AAlib video output [autodetect]
379 --enable-caca enable CACA video output [autodetect]
380 --enable-ggi enable GGI video output [autodetect]
381 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
382 --enable-direct3d enable Direct3D video output [autodetect]
383 --enable-directx enable DirectX video output [autodetect]
384 --enable-dxr2 enable DXR2 video output [autodetect]
385 --enable-dxr3 enable DXR3/H+ video output [autodetect]
386 --enable-ivtv enable IVTV TV-Out video output [autodetect]
387 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
388 --enable-dvb enable DVB video output [autodetect]
389 --enable-mga enable mga_vid video output [autodetect]
390 --enable-xmga enable mga_vid X11 video output [autodetect]
391 --enable-xv enable Xv video output [autodetect]
392 --enable-xvmc enable XvMC acceleration [disable]
393 --enable-vdpau enable VDPAU acceleration [autodetect]
394 --enable-vm enable XF86VidMode support [autodetect]
395 --enable-xinerama enable Xinerama support [autodetect]
396 --enable-x11 enable X11 video output [autodetect]
397 --enable-xshape enable XShape support [autodetect]
398 --disable-xss disable screensaver support via xss [autodetect]
399 --enable-fbdev enable FBDev video output [autodetect]
400 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
401 --enable-tdfxfb enable tdfxfb video output [disable]
402 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
403 --enable-wii enable Nintendo Wii/GameCube video output [disable]
404 --enable-directfb enable DirectFB video output [autodetect]
405 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
406 --enable-bl enable Blinkenlights video output [disable]
407 --enable-tdfxvid enable tdfx_vid video output [disable]
408 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
409 --disable-tga disable Targa video output [enable]
410 --disable-pnm disable PNM video output [enable]
411 --disable-md5sum disable md5sum video output [enable]
412 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
413 --disable-corevideo disable CoreVideo video output [autodetect]
414 --disable-quartz disable Quartz video output [autodetect]
417 --disable-alsa disable ALSA audio output [autodetect]
418 --disable-ossaudio disable OSS audio output [autodetect]
419 --disable-arts disable aRts audio output [autodetect]
420 --disable-esd disable esd audio output [autodetect]
421 --disable-pulse disable Pulseaudio audio output [autodetect]
422 --disable-jack disable JACK audio output [autodetect]
423 --enable-openal enable OpenAL audio output [disable]
424 --disable-nas disable NAS audio output [autodetect]
425 --disable-sgiaudio disable SGI audio output [autodetect]
426 --disable-sunaudio disable Sun audio output [autodetect]
427 --disable-kai disable KAI audio output [autodetect]
428 --disable-dart disable DART audio output [autodetect]
429 --disable-win32waveout disable Windows waveout audio output [autodetect]
430 --disable-coreaudio disable CoreAudio audio output [autodetect]
431 --disable-select disable using select() on the audio device [enable]
434 --enable-translation enable support for translated output [disable]
435 --charset=charset convert the console messages to this character set
436 --language-doc=lang language to use for the documentation [en]
437 --language-man=lang language to use for the man pages [en]
438 --language-msg=lang extra languages for program messages [all]
439 --language=lang default language to use [en]
440 Specific options override --language. You can pass a list of languages separated
441 by whitespace or commas instead of a single language. Nonexisting translations
442 will be dropped from each list. All translations available in the list will be
443 installed. The value "all" will activate all translations. The LINGUAS
444 environment variable is honored. In all cases the fallback is English.
445 The program always supports English-language output; additional message
446 languages are only installed if --enable-translation is also specified.
447 Available values for --language-doc are: all $doc_lang_all
448 Available values for --language-man are: all $man_lang_all
449 Available values for --language-msg are: all $msg_lang_all
451 Miscellaneous options:
452 --enable-runtime-cpudetection enable runtime CPU detection [disable]
453 --enable-cross-compile enable cross-compilation [autodetect]
454 --cc=COMPILER C compiler to build MPlayer [gcc]
455 --host-cc=COMPILER C compiler for tools needed while building [gcc]
456 --as=ASSEMBLER assembler to build MPlayer [as]
457 --nm=NM nm tool to build MPlayer [nm]
458 --yasm=YASM Yasm assembler to build MPlayer [yasm]
459 --ar=AR librarian to build MPlayer [ar]
460 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
461 --windres=WINDRES windres to build MPlayer [windres]
462 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
463 --enable-static build a statically linked binary
464 --with-install=PATH path to a custom install program
467 --enable-mmx enable MMX [autodetect]
468 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
469 --enable-3dnow enable 3DNow! [autodetect]
470 --enable-3dnowext enable extended 3DNow! [autodetect]
471 --enable-sse enable SSE [autodetect]
472 --enable-sse2 enable SSE2 [autodetect]
473 --enable-ssse3 enable SSSE3 [autodetect]
474 --enable-shm enable shm [autodetect]
475 --enable-altivec enable AltiVec (PowerPC) [autodetect]
476 --enable-armv5te enable DSP extensions (ARM) [autodetect]
477 --enable-armv6 enable ARMv6 (ARM) [autodetect]
478 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
479 --enable-armvfp enable ARM VFP (ARM) [autodetect]
480 --enable-neon enable NEON (ARM) [autodetect]
481 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
482 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
483 --enable-big-endian force byte order to big-endian [autodetect]
484 --enable-debug[=1-3] compile-in debugging information [disable]
485 --enable-profile compile-in profiling information [disable]
486 --disable-sighandler disable sighandler for crashes [enable]
487 --enable-crash-debug enable automatic gdb attach on crash [disable]
488 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
489 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
491 Use these options if autodetection fails:
492 --extra-cflags=FLAGS extra CFLAGS
493 --extra-ldflags=FLAGS extra LDFLAGS
494 --extra-libs=FLAGS extra linker flags
495 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
496 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
498 --with-freetype-config=PATH path to freetype-config
499 --with-glib-config=PATH path to glib*-config
500 --with-gtk-config=PATH path to gtk*-config
501 --with-sdl-config=PATH path to sdl*-config
502 --with-dvdnav-config=PATH path to dvdnav-config
503 --with-dvdread-config=PATH path to dvdread-config
505 This configure script is NOT autoconf-based, even though its output is similar.
506 It will try to autodetect all configuration options. If you --enable an option
507 it will be forcefully turned on, skipping autodetection. This can break
508 compilation, so you need to know what you are doing.
513 # GOTCHA: the variables below defines the default behavior for autodetection
514 # and have - unless stated otherwise - at least 2 states : yes no
515 # If autodetection is available then the third state is: auto
539 test "$CC" && _cc
="$CC"
543 _runtime_cpudetection
=no
555 _xvmc
=no
#auto when complete
618 _dvdnavconfig
=dvdnav-config
619 _dvdreadconfig
=dvdread-config
621 _dvdread_internal
=auto
622 _libdvdcss_internal
=auto
704 _freetypeconfig
='freetype-config'
719 def_dos_paths
="#define HAVE_DOS_PATHS 0"
720 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
721 def_priority
="#undef CONFIG_PRIORITY"
722 def_pthread_cache
="#undef PTHREAD_CACHE"
730 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
733 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
736 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
739 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
742 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
745 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
748 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
751 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
755 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
758 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
762 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
764 --with-freetype-config=*)
765 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
768 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
770 --with-glib-config=*)
771 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
773 --with-dvdnav-config=*)
774 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
776 --with-dvdread-config=*)
777 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
781 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
784 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
787 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
789 --extra-libs-mplayer=*)
790 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
794 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
797 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
803 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
806 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
809 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
812 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
815 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
818 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
821 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
824 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
827 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
830 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
833 language
=$
(echo $ac_option | cut
-d '=' -f 2)
852 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
857 --enable-translation) _translation
=yes ;;
858 --disable-translation) _translation
=no
;;
859 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
860 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
861 --enable-cross-compile) _cross_compile
=yes ;;
862 --disable-cross-compile) _cross_compile
=no
;;
863 --enable-mplayer) _mplayer
=yes ;;
864 --disable-mplayer) _mplayer
=no
;;
865 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
866 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
867 --enable-x11) _x11
=yes ;;
868 --disable-x11) _x11
=no
;;
869 --enable-xshape) _xshape
=yes ;;
870 --disable-xshape) _xshape
=no
;;
871 --enable-xss) _xss
=yes ;;
872 --disable-xss) _xss
=no
;;
873 --enable-xv) _xv
=yes ;;
874 --disable-xv) _xv
=no
;;
875 --enable-xvmc) _xvmc
=yes ;;
876 --disable-xvmc) _xvmc
=no
;;
877 --enable-vdpau) _vdpau
=yes ;;
878 --disable-vdpau) _vdpau
=no
;;
879 --enable-sdl) _sdl
=yes ;;
880 --disable-sdl) _sdl
=no
;;
881 --enable-kva) _kva
=yes ;;
882 --disable-kva) _kva
=no
;;
883 --enable-direct3d) _direct3d
=yes ;;
884 --disable-direct3d) _direct3d
=no
;;
885 --enable-directx) _directx
=yes ;;
886 --disable-directx) _directx
=no
;;
887 --enable-win32waveout) _win32waveout
=yes ;;
888 --disable-win32waveout) _win32waveout
=no
;;
889 --enable-nas) _nas
=yes ;;
890 --disable-nas) _nas
=no
;;
891 --enable-png) _png
=yes ;;
892 --disable-png) _png
=no
;;
893 --enable-mng) _mng
=yes ;;
894 --disable-mng) _mng
=no
;;
895 --enable-jpeg) _jpeg
=yes ;;
896 --disable-jpeg) _jpeg
=no
;;
897 --enable-pnm) _pnm
=yes ;;
898 --disable-pnm) _pnm
=no
;;
899 --enable-md5sum) _md5sum
=yes ;;
900 --disable-md5sum) _md5sum
=no
;;
901 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
902 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
903 --enable-gif) _gif
=yes ;;
904 --disable-gif) _gif
=no
;;
905 --enable-gl) _gl
=yes ;;
906 --disable-gl) _gl
=no
;;
907 --enable-matrixview) matrixview
=yes ;;
908 --disable-matrixview) matrixview
=no
;;
909 --enable-ggi) _ggi
=yes ;;
910 --disable-ggi) _ggi
=no
;;
911 --enable-ggiwmh) _ggiwmh
=yes ;;
912 --disable-ggiwmh) _ggiwmh
=no
;;
913 --enable-aa) _aa
=yes ;;
914 --disable-aa) _aa
=no
;;
915 --enable-caca) _caca
=yes ;;
916 --disable-caca) _caca
=no
;;
917 --enable-svga) _svga
=yes ;;
918 --disable-svga) _svga
=no
;;
919 --enable-vesa) _vesa
=yes ;;
920 --disable-vesa) _vesa
=no
;;
921 --enable-fbdev) _fbdev
=yes ;;
922 --disable-fbdev) _fbdev
=no
;;
923 --enable-dvb) _dvb
=yes ;;
924 --disable-dvb) _dvb
=no
;;
925 --enable-dxr2) _dxr2
=yes ;;
926 --disable-dxr2) _dxr2
=no
;;
927 --enable-dxr3) _dxr3
=yes ;;
928 --disable-dxr3) _dxr3
=no
;;
929 --enable-ivtv) _ivtv
=yes ;;
930 --disable-ivtv) _ivtv
=no
;;
931 --enable-v4l2) _v4l2
=yes ;;
932 --disable-v4l2) _v4l2
=no
;;
933 --enable-iconv) _iconv
=yes ;;
934 --disable-iconv) _iconv
=no
;;
935 --enable-langinfo) _langinfo
=yes ;;
936 --disable-langinfo) _langinfo
=no
;;
937 --enable-rtc) _rtc
=yes ;;
938 --disable-rtc) _rtc
=no
;;
939 --enable-libdv) _libdv
=yes ;;
940 --disable-libdv) _libdv
=no
;;
941 --enable-ossaudio) _ossaudio
=yes ;;
942 --disable-ossaudio) _ossaudio
=no
;;
943 --enable-arts) _arts
=yes ;;
944 --disable-arts) _arts
=no
;;
945 --enable-esd) _esd
=yes ;;
946 --disable-esd) _esd
=no
;;
947 --enable-pulse) _pulse
=yes ;;
948 --disable-pulse) _pulse
=no
;;
949 --enable-jack) _jack
=yes ;;
950 --disable-jack) _jack
=no
;;
951 --enable-openal) _openal
=yes ;;
952 --disable-openal) _openal
=no
;;
953 --enable-kai) _kai
=yes ;;
954 --disable-kai) _kai
=no
;;
955 --enable-dart) _dart
=yes ;;
956 --disable-dart) _dart
=no
;;
957 --enable-mad) _mad
=yes ;;
958 --disable-mad) _mad
=no
;;
959 --enable-libcdio) _libcdio
=yes ;;
960 --disable-libcdio) _libcdio
=no
;;
961 --enable-liblzo) _liblzo
=yes ;;
962 --disable-liblzo) _liblzo
=no
;;
963 --enable-libvorbis) _libvorbis
=yes ;;
964 --disable-libvorbis) _libvorbis
=no
;;
965 --enable-speex) _speex
=yes ;;
966 --disable-speex) _speex
=no
;;
967 --enable-tremor) _tremor
=yes ;;
968 --disable-tremor) _tremor
=no
;;
969 --enable-tremor-internal) _tremor_internal
=yes ;;
970 --disable-tremor-internal) _tremor_internal
=no
;;
971 --enable-tremor-low) _tremor_low
=yes ;;
972 --disable-tremor-low) _tremor_low
=no
;;
973 --enable-theora) _theora
=yes ;;
974 --disable-theora) _theora
=no
;;
975 --enable-mpg123) _mpg123
=yes ;;
976 --disable-mpg123) _mpg123
=no
;;
977 --enable-mp3lib) _mp3lib
=yes ;;
978 --disable-mp3lib) _mp3lib
=no
;;
979 --enable-liba52) _liba52
=yes ;;
980 --disable-liba52) _liba52
=no
;;
981 --enable-libdca) _libdca
=yes ;;
982 --disable-libdca) _libdca
=no
;;
983 --enable-libmpeg2) _libmpeg2
=yes ;;
984 --disable-libmpeg2) _libmpeg2
=no
;;
985 --enable-musepack) _musepack
=yes ;;
986 --disable-musepack) _musepack
=no
;;
987 --enable-faad) _faad
=yes ;;
988 --disable-faad) _faad
=no
;;
989 --enable-faad-internal) _faad_internal
=yes ;;
990 --disable-faad-internal) _faad_internal
=no
;;
991 --enable-faad-fixed) _faad_fixed
=yes ;;
992 --disable-faad-fixed) _faad_fixed
=no
;;
993 --enable-ladspa) _ladspa
=yes ;;
994 --disable-ladspa) _ladspa
=no
;;
995 --enable-libbs2b) _libbs2b
=yes ;;
996 --disable-libbs2b) _libbs2b
=no
;;
997 --enable-xmms) _xmms
=yes ;;
998 --disable-xmms) _xmms
=no
;;
999 --enable-vcd) _vcd
=yes ;;
1000 --disable-vcd) _vcd
=no
;;
1001 --enable-bluray) _bluray
=yes ;;
1002 --disable-bluray) _bluray
=no
;;
1003 --enable-dvdread) _dvdread
=yes ;;
1004 --disable-dvdread) _dvdread
=no
;;
1005 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1006 --disable-dvdread-internal) _dvdread_internal
=no
;;
1007 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1008 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1009 --enable-dvdnav) _dvdnav
=yes ;;
1010 --disable-dvdnav) _dvdnav
=no
;;
1011 --enable-xanim) _xanim
=yes ;;
1012 --disable-xanim) _xanim
=no
;;
1013 --enable-real) _real
=yes ;;
1014 --disable-real) _real
=no
;;
1015 --enable-live) _live
=yes ;;
1016 --disable-live) _live
=no
;;
1017 --enable-nemesi) _nemesi
=yes ;;
1018 --disable-nemesi) _nemesi
=no
;;
1019 --enable-xinerama) _xinerama
=yes ;;
1020 --disable-xinerama) _xinerama
=no
;;
1021 --enable-mga) _mga
=yes ;;
1022 --disable-mga) _mga
=no
;;
1023 --enable-xmga) _xmga
=yes ;;
1024 --disable-xmga) _xmga
=no
;;
1025 --enable-vm) _vm
=yes ;;
1026 --disable-vm) _vm
=no
;;
1027 --enable-xf86keysym) _xf86keysym
=yes ;;
1028 --disable-xf86keysym) _xf86keysym
=no
;;
1029 --enable-sunaudio) _sunaudio
=yes ;;
1030 --disable-sunaudio) _sunaudio
=no
;;
1031 --enable-sgiaudio) _sgiaudio
=yes ;;
1032 --disable-sgiaudio) _sgiaudio
=no
;;
1033 --enable-alsa) _alsa
=yes ;;
1034 --disable-alsa) _alsa
=no
;;
1035 --enable-tv) _tv
=yes ;;
1036 --disable-tv) _tv
=no
;;
1037 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1038 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1039 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1040 --disable-tv-v4l1) _tv_v4l1
=no
;;
1041 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1042 --disable-tv-v4l2) _tv_v4l2
=no
;;
1043 --enable-tv-dshow) _tv_dshow
=yes ;;
1044 --disable-tv-dshow) _tv_dshow
=no
;;
1045 --enable-radio) _radio
=yes ;;
1046 --enable-radio-capture) _radio_capture
=yes ;;
1047 --disable-radio-capture) _radio_capture
=no
;;
1048 --disable-radio) _radio
=no
;;
1049 --enable-radio-v4l) _radio_v4l
=yes ;;
1050 --disable-radio-v4l) _radio_v4l
=no
;;
1051 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1052 --disable-radio-v4l2) _radio_v4l2
=no
;;
1053 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1054 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1055 --enable-pvr) _pvr
=yes ;;
1056 --disable-pvr) _pvr
=no
;;
1057 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1058 --disable-fastmemcpy) _fastmemcpy
=no
;;
1059 --enable-networking) networking
=yes ;;
1060 --disable-networking) networking
=no
;;
1061 --enable-winsock2_h) _winsock2_h
=yes ;;
1062 --disable-winsock2_h) _winsock2_h
=no
;;
1063 --enable-smb) _smb
=yes ;;
1064 --disable-smb) _smb
=no
;;
1065 --enable-vidix) _vidix
=yes ;;
1066 --disable-vidix) _vidix
=no
;;
1067 --with-vidix-drivers=*)
1068 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1070 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1071 --enable-dhahelper) _dhahelper
=yes ;;
1072 --disable-dhahelper) _dhahelper
=no
;;
1073 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1074 --disable-svgalib_helper) _svgalib_helper
=no
;;
1075 --enable-joystick) _joystick
=yes ;;
1076 --disable-joystick) _joystick
=no
;;
1077 --enable-xvid) _xvid
=yes ;;
1078 --disable-xvid) _xvid
=no
;;
1079 --enable-libnut) _libnut
=yes ;;
1080 --disable-libnut) _libnut
=no
;;
1081 --enable-ffmpeg) ffmpeg
=yes ;;
1082 --disable-ffmpeg) ffmpeg
=no
;;
1083 --ffmpeg-source-dir=*)
1084 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1086 --enable-lirc) _lirc
=yes ;;
1087 --disable-lirc) _lirc
=no
;;
1088 --enable-lircc) _lircc
=yes ;;
1089 --disable-lircc) _lircc
=no
;;
1090 --enable-apple-remote) _apple_remote
=yes ;;
1091 --disable-apple-remote) _apple_remote
=no
;;
1092 --enable-apple-ir) _apple_ir
=yes ;;
1093 --disable-apple-ir) _apple_ir
=no
;;
1094 --enable-gui) _gui
=yes ;;
1095 --disable-gui) _gui
=no
;;
1096 --enable-gtk1) _gtk1
=yes ;;
1097 --disable-gtk1) _gtk1
=no
;;
1098 --enable-termcap) _termcap
=yes ;;
1099 --disable-termcap) _termcap
=no
;;
1100 --enable-termios) _termios
=yes ;;
1101 --disable-termios) _termios
=no
;;
1102 --enable-3dfx) _3dfx
=yes ;;
1103 --disable-3dfx) _3dfx
=no
;;
1104 --enable-s3fb) _s3fb
=yes ;;
1105 --disable-s3fb) _s3fb
=no
;;
1106 --enable-wii) _wii
=yes ;;
1107 --disable-wii) _wii
=no
;;
1108 --enable-tdfxfb) _tdfxfb
=yes ;;
1109 --disable-tdfxfb) _tdfxfb
=no
;;
1110 --disable-tdfxvid) _tdfxvid
=no
;;
1111 --enable-tdfxvid) _tdfxvid
=yes ;;
1112 --disable-xvr100) _xvr100
=no
;;
1113 --enable-xvr100) _xvr100
=yes ;;
1114 --disable-tga) _tga
=no
;;
1115 --enable-tga) _tga
=yes ;;
1116 --enable-directfb) _directfb
=yes ;;
1117 --disable-directfb) _directfb
=no
;;
1118 --enable-zr) _zr
=yes ;;
1119 --disable-zr) _zr
=no
;;
1120 --enable-bl) _bl
=yes ;;
1121 --disable-bl) _bl
=no
;;
1122 --enable-mtrr) _mtrr
=yes ;;
1123 --disable-mtrr) _mtrr
=no
;;
1124 --enable-largefiles) _largefiles
=yes ;;
1125 --disable-largefiles) _largefiles
=no
;;
1126 --enable-shm) _shm
=yes ;;
1127 --disable-shm) _shm
=no
;;
1128 --enable-select) _select
=yes ;;
1129 --disable-select) _select
=no
;;
1130 --enable-cdparanoia) _cdparanoia
=yes ;;
1131 --disable-cdparanoia) _cdparanoia
=no
;;
1132 --enable-cddb) _cddb
=yes ;;
1133 --disable-cddb) _cddb
=no
;;
1134 --enable-big-endian) _big_endian
=yes ;;
1135 --disable-big-endian) _big_endian
=no
;;
1136 --enable-bitmap-font) _bitmap_font
=yes ;;
1137 --disable-bitmap-font) _bitmap_font
=no
;;
1138 --enable-freetype) _freetype
=yes ;;
1139 --disable-freetype) _freetype
=no
;;
1140 --enable-fontconfig) _fontconfig
=yes ;;
1141 --disable-fontconfig) _fontconfig
=no
;;
1142 --enable-unrarexec) _unrar_exec
=yes ;;
1143 --disable-unrarexec) _unrar_exec
=no
;;
1144 --enable-ftp) _ftp
=yes ;;
1145 --disable-ftp) _ftp
=no
;;
1146 --enable-vstream) _vstream
=yes ;;
1147 --disable-vstream) _vstream
=no
;;
1148 --enable-pthreads) _pthreads
=yes ;;
1149 --disable-pthreads) _pthreads
=no
;;
1150 --enable-w32threads) _w32threads
=yes ;;
1151 --disable-w32threads) _w32threads
=no
;;
1152 --enable-ass) _ass
=yes ;;
1153 --disable-ass) _ass
=no
;;
1154 --enable-rpath) _rpath
=yes ;;
1155 --disable-rpath) _rpath
=no
;;
1157 --enable-fribidi) _fribidi
=yes ;;
1158 --disable-fribidi) _fribidi
=no
;;
1160 --enable-enca) _enca
=yes ;;
1161 --disable-enca) _enca
=no
;;
1163 --enable-inet6) _inet6
=yes ;;
1164 --disable-inet6) _inet6
=no
;;
1166 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1167 --disable-gethostbyname2) _gethostbyname2
=no
;;
1169 --enable-dga1) _dga1
=yes ;;
1170 --disable-dga1) _dga1
=no
;;
1171 --enable-dga2) _dga2
=yes ;;
1172 --disable-dga2) _dga2
=no
;;
1174 --enable-menu) _menu
=yes ;;
1175 --disable-menu) _menu
=no
;;
1177 --enable-qtx) _qtx
=yes ;;
1178 --disable-qtx) _qtx
=no
;;
1180 --enable-coreaudio) _coreaudio
=yes ;;
1181 --disable-coreaudio) _coreaudio
=no
;;
1182 --enable-corevideo) _corevideo
=yes ;;
1183 --disable-corevideo) _corevideo
=no
;;
1184 --enable-quartz) _quartz
=yes ;;
1185 --disable-quartz) _quartz
=no
;;
1186 --enable-macosx-finder) _macosx_finder
=yes ;;
1187 --disable-macosx-finder) _macosx_finder
=no
;;
1188 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1189 --disable-macosx-bundle) _macosx_bundle
=no
;;
1191 --enable-maemo) _maemo
=yes ;;
1192 --disable-maemo) _maemo
=no
;;
1194 --enable-sortsub) _sortsub
=yes ;;
1195 --disable-sortsub) _sortsub
=no
;;
1197 --enable-crash-debug) _crash_debug
=yes ;;
1198 --disable-crash-debug) _crash_debug
=no
;;
1199 --enable-sighandler) _sighandler
=yes ;;
1200 --disable-sighandler) _sighandler
=no
;;
1201 --enable-win32dll) _win32dll
=yes ;;
1202 --disable-win32dll) _win32dll
=no
;;
1204 --enable-sse) _sse
=yes ;;
1205 --disable-sse) _sse
=no
;;
1206 --enable-sse2) _sse2
=yes ;;
1207 --disable-sse2) _sse2
=no
;;
1208 --enable-ssse3) _ssse3
=yes ;;
1209 --disable-ssse3) _ssse3
=no
;;
1210 --enable-mmxext) _mmxext
=yes ;;
1211 --disable-mmxext) _mmxext
=no
;;
1212 --enable-3dnow) _3dnow
=yes ;;
1213 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1214 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1215 --disable-3dnowext) _3dnowext
=no
;;
1216 --enable-cmov) _cmov
=yes ;;
1217 --disable-cmov) _cmov
=no
;;
1218 --enable-fast-cmov) _fast_cmov
=yes ;;
1219 --disable-fast-cmov) _fast_cmov
=no
;;
1220 --enable-fast-clz) _fast_clz
=yes ;;
1221 --disable-fast-clz) _fast_clz
=no
;;
1222 --enable-altivec) _altivec
=yes ;;
1223 --disable-altivec) _altivec
=no
;;
1224 --enable-armv5te) _armv5te
=yes ;;
1225 --disable-armv5te) _armv5te
=no
;;
1226 --enable-armv6) _armv6
=yes ;;
1227 --disable-armv6) _armv6
=no
;;
1228 --enable-armv6t2) _armv6t2
=yes ;;
1229 --disable-armv6t2) _armv6t2
=no
;;
1230 --enable-armvfp) _armvfp
=yes ;;
1231 --disable-armvfp) _armvfp
=no
;;
1232 --enable-neon) neon
=yes ;;
1233 --disable-neon) neon
=no
;;
1234 --enable-iwmmxt) _iwmmxt
=yes ;;
1235 --disable-iwmmxt) _iwmmxt
=no
;;
1236 --enable-mmx) _mmx
=yes ;;
1237 --disable-mmx) # 3Dnow! and MMX2 require MMX
1238 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1241 echo "Unknown parameter: $ac_option"
1248 if test "$_gui" = yes ; then
1249 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1250 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1253 # Atmos: moved this here, to be correct, if --prefix is specified
1254 test -z "$_bindir" && _bindir
="$_prefix/bin"
1255 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1256 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1257 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1258 test -z "$_libdir" && _libdir
="$_prefix/lib"
1259 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1261 # Determine our OS name and CPU architecture
1262 if test -z "$_target" ; then
1264 system_name
=$
(uname
-s 2>&1)
1265 case "$system_name" in
1266 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1280 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1290 system_name
="$system_name-UNKNOWN"
1295 # host's CPU/instruction set
1296 host_arch
=$
(uname
-p 2>&1)
1297 case "$host_arch" in
1298 i386|sparc|ppc|alpha|arm|mips|vax
)
1300 powerpc
) # Darwin returns 'powerpc'
1303 *) # uname -p on Linux returns 'unknown' for the processor type,
1304 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1306 # Maybe uname -m (machine hardware name) returns something we
1309 # x86/x86pc is used by QNX
1310 case "$(uname -m 2>&1)" in
1311 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
;;
1312 ia64
) host_arch
=ia64
;;
1313 macppc|ppc
) host_arch
=ppc
;;
1314 ppc64
) host_arch
=ppc64
;;
1315 alpha
) host_arch
=alpha
;;
1316 sparc
) host_arch
=sparc
;;
1317 sparc64
) host_arch
=sparc64
;;
1318 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1319 arm
*|zaurus|cats
) host_arch
=arm
;;
1320 sh3|sh4|sh4a
) host_arch
=sh
;;
1321 s390
) host_arch
=s390
;;
1322 s390x
) host_arch
=s390x
;;
1323 *mips
*) host_arch
=mips
;;
1324 vax
) host_arch
=vax
;;
1325 xtensa
*) host_arch
=xtensa
;;
1326 *) host_arch
=UNKNOWN
;;
1330 else # if test -z "$_target"
1331 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1332 case "$(echo $system_name | tr A-Z a-z)" in
1333 linux
) system_name
=Linux
;;
1334 freebsd
) system_name
=FreeBSD
;;
1335 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1336 netbsd
) system_name
=NetBSD
;;
1337 bsd
/os
) system_name
=BSD
/OS
;;
1338 openbsd
) system_name
=OpenBSD
;;
1339 dragonfly
) system_name
=DragonFly
;;
1340 sunos
) system_name
=SunOS
;;
1341 qnx
) system_name
=QNX
;;
1342 morphos
) system_name
=MorphOS
;;
1343 amigaos
) system_name
=AmigaOS
;;
1344 mingw32
*) system_name
=MINGW32
;;
1346 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1347 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1348 if test $
(echo $host_arch) != "x86_64" ; then
1349 host_arch
=$
(echo $host_arch |
tr '_' '-')
1353 extra_cflags
="-I. $extra_cflags"
1354 _timer
=timer-linux.c
1357 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1358 extra_cflags
="$extra_cflags -I/usr/local/include"
1361 if netbsd || dragonfly
; then
1362 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1363 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1367 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1368 if test "$(basename $_cc)" != "clang" ; then
1369 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
1371 _timer
=timer-darwin.c
1375 extra_ldflags
="$extra_ldflags -lC"
1386 extra_cflags
="$extra_cflags -fno-common"
1387 # -lwinmm is always needed for osdep/timer-win2.c
1388 extra_ldflags
="$extra_ldflags -lwinmm"
1392 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1393 def_priority
="#define CONFIG_PRIORITY 1"
1405 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1406 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1410 extra_ldflags
="$extra_ldflags -lph"
1418 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1419 def_priority
="#define CONFIG_PRIORITY 1"
1422 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1423 test "$tmpdir" && break
1426 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1427 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1430 TMPC
="$mplayer_tmpdir/tmp.c"
1431 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1432 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1433 TMPH
="$mplayer_tmpdir/tmp.h"
1434 TMPS
="$mplayer_tmpdir/tmp.S"
1437 echo configuration
: $configuration > "$TMPLOG"
1441 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1442 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1446 # Checking CC version...
1447 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1448 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1449 echocheck
"$_cc version"
1451 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1452 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1453 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1454 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1455 # TODO verify older icc/ecc compatibility
1458 cc_version
="v. ?.??, bad"
1462 cc_version
="$cc_version, ok"
1465 cc_version
="$cc_version, bad"
1469 echores
"$cc_version"
1471 for _cc
in "$_cc" gcc cc
; do
1472 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1473 if test "$cc_name_tmp" = "gcc"; then
1474 cc_name
=$cc_name_tmp
1475 echocheck
"$_cc version"
1477 cc_version
=$
($_cc -dumpversion 2>&1)
1483 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1484 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1485 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1488 echores
"$cc_version"
1491 cc_name_tmp
=$
($_cc -v 2>&1 |
head -n 1 | cut
-d ' ' -f 1)
1492 if test "$cc_name_tmp" = "clang"; then
1493 echocheck
"$_cc version"
1495 cc_version
=$
($_cc -dumpversion 2>&1)
1496 res_comment
="experimental support only"
1497 echores
"clang $cc_version"
1500 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1501 if test "$cc_name_tmp" = "Sun C"; then
1502 echocheck
"$_cc version"
1504 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1505 res_comment
="experimental support only"
1506 echores
"Sun C $cc_version"
1511 test "$cc_fail" = yes && die
"unsupported compiler version"
1513 if test -z "$_target" && x86
; then
1516 int test[(int)sizeof(char *)-7];
1520 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1523 echo "Detected operating system: $system_name"
1524 echo "Detected host architecture: $host_arch"
1527 test "$_host_cc" || _host_cc
=$_cc
1530 echocheck
"cross compilation"
1531 if test $_cross_compile = auto
; then
1533 cflag_check
"" && "$TMPEXE" && _cross_compile
=no
1535 echores
$_cross_compile
1537 if test $_cross_compile = yes; then
1545 # now that we know what compiler should be used for compilation, try to find
1546 # out which assembler is used by the $_cc compiler
1547 if test "$_as" = auto
; then
1548 _as
=$
($_cc -print-prog-name=as
)
1549 test -z "$_as" && _as
=as
1552 if test "$_nm" = auto
; then
1553 _nm
=$
($_cc -print-prog-name=nm
)
1554 test -z "$_nm" && _nm
=nm
1557 # XXX: this should be ok..
1560 if test "$_runtime_cpudetection" = no
; then
1562 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1563 # FIXME: Remove the cygwin check once AMD CPUs are supported
1564 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1565 # Linux with /proc mounted, extract CPU information from it
1566 _cpuinfo
="cat /proc/cpuinfo"
1567 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1568 # FreeBSD with Linux emulation /proc mounted,
1569 # extract CPU information from it
1570 # Don't use it on x86 though, it never reports 3Dnow
1571 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1572 elif darwin
&& ! x86
; then
1573 # use hostinfo on Darwin
1576 # use 'lsattr' on AIX
1577 _cpuinfo
="lsattr -E -l proc0 -a type"
1579 # all other OSes try to extract CPU information from a small helper
1580 # program cpuinfo instead
1581 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1582 _cpuinfo
="./cpuinfo$_exesuf"
1586 # gather more CPU information
1587 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1588 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1589 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1590 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1591 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1593 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1595 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1596 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1598 for ext
in $pparam ; do
1599 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1602 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1603 test $_sse = kernel_check
&& _mmxext
=kernel_check
1605 echocheck
"CPU vendor"
1606 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1608 echocheck
"CPU type"
1612 fi # test "$_runtime_cpudetection" = no
1614 if x86
&& test "$_runtime_cpudetection" = no
; then
1616 if test "$1" = kernel_check
; then
1617 echocheck
"kernel support of $2"
1621 static void catch(int sig) { exit(1); }
1623 signal(SIGILL, catch);
1624 __asm__ volatile ("$3":::"memory"); return 0;
1628 if cc_check
&& tmp_run
; then
1631 _optimizing
="$_optimizing $2"
1636 echo "It seems that your kernel does not correctly support $2."
1637 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1644 extcheck
$_mmx "mmx" "emms"
1645 extcheck
$_mmxext "mmxext" "sfence"
1646 extcheck
$_3dnow "3dnow" "femms"
1647 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1648 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1649 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1650 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1651 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1653 echocheck
"mtrr support"
1654 if test "$_mtrr" = kernel_check
; then
1656 _optimizing
="$_optimizing mtrr"
1660 if test "$_gcc3_ext" != ""; then
1661 # if we had to disable sse/sse2 because the active kernel does not
1662 # support this instruction set extension, we also have to tell
1663 # gcc3 to not generate sse/sse2 instructions for normal C code
1664 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1670 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1671 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1672 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1673 subarch_all
='X86_32 X86_64 PPC64'
1674 case "$host_arch" in
1675 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1678 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1683 if test "$_runtime_cpudetection" = no
; then
1687 3) proc
=i386 iproc
=386 ;;
1688 4) proc
=i486 iproc
=486 ;;
1689 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1690 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1691 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1693 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1695 elif test "$pmodel" -ge 8; then
1697 elif test "$pmodel" -ge 6; then
1704 # It's a bit difficult to determine the correct type of Family 6
1705 # AMD CPUs just from their signature. Instead, we check directly
1706 # whether it supports SSE.
1707 if test "$_sse" = yes; then
1708 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1711 # Again, gcc treats athlon and athlon-tbird similarly.
1716 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1717 # caught and remedied in the optimization tests below.
1721 *) proc
=amdfam10 iproc
=686
1722 test $_fast_clz = "auto" && _fast_clz
=yes
1728 3) proc
=i386 iproc
=386 ;;
1729 4) proc
=i486 iproc
=486 ;;
1731 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1732 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1738 if test "$pmodel" -ge 15; then
1740 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1742 elif test "$pmodel" -ge 7; then
1744 elif test "$pmodel" -ge 3; then
1749 test $_fast_clz = "auto" && _fast_clz
=yes
1752 # A nocona in 32-bit mode has no more capabilities than a prescott.
1753 if test "$pmodel" -ge 3; then
1757 test $_fast_clz = "auto" && _fast_clz
=yes
1759 test $_fast_cmov = "auto" && _fast_cmov
=no
1761 *) proc
=prescott iproc
=686 ;;
1767 if test "$pmodel" -ge 8; then
1769 elif test "$pmodel" -ge 4; then
1776 if test "$pmodel" -ge 9; then
1783 *) proc
=i686 iproc
=i686
;;
1788 3) proc
=i386 iproc
=386 ;;
1789 4) proc
=i486 iproc
=486 ;;
1790 *) proc
=i586 iproc
=586 ;;
1794 proc
=i586 iproc
=586 ;;
1796 test $_fast_clz = "auto" && _fast_clz
=no
1797 fi # test "$_runtime_cpudetection" = no
1800 # check that gcc supports our CPU, if not, fall back to earlier ones
1801 # LGB: check -mcpu and -march swithing step by step with enabling
1802 # to fall back till 386.
1804 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1806 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1812 echocheck
"GCC & CPU optimization abilities"
1813 if test "$_runtime_cpudetection" = no
; then
1814 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1815 cflag_check
-march=native
&& proc
=native
1817 if test "$proc" = "amdfam10"; then
1818 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1820 if test "$proc" = "k8"; then
1821 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1823 if test "$proc" = "athlon-xp"; then
1824 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1826 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1827 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1829 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1830 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1831 if cflag_check
-march=i586
$cpuopt=i686
; then
1838 if test "$proc" = "prescott" ; then
1839 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1841 if test "$proc" = "core2" ; then
1842 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1844 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
1845 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1847 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1848 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1850 if test "$proc" = "i586"; then
1851 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1853 if test "$proc" = "i486" ; then
1854 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1856 if test "$proc" = "i386" ; then
1857 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1859 if test "$proc" = "error" ; then
1860 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1864 elif test "$proc" = "i586-i686"; then
1865 _march
="-march=i586"
1866 _mcpu
="$cpuopt=i686"
1869 _march
="-march=$proc"
1870 _mcpu
="$cpuopt=$proc"
1873 else # if test "$_runtime_cpudetection" = no
1874 _mcpu
="$cpuopt=generic"
1875 # at least i486 required, for bswap instruction
1876 _march
="-march=i486"
1877 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1878 cflag_check
$_mcpu || _mcpu
=""
1879 cflag_check
$_march $_mcpu || _march
=""
1882 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1883 ## autodetected mcpu/march parameters
1884 if test "$_target" ; then
1885 # TODO: it may be a good idea to check GCC and fall back in all cases
1886 if test "$host_arch" = "i586-i686"; then
1887 _march
="-march=i586"
1888 _mcpu
="$cpuopt=i686"
1890 _march
="-march=$host_arch"
1891 _mcpu
="$cpuopt=$host_arch"
1899 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1900 i686|athlon
*|pentium
*) iproc
=686 ;;
1905 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1910 test $_fast_clz = "auto" && _fast_clz
=yes
1917 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1924 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1925 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1928 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1929 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1934 if test "$_runtime_cpudetection" = no
; then
1939 test $_fast_clz = "auto" && _fast_clz
=no
1948 # 64-bit prescotts exist, but as far as GCC is concerned they
1949 # have the same capabilities as a nocona.
1951 test $_fast_cmov = "auto" && _fast_cmov
=no
1952 test $_fast_clz = "auto" && _fast_clz
=no
1959 fi # test "$_runtime_cpudetection" = no
1961 echocheck
"GCC & CPU optimization abilities"
1962 # This is a stripped-down version of the i386 fallback.
1963 if test "$_runtime_cpudetection" = no
; then
1964 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1965 cflag_check
-march=native
&& proc
=native
1967 # --- AMD processors ---
1968 if test "$proc" = "amdfam10"; then
1969 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1971 if test "$proc" = "k8"; then
1972 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1974 # This will fail if gcc version < 3.3, which is ok because earlier
1975 # versions don't really support 64-bit on amd64.
1976 # Is this a valid assumption? -Corey
1977 if test "$proc" = "athlon-xp"; then
1978 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1980 # --- Intel processors ---
1981 if test "$proc" = "core2"; then
1982 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1984 if test "$proc" = "x86-64"; then
1985 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
1987 if test "$proc" = "nocona"; then
1988 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1990 if test "$proc" = "pentium4"; then
1991 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1994 _march
="-march=$proc"
1995 _mcpu
="$cpuopt=$proc"
1996 if test "$proc" = "error" ; then
1997 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2001 else # if test "$_runtime_cpudetection" = no
2002 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2003 _march
="-march=x86-64"
2004 _mcpu
="$cpuopt=generic"
2005 cflag_check
$_mcpu || _mcpu
="x86-64"
2006 cflag_check
$_mcpu || _mcpu
=""
2007 cflag_check
$_march $_mcpu || _march
=""
2011 test $_fast_cmov = "auto" && _fast_cmov
=yes
2012 test $_fast_clz = "auto" && _fast_clz
=yes
2020 if test "$host_arch" = "sparc64" ; then
2023 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2025 echocheck
"CPU type"
2027 case "$(echo $karch)" in
2032 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2051 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2053 test $_fast_clz = "auto" && _fast_clz
=yes
2061 ppc|ppc64|powerpc|powerpc64
)
2063 def_dcbzl
='#define HAVE_DCBZL 0'
2064 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2067 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2069 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2071 echocheck
"CPU type"
2072 case $system_name in
2074 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2075 if test -n "$($_cpuinfo | grep altivec)"; then
2076 test $_altivec = auto
&& _altivec
=yes
2080 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2081 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2082 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2083 test $_altivec = auto
&& _altivec
=yes
2087 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2089 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2092 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2093 test $_altivec = auto
&& _altivec
=yes
2099 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2102 if test "$_altivec" = yes; then
2103 echores
"$proc altivec"
2109 echocheck
"GCC & CPU optimization abilities"
2111 if test -n "$proc"; then
2113 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2114 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2115 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2116 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2117 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2118 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2119 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2120 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2121 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2124 # gcc 3.1(.1) and up supports 7400 and 7450
2125 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2127 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2128 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2132 # gcc 3.2 and up supports 970
2133 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2135 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2136 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2140 # gcc 3.3 and up supports POWER4
2141 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2143 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2147 # gcc 3.4 and up supports 440*
2148 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2150 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2151 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2155 # gcc 4.0 and up supports POWER5
2156 if test "$_cc_major" -ge "4"; then
2158 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2164 if test -n "$_mcpu"; then
2165 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2166 echores
"$_optimizing"
2171 test $_fast_clz = "auto" && _fast_clz
=yes
2178 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2180 echocheck
"CPU type"
2183 unsigned long ver, mask;
2184 __asm__ ("implver %0" : "=r" (ver));
2185 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2186 printf("%ld-%x\n", ver, ~mask);
2190 $_cc -o "$TMPEXE" "$TMPC"
2191 case $
("$TMPEXE") in
2193 0-0) proc
="ev4"; _mvi
="0";;
2194 1-0) proc
="ev5"; _mvi
="0";;
2195 1-1) proc
="ev56"; _mvi
="0";;
2196 1-101) proc
="pca56"; _mvi
="1";;
2197 2-303) proc
="ev6"; _mvi
="1";;
2198 2-307) proc
="ev67"; _mvi
="1";;
2199 2-1307) proc
="ev68"; _mvi
="1";;
2203 echocheck
"GCC & CPU optimization abilities"
2204 if test "$proc" = "ev68" ; then
2205 cc_check
-mcpu=$proc || proc
=ev67
2207 if test "$proc" = "ev67" ; then
2208 cc_check
-mcpu=$proc || proc
=ev6
2213 test $_fast_clz = "auto" && _fast_clz
=yes
2223 echocheck
"CPU type"
2224 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2225 case "$(echo $proc)" in
2226 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2227 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2228 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2229 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2230 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2231 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2233 # gcc < 3.x does not support -mtune.
2234 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2240 test $_fast_clz = "auto" && _fast_clz
=yes
2274 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2275 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2276 die
"unsupported architecture $host_arch"
2278 esac # case "$host_arch" in
2280 if test "$_runtime_cpudetection" = yes ; then
2282 test "$_cmov" != no
&& _cmov
=yes
2284 test "$_mmx" != no
&& _mmx
=yes
2285 test "$_3dnow" != no
&& _3dnow
=yes
2286 test "$_3dnowext" != no
&& _3dnowext
=yes
2287 test "$_mmxext" != no
&& _mmxext
=yes
2288 test "$_sse" != no
&& _sse
=yes
2289 test "$_sse2" != no
&& _sse2
=yes
2290 test "$_ssse3" != no
&& _ssse3
=yes
2291 test "$_mtrr" != no
&& _mtrr
=yes
2300 echocheck
"byte order"
2301 if test "$_big_endian" = auto
; then
2303 short ascii_name[] = {
2304 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2305 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2306 int main(void) { return (long)ascii_name; }
2309 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2315 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2318 if test "$_big_endian" = yes ; then
2319 _byte_order
='big-endian'
2320 def_words_endian
='#define WORDS_BIGENDIAN 1'
2321 def_bigendian
='#define HAVE_BIGENDIAN 1'
2323 _byte_order
='little-endian'
2324 def_words_endian
='#undef WORDS_BIGENDIAN'
2325 def_bigendian
='#define HAVE_BIGENDIAN 0'
2327 echores
"$_byte_order"
2330 echocheck
"extern symbol prefix"
2334 cc_check
-c || die
"Symbol mangling check failed."
2335 sym
=$
($_nm -P -g $TMPEXE)
2336 extern_prefix
=${sym%%ff_extern*}
2337 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2338 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2339 echores
$extern_prefix
2342 echocheck
"assembler support of -pipe option"
2343 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2344 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2347 echocheck
"compiler support of named assembler arguments"
2349 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2350 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2351 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2353 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2355 echores
$_named_asm_args
2358 if darwin
&& test "$cc_vendor" = "gnu" ; then
2359 echocheck
"GCC support of -mstackrealign"
2360 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2361 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2362 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2363 # wrong code with this flag, but this can be worked around by adding
2364 # -fno-unit-at-a-time as described in the blog post at
2365 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2367 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2368 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2370 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2371 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time \
2372 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2373 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2374 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2377 # Checking for CFLAGS
2379 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2380 CFLAGS
="-O2 $_march $_mcpu $_pipe $_debug $_profile"
2381 WARNFLAGS
="-W -Wall"
2383 elif test -z "$CFLAGS" ; then
2384 if test "$cc_vendor" = "intel" ; then
2385 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2386 WARNFLAGS
="-wd167 -wd556 -wd144"
2387 elif test "$cc_vendor" = "sun" ; then
2388 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2389 elif test "$cc_vendor" = "clang"; then
2390 CFLAGS
="-O2 $_march $_pipe"
2391 elif test "$cc_vendor" != "gnu" ; then
2392 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2394 CFLAGS
="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2395 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2396 extra_ldflags
="$extra_ldflags -ffast-math"
2402 if test "$cc_vendor" = "gnu" ; then
2403 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2404 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2405 # that's the only variable specific to C now, and this option is not valid
2407 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2408 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2409 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2410 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2411 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2413 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2416 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2417 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2420 if test -n "$LDFLAGS" ; then
2421 extra_ldflags
="$extra_ldflags $LDFLAGS"
2423 elif test "$cc_vendor" = "intel" ; then
2424 extra_ldflags
="$extra_ldflags -i-static"
2426 if test -n "$CPPFLAGS" ; then
2427 extra_cflags
="$extra_cflags $CPPFLAGS"
2434 # Checking assembler (_as) compatibility...
2435 # Added workaround for older as that reads from stdin by default - atmos
2436 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2437 echocheck
"assembler ($_as $as_version)"
2439 _pref_as_version
='2.9.1'
2441 if test "$_mmx" = yes ; then
2442 echo 'emms' >> $TMPS
2444 if test "$_3dnow" = yes ; then
2445 _pref_as_version
='2.10.1'
2446 echo 'femms' >> $TMPS
2448 if test "$_3dnowext" = yes ; then
2449 _pref_as_version
='2.10.1'
2450 echo 'pswapd %mm0, %mm0' >> $TMPS
2452 if test "$_mmxext" = yes ; then
2453 _pref_as_version
='2.10.1'
2454 echo 'movntq %mm0, (%eax)' >> $TMPS
2456 if test "$_sse" = yes ; then
2457 _pref_as_version
='2.10.1'
2458 echo 'xorps %xmm0, %xmm0' >> $TMPS
2460 #if test "$_sse2" = yes ; then
2461 # _pref_as_version='2.11'
2462 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2464 if test "$_cmov" = yes ; then
2465 _pref_as_version
='2.10.1'
2466 echo 'cmovb %eax, %ebx' >> $TMPS
2468 if test "$_ssse3" = yes ; then
2469 _pref_as_version
='2.16.92'
2470 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2472 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2474 if test "$as_verc_fail" != yes ; then
2477 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2479 die
"obsolete binutils version"
2489 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2490 #error PIC not enabled
2495 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2501 echocheck
".align is a power of two"
2502 if test "$_asmalign_pot" = auto
; then
2504 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2506 if test "$_asmalign_pot" = "yes" ; then
2507 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2509 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2511 echores
$_asmalign_pot
2514 echocheck
"10 assembler operands"
2516 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2522 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2527 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2528 echores
$ten_operands
2530 echocheck
"ebx availability"
2532 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2539 // just adding ebx to clobber list seems unreliable with some
2540 // compilers, e.g. Haiku's gcc 2.95
2542 // and the above check does not work for OSX 64 bit...
2543 __asm__ volatile("":::"%ebx");
2547 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2548 echores
$ebx_available
2552 if test -z "$YASMFLAGS" ; then
2554 x86_64
&& objformat
="macho64" || objformat
="macho"
2560 # currently tested for Linux x86, x86_64
2561 YASMFLAGS
="-f $objformat"
2562 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2563 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2564 case "$objformat" in
2565 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2566 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2572 echo "pabsw xmm0, xmm0" > $TMPS
2573 yasm_check || _yasm
=""
2574 if test $_yasm ; then
2575 def_yasm
='#define HAVE_YASM 1'
2579 def_yasm
='#define HAVE_YASM 0'
2585 def_bswap
='#define HAVE_BSWAP 0'
2586 echo 'bswap %eax' > $TMPS
2587 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2592 #FIXME: This should happen before the check for CFLAGS..
2593 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2594 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2596 # check if AltiVec is supported by the compiler, and how to enable it
2597 echocheck
"GCC AltiVec flags"
2598 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2599 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2600 # check if <altivec.h> should be included
2601 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2602 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2603 inc_altivec_h
='#include <altivec.h>'
2605 if $
(cflag_check
-faltivec) ; then
2606 _altivec_gcc_flags
="-faltivec"
2609 _altivec_gcc_flags
="none, AltiVec disabled"
2613 echores
"$_altivec_gcc_flags"
2615 # check if the compiler supports braces for vector declarations
2618 int main(void) { (vector int) {1}; return 0; }
2620 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2622 # Disable runtime cpudetection if we cannot generate AltiVec code or
2623 # AltiVec is disabled by the user.
2624 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2625 && _runtime_cpudetection
=no
2627 # Show that we are optimizing for AltiVec (if enabled and supported).
2628 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2629 && _optimizing
="$_optimizing altivec"
2631 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2632 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2636 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2638 echocheck
"XFORM ASM support"
2639 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2640 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2641 echores
"$xform_asm"
2645 echocheck
"ARM pld instruction"
2647 inline_asm_check
'"pld [r0]"' && pld
=yes
2650 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2651 if test $_armv5te = "auto" ; then
2653 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2657 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2659 echocheck
"ARMv6 (SIMD instructions)"
2660 if test $_armv6 = "auto" ; then
2662 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2666 echocheck
"ARMv6t2 (SIMD instructions)"
2667 if test $_armv6t2 = "auto" ; then
2669 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2674 if test $_armvfp = "auto" ; then
2676 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2680 echocheck
"ARM NEON"
2681 if test $neon = "auto" ; then
2683 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2687 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2688 if test $_iwmmxt = "auto" ; then
2690 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2695 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'
2696 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2697 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2698 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2699 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2700 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2701 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2702 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2703 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2704 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2705 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2706 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2707 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2708 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2709 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2710 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2711 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2712 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2713 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2714 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2715 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2717 # Checking kernel version...
2718 if x86_32
&& linux
; then
2720 kernel_version
=$
(uname
-r 2>&1)
2721 echocheck
"$system_name kernel version"
2722 case "$kernel_version" in
2723 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2724 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2725 _k_verc_problem
=yes;;
2727 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2730 if test "$_k_verc_fail" ; then
2731 echores
"$kernel_version, fail"
2732 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2733 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2734 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2735 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2736 echo "2.2.x you must upgrade it to get SSE support!"
2737 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2739 echores
"$kernel_version, ok"
2743 ######################
2744 # MAIN TESTS GO HERE #
2745 ######################
2749 if cflag_check
-lposix ; then
2750 extra_ldflags
="$extra_ldflags -lposix"
2757 if cflag_check
-lm ; then
2766 echocheck
"langinfo"
2767 if test "$_langinfo" = auto
; then
2769 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2771 if test "$_langinfo" = yes ; then
2772 def_langinfo
='#define HAVE_LANGINFO 1'
2774 def_langinfo
='#undef HAVE_LANGINFO'
2776 echores
"$_langinfo"
2779 echocheck
"translation support"
2780 if test "$_translation" = yes; then
2781 def_translation
="#define CONFIG_TRANSLATION 1"
2783 def_translation
="#undef CONFIG_TRANSLATION"
2785 echores
"$_translation"
2787 echocheck
"language"
2788 # Set preferred languages, "all" uses English as main language.
2789 test -z "$language" && language
=$LINGUAS
2790 test -z "$language_doc" && language_doc
=$language
2791 test -z "$language_man" && language_man
=$language
2792 test -z "$language_msg" && language_msg
="all"
2793 language_doc
=$
(echo $language_doc |
tr , " ")
2794 language_man
=$
(echo $language_man |
tr , " ")
2795 language_msg
=$
(echo $language_msg |
tr , " ")
2797 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2798 test "$language_man" = "all" && language_man
=$man_lang_all
2799 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2801 if test "$_translation" != yes ; then
2805 # Prune non-existing translations from language lists.
2806 # Set message translation to the first available language.
2807 # Fall back on English.
2808 for lang
in $language_doc ; do
2809 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2811 language_doc
=$tmp_language_doc
2812 test -z "$language_doc" && language_doc
=en
2814 for lang
in $language_man ; do
2815 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2817 language_man
=$tmp_language_man
2818 test -z "$language_man" && language_man
=en
2820 for lang
in $language_msg ; do
2821 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2823 language_msg
=$tmp_language_msg
2825 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2828 echocheck
"enable sighandler"
2829 if test "$_sighandler" = yes ; then
2830 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2832 def_sighandler
='#undef CONFIG_SIGHANDLER'
2834 echores
"$_sighandler"
2836 echocheck
"runtime cpudetection"
2837 if test "$_runtime_cpudetection" = yes ; then
2838 _optimizing
="Runtime CPU-Detection enabled"
2839 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2841 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2843 echores
"$_runtime_cpudetection"
2846 echocheck
"restrict keyword"
2847 for restrict_keyword
in restrict __restrict __restrict__
; do
2848 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2850 def_restrict_keyword
=$restrict_keyword
2854 if [ -n "$def_restrict_keyword" ]; then
2855 echores
"$def_restrict_keyword"
2859 # Avoid infinite recursion loop ("#define restrict restrict")
2860 if [ "$def_restrict_keyword" != "restrict" ]; then
2861 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2863 def_restrict_keyword
=""
2867 echocheck
"__builtin_expect"
2868 # GCC branch prediction hint
2870 static int foo(int a) {
2871 a = __builtin_expect(a, 10);
2872 return a == 10 ? 0 : 1;
2874 int main(void) { return foo(10) && foo(0); }
2877 cc_check
&& _builtin_expect
=yes
2878 if test "$_builtin_expect" = yes ; then
2879 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2881 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2883 echores
"$_builtin_expect"
2888 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2889 if test "$_kstat" = yes ; then
2890 def_kstat
="#define HAVE_LIBKSTAT 1"
2891 extra_ldflags
="$extra_ldflags -lkstat"
2893 def_kstat
="#undef HAVE_LIBKSTAT"
2899 # required for nanosleep on some systems
2901 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2902 if test "$_posix4" = yes ; then
2903 extra_ldflags
="$extra_ldflags -lposix4"
2907 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2910 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2911 if eval test "x\$_$func" = "xyes"; then
2912 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2915 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2923 #define _XOPEN_SOURCE 500
2925 int main(void) { mkstemp(""); return 0; }
2928 cc_check
&& _mkstemp
=yes
2929 if test "$_mkstemp" = yes ; then
2930 def_mkstemp
='#define HAVE_MKSTEMP 1'
2932 def_mkstemp
='#define HAVE_MKSTEMP 0'
2937 echocheck
"nanosleep"
2939 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2940 if test "$_nanosleep" = yes ; then
2941 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2943 def_nanosleep
='#undef HAVE_NANOSLEEP'
2945 echores
"$_nanosleep"
2949 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2950 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2953 #include <sys/socket.h>
2954 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2957 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2958 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2960 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2961 if test $_winsock2_h = auto
; then
2963 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2965 test "$_ld_sock" && res_comment
="using $_ld_sock"
2969 if test $_winsock2_h = yes ; then
2971 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2973 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2977 echocheck
"arpa/inet.h"
2979 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2980 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2981 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2982 echores
"$arpa_inet_h"
2985 echocheck
"inet_pton()"
2986 def_inet_pton
='#define HAVE_INET_PTON 0'
2988 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2989 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
2991 if test $inet_pton = yes ; then
2992 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2993 def_inet_pton
='#define HAVE_INET_PTON 1'
2995 echores
"$inet_pton"
2998 echocheck
"inet_aton()"
2999 def_inet_aton
='#define HAVE_INET_ATON 0'
3001 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3002 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
3004 if test $inet_aton = yes ; then
3005 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3006 def_inet_aton
='#define HAVE_INET_ATON 1'
3008 echores
"$inet_aton"
3011 echocheck
"socklen_t"
3013 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3014 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
3016 if test "$_socklen_t" = yes ; then
3017 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3019 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3021 echores
"$_socklen_t"
3024 echocheck
"closesocket()"
3026 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
3027 if test "$_closesocket" = yes ; then
3028 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3030 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3032 echores
"$_closesocket"
3035 echocheck
"networking"
3036 test $_winsock2_h = no
&& test $inet_pton = no
&&
3037 test $inet_aton = no
&& networking
=no
3038 if test "$networking" = yes ; then
3039 def_network
='#define CONFIG_NETWORK 1'
3040 def_networking
='#define CONFIG_NETWORKING 1'
3041 extra_ldflags
="$extra_ldflags $_ld_sock"
3042 inputmodules
="networking $inputmodules"
3044 noinputmodules
="networking $noinputmodules"
3045 def_network
='#define CONFIG_NETWORK 0'
3046 def_networking
='#undef CONFIG_NETWORKING'
3048 echores
"$networking"
3052 if test "$_inet6" = auto
; then
3054 #include <sys/types.h>
3055 #if !defined(_WIN32) || defined(__CYGWIN__)
3056 #include <sys/socket.h>
3057 #include <netinet/in.h>
3059 #include <ws2tcpip.h>
3061 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3064 if cc_check
$_ld_sock ; then
3068 if test "$_inet6" = yes ; then
3069 def_inet6
='#define HAVE_AF_INET6 1'
3071 def_inet6
='#undef HAVE_AF_INET6'
3076 echocheck
"gethostbyname2"
3077 if test "$_gethostbyname2" = auto
; then
3079 #include <sys/types.h>
3080 #include <sys/socket.h>
3082 int main(void) { gethostbyname2("", AF_INET); return 0; }
3089 if test "$_gethostbyname2" = yes ; then
3090 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3092 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3094 echores
"$_gethostbyname2"
3097 echocheck
"inttypes.h (required)"
3099 header_check inttypes.h
&& _inttypes
=yes
3100 echores
"$_inttypes"
3102 if test "$_inttypes" = no
; then
3103 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3104 header_check sys
/bitypes.h
&& _inttypes
=yes
3105 if test "$_inttypes" = yes ; then
3106 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."
3108 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3113 echocheck
"int_fastXY_t in inttypes.h"
3115 #include <inttypes.h>
3116 int main(void) { volatile int_fast16_t v = 0; return v; }
3119 cc_check
&& _fast_inttypes
=yes
3120 if test "$_fast_inttypes" = no
; then
3122 typedef signed char int_fast8_t;
3123 typedef signed int int_fast16_t;
3124 typedef signed int int_fast32_t;
3125 typedef signed long long int_fast64_t;
3126 typedef unsigned char uint_fast8_t;
3127 typedef unsigned int uint_fast16_t;
3128 typedef unsigned int uint_fast32_t;
3129 typedef unsigned long long uint_fast64_t;'
3131 echores
"$_fast_inttypes"
3134 echocheck
"malloc.h"
3136 header_check malloc.h
&& _malloc
=yes
3137 if test "$_malloc" = yes ; then
3138 def_malloc_h
='#define HAVE_MALLOC_H 1'
3140 def_malloc_h
='#define HAVE_MALLOC_H 0'
3145 echocheck
"memalign()"
3146 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3147 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3149 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3150 if test "$_memalign" = yes ; then
3151 def_memalign
='#define HAVE_MEMALIGN 1'
3153 def_memalign
='#define HAVE_MEMALIGN 0'
3154 def_map_memalign
='#define memalign(a, b) malloc(b)'
3155 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3157 echores
"$_memalign"
3160 echocheck
"posix_memalign()"
3162 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3164 #define _XOPEN_SOURCE 600
3166 int main(void) { posix_memalign(NULL, 0, 0); }
3168 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3169 echores
"$posix_memalign"
3172 echocheck
"alloca.h"
3174 statement_check alloca.h
'alloca(0)' && _alloca
=yes
3176 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3178 def_alloca_h
='#undef HAVE_ALLOCA_H'
3183 echocheck
"fastmemcpy"
3184 if test "$_fastmemcpy" = yes ; then
3185 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3187 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3189 echores
"$_fastmemcpy"
3194 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
3195 if test "$_mman" = yes ; then
3196 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3198 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3199 os2
&& _need_mmap
=yes
3203 _mman_has_map_failed
=no
3204 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
3205 if test "$_mman_has_map_failed" = yes ; then
3206 def_mman_has_map_failed
=''
3208 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3211 echocheck
"dynamic loader"
3213 for _ld_tmp
in "" "-ldl"; do
3214 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3216 if test "$_dl" = yes ; then
3217 def_dl
='#define HAVE_LIBDL 1'
3219 def_dl
='#undef HAVE_LIBDL'
3224 echocheck
"dynamic a/v plugins support"
3225 if test "$_dl" = no
; then
3228 if test "$_dynamic_plugins" = yes ; then
3229 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3231 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3233 echores
"$_dynamic_plugins"
3236 def_threads
='#define HAVE_THREADS 0'
3240 THREAD_CFLAGS
=-D_REENTRANT
3241 elif freebsd || netbsd || openbsd || bsdos
; then
3242 THREAD_CFLAGS
=-D_THREAD_SAFE
3244 if test "$_pthreads" = auto
; then
3246 #include <pthread.h>
3247 static void *func(void *arg) { return arg; }
3248 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3252 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3253 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3254 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3258 if test "$_pthreads" = yes ; then
3259 test $_ld_pthread && res_comment
="using $_ld_pthread"
3260 def_pthreads
='#define HAVE_PTHREADS 1'
3261 def_threads
='#define HAVE_THREADS 1'
3262 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3264 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3265 def_pthreads
='#undef HAVE_PTHREADS'
3266 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3267 mingw32 || _win32dll
=no
3269 echores
"$_pthreads"
3272 if test "$_pthreads" = yes ; then
3273 def_pthread_cache
="#define PTHREAD_CACHE 1"
3276 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3280 echocheck
"w32threads"
3281 if test "$_pthreads" = yes ; then
3282 res_comment
="using pthread instead"
3285 if test "$_w32threads" = auto
; then
3287 mingw32
&& _w32threads
=yes
3289 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3290 echores
"$_w32threads"
3293 if test "$_rpath" = yes ; then
3294 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3295 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3302 if test "$_iconv" = auto
; then
3307 #define INBUFSIZE 1024
3308 #define OUTBUFSIZE 4096
3310 char inbuffer[INBUFSIZE];
3311 char outbuffer[OUTBUFSIZE];
3316 char *tocode="UTF-8";
3317 char *fromcode="cp1250";
3318 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3319 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3320 char *iptr=inbuffer;
3321 char *optr=outbuffer;
3322 size_t inleft=numread;
3323 size_t outleft=OUTBUFSIZE;
3324 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3326 write(1, outbuffer, OUTBUFSIZE - outleft);
3329 if (iconv_close(icdsc) == -1)
3336 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3337 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3341 if test "$_iconv" = yes ; then
3342 def_iconv
='#define CONFIG_ICONV 1'
3344 def_iconv
='#undef CONFIG_ICONV'
3349 echocheck
"soundcard.h"
3351 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3352 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3353 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3354 header_check
$_soundcard_header && _soundcard_h
=yes &&
3355 res_comment
="$_soundcard_header" && break
3358 if test "$_soundcard_h" = yes ; then
3359 if test $_soundcard_header = "sys/soundcard.h"; then
3360 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3362 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3365 echores
"$_soundcard_h"
3368 echocheck
"sys/dvdio.h"
3370 # FreeBSD 8.1 has broken dvdio.h
3371 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3372 if test "$_dvdio" = yes ; then
3373 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3375 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3380 echocheck
"sys/cdio.h"
3382 # at least OpenSolaris has a broken cdio.h
3383 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3384 if test "$_cdio" = yes ; then
3385 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3387 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3392 echocheck
"linux/cdrom.h"
3394 header_check linux
/cdrom.h
&& _cdrom
=yes
3395 if test "$_cdrom" = yes ; then
3396 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3398 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3405 header_check dvd.h
&& _dvd
=yes
3406 if test "$_dvd" = yes ; then
3407 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3409 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3415 echocheck
"BSDI dvd.h"
3417 header_check dvd.h
&& _bsdi_dvd
=yes
3418 if test "$_bsdi_dvd" = yes ; then
3419 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3421 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3423 echores
"$_bsdi_dvd"
3428 # also used by AIX, but AIX does not support VCD and/or libdvdread
3429 echocheck
"HP-UX SCSI header"
3431 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3432 if test "$_hpux_scsi_h" = yes ; then
3433 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3435 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3437 echores
"$_hpux_scsi_h"
3442 echocheck
"userspace SCSI headers (Solaris)"
3444 header_check sys
/scsi
/scsi_types.h
&&
3445 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3447 if test "$_sol_scsi_h" = yes ; then
3448 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3450 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3452 echores
"$_sol_scsi_h"
3457 if test "$_termcap" = auto
; then
3459 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3460 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3461 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3464 if test "$_termcap" = yes ; then
3465 def_termcap
='#define HAVE_TERMCAP 1'
3466 test $_ld_tmp && res_comment
="using $_ld_tmp"
3468 def_termcap
='#undef HAVE_TERMCAP'
3474 def_termios
='#undef HAVE_TERMIOS'
3475 def_termios_h
='#undef HAVE_TERMIOS_H'
3476 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3477 if test "$_termios" = auto
; then
3479 for _termios_header
in "termios.h" "sys/termios.h"; do
3480 header_check
$_termios_header && _termios
=yes &&
3481 res_comment
="using $_termios_header" && break
3485 if test "$_termios" = yes ; then
3486 def_termios
='#define HAVE_TERMIOS 1'
3487 if test "$_termios_header" = "termios.h" ; then
3488 def_termios_h
='#define HAVE_TERMIOS_H 1'
3490 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3497 if test "$_shm" = auto
; then
3499 #include <sys/shm.h>
3500 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3503 cc_check
&& _shm
=yes
3505 if test "$_shm" = yes ; then
3506 def_shm
='#define HAVE_SHM 1'
3508 def_shm
='#undef HAVE_SHM'
3513 echocheck
"strsep()"
3516 int main(void) { char *s = "Hello, world!"; strsep(&s, ","); return 0; }
3519 cc_check
&& _strsep
=yes
3520 if test "$_strsep" = yes ; then
3521 def_strsep
='#define HAVE_STRSEP 1'
3524 def_strsep
='#undef HAVE_STRSEP'
3530 echocheck
"vsscanf()"
3532 #define _ISOC99_SOURCE
3535 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3538 cc_check
&& _vsscanf
=yes
3539 if test "$_vsscanf" = yes ; then
3540 def_vsscanf
='#define HAVE_VSSCANF 1'
3543 def_vsscanf
='#undef HAVE_VSSCANF'
3551 #define _XOPEN_SOURCE 600
3553 int main(void) { int a, b; swab(&a, &b, 0); return 0; }
3556 cc_check
&& _swab
=yes
3557 if test "$_swab" = yes ; then
3558 def_swab
='#define HAVE_SWAB 1'
3561 def_swab
='#undef HAVE_SWAB'
3566 echocheck
"POSIX select()"
3570 #include <sys/types.h>
3572 #include <sys/time.h>
3574 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3577 def_posix_select
='#undef HAVE_POSIX_SELECT'
3578 #select() of kLIBC (OS/2) supports socket only
3579 ! os2
&& cc_check
&& _posix_select
=yes \
3580 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3581 echores
"$_posix_select"
3584 echocheck
"audio select()"
3585 if test "$_select" = no
; then
3586 def_select
='#undef HAVE_AUDIO_SELECT'
3587 elif test "$_select" = yes ; then
3588 def_select
='#define HAVE_AUDIO_SELECT 1'
3593 echocheck
"gettimeofday()"
3595 #include <sys/time.h>
3596 int main(void) {struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return 0; }
3599 cc_check
&& _gettimeofday
=yes
3600 if test "$_gettimeofday" = yes ; then
3601 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3602 _need_gettimeofday
=no
3604 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3605 _need_gettimeofday
=yes
3607 echores
"$_gettimeofday"
3612 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3613 if test "$_glob" = yes ; then
3614 def_glob
='#define HAVE_GLOB 1'
3617 def_glob
='#undef HAVE_GLOB'
3623 echocheck
"setenv()"
3625 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3626 if test "$_setenv" = yes ; then
3627 def_setenv
='#define HAVE_SETENV 1'
3630 def_setenv
='#undef HAVE_SETENV'
3636 echocheck
"setmode()"
3638 def_setmode
='#define HAVE_SETMODE 0'
3639 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3644 echocheck
"sysi86()"
3646 statement_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3647 if test "$_sysi86" = yes ; then
3648 def_sysi86
='#define HAVE_SYSI86 1'
3650 #include <sys/sysi86.h>
3651 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3653 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3655 def_sysi86
='#undef HAVE_SYSI86'
3661 echocheck
"sys/sysinfo.h"
3663 #include <sys/sysinfo.h>
3664 int main(void) { struct sysinfo s_info; sysinfo(&s_info); return 0; }
3667 cc_check
&& _sys_sysinfo
=yes
3668 if test "$_sys_sysinfo" = yes ; then
3669 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3671 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3673 echores
"$_sys_sysinfo"
3678 echocheck
"Mac OS X Finder Support"
3679 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3680 if test "$_macosx_finder" = yes ; then
3681 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3682 extra_ldflags
="$extra_ldflags -framework Carbon"
3684 echores
"$_macosx_finder"
3686 echocheck
"Mac OS X Bundle file locations"
3687 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3688 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3689 if test "$_macosx_bundle" = yes ; then
3690 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3691 extra_ldflags
="$extra_ldflags -framework Carbon"
3693 echores
"$_macosx_bundle"
3695 echocheck
"Apple Remote"
3696 if test "$_apple_remote" = auto
; then
3700 #include <IOKit/IOCFPlugIn.h>
3702 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3703 CFMutableDictionaryRef hidMatchDictionary;
3704 IOReturn ioReturnValue;
3706 // Set up a matching dictionary to search the I/O Registry by class.
3707 // name for all HID class devices
3708 hidMatchDictionary = IOServiceMatching("AppleIRController");
3710 // Now search I/O Registry for matching devices.
3711 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3712 hidMatchDictionary, &hidObjectIterator);
3714 // If search is unsuccessful, return nonzero.
3715 if (ioReturnValue != kIOReturnSuccess ||
3716 !IOIteratorIsValid(hidObjectIterator)) {
3722 cc_check
-framework IOKit
&& _apple_remote
=yes
3724 if test "$_apple_remote" = yes ; then
3725 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3726 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3728 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3730 echores
"$_apple_remote"
3736 echocheck
"Apple IR"
3737 if test "$_apple_ir" = auto
; then
3740 #include <linux/input.h>
3741 int main(void) { struct input_event ev; struct input_id id; return 0; }
3743 cc_check
&& _apple_ir
=yes
3745 if test "$_apple_ir" = yes ; then
3746 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3748 def_apple_ir
='#undef CONFIG_APPLE_IR'
3750 echores
"$_apple_ir"
3753 echocheck
"pkg-config"
3754 _pkg_config
=pkg-config
3755 if $
($_pkg_config --version > /dev
/null
2>&1); then
3756 if test "$_ld_static"; then
3757 _pkg_config
="$_pkg_config --static"
3766 echocheck
"Samba support (libsmbclient)"
3767 if test "$_smb" = yes; then
3768 extra_ldflags
="$extra_ldflags -lsmbclient"
3770 if test "$_smb" = auto
; then
3772 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3773 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3774 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3778 if test "$_smb" = yes; then
3779 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3780 inputmodules
="smb $inputmodules"
3782 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3783 noinputmodules
="smb $noinputmodules"
3794 if test "$_tdfxfb" = yes ; then
3795 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3796 vomodules
="tdfxfb $vomodules"
3798 def_tdfxfb
='#undef CONFIG_TDFXFB'
3799 novomodules
="tdfxfb $novomodules"
3804 if test "$_s3fb" = yes ; then
3805 def_s3fb
='#define CONFIG_S3FB 1'
3806 vomodules
="s3fb $vomodules"
3808 def_s3fb
='#undef CONFIG_S3FB'
3809 novomodules
="s3fb $novomodules"
3814 if test "$_wii" = yes ; then
3815 def_wii
='#define CONFIG_WII 1'
3816 vomodules
="wii $vomodules"
3818 def_wii
='#undef CONFIG_WII'
3819 novomodules
="wii $novomodules"
3824 if test "$_tdfxvid" = yes ; then
3825 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3826 vomodules
="tdfx_vid $vomodules"
3828 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3829 novomodules
="tdfx_vid $novomodules"
3834 if test "$_xvr100" = auto
; then
3837 #include <sys/fbio.h>
3838 #include <sys/visual_io.h>
3840 struct vis_identifier ident;
3841 struct fbgattr attr;
3842 ioctl(0, VIS_GETIDENTIFIER, &ident);
3843 ioctl(0, FBIOGATTR, &attr);
3848 cc_check
&& _xvr100
=yes
3850 if test "$_xvr100" = yes ; then
3851 def_xvr100
='#define CONFIG_XVR100 1'
3852 vomodules
="xvr100 $vomodules"
3854 def_tdfxvid
='#undef CONFIG_XVR100'
3855 novomodules
="xvr100 $novomodules"
3860 if test "$_tga" = yes ; then
3861 def_tga
='#define CONFIG_TGA 1'
3862 vomodules
="tga $vomodules"
3864 def_tga
='#undef CONFIG_TGA'
3865 novomodules
="tga $novomodules"
3870 echocheck
"md5sum support"
3871 if test "$_md5sum" = yes; then
3872 def_md5sum
="#define CONFIG_MD5SUM 1"
3873 vomodules
="md5sum $vomodules"
3875 def_md5sum
="#undef CONFIG_MD5SUM"
3876 novomodules
="md5sum $novomodules"
3881 echocheck
"yuv4mpeg support"
3882 if test "$_yuv4mpeg" = yes; then
3883 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3884 vomodules
="yuv4mpeg $vomodules"
3886 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3887 novomodules
="yuv4mpeg $novomodules"
3889 echores
"$_yuv4mpeg"
3893 if test "$_bl" = yes ; then
3894 def_bl
='#define CONFIG_BL 1'
3895 vomodules
="bl $vomodules"
3897 def_bl
='#undef CONFIG_BL'
3898 novomodules
="bl $novomodules"
3903 echocheck
"DirectFB"
3904 if test "$_directfb" = auto
; then
3907 #include <directfb.h>
3908 #include <directfb_version.h>
3909 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3910 #error "DirectFB version too old."
3912 int main(void) { DirectFBInit(0, 0); return 0; }
3914 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3915 cc_check
$_inc_tmp -ldirectfb &&
3916 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3919 if test "$_directfb" = yes ; then
3920 def_directfb
='#define CONFIG_DIRECTFB 1'
3921 vomodules
="directfb dfbmga $vomodules"
3922 libs_mplayer
="$libs_mplayer -ldirectfb"
3924 def_directfb
='#undef CONFIG_DIRECTFB'
3925 novomodules
="directfb dfbmga $novomodules"
3927 echores
"$_directfb"
3930 echocheck
"X11 headers presence"
3932 res_comment
="check if the dev(el) packages are installed"
3933 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3934 if test -f "$I/X11/Xlib.h" ; then
3940 if test $_cross_compile = no
; then
3941 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3942 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3943 if test -f "$I/X11/Xlib.h" ; then
3944 extra_cflags
="$extra_cflags -I$I"
3946 res_comment
="using $I"
3951 echores
"$_x11_headers"
3955 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3956 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3957 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3960 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3962 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3964 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3965 libs_mplayer
="$libs_mplayer $_ld_tmp" && _x11
=yes && break
3968 if test "$_x11" = yes ; then
3969 def_x11
='#define CONFIG_X11 1'
3970 vomodules
="x11 xover $vomodules"
3973 def_x11
='#undef CONFIG_X11'
3974 novomodules
="x11 $novomodules"
3975 res_comment
="check if the dev(el) packages are installed"
3976 # disable stuff that depends on X
3977 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
3981 echocheck
"Xss screensaver extensions"
3982 if test "$_xss" = auto
; then
3984 #include <X11/Xlib.h>
3985 #include <X11/extensions/scrnsaver.h>
3986 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
3989 cc_check
-lXss && _xss
=yes
3991 if test "$_xss" = yes ; then
3992 def_xss
='#define CONFIG_XSS 1'
3993 libs_mplayer
="$libs_mplayer -lXss"
3995 def_xss
='#undef CONFIG_XSS'
4002 if test "$_x11" = yes ; then
4004 #include <X11/Xmd.h>
4005 #include <X11/Xlib.h>
4006 #include <X11/Xutil.h>
4007 #include <X11/Xatom.h>
4008 #include <X11/extensions/dpms.h>
4009 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
4011 cc_check
-lXdpms && _xdpms3
=yes
4012 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
4014 if test "$_xdpms4" = yes ; then
4015 def_xdpms
='#define CONFIG_XDPMS 1'
4016 res_comment
="using Xdpms 4"
4018 elif test "$_xdpms3" = yes ; then
4019 def_xdpms
='#define CONFIG_XDPMS 1'
4020 libs_mplayer
="$libs_mplayer -lXdpms"
4021 res_comment
="using Xdpms 3"
4024 def_xdpms
='#undef CONFIG_XDPMS'
4030 if test "$_xv" = auto
; then
4032 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
4035 if test "$_xv" = yes ; then
4036 def_xv
='#define CONFIG_XV 1'
4037 libs_mplayer
="$libs_mplayer -lXv"
4038 vomodules
="xv $vomodules"
4040 def_xv
='#undef CONFIG_XV'
4041 novomodules
="xv $novomodules"
4047 if test "$_xv" = yes && test "$_xvmc" != no
; then
4050 #include <X11/Xlib.h>
4051 #include <X11/extensions/Xvlib.h>
4052 #include <X11/extensions/XvMClib.h>
4054 XvMCQueryExtension(0, 0, 0);
4055 XvMCCreateContext(0, 0, 0, 0, 0, 0, 0);
4058 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4059 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4062 if test "$_xvmc" = yes ; then
4063 def_xvmc
='#define CONFIG_XVMC 1'
4064 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4065 vomodules
="xvmc $vomodules"
4066 res_comment
="using $_xvmclib"
4068 def_xvmc
='#define CONFIG_XVMC 0'
4069 novomodules
="xvmc $novomodules"
4075 if test "$_vdpau" = auto
; then
4077 if test "$_dl" = yes ; then
4079 #include <vdpau/vdpau_x11.h>
4081 vdp_device_create_x11(0, 0, 0, 0);
4082 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4084 cc_check
-lvdpau && _vdpau
=yes
4087 if test "$_vdpau" = yes ; then
4088 def_vdpau
='#define CONFIG_VDPAU 1'
4089 libs_mplayer
="$libs_mplayer -lvdpau"
4090 vomodules
="vdpau $vomodules"
4092 def_vdpau
='#define CONFIG_VDPAU 0'
4093 novomodules
="vdpau $novomodules"
4098 echocheck
"Xinerama"
4099 if test "$_xinerama" = auto
; then
4101 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
4104 if test "$_xinerama" = yes ; then
4105 def_xinerama
='#define CONFIG_XINERAMA 1'
4106 libs_mplayer
="$libs_mplayer -lXinerama"
4108 def_xinerama
='#undef CONFIG_XINERAMA'
4110 echores
"$_xinerama"
4113 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4114 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4115 # named 'X extensions' or something similar.
4116 # This check may be useful for future mplayer versions (to change resolution)
4117 # If you run into problems, remove '-lXxf86vm'.
4119 if test "$_vm" = auto
; then
4121 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
4123 if test "$_vm" = yes ; then
4124 def_vm
='#define CONFIG_XF86VM 1'
4125 libs_mplayer
="$libs_mplayer -lXxf86vm"
4127 def_vm
='#undef CONFIG_XF86VM'
4131 # Check for the presence of special keycodes, like audio control buttons
4132 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4133 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4134 # have these new keycodes.
4135 echocheck
"XF86keysym"
4136 if test "$_xf86keysym" = auto
; then
4139 #include <X11/XF86keysym.h>
4140 int main(void) { return XF86XK_AudioPause; }
4142 cc_check
&& _xf86keysym
=yes
4144 if test "$_xf86keysym" = yes ; then
4145 def_xf86keysym
='#define CONFIG_XF86XK 1'
4147 def_xf86keysym
='#undef CONFIG_XF86XK'
4149 echores
"$_xf86keysym"
4152 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4154 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2
=yes
4156 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4158 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XF86DGASetViewPort(0, 0, 0, 0)' -lXxf86dga -lXxf86vm && _dga1
=yes
4162 def_dga
='#undef CONFIG_DGA'
4163 def_dga1
='#undef CONFIG_DGA1'
4164 def_dga2
='#undef CONFIG_DGA2'
4165 if test "$_dga1" = yes ; then
4167 def_dga1
='#define CONFIG_DGA1 1'
4168 res_comment
="using DGA 1.0"
4169 elif test "$_dga2" = yes ; then
4171 def_dga2
='#define CONFIG_DGA2 1'
4172 res_comment
="using DGA 2.0"
4174 if test "$_dga" = yes ; then
4175 def_dga
='#define CONFIG_DGA 1'
4176 libs_mplayer
="$libs_mplayer -lXxf86dga"
4177 vomodules
="dga $vomodules"
4179 novomodules
="dga $novomodules"
4185 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4186 def_3dfx
='#define CONFIG_3DFX 1'
4187 vomodules
="3dfx $vomodules"
4189 def_3dfx
='#undef CONFIG_3DFX'
4190 novomodules
="3dfx $novomodules"
4196 def_vidix
='#undef CONFIG_VIDIX'
4197 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4198 _vidix_drv_cyberblade
=no
4199 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4201 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4202 _vidix_drv_mach64
=no
4203 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4205 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4206 _vidix_drv_mga_crtc2
=no
4207 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4208 _vidix_drv_nvidia
=no
4209 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4211 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4213 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4214 _vidix_drv_radeon
=no
4215 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4216 _vidix_drv_rage128
=no
4217 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4219 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4220 _vidix_drv_sh_veu
=no
4221 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4223 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4224 _vidix_drv_unichrome
=no
4225 if test "$_vidix" = auto
; then
4227 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4229 x86_64
&& ! linux
&& _vidix
=no
4230 (ppc || alpha
) && linux
&& _vidix
=yes
4234 if test "$_vidix" = yes ; then
4235 def_vidix
='#define CONFIG_VIDIX 1'
4236 vomodules
="cvidix $vomodules"
4237 # FIXME: ivtv driver temporarily disabled until we have a proper test
4238 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4239 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4241 # some vidix drivers are architecture and os specific, discard them elsewhere
4242 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4243 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4245 for driver
in $_vidix_drivers ; do
4246 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4247 eval _vidix_drv_
${driver}=yes
4248 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4251 echocheck
"VIDIX PCI device name database"
4252 echores
"$_vidix_pcidb"
4253 if test "$_vidix_pcidb" = yes ; then
4259 echocheck
"VIDIX dhahelper support"
4260 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4261 echores
"$_dhahelper"
4263 echocheck
"VIDIX svgalib_helper support"
4264 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4265 echores
"$_svgalib_helper"
4268 novomodules
="cvidix $novomodules"
4271 if test "$_vidix" = yes && win32
; then
4273 vomodules
="winvidix $vomodules"
4274 libs_mplayer
="$libs_mplayer -lgdi32"
4276 novomodules
="winvidix $novomodules"
4278 if test "$_vidix" = yes && test "$_x11" = yes; then
4280 vomodules
="xvidix $vomodules"
4282 novomodules
="xvidix $novomodules"
4286 if test "$_ggi" = auto
; then
4288 statement_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4290 if test "$_ggi" = yes ; then
4291 def_ggi
='#define CONFIG_GGI 1'
4292 libs_mplayer
="$libs_mplayer -lggi"
4293 vomodules
="ggi $vomodules"
4295 def_ggi
='#undef CONFIG_GGI'
4296 novomodules
="ggi $novomodules"
4300 echocheck
"GGI extension: libggiwmh"
4301 if test "$_ggiwmh" = auto
; then
4303 statement_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4305 # needed to get right output on obscure combination
4306 # like --disable-ggi --enable-ggiwmh
4307 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4308 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4309 libs_mplayer
="$libs_mplayer -lggiwmh"
4312 def_ggiwmh
='#undef CONFIG_GGIWMH'
4318 if test "$_aa" = auto
; then
4325 c = aa_autoinit(&aa_defparams);
4326 p = aa_getrenderparams();
4327 aa_autoinitkbd(c, 0);
4331 for _ld_tmp
in "-laa" ; do
4332 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4335 if test "$_aa" = yes ; then
4336 def_aa
='#define CONFIG_AA 1'
4338 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4340 vomodules
="aa $vomodules"
4342 def_aa
='#undef CONFIG_AA'
4343 novomodules
="aa $novomodules"
4349 if test "$_caca" = auto
; then
4351 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4354 #ifdef CACA_API_VERSION_1
4357 int main(void) { caca_init(); return 0; }
4359 cc_check $
(caca-config
--libs) && _caca
=yes
4362 if test "$_caca" = yes ; then
4363 def_caca
='#define CONFIG_CACA 1'
4364 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4365 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4366 vomodules
="caca $vomodules"
4368 def_caca
='#undef CONFIG_CACA'
4369 novomodules
="caca $novomodules"
4375 if test "$_svga" = auto
; then
4377 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4379 if test "$_svga" = yes ; then
4380 def_svga
='#define CONFIG_SVGALIB 1'
4381 libs_mplayer
="$libs_mplayer -lvga"
4382 vomodules
="svga $vomodules"
4384 def_svga
='#undef CONFIG_SVGALIB'
4385 novomodules
="svga $novomodules"
4391 if test "$_fbdev" = auto
; then
4395 if test "$_fbdev" = yes ; then
4396 def_fbdev
='#define CONFIG_FBDEV 1'
4397 vomodules
="fbdev $vomodules"
4399 def_fbdev
='#undef CONFIG_FBDEV'
4400 novomodules
="fbdev $novomodules"
4407 if test "$_dvb" = auto
; then
4411 #include <sys/ioctl.h>
4415 #include <linux/dvb/dmx.h>
4416 #include <linux/dvb/frontend.h>
4417 #include <linux/dvb/video.h>
4418 #include <linux/dvb/audio.h>
4419 int main(void) {return 0;}
4421 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4422 cc_check
$_inc_tmp && _dvb
=yes && \
4423 extra_cflags
="$extra_cflags $_inc_tmp" && break
4427 if test "$_dvb" = yes ; then
4429 inputmodules
="dvb $inputmodules"
4430 def_dvb
='#define CONFIG_DVB 1'
4431 def_dvbin
='#define CONFIG_DVBIN 1'
4432 aomodules
="mpegpes(dvb) $aomodules"
4433 vomodules
="mpegpes(dvb) $vomodules"
4436 noinputmodules
="dvb $noinputmodules"
4437 def_dvb
='#undef CONFIG_DVB'
4438 def_dvbin
='#undef CONFIG_DVBIN '
4439 aomodules
="mpegpes(file) $aomodules"
4440 vomodules
="mpegpes(file) $vomodules"
4446 echocheck
"QuickTime"
4447 if test "$quicktime" = auto
; then
4449 #include <QuickTime/QuickTime.h>
4451 ImageDescription *desc;
4458 cc_check
-framework QuickTime
&& quicktime
=yes
4460 if test "$quicktime" = yes ; then
4461 extra_ldflags
="$extra_ldflags -framework QuickTime"
4462 def_quicktime
='#define CONFIG_QUICKTIME 1'
4464 def_quicktime
='#undef CONFIG_QUICKTIME'
4470 if test "$_quartz" = auto
; then
4472 statement_check Carbon
/Carbon.h
'CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false)' -framework Carbon
&& _quartz
=yes
4474 if test "$_quartz" = yes ; then
4475 libs_mplayer
="$libs_mplayer -framework Carbon"
4476 def_quartz
='#define CONFIG_QUARTZ 1'
4477 vomodules
="quartz $vomodules"
4479 def_quartz
='#undef CONFIG_QUARTZ'
4480 novomodules
="quartz $novomodules"
4484 echocheck
"CoreVideo"
4485 if test "$_corevideo" = auto
; then
4487 #include <Carbon/Carbon.h>
4488 #include <CoreServices/CoreServices.h>
4489 #include <OpenGL/OpenGL.h>
4490 #include <QuartzCore/CoreVideo.h>
4491 int main(void) { return 0; }
4494 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4496 if test "$_corevideo" = yes ; then
4497 vomodules
="corevideo $vomodules"
4498 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4499 def_corevideo
='#define CONFIG_COREVIDEO 1'
4501 novomodules
="corevideo $novomodules"
4502 def_corevideo
='#undef CONFIG_COREVIDEO'
4504 echores
"$_corevideo"
4509 echocheck
"PNG support"
4510 if test "$_png" = auto
; then
4513 # Don't check for -lpng on irix since it has its own libpng
4514 # incompatible with the GNU libpng
4515 res_comment
="disabled on irix (not GNU libpng)"
4522 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4523 printf("libpng: %s\n", png_libpng_ver);
4524 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4527 cc_check
-lpng -lz $_ld_lm && _png
=yes
4531 if test "$_png" = yes ; then
4532 def_png
='#define CONFIG_PNG 1'
4533 extra_ldflags
="$extra_ldflags -lpng -lz"
4535 def_png
='#undef CONFIG_PNG'
4538 echocheck
"MNG support"
4539 if test "$_mng" = auto
; then
4544 const char * p_ver = mng_version_text();
4545 return !p_ver || p_ver[0] == 0;
4548 if cc_check
-lmng -lz $_ld_lm ; then
4553 if test "$_mng" = yes ; then
4554 def_mng
='#define CONFIG_MNG 1'
4555 extra_ldflags
="$extra_ldflags -lmng -lz"
4557 def_mng
='#undef CONFIG_MNG'
4560 echocheck
"JPEG support"
4561 if test "$_jpeg" = auto
; then
4563 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
4567 if test "$_jpeg" = yes ; then
4568 def_jpeg
='#define CONFIG_JPEG 1'
4569 vomodules
="jpeg $vomodules"
4570 extra_ldflags
="$extra_ldflags -ljpeg"
4572 def_jpeg
='#undef CONFIG_JPEG'
4573 novomodules
="jpeg $novomodules"
4578 echocheck
"PNM support"
4579 if test "$_pnm" = yes; then
4580 def_pnm
="#define CONFIG_PNM 1"
4581 vomodules
="pnm $vomodules"
4583 def_pnm
="#undef CONFIG_PNM"
4584 novomodules
="pnm $novomodules"
4590 echocheck
"GIF support"
4591 # This is to appease people who want to force gif support.
4592 # If it is forced to yes, then we still do checks to determine
4593 # which gif library to use.
4594 if test "$_gif" = yes ; then
4599 if test "$_gif" = auto
; then
4601 for _ld_gif
in "-lungif" "-lgif" ; do
4602 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4606 # If no library was found, and the user wants support forced,
4607 # then we force it on with libgif, as this is the safest
4608 # assumption IMHO. (libungif & libregif both create symbolic
4609 # links to libgif. We also assume that no x11 support is needed,
4610 # because if you are forcing this, then you _should_ know what
4611 # you are doing. [ Besides, package maintainers should never
4612 # have compiled x11 deps into libungif in the first place. ] )
4615 if test "$_force_gif" = yes && test "$_gif" = no
; then
4620 if test "$_gif" = yes ; then
4621 def_gif
='#define CONFIG_GIF 1'
4622 codecmodules
="gif $codecmodules"
4623 vomodules
="gif89a $vomodules"
4624 res_comment
="old version, some encoding functions disabled"
4625 def_gif_4
='#undef CONFIG_GIF_4'
4626 extra_ldflags
="$extra_ldflags $_ld_gif"
4632 #include <gif_lib.h>
4633 static void catch(int sig) { exit(1); }
4635 signal(SIGSEGV, catch); // catch segfault
4636 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4637 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4641 if cc_check
"$_ld_gif" ; then
4642 def_gif_4
='#define CONFIG_GIF_4 1'
4646 def_gif
='#undef CONFIG_GIF'
4647 def_gif_4
='#undef CONFIG_GIF_4'
4648 novomodules
="gif89a $novomodules"
4649 nocodecmodules
="gif $nocodecmodules"
4654 case "$_gif" in yes*)
4655 echocheck
"broken giflib workaround"
4656 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4660 #include <gif_lib.h>
4662 GifFileType gif = {.UserData = NULL};
4663 printf("UserData is at address %p\n", gif.UserData);
4667 if cc_check
"$_ld_gif" ; then
4668 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4677 echocheck
"VESA support"
4678 if test "$_vesa" = auto
; then
4680 statement_check vbe.h
'vbeInit()' -lvbe -llrmi && _vesa
=yes
4682 if test "$_vesa" = yes ; then
4683 def_vesa
='#define CONFIG_VESA 1'
4684 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4685 vomodules
="vesa $vomodules"
4687 def_vesa
='#undef CONFIG_VESA'
4688 novomodules
="vesa $novomodules"
4700 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4701 if test -z "$_sdlconfig" ; then
4702 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4703 _sdlconfig
="sdl-config"
4704 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4705 _sdlconfig
="sdl11-config"
4710 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4712 #ifdef CONFIG_SDL_SDL_H
4713 #include <SDL/SDL.h>
4718 // we allow SDL hacking our main() only on OSX
4721 int main(int argc, char *argv[]) {
4722 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4727 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4728 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4730 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4734 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4735 res_comment
="using $_sdlconfig"
4737 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4738 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4740 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4741 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4743 _inc_tmp
="$($_sdlconfig --cflags)"
4744 _ld_tmp
="$($_sdlconfig --libs)"
4746 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4748 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4749 # HACK for BeOS/Haiku SDL
4750 _ld_tmp
="$_ld_tmp -lstdc++"
4755 if test "$_sdl" = yes ; then
4756 def_sdl
='#define CONFIG_SDL 1'
4757 extra_cflags
="$extra_cflags $_inc_tmp"
4758 libs_mplayer
="$libs_mplayer $_ld_tmp"
4759 vomodules
="sdl $vomodules"
4760 aomodules
="sdl $aomodules"
4762 def_sdl
='#undef CONFIG_SDL'
4763 novomodules
="sdl $novomodules"
4764 noaomodules
="sdl $noaomodules"
4769 # make sure this stays below CoreVideo to avoid issues due to namespace
4770 # conflicts between -lGL and -framework OpenGL
4772 #Note: this test is run even with --enable-gl since we autodetect linker flags
4773 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
4776 #include <windows.h>
4778 #elif defined(GL_SDL)
4780 #ifdef CONFIG_SDL_SDL_H
4781 #include <SDL/SDL.h>
4786 // we allow SDL hacking our main() only on OSX
4791 #include <X11/Xlib.h>
4794 int main(int argc, char *argv[]) {
4797 wglCreateContext(dc);
4798 #elif defined(GL_SDL)
4799 SDL_GL_SwapBuffers();
4801 glXCreateContext(NULL, NULL, NULL, True);
4808 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4809 if cc_check
$_ld_tmp $_ld_lm ; then
4812 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4816 if cc_check
-DGL_WIN32 -lopengl32 ; then
4819 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4821 # last so it can reuse any linker etc. flags detected before
4822 if test "$_sdl" = yes ; then
4823 if cc_check
-DGL_SDL ||
4824 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4827 elif cc_check
-DGL_SDL -lGL ||
4828 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4831 libs_mplayer
="$libs_mplayer -lGL"
4837 if test "$_gl" = yes ; then
4838 def_gl
='#define CONFIG_GL 1'
4839 res_comment
="backends:"
4840 if test "$_gl_win32" = yes ; then
4841 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4842 res_comment
="$res_comment win32"
4844 if test "$_gl_x11" = yes ; then
4845 def_gl_x11
='#define CONFIG_GL_X11 1'
4846 res_comment
="$res_comment x11"
4848 if test "$_gl_sdl" = yes ; then
4849 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4850 res_comment
="$res_comment sdl"
4852 vomodules
="opengl $vomodules"
4854 def_gl
='#undef CONFIG_GL'
4855 def_gl_win32
='#undef CONFIG_GL_WIN32'
4856 def_gl_x11
='#undef CONFIG_GL_X11'
4857 def_gl_sdl
='#undef CONFIG_GL_SDL'
4858 novomodules
="opengl $novomodules"
4863 echocheck
"MatrixView"
4864 if test "$_gl" = no
; then
4867 if test "$matrixview" = yes ; then
4868 vomodules
="matrixview $vomodules"
4869 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
4871 novomodules
="matrixview $novomodules"
4872 def_matrixview
='#undef CONFIG_MATRIXVIEW'
4874 echores
"$matrixview"
4878 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
4879 if test "$_kva" = auto
; then
4881 header_check_broken os2.h kva.h
-lkva && _kva
=yes
4883 if test "$_kva" = yes ; then
4884 def_kva
='#define CONFIG_KVA 1'
4885 libs_mplayer
="$libs_mplayer -lkva"
4886 vomodules
="kva $vomodules"
4888 def_kva
='#undef CONFIG_KVA'
4889 novomodules
="kva $novomodules"
4897 echocheck
"Windows waveout"
4898 if test "$_win32waveout" = auto
; then
4900 header_check_broken windows.h mmsystem.h
-lwinmm && _win32waveout
=yes
4902 if test "$_win32waveout" = yes ; then
4903 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
4904 libs_mplayer
="$libs_mplayer -lwinmm"
4905 aomodules
="win32 $aomodules"
4907 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
4908 noaomodules
="win32 $noaomodules"
4910 echores
"$_win32waveout"
4912 echocheck
"Direct3D"
4913 if test "$_direct3d" = auto
; then
4915 header_check d3d9.h
&& _direct3d
=yes
4917 if test "$_direct3d" = yes ; then
4918 def_direct3d
='#define CONFIG_DIRECT3D 1'
4919 vomodules
="direct3d $vomodules"
4921 def_direct3d
='#undef CONFIG_DIRECT3D'
4922 novomodules
="direct3d $novomodules"
4924 echores
"$_direct3d"
4927 if test "$_directx" = auto
; then
4931 int main(void) { return 0; }
4934 cc_check
-lgdi32 && _directx
=yes
4936 if test "$_directx" = yes ; then
4937 def_directx
='#define CONFIG_DIRECTX 1'
4938 libs_mplayer
="$libs_mplayer -lgdi32"
4939 vomodules
="directx $vomodules"
4940 aomodules
="dsound $aomodules"
4942 def_directx
='#undef CONFIG_DIRECTX'
4943 novomodules
="directx $novomodules"
4944 noaomodules
="dsound $noaomodules"
4952 if test "$_dxr2" = auto
; then
4954 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4955 header_check dxr2ioctl.h
$_inc_tmp && _dxr2
=yes &&
4956 extra_cflags
="$extra_cflags $_inc_tmp" && break
4959 if test "$_dxr2" = yes; then
4960 def_dxr2
='#define CONFIG_DXR2 1'
4961 aomodules
="dxr2 $aomodules"
4962 vomodules
="dxr2 $vomodules"
4964 def_dxr2
='#undef CONFIG_DXR2'
4965 noaomodules
="dxr2 $noaomodules"
4966 novomodules
="dxr2 $novomodules"
4971 if test "$_dxr3" = auto
; then
4973 header_check linux
/em8300.h
&& _dxr3
=yes
4975 if test "$_dxr3" = yes ; then
4976 def_dxr3
='#define CONFIG_DXR3 1'
4977 vomodules
="dxr3 $vomodules"
4979 def_dxr3
='#undef CONFIG_DXR3'
4980 novomodules
="dxr3 $novomodules"
4985 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
4986 if test "$_ivtv" = auto
; then
4988 #include <linux/videodev2.h>
4989 #include <linux/ivtv.h>
4990 #include <sys/ioctl.h>
4992 struct ivtv_cfg_stop_decode sd;
4993 struct ivtv_cfg_start_decode sd1;
4994 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
4995 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
4999 cc_check
&& _ivtv
=yes
5001 if test "$_ivtv" = yes ; then
5002 def_ivtv
='#define CONFIG_IVTV 1'
5003 vomodules
="ivtv $vomodules"
5004 aomodules
="ivtv $aomodules"
5006 def_ivtv
='#undef CONFIG_IVTV'
5007 novomodules
="ivtv $novomodules"
5008 noaomodules
="ivtv $noaomodules"
5013 echocheck
"V4L2 MPEG Decoder"
5014 if test "$_v4l2" = auto
; then
5016 #include <linux/videodev2.h>
5017 #include <linux/version.h>
5019 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5020 #error kernel headers too old, need 2.6.22
5022 struct v4l2_ext_controls ctrls;
5023 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5028 cc_check
&& _v4l2
=yes
5030 if test "$_v4l2" = yes ; then
5031 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5032 vomodules
="v4l2 $vomodules"
5033 aomodules
="v4l2 $aomodules"
5035 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5036 novomodules
="v4l2 $novomodules"
5037 noaomodules
="v4l2 $noaomodules"
5048 echocheck
"OSS Audio"
5049 if test "$_ossaudio" = auto
; then
5051 #include <$_soundcard_header>
5052 int main(void) { return SNDCTL_DSP_SETFRAGMENT; }
5055 cc_check
&& _ossaudio
=yes
5057 if test "$_ossaudio" = yes ; then
5058 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5059 aomodules
="oss $aomodules"
5061 #include <$_soundcard_header>
5062 #ifdef OPEN_SOUND_SYSTEM
5063 int main(void) { return 0; }
5065 #error Not the real thing
5069 cc_check
&& _real_ossaudio
=yes
5070 if test "$_real_ossaudio" = yes; then
5071 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5072 # Check for OSS4 headers (override default headers)
5073 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5074 if test -f /etc
/oss.conf
; then
5076 _ossinc
="$OSSLIBDIR/include"
5077 if test -f "$_ossinc/sys/soundcard.h"; then
5078 extra_cflags
="-I$_ossinc $extra_cflags"
5081 elif netbsd || openbsd
; then
5082 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5083 extra_ldflags
="$extra_ldflags -lossaudio"
5085 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5087 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5089 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5090 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5091 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5092 noaomodules
="oss $noaomodules"
5094 echores
"$_ossaudio"
5098 if test "$_arts" = auto
; then
5100 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5101 statement_check artsc.h
'arts_init()' $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
5106 if test "$_arts" = yes ; then
5107 def_arts
='#define CONFIG_ARTS 1'
5108 aomodules
="arts $aomodules"
5109 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5110 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5112 noaomodules
="arts $noaomodules"
5118 if test "$_esd" = auto
; then
5120 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5121 statement_check esd.h
'esd_open_sound("test")' $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5126 if test "$_esd" = yes ; then
5127 def_esd
='#define CONFIG_ESD 1'
5128 aomodules
="esd $aomodules"
5129 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5130 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5132 echocheck
"esd_get_latency()"
5133 statement_check esd.h
'esd_get_latency(0)' $
(esd-config
--libs) $
(esd-config
--cflags) &&
5134 _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5135 echores
"$_esd_latency"
5137 def_esd
='#undef CONFIG_ESD'
5138 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5139 noaomodules
="esd $noaomodules"
5144 if test "$_nas" = auto
; then
5146 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
5148 if test "$_nas" = yes ; then
5149 def_nas
='#define CONFIG_NAS 1'
5150 libs_mplayer
="$libs_mplayer -laudio -lXt"
5151 aomodules
="nas $aomodules"
5153 noaomodules
="nas $noaomodules"
5154 def_nas
='#undef CONFIG_NAS'
5160 if test "$_pulse" = auto
; then
5162 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5163 header_check pulse
/pulseaudio.h $
($_pkg_config --libs --cflags libpulse
) &&
5169 if test "$_pulse" = yes ; then
5170 def_pulse
='#define CONFIG_PULSE 1'
5171 aomodules
="pulse $aomodules"
5172 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5173 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5175 def_pulse
='#undef CONFIG_PULSE'
5176 noaomodules
="pulse $noaomodules"
5181 if test "$_jack" = auto
; then
5183 if statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' -ljack ; then
5184 libs_mplayer
="$libs_mplayer -ljack"
5185 elif statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5186 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5187 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5193 if test "$_jack" = yes ; then
5194 def_jack
='#define CONFIG_JACK 1'
5195 aomodules
="jack $aomodules"
5197 noaomodules
="jack $noaomodules"
5202 if test "$_openal" = auto
; then
5206 #include <OpenAL/al.h>
5211 alSourceQueueBuffers(0, 0, 0);
5212 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5216 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5217 cc_check
$I && _openal
=yes && break
5218 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5220 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5222 if test "$_openal" = yes ; then
5223 def_openal
='#define CONFIG_OPENAL 1'
5224 aomodules
="openal $aomodules"
5226 noaomodules
="openal $noaomodules"
5230 echocheck
"ALSA audio"
5231 if test "$_alloca" != yes ; then
5233 res_comment
="alloca missing"
5235 if test "$_alsa" != no
; then
5238 #include <sys/asoundlib.h>
5239 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5240 #error "alsa version != 0.5.x"
5242 int main(void) { return 0; }
5244 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5247 #include <sys/asoundlib.h>
5248 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5249 #error "alsa version != 0.9.x"
5251 int main(void) { return 0; }
5253 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5255 #include <alsa/asoundlib.h>
5256 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5257 #error "alsa version != 0.9.x"
5259 int main(void) { return 0; }
5261 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5264 #include <sys/asoundlib.h>
5265 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5266 #error "alsa version != 1.0.x"
5268 int main(void) { return 0; }
5270 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5272 #include <alsa/asoundlib.h>
5273 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5274 #error "alsa version != 1.0.x"
5276 int main(void) { return 0; }
5278 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5280 def_alsa
='#undef CONFIG_ALSA'
5281 def_alsa5
='#undef CONFIG_ALSA5'
5282 def_alsa9
='#undef CONFIG_ALSA9'
5283 def_alsa1x
='#undef CONFIG_ALSA1X'
5284 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5285 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5286 if test "$_alsaver" ; then
5288 if test "$_alsaver" = '0.5.x' ; then
5290 aomodules
="alsa5 $aomodules"
5291 def_alsa5
='#define CONFIG_ALSA5 1'
5292 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5293 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5294 elif test "$_alsaver" = '0.9.x-sys' ; then
5296 aomodules
="alsa $aomodules"
5297 def_alsa
='#define CONFIG_ALSA 1'
5298 def_alsa9
='#define CONFIG_ALSA9 1'
5299 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5300 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5301 elif test "$_alsaver" = '0.9.x-alsa' ; then
5303 aomodules
="alsa $aomodules"
5304 def_alsa
='#define CONFIG_ALSA 1'
5305 def_alsa9
='#define CONFIG_ALSA9 1'
5306 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5307 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5308 elif test "$_alsaver" = '1.0.x-sys' ; then
5310 aomodules
="alsa $aomodules"
5311 def_alsa
='#define CONFIG_ALSA 1'
5312 def_alsa1x
="#define CONFIG_ALSA1X 1"
5313 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5314 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5315 elif test "$_alsaver" = '1.0.x-alsa' ; then
5317 aomodules
="alsa $aomodules"
5318 def_alsa
='#define CONFIG_ALSA 1'
5319 def_alsa1x
="#define CONFIG_ALSA1X 1"
5320 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5321 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5324 res_comment
="unknown version"
5326 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5328 noaomodules
="alsa $noaomodules"
5333 echocheck
"Sun audio"
5334 if test "$_sunaudio" = auto
; then
5336 #include <sys/types.h>
5337 #include <sys/audioio.h>
5338 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5341 cc_check
&& _sunaudio
=yes
5343 if test "$_sunaudio" = yes ; then
5344 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5345 aomodules
="sun $aomodules"
5347 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5348 noaomodules
="sun $noaomodules"
5350 echores
"$_sunaudio"
5354 echocheck
"CoreAudio"
5355 if test "$_coreaudio" = auto
; then
5357 #include <CoreAudio/CoreAudio.h>
5358 #include <AudioToolbox/AudioToolbox.h>
5359 #include <AudioUnit/AudioUnit.h>
5360 int main(void) { return 0; }
5363 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5365 if test "$_coreaudio" = yes ; then
5366 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5367 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5368 aomodules
="coreaudio $aomodules"
5370 def_coreaudio
='#undef CONFIG_COREAUDIO'
5371 noaomodules
="coreaudio $noaomodules"
5378 echocheck
"SGI audio"
5379 if test "$_sgiaudio" = auto
; then
5381 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5383 if test "$_sgiaudio" = "yes" ; then
5384 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5385 libs_mplayer
="$libs_mplayer -laudio"
5386 aomodules
="sgi $aomodules"
5388 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5389 noaomodules
="sgi $noaomodules"
5391 echores
"$_sgiaudio"
5396 echocheck
"KAI (UNIAUD/DART)"
5397 if test "$_kai" = auto
; then
5399 header_check_broken os2.h kai.h
-lkai && _kai
=yes
5401 if test "$_kai" = yes ; then
5402 def_kai
='#define CONFIG_KAI 1'
5403 libs_mplayer
="$libs_mplayer -lkai"
5404 aomodules
="kai $aomodules"
5406 def_kai
='#undef CONFIG_KAI'
5407 noaomodules
="kai $noaomodules"
5412 if test "$_dart" = auto
; then
5414 header_check_broken os2.h dart.h
-ldart && _dart
=yes
5416 if test "$_dart" = yes ; then
5417 def_dart
='#define CONFIG_DART 1'
5418 libs_mplayer
="$libs_mplayer -ldart"
5419 aomodules
="dart $aomodules"
5421 def_dart
='#undef CONFIG_DART'
5422 noaomodules
="dart $noaomodules"
5428 # set default CD/DVD devices
5429 if win32 || os2
; then
5430 default_cdrom_device
="D:"
5432 default_cdrom_device
="/dev/disk1"
5433 elif dragonfly
; then
5434 default_cdrom_device
="/dev/cd0"
5436 default_cdrom_device
="/dev/acd0"
5438 default_cdrom_device
="/dev/rcd0c"
5440 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5441 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5442 # file system and the volfs service.
5443 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5445 default_cdrom_device
="a1ide.device:2"
5447 default_cdrom_device
="/dev/cdrom"
5450 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5451 default_dvd_device
=$default_cdrom_device
5453 default_dvd_device
="/dev/rdiskN"
5455 default_dvd_device
="/dev/dvd"
5459 echocheck
"VCD support"
5460 if test "$_vcd" = auto
; then
5462 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
5465 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5468 if test "$_vcd" = yes; then
5469 inputmodules
="vcd $inputmodules"
5470 def_vcd
='#define CONFIG_VCD 1'
5472 def_vcd
='#undef CONFIG_VCD'
5473 noinputmodules
="vcd $noinputmodules"
5474 res_comment
="not supported on this OS"
5480 echocheck
"Blu-ray support"
5481 if test "$_bluray" = auto
; then
5483 statement_check libbluray
/bluray.h
'bd_get_title_info(0, 0)' -lbluray && _bluray
=yes
5485 if test "$_bluray" = yes ; then
5486 def_bluray
='#define CONFIG_LIBBLURAY 1'
5487 extra_ldflags
="$extra_ldflags -lbluray"
5488 inputmodules
="bluray $inputmodules"
5490 def_bluray
='#undef CONFIG_LIBBLURAY'
5491 noinputmodules
="bluray $noinputmodules"
5496 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5497 _dvdread_internal
=no
5499 if test "$_dvdread_internal" = auto
; then
5500 _dvdread_internal
=no
5502 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5503 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5504 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5505 || darwin || win32 || os2
; then
5506 _dvdread_internal
=yes
5508 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5510 elif test "$_dvdread" = auto
; then
5512 if test "$_dl" = yes; then
5513 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
5514 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
5515 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5517 extra_cflags
="$extra_cflags $_dvdreadcflags"
5518 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5519 res_comment
="external"
5524 if test "$_dvdread_internal" = yes; then
5525 def_dvdread
='#define CONFIG_DVDREAD 1'
5526 inputmodules
="dvdread(internal) $inputmodules"
5528 res_comment
="internal"
5529 elif test "$_dvdread" = yes; then
5530 def_dvdread
='#define CONFIG_DVDREAD 1'
5532 extra_ldflags
="$extra_ldflags -ldvdread"
5533 inputmodules
="dvdread(external) $inputmodules"
5534 res_comment
="external"
5536 def_dvdread
='#undef CONFIG_DVDREAD'
5537 noinputmodules
="dvdread $noinputmodules"
5542 echocheck
"internal libdvdcss"
5543 if test "$_libdvdcss_internal" = auto
; then
5544 _libdvdcss_internal
=no
5545 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
5546 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5548 if test "$_libdvdcss_internal" = yes ; then
5549 if linux || netbsd || openbsd || bsdos
; then
5550 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5551 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5552 elif freebsd || dragonfly
; then
5553 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5555 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5556 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5558 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5560 cflags_libdvdcss
="-DSYS_BEOS"
5562 cflags_libdvdcss
="-DSYS_OS2"
5564 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5565 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5566 inputmodules
="libdvdcss(internal) $inputmodules"
5569 noinputmodules
="libdvdcss(internal) $noinputmodules"
5571 echores
"$_libdvdcss_internal"
5574 echocheck
"cdparanoia"
5575 if test "$_cdparanoia" = auto
; then
5577 #include <cdda_interface.h>
5578 #include <cdda_paranoia.h>
5579 // This need a better test. How ?
5580 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5583 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5584 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5585 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5588 if test "$_cdparanoia" = yes ; then
5590 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5591 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5593 echores
"$_cdparanoia"
5597 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5600 #include <cdio/version.h>
5601 #include <cdio/cdda.h>
5602 #include <cdio/paranoia.h>
5604 void *test = cdda_verbose_set;
5605 printf("%s\n", CDIO_VERSION);
5606 return test == (void *)1;
5610 for _ld_tmp
in "" "-lwinmm" ; do
5611 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5612 cc_check
$_ld_tmp $_ld_lm \
5613 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5615 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5616 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5617 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5618 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5619 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5622 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5624 def_libcdio
='#define CONFIG_LIBCDIO 1'
5625 def_havelibcdio
='yes'
5627 if test "$_cdparanoia" = yes ; then
5628 res_comment
="using cdparanoia"
5630 def_libcdio
='#undef CONFIG_LIBCDIO'
5631 def_havelibcdio
='no'
5635 if test "$_cdda" = yes ; then
5636 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5637 def_cdparanoia
='#define CONFIG_CDDA 1'
5638 inputmodules
="cdda $inputmodules"
5640 def_cdparanoia
='#undef CONFIG_CDDA'
5641 noinputmodules
="cdda $noinputmodules"
5644 if test "$_cddb" = yes ; then
5645 def_cddb
='#define CONFIG_CDDB 1'
5646 inputmodules
="cddb $inputmodules"
5649 def_cddb
='#undef CONFIG_CDDB'
5650 noinputmodules
="cddb $noinputmodules"
5653 echocheck
"bitmap font support"
5654 if test "$_bitmap_font" = yes ; then
5655 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5657 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5659 echores
"$_bitmap_font"
5662 echocheck
"freetype >= 2.0.9"
5664 # freetype depends on iconv
5665 if test "$_iconv" = no
; then
5667 res_comment
="iconv support needed"
5670 if test "$_freetype" = auto
; then
5671 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5674 #include <ft2build.h>
5675 #include FT_FREETYPE_H
5676 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5677 #error "Need FreeType 2.0.9 or newer"
5681 FT_Init_FreeType(&library);
5686 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
5691 if test "$_freetype" = yes ; then
5692 def_freetype
='#define CONFIG_FREETYPE 1'
5693 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
5694 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
5696 def_freetype
='#undef CONFIG_FREETYPE'
5698 echores
"$_freetype"
5700 if test "$_freetype" = no
; then
5702 res_comment
="FreeType support needed"
5704 echocheck
"fontconfig"
5705 if test "$_fontconfig" = auto
; then
5709 #include <fontconfig/fontconfig.h>
5710 #if FC_VERSION < 20402
5711 #error At least version 2.4.2 of fontconfig required
5715 if (err == FcFalse) {
5716 printf("Couldn't initialize fontconfig lib\n");
5723 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
5724 _ld_tmp
="-lfontconfig $_ld_tmp"
5725 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5727 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5728 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
5729 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
5730 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5731 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5734 if test "$_fontconfig" = yes ; then
5735 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5737 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5739 echores
"$_fontconfig"
5742 echocheck
"SSA/ASS support"
5743 if test "$_ass" = auto
-o "$_ass" = yes ; then
5744 if $_pkg_config libass
; then
5746 def_ass
='#define CONFIG_ASS 1'
5747 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
5748 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
5751 def_ass
='#undef CONFIG_ASS'
5754 def_ass
='#undef CONFIG_ASS'
5759 echocheck
"fribidi with charsets"
5762 if test "$_fribidi" = auto
; then
5765 /* workaround for fribidi 0.10.4 and below */
5766 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5767 #include <fribidi/fribidi.h>
5769 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
5777 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5778 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
5779 test "$_fribidi" = no
; then
5780 _inc_tmp
="$($_pkg_config --cflags)"
5781 _ld_tmp
="$($_pkg_config --libs)"
5782 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5785 if test "$_fribidi" = yes ; then
5786 def_fribidi
='#define CONFIG_FRIBIDI 1'
5787 extra_cflags
="$extra_cflags $_inc_tmp"
5788 extra_ldflags
="$extra_ldflags $_ld_tmp"
5790 def_fribidi
='#undef CONFIG_FRIBIDI'
5796 if test "$_enca" = auto
; then
5798 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
5800 if test "$_enca" = yes ; then
5801 def_enca
='#define CONFIG_ENCA 1'
5802 extra_ldflags
="$extra_ldflags -lenca"
5804 def_enca
='#undef CONFIG_ENCA'
5811 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
5812 if test "$_zlib" = yes ; then
5813 def_zlib
='#define CONFIG_ZLIB 1'
5814 extra_ldflags
="$extra_ldflags -lz"
5816 def_zlib
='#define CONFIG_ZLIB 0'
5823 def_bzlib
='#define CONFIG_BZLIB 0'
5824 statement_check bzlib.h
'BZ2_bzlibVersion()' -lbz2 && bzlib
=yes
5825 if test "$bzlib" = yes ; then
5826 def_bzlib
='#define CONFIG_BZLIB 1'
5827 extra_ldflags
="$extra_ldflags -lbz2"
5833 if test "$_rtc" = auto
; then
5835 #include <sys/ioctl.h>
5837 #include <linux/rtc.h>
5840 #define RTC_PIE_ON RTCIO_PIE_ON
5842 int main(void) { return RTC_PIE_ON; }
5845 cc_check
&& _rtc
=yes
5848 if test "$_rtc" = yes ; then
5849 def_rtc
='#define HAVE_RTC 1'
5851 def_rtc
='#undef HAVE_RTC'
5856 echocheck
"liblzo2 support"
5857 if test "$_liblzo" = auto
; then
5859 statement_check lzo
/lzo1x.h
'lzo_init()' -llzo2 && _liblzo
=yes
5861 if test "$_liblzo" = yes ; then
5862 def_liblzo
='#define CONFIG_LIBLZO 1'
5863 extra_ldflags
="$extra_ldflags -llzo2"
5864 codecmodules
="liblzo $codecmodules"
5866 def_liblzo
='#undef CONFIG_LIBLZO'
5867 nocodecmodules
="liblzo $nocodecmodules"
5872 echocheck
"mad support"
5873 if test "$_mad" = auto
; then
5875 header_check mad.h
-lmad && _mad
=yes
5877 if test "$_mad" = yes ; then
5878 def_mad
='#define CONFIG_LIBMAD 1'
5879 extra_ldflags
="$extra_ldflags -lmad"
5880 codecmodules
="libmad $codecmodules"
5882 def_mad
='#undef CONFIG_LIBMAD'
5883 nocodecmodules
="libmad $nocodecmodules"
5887 echocheck
"OggVorbis support"
5888 if test "$_tremor_internal" = yes; then
5890 elif test "$_tremor" = auto
; then
5892 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
5894 if test "$_libvorbis" = auto
; then
5896 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes
5898 if test "$_tremor_internal" = yes ; then
5900 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5901 def_tremor
='#define CONFIG_TREMOR 1'
5902 codecmodules
="tremor(internal) $codecmodules"
5903 res_comment
="internal Tremor"
5904 if test "$_tremor_low" = yes ; then
5905 cflags_tremor_low
="-D_LOW_ACCURACY_"
5906 res_comment
="internal low accuracy Tremor"
5908 elif test "$_tremor" = yes ; then
5910 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5911 def_tremor
='#define CONFIG_TREMOR 1'
5912 codecmodules
="tremor(external) $codecmodules"
5913 res_comment
="external Tremor"
5914 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
5915 elif test "$_libvorbis" = yes ; then
5917 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5918 codecmodules
="libvorbis $codecmodules"
5919 res_comment
="libvorbis"
5920 extra_ldflags
="$extra_ldflags -lvorbis -logg"
5923 nocodecmodules
="libvorbis $nocodecmodules"
5927 echocheck
"libspeex (version >= 1.1 required)"
5928 if test "$_speex" = auto
; then
5932 #include <speex/speex.h>
5933 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
5935 cc_check
-lspeex $_ld_lm && _speex
=yes
5937 if test "$_speex" = yes ; then
5938 def_speex
='#define CONFIG_SPEEX 1'
5939 extra_ldflags
="$extra_ldflags -lspeex"
5940 codecmodules
="speex $codecmodules"
5942 def_speex
='#undef CONFIG_SPEEX'
5943 nocodecmodules
="speex $nocodecmodules"
5947 echocheck
"OggTheora support"
5948 if test "$_theora" = auto
; then
5951 #include <theora/theora.h>
5954 /* Theora is in flux, make sure that all interface routines and datatypes
5955 * exist and work the way we expect it, so we don't break MPlayer. */
5964 theora_info_init(&inf);
5965 theora_comment_init(&tc);
5969 /* we don't want to execute this kind of nonsense; just for making sure
5970 * that compilation works... */
5971 memset(&op, 0, sizeof(op));
5972 r = theora_decode_header(&inf, &tc, &op);
5973 r = theora_decode_init(&st, &inf);
5974 t = theora_granule_time(&st, op.granulepos);
5975 r = theora_decode_packetin(&st, &op);
5976 r = theora_decode_YUVout(&st, &yuv);
5982 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
5983 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
5984 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
5985 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
5986 if test _theora
= no
; then
5987 _ld_theora
="-ltheora -logg"
5988 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
5990 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5991 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
5992 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
5993 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
5994 extra_ldflags
="$extra_ldflags $_ld_theora" &&
5995 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
5996 if test _theora
= no
; then
5997 _ld_theora
="-ltheora -logg"
5998 cc_check tremor
/bitwise.c
$_ld_theora &&
5999 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6003 if test "$_theora" = yes ; then
6004 def_theora
='#define CONFIG_OGGTHEORA 1'
6005 codecmodules
="libtheora $codecmodules"
6006 # when --enable-theora is forced, we'd better provide a probably sane
6007 # $_ld_theora than nothing
6008 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6010 def_theora
='#undef CONFIG_OGGTHEORA'
6011 nocodecmodules
="libtheora $nocodecmodules"
6015 echocheck
"mp3lib support"
6016 if test "$_mp3lib" = auto
; then
6017 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6019 if test "$_mp3lib" = yes ; then
6020 def_mp3lib
='#define CONFIG_MP3LIB 1'
6021 codecmodules
="mp3lib(internal) $codecmodules"
6023 def_mp3lib
='#undef CONFIG_MP3LIB'
6024 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6028 # Any version of libmpg123 shall be fine.
6029 echocheck
"mpg123 support"
6030 def_mpg123
='#undef CONFIG_MPG123'
6031 if test "$_mpg123" = auto
; then
6033 statement_check mpg123.h
'mpg123_init()' -lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
6035 if test "$_mpg123" = yes ; then
6036 def_mpg123
='#define CONFIG_MPG123 1'
6037 codecmodules
="mpg123 $codecmodules"
6039 nocodecmodules
="mpg123 $nocodecmodules"
6043 echocheck
"liba52 support"
6044 def_liba52
='#undef CONFIG_LIBA52'
6045 if test "$_liba52" = auto
; then
6048 #include <inttypes.h>
6049 #include <a52dec/a52.h>
6050 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6052 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6054 if test "$_liba52" = yes ; then
6055 def_liba52
='#define CONFIG_LIBA52 1'
6056 codecmodules
="liba52 $codecmodules"
6058 nocodecmodules
="liba52 $nocodecmodules"
6062 echocheck
"internal libmpeg2 support"
6063 if test "$_libmpeg2" = auto
; then
6065 if alpha
&& test cc_vendor
=gnu
; then
6067 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6069 res_comment
="broken gcc"
6074 if test "$_libmpeg2" = yes ; then
6075 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6076 codecmodules
="libmpeg2(internal) $codecmodules"
6078 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6079 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6081 echores
"$_libmpeg2"
6083 echocheck
"libdca support"
6084 if test "$_libdca" = auto
; then
6086 for _ld_dca
in -ldca -ldts ; do
6087 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
6088 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
6091 if test "$_libdca" = yes ; then
6092 def_libdca
='#define CONFIG_LIBDCA 1'
6093 codecmodules
="libdca $codecmodules"
6095 def_libdca
='#undef CONFIG_LIBDCA'
6096 nocodecmodules
="libdca $nocodecmodules"
6100 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6101 if test "$_musepack" = auto
; then
6105 #include <mpcdec/mpcdec.h>
6107 mpc_streaminfo info;
6108 mpc_decoder decoder;
6109 mpc_decoder_set_streaminfo(&decoder, &info);
6110 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6114 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6116 if test "$_musepack" = yes ; then
6117 def_musepack
='#define CONFIG_MUSEPACK 1'
6118 extra_ldflags
="$extra_ldflags -lmpcdec"
6119 codecmodules
="musepack $codecmodules"
6121 def_musepack
='#undef CONFIG_MUSEPACK'
6122 nocodecmodules
="musepack $nocodecmodules"
6124 echores
"$_musepack"
6127 echocheck
"FAAD2 support"
6128 if test "$_faad_internal" = auto
; then
6129 if x86_32
&& test cc_vendor
=gnu
; then
6131 3.1*|
3.2) # ICE/insn with these versions
6133 res_comment
="broken gcc"
6145 if test "$_faad" = auto
; then
6148 #ifndef FAAD_MIN_STREAMSIZE
6149 #error Too old version
6151 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6152 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6154 cc_check
-lfaad $_ld_lm && _faad
=yes
6157 def_faad
='#undef CONFIG_FAAD'
6158 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6159 if test "$_faad_internal" = yes ; then
6160 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6161 res_comment
="internal floating-point"
6162 if test "$_faad_fixed" = yes ; then
6163 # The FIXED_POINT implementation of FAAD2 improves performance
6164 # on some platforms, especially for SBR files.
6165 cflags_faad_fixed
="-DFIXED_POINT"
6166 res_comment
="internal fixed-point"
6168 elif test "$_faad" = yes ; then
6169 extra_ldflags
="$extra_ldflags -lfaad"
6172 if test "$_faad" = yes ; then
6173 def_faad
='#define CONFIG_FAAD 1'
6174 if test "$_faad_internal" = yes ; then
6175 codecmodules
="faad2(internal) $codecmodules"
6177 codecmodules
="faad2 $codecmodules"
6181 nocodecmodules
="faad2 $nocodecmodules"
6186 echocheck
"LADSPA plugin support"
6187 if test "$_ladspa" = auto
; then
6189 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
6191 if test "$_ladspa" = yes; then
6192 def_ladspa
="#define CONFIG_LADSPA 1"
6194 def_ladspa
="#undef CONFIG_LADSPA"
6199 echocheck
"libbs2b audio filter support"
6200 if test "$_libbs2b" = auto
; then
6203 #if BS2B_VERSION_MAJOR < 3
6204 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6214 if $_pkg_config --exists libbs2b
; then
6215 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6216 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6217 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6218 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6220 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6221 -I/usr
/local
/include
/bs2b
; do
6222 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6223 extra_ldflags
="$extra_ldflags -lbs2b"
6224 extra_cflags
="$extra_cflags $_inc_tmp"
6231 def_libbs2b
="#undef CONFIG_LIBBS2B"
6232 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6236 if test -z "$_codecsdir" ; then
6237 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6238 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6239 if test -d "$dir" ; then
6245 # Fall back on default directory.
6246 if test -z "$_codecsdir" ; then
6247 _codecsdir
="$_libdir/codecs"
6248 mingw32 || os2
&& _codecsdir
="codecs"
6252 echocheck
"Win32 codecs"
6253 if test "$_win32dll" = auto
; then
6255 if x86_32
&& ! qnx
; then
6259 if test "$_win32dll" = yes ; then
6260 def_win32dll
='#define CONFIG_WIN32DLL 1'
6262 def_win32_loader
='#define WIN32_LOADER 1'
6263 _win32_emulation
=yes
6265 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6266 res_comment
="using native windows"
6268 codecmodules
="win32 $codecmodules"
6270 def_win32dll
='#undef CONFIG_WIN32DLL'
6271 def_win32_loader
='#undef WIN32_LOADER'
6272 nocodecmodules
="win32 $nocodecmodules"
6274 echores
"$_win32dll"
6277 echocheck
"XAnim codecs"
6278 if test "$_xanim" = auto
; then
6280 res_comment
="dynamic loader support needed"
6281 if test "$_dl" = yes ; then
6285 if test "$_xanim" = yes ; then
6286 def_xanim
='#define CONFIG_XANIM 1'
6287 codecmodules
="xanim $codecmodules"
6289 def_xanim
='#undef CONFIG_XANIM'
6290 nocodecmodules
="xanim $nocodecmodules"
6295 echocheck
"RealPlayer codecs"
6296 if test "$_real" = auto
; then
6298 res_comment
="dynamic loader support needed"
6299 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6300 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
6304 if test "$_real" = yes ; then
6305 def_real
='#define CONFIG_REALCODECS 1'
6306 codecmodules
="real $codecmodules"
6308 def_real
='#undef CONFIG_REALCODECS'
6309 nocodecmodules
="real $nocodecmodules"
6314 echocheck
"QuickTime codecs"
6316 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6317 if test "$_qtx" = auto
; then
6318 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6320 if test "$_qtx" = yes ; then
6321 def_qtx
='#define CONFIG_QTX_CODECS 1'
6322 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6323 codecmodules
="qtx $codecmodules"
6324 darwin || win32 || _qtx_emulation
=yes
6326 def_qtx
='#undef CONFIG_QTX_CODECS'
6327 nocodecmodules
="qtx $nocodecmodules"
6331 echocheck
"Nemesi Streaming Media libraries"
6332 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
6334 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6335 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6336 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6340 if test "$_nemesi" = yes; then
6342 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6343 inputmodules
="nemesi $inputmodules"
6345 _native_rtsp
="$networking"
6347 def_nemesi
='#undef CONFIG_LIBNEMESI'
6348 noinputmodules
="nemesi $noinputmodules"
6352 echocheck
"LIVE555 Streaming Media libraries"
6353 if test "$_live" = auto
&& test "$networking" = yes ; then
6354 cat > $TMPCPP << EOF
6355 #include <liveMedia.hh>
6356 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6357 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6359 int main(void) { return 0; }
6363 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
6364 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6365 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6366 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6367 $_livelibdir/groupsock/libgroupsock.a \
6368 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6369 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6370 $extra_ldflags -lstdc++" \
6371 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6372 -I$_livelibdir/UsageEnvironment/include \
6373 -I$_livelibdir/BasicUsageEnvironment/include \
6374 -I$_livelibdir/groupsock/include" && \
6377 if test "$_live" != yes ; then
6378 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6379 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6384 if test "$_live" = yes && test "$networking" = yes; then
6385 test $_livelibdir && res_comment
="using $_livelibdir"
6386 def_live
='#define CONFIG_LIVE555 1'
6387 inputmodules
="live555 $inputmodules"
6388 elif test "$_live_dist" = yes && test "$networking" = yes; then
6389 res_comment
="using distribution version"
6391 def_live
='#define CONFIG_LIVE555 1'
6392 extra_ldflags
="$extra_ldflags $ld_tmp"
6393 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6394 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6395 inputmodules
="live555 $inputmodules"
6398 def_live
='#undef CONFIG_LIVE555'
6399 noinputmodules
="live555 $noinputmodules"
6405 all_ffmpeg_libs
="libavutil libavcodec libavformat libswscale libpostproc"
6406 echocheck
"FFmpeg ($all_ffmpeg_libs)"
6407 if test "$ffmpeg" = auto
; then
6409 if $_pkg_config --exists $all_ffmpeg_libs ; then
6410 inc_ffmpeg
=$
($_pkg_config --cflags $all_ffmpeg_libs)
6411 _ld_tmp
=$
($_pkg_config --libs $all_ffmpeg_libs)
6412 extra_ldflags
="$extra_ldflags $_ld_tmp"
6413 extra_cflags
="$extra_cflags $inc_ffmpeg"
6415 elif header_check libavcore
/avutil.h
-lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
6416 extra_ldflags
="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
6422 def_ffmpeg_eval_api
="#undef CONFIG_FFMPEG_EVAL_API"
6423 if test "$ffmpeg" = yes; then
6424 def_ffmpeg
='#define CONFIG_FFMPEG 1'
6425 codecmodules
="ffmpeg $codecmodules"
6426 if $_pkg_config --atleast-version=50.18.0 libavutil
; then
6428 def_ffmpeg_eval_api
="#define CONFIG_FFMPEG_EVAL_API 1"
6431 def_ffmpeg
='#undef CONFIG_FFMPEG'
6432 nocodecmodules
="ffmpeg $nocodecmodules"
6436 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
6437 if ! test -z "$_ffmpeg_source" ; then
6438 test "$ffmpeg" = yes && def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
6443 echocheck
"libdv-0.9.5+"
6444 if test "$_libdv" = auto
; then
6446 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
6448 if test "$_libdv" = yes ; then
6449 def_libdv
='#define CONFIG_LIBDV095 1'
6450 extra_ldflags
="$extra_ldflags -ldv"
6451 codecmodules
="libdv $codecmodules"
6453 def_libdv
='#undef CONFIG_LIBDV095'
6454 nocodecmodules
="libdv $nocodecmodules"
6460 if test "$_xvid" = auto
; then
6462 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6463 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
6464 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
6468 if test "$_xvid" = yes ; then
6469 def_xvid
='#define CONFIG_XVID4 1'
6470 codecmodules
="xvid $codecmodules"
6472 def_xvid
='#undef CONFIG_XVID4'
6473 nocodecmodules
="xvid $nocodecmodules"
6479 if test "$_libnut" = auto
; then
6482 nut_context_tt * nut;
6483 int main(void) { nut_error(0); return 0; }
6486 cc_check
-lnut && _libnut
=yes
6489 if test "$_libnut" = yes ; then
6490 def_libnut
='#define CONFIG_LIBNUT 1'
6491 extra_ldflags
="$extra_ldflags -lnut"
6493 def_libnut
='#undef CONFIG_LIBNUT'
6497 # These VO checks must be done after the FFmpeg one
6498 echocheck
"/dev/mga_vid"
6499 if test "$_mga" = auto
; then
6501 test -c /dev
/mga_vid
&& _mga
=yes
6503 if test "$_mga" = yes ; then
6504 def_mga
='#define CONFIG_MGA 1'
6505 vomodules
="mga $vomodules"
6507 def_mga
='#undef CONFIG_MGA'
6508 novomodules
="mga $novomodules"
6514 if test "$_xmga" = auto
; then
6516 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
6518 if test "$_xmga" = yes ; then
6519 def_xmga
='#define CONFIG_XMGA 1'
6520 vomodules
="xmga $vomodules"
6522 def_xmga
='#undef CONFIG_XMGA'
6523 novomodules
="xmga $novomodules"
6528 if test "$_zr" = auto
; then
6529 #36067's seem to identify themselves as 36057PQC's, so the line
6530 #below should work for 36067's and 36057's.
6531 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
6537 if test "$_zr" = yes ; then
6538 if test "$ffmpeg_internals" = yes ; then
6539 def_zr
='#define CONFIG_ZR 1'
6540 vomodules
="zr zr2 $vomodules"
6542 res_comment
="FFmpeg internal headers are required by zr, sorry"
6543 novomodules
="zr $novomodules"
6544 def_zr
='#undef CONFIG_ZR'
6547 def_zr
='#undef CONFIG_ZR'
6548 novomodules
="zr zr2 $novomodules"
6553 echocheck
"UnRAR executable"
6554 if test "$_unrar_exec" = auto
; then
6556 mingw32
&& _unrar_exec
="no"
6558 if test "$_unrar_exec" = yes ; then
6559 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
6561 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
6563 echores
"$_unrar_exec"
6565 echocheck
"TV interface"
6566 if test "$_tv" = yes ; then
6567 def_tv
='#define CONFIG_TV 1'
6568 inputmodules
="tv $inputmodules"
6570 noinputmodules
="tv $noinputmodules"
6571 def_tv
='#undef CONFIG_TV'
6576 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
6577 echocheck
"*BSD BT848 bt8xx header"
6579 for file in "machine/ioctl_bt848.h" \
6580 "dev/bktr/ioctl_bt848.h" \
6581 "dev/video/bktr/ioctl_bt848.h" \
6582 "dev/ic/bt8xx.h" ; do
6584 #include <sys/types.h>
6585 #include <sys/ioctl.h>
6587 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
6591 _ioctl_bt848_h_name
="$file"
6595 if test "$_ioctl_bt848_h" = yes ; then
6596 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6597 res_comment
="using $_ioctl_bt848_h_name"
6599 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6601 echores
"$_ioctl_bt848_h"
6603 echocheck
"*BSD ioctl_meteor.h"
6605 for file in "machine/ioctl_meteor.h" \
6606 "dev/bktr/ioctl_meteor.h" \
6607 "dev/video/bktr/ioctl_meteor.h" ; do
6609 #include <sys/types.h>
6611 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
6615 _ioctl_meteor_h_name
="$file"
6619 if test "$_ioctl_meteor_h" = yes ; then
6620 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6621 res_comment
="using $_ioctl_meteor_h_name"
6623 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6625 echores
"$_ioctl_meteor_h"
6627 echocheck
"*BSD BrookTree 848 TV interface"
6628 if test "$_tv_bsdbt848" = auto
; then
6630 if test "$_tv" = yes ; then
6632 #include <sys/types.h>
6633 $def_ioctl_meteor_h_name
6634 $def_ioctl_bt848_h_name
6635 #ifdef IOCTL_METEOR_H_NAME
6636 #include IOCTL_METEOR_H_NAME
6638 #ifdef IOCTL_BT848_H_NAME
6639 #include IOCTL_BT848_H_NAME
6642 ioctl(0, METEORSINPUT, 0);
6643 ioctl(0, TVTUNER_GETFREQ, 0);
6647 cc_check
&& _tv_bsdbt848
=yes
6650 if test "$_tv_bsdbt848" = yes ; then
6651 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
6652 inputmodules
="tv-bsdbt848 $inputmodules"
6654 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
6655 noinputmodules
="tv-bsdbt848 $noinputmodules"
6657 echores
"$_tv_bsdbt848"
6658 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
6661 echocheck
"DirectShow TV interface"
6662 if test "$_tv_dshow" = auto
; then
6664 if test "$_tv" = yes && win32
; then
6669 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
6673 cc_check
-lole32 -luuid && _tv_dshow
=yes
6676 if test "$_tv_dshow" = yes ; then
6677 inputmodules
="tv-dshow $inputmodules"
6678 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
6679 extra_ldflags
="$extra_ldflags -lole32 -luuid"
6681 noinputmodules
="tv-dshow $noinputmodules"
6682 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
6684 echores
"$_tv_dshow"
6687 echocheck
"Video 4 Linux TV interface"
6688 if test "$_tv_v4l1" = auto
; then
6690 if test "$_tv" = yes && linux
; then
6691 header_check linux
/videodev.h
&& _tv_v4l1
=yes
6694 if test "$_tv_v4l1" = yes ; then
6697 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6698 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
6699 inputmodules
="tv-v4l $inputmodules"
6701 noinputmodules
="tv-v4l1 $noinputmodules"
6702 def_tv_v4l
='#undef CONFIG_TV_V4L'
6707 echocheck
"Video 4 Linux 2 TV interface"
6708 if test "$_tv_v4l2" = auto
; then
6710 if test "$_tv" = yes && linux
; then
6711 header_check linux
/videodev2.h
&& _tv_v4l2
=yes
6714 if test "$_tv_v4l2" = yes ; then
6717 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6718 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
6719 inputmodules
="tv-v4l2 $inputmodules"
6721 noinputmodules
="tv-v4l2 $noinputmodules"
6722 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
6727 echocheck
"Radio interface"
6728 if test "$_radio" = yes ; then
6729 def_radio
='#define CONFIG_RADIO 1'
6730 inputmodules
="radio $inputmodules"
6731 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6734 if test "$_radio_capture" = yes ; then
6736 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
6738 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6741 noinputmodules
="radio $noinputmodules"
6742 def_radio
='#undef CONFIG_RADIO'
6743 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6747 echocheck
"Capture for Radio interface"
6748 echores
"$_radio_capture"
6750 echocheck
"Video 4 Linux 2 Radio interface"
6751 if test "$_radio_v4l2" = auto
; then
6753 if test "$_radio" = yes && linux
; then
6754 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
6757 if test "$_radio_v4l2" = yes ; then
6758 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
6760 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
6762 echores
"$_radio_v4l2"
6764 echocheck
"Video 4 Linux Radio interface"
6765 if test "$_radio_v4l" = auto
; then
6767 if test "$_radio" = yes && linux
; then
6768 header_check linux
/videodev.h
&& _radio_v4l
=yes
6771 if test "$_radio_v4l" = yes ; then
6772 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
6774 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
6776 echores
"$_radio_v4l"
6778 if freebsd || netbsd || openbsd || dragonfly || bsdos \
6779 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6780 echocheck
"*BSD BrookTree 848 Radio interface"
6783 #include <sys/types.h>
6784 $def_ioctl_bt848_h_name
6785 #ifdef IOCTL_BT848_H_NAME
6786 #include IOCTL_BT848_H_NAME
6788 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
6790 cc_check
&& _radio_bsdbt848
=yes
6791 echores
"$_radio_bsdbt848"
6792 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
6794 if test "$_radio_bsdbt848" = yes ; then
6795 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
6797 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
6800 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6801 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6802 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6805 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6806 if test "$_pvr" = auto
; then
6808 if test "$_tv_v4l2" = yes && linux
; then
6810 #include <linux/videodev2.h>
6811 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
6813 cc_check
&& _pvr
=yes
6816 if test "$_pvr" = yes ; then
6817 def_pvr
='#define CONFIG_PVR 1'
6818 inputmodules
="pvr $inputmodules"
6820 noinputmodules
="pvr $noinputmodules"
6821 def_pvr
='#undef CONFIG_PVR'
6827 if test "$_ftp" = "auto" ; then
6828 test "$networking" = "yes" && ! beos
&& _ftp
=yes
6830 if test "$_ftp" = yes ; then
6831 def_ftp
='#define CONFIG_FTP 1'
6832 inputmodules
="ftp $inputmodules"
6834 noinputmodules
="ftp $noinputmodules"
6835 def_ftp
='#undef CONFIG_FTP'
6839 echocheck
"vstream client"
6840 if test "$_vstream" = auto
; then
6843 #include <vstream-client.h>
6844 void vstream_error(const char *format, ... ) {}
6845 int main(void) { vstream_start(); return 0; }
6847 cc_check
-lvstream-client && _vstream
=yes
6849 if test "$_vstream" = yes ; then
6850 def_vstream
='#define CONFIG_VSTREAM 1'
6851 inputmodules
="vstream $inputmodules"
6852 extra_ldflags
="$extra_ldflags -lvstream-client"
6854 noinputmodules
="vstream $noinputmodules"
6855 def_vstream
='#undef CONFIG_VSTREAM'
6860 echocheck
"OSD menu"
6861 if test "$_menu" = yes ; then
6862 def_menu
='#define CONFIG_MENU 1'
6863 test $_dvbin = "yes" && _menu_dvbin
=yes
6865 def_menu
='#undef CONFIG_MENU'
6871 echocheck
"Subtitles sorting"
6872 if test "$_sortsub" = yes ; then
6873 def_sortsub
='#define CONFIG_SORTSUB 1'
6875 def_sortsub
='#undef CONFIG_SORTSUB'
6880 echocheck
"XMMS inputplugin support"
6881 if test "$_xmms" = yes ; then
6882 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6883 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
6884 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
6886 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6887 _xmmslibdir
=/usr
/lib
6890 def_xmms
='#define CONFIG_XMMS 1'
6892 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
6894 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6897 def_xmms
='#undef CONFIG_XMMS'
6901 if test "$_charset" != "noconv" ; then
6902 def_charset
="#define MSG_CHARSET \"$_charset\""
6904 def_charset
="#undef MSG_CHARSET"
6908 #############################################################################
6910 echocheck
"automatic gdb attach"
6911 if test "$_crash_debug" = yes ; then
6912 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
6914 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
6917 echores
"$_crash_debug"
6919 echocheck
"compiler support for noexecstack"
6920 if cflag_check
-Wl,-z,noexecstack
; then
6921 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
6927 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
6928 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
6929 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
6936 # Dynamic linking flags
6937 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6939 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
6940 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
6941 _ld_dl_dynamic
='-rdynamic'
6944 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6945 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
6946 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
6948 def_debug
='#undef MP_DEBUG'
6949 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
6952 echocheck
"joystick"
6953 def_joystick
='#undef CONFIG_JOYSTICK'
6954 if test "$_joystick" = yes ; then
6955 if linux || freebsd
; then
6956 # TODO add some check
6957 def_joystick
='#define CONFIG_JOYSTICK 1'
6960 res_comment
="unsupported under $system_name"
6963 echores
"$_joystick"
6966 if test "$_lirc" = auto
; then
6968 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
6970 if test "$_lirc" = yes ; then
6971 def_lirc
='#define CONFIG_LIRC 1'
6972 libs_mplayer
="$libs_mplayer -llirc_client"
6974 def_lirc
='#undef CONFIG_LIRC'
6979 if test "$_lircc" = auto
; then
6981 header_check lirc
/lircc.h
-llircc && _lircc
=yes
6983 if test "$_lircc" = yes ; then
6984 def_lircc
='#define CONFIG_LIRCC 1'
6985 libs_mplayer
="$libs_mplayer -llircc"
6987 def_lircc
='#undef CONFIG_LIRCC'
6992 # Detect maemo development platform libraries availability (http://www.maemo.org),
6993 # they are used when run on Nokia 770|8x0
6994 echocheck
"maemo (Nokia 770|8x0)"
6995 if test "$_maemo" = auto
; then
6997 statement_check libosso.h
'osso_initialize('', '', 0, NULL)' $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
6999 if test "$_maemo" = yes ; then
7000 def_maemo
='#define CONFIG_MAEMO 1'
7001 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
7002 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
7004 def_maemo
='#undef CONFIG_MAEMO'
7009 #############################################################################
7011 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
7012 # the OMF format needs to come after the 'extern symbol prefix' check, which
7015 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
7018 #############################################################################
7019 # 64 bit file offsets?
7020 if test "$_largefiles" = yes || freebsd
; then
7021 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7022 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7023 # dvdread support requires this (for off64_t)
7024 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7028 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
7030 # This must be the last test to be performed. Any other tests following it
7031 # could fail due to linker errors. libdvdnavmini is intentionally not linked
7032 # against libdvdread (to permit MPlayer to use its own copy of the library).
7033 # So any compilation using the flags added here but not linking against
7034 # libdvdread can fail.
7035 echocheck
"DVD support (libdvdnav)"
7036 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
7040 if test "$_dvdnav" = auto
; then
7041 if test "$_dvdread_internal" = yes ; then
7044 res_comment
="internal"
7046 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7049 if test "$_dvdnav" = auto
; then
7051 _dvdnavdir
=$
($_dvdnavconfig --cflags)
7052 _dvdnavlibs
=$
($_dvdnavconfig --libs)
7053 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7055 if test "$_dvdnav" = yes ; then
7057 def_dvdnav
='#define CONFIG_DVDNAV 1'
7058 if test "$dvdnav_internal" = yes ; then
7059 cflags_libdvdnav
="-Ilibdvdnav"
7060 inputmodules
="dvdnav(internal) $inputmodules"
7062 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
7063 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
7064 inputmodules
="dvdnav $inputmodules"
7067 def_dvdnav
='#undef CONFIG_DVDNAV'
7068 noinputmodules
="dvdnav $noinputmodules"
7072 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
7073 # Read dvdnav comment above.
7076 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7077 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7079 for part
in $list; do
7080 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7081 echo "${nprefix}_$part = yes"
7086 #############################################################################
7087 echo "Creating config.mak"
7088 cat > config.mak
<< EOF
7089 # -------- Generated by configure -----------
7091 # Ensure that locale settings do not interfere with shell commands.
7094 CONFIGURATION = $configuration
7097 DOC_LANGS = $language_doc
7098 DOC_LANG_ALL = $doc_lang_all
7099 MAN_LANGS = $language_man
7100 MAN_LANG_ALL = $man_lang_all
7101 MSG_LANGS = $language_msg
7102 MSG_LANG_ALL = $msg_lang_all
7104 prefix = \$(DESTDIR)$_prefix
7105 BINDIR = \$(DESTDIR)$_bindir
7106 DATADIR = \$(DESTDIR)$_datadir
7107 LIBDIR = \$(DESTDIR)$_libdir
7108 MANDIR = \$(DESTDIR)$_mandir
7109 CONFDIR = \$(DESTDIR)$_confdir
7110 LOCALEDIR = \$(DESTDIR)$_localedir
7118 INSTALLSTRIP = $_install_strip
7121 CFLAGS = $WARNFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
7122 CXXFLAGS = $WARNFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
7123 DEPFLAGS = $DEPFLAGS
7125 CFLAGS_DHAHELPER = $cflags_dhahelper
7126 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
7127 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7128 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7129 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7130 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7131 CFLAGS_STACKREALIGN = $cflags_stackrealign
7132 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7133 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7135 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7136 EXTRALIBS_MPLAYER = $libs_mplayer
7145 $(mak_enable "$arch_all" "$arch" ARCH)
7146 $(mak_enable "$subarch_all" "$subarch" ARCH)
7147 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
7151 NEED_GETTIMEOFDAY = $_need_gettimeofday
7152 NEED_GLOB = $_need_glob
7153 NEED_MMAP = $_need_mmap
7154 NEED_SETENV = $_need_setenv
7155 NEED_SHMEM = $_need_shmem
7156 NEED_STRSEP = $_need_strsep
7157 NEED_SWAB = $_need_swab
7158 NEED_VSSCANF = $_need_vsscanf
7166 APPLE_IR = $_apple_ir
7167 APPLE_REMOTE = $_apple_remote
7169 AUDIO_INPUT = $_audio_input
7170 BITMAP_FONT = $_bitmap_font
7175 COREAUDIO = $_coreaudio
7176 COREVIDEO = $_corevideo
7179 DIRECT3D = $_direct3d
7180 DIRECTFB = $_directfb
7184 DVDNAV_INTERNAL = $dvdnav_internal
7186 DVDREAD_INTERNAL = $_dvdread_internal
7191 FAAD_INTERNAL = $_faad_internal
7192 FASTMEMCPY = $_fastmemcpy
7194 FREETYPE = $_freetype
7199 GL_WIN32 = $_gl_win32
7202 MATRIXVIEW = $matrixview
7203 HAVE_POSIX_SELECT = $_posix_select
7204 HAVE_SYS_MMAN_H = $_mman
7207 JOYSTICK = $_joystick
7214 LIBBLURAY = $_bluray
7218 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7222 LIBMENU_DVBIN = $_menu_dvbin
7223 LIBMPEG2 = $_libmpeg2
7224 LIBNEMESI = $_nemesi
7226 LIBSMBCLIENT = $_smb
7227 LIBTHEORA = $_theora
7230 MACOSX_FINDER = $_macosx_finder
7236 MUSEPACK = $_musepack
7238 NATIVE_RTSP = $_native_rtsp
7239 NETWORKING = $networking
7242 PE_EXECUTABLE = $_pe_executable
7245 PRIORITY = $_priority
7249 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7250 QTX_EMULATION = $_qtx_emulation
7253 RADIO_CAPTURE=$_radio_capture
7254 REAL_CODECS = $_real
7258 STREAM_CACHE = $_stream_cache
7259 SGIAUDIO = $_sgiaudio
7260 SUNAUDIO = $_sunaudio
7265 TREMOR_INTERNAL = $_tremor_internal
7267 TV_BSDBT848 = $_tv_bsdbt848
7268 TV_DSHOW = $_tv_dshow
7272 UNRAR_EXEC = $_unrar_exec
7278 VIDIX_PCIDB = $_vidix_pcidb_val
7279 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7280 VIDIX_IVTV=$_vidix_drv_ivtv
7281 VIDIX_MACH64=$_vidix_drv_mach64
7282 VIDIX_MGA=$_vidix_drv_mga
7283 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7284 VIDIX_NVIDIA=$_vidix_drv_nvidia
7285 VIDIX_PM2=$_vidix_drv_pm2
7286 VIDIX_PM3=$_vidix_drv_pm3
7287 VIDIX_RADEON=$_vidix_drv_radeon
7288 VIDIX_RAGE128=$_vidix_drv_rage128
7289 VIDIX_S3=$_vidix_drv_s3
7290 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7291 VIDIX_SIS=$_vidix_drv_sis
7292 VIDIX_UNICHROME=$_vidix_drv_unichrome
7296 WIN32DLL = $_win32dll
7297 WIN32WAVEOUT = $_win32waveout
7298 WIN32_EMULATION = $_win32_emulation
7299 WINVIDIX = $winvidix
7301 XANIM_CODECS = $_xanim
7303 XMMS_PLUGINS = $_xmms
7309 YUV4MPEG = $_yuv4mpeg
7314 FFMPEG_EVAL_API = $ffmpeg_eval_api
7315 FFMPEG_INTERNALS = $ffmpeg_internals
7316 FFMPEG_SOURCE_PATH = $_ffmpeg_source
7320 YASMFLAGS = $YASMFLAGS
7322 CONFIG_BZLIB = $bzlib
7323 CONFIG_VDPAU = $_vdpau
7324 CONFIG_XVMC = $_xvmc
7325 CONFIG_ZLIB = $_zlib
7327 HAVE_PTHREADS = $_pthreads
7329 HAVE_W32THREADS = $_w32threads
7330 HAVE_YASM = $have_yasm
7334 #############################################################################
7336 ff_config_enable
() {
7337 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7338 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7340 test -z "$_nprefix" && _nprefix
='CONFIG'
7341 for part
in $list; do
7342 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7343 echo "#define ${_nprefix}_$part 1"
7345 echo "#define ${_nprefix}_$part 0"
7350 echo "Creating config.h"
7352 /*----------------------------------------------------------------------------
7353 ** This file has been automatically generated by configure any changes in it
7354 ** will be lost when you run configure again.
7355 ** Instead of modifying definitions here, use the --enable/--disable options
7356 ** of the configure script! See ./configure --help for details.
7357 *---------------------------------------------------------------------------*/
7359 #ifndef MPLAYER_CONFIG_H
7360 #define MPLAYER_CONFIG_H
7362 /* Undefine this if you do not want to select mono audio (left or right)
7363 with a stereo MPEG layer 2/3 audio stream. The command line option
7364 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7365 right-only), with 0 being the default.
7367 #define CONFIG_FAKE_MONO 1
7369 /* set up audio OUTBURST. Do not change this! */
7370 #define OUTBURST 512
7372 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7374 #undef FAST_OSD_TABLE
7376 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
7377 #define MPEG12_POSTPROC 1
7378 #define ATTRIBUTE_ALIGNED_MAX 16
7382 #define CONFIGURATION "$configuration"
7384 #define MPLAYER_DATADIR "$_datadir"
7385 #define MPLAYER_CONFDIR "$_confdir"
7386 #define MPLAYER_LIBDIR "$_libdir"
7387 #define MPLAYER_LOCALEDIR "$_localedir"
7391 /* definitions needed by included libraries */
7392 #define HAVE_INTTYPES_H 1
7393 /* libmpeg2 + FFmpeg */
7396 #define HAVE_ERRNO_H 1
7397 /* libdvdcss + libdvdread */
7398 #define HAVE_LIMITS_H 1
7399 /* libdvdcss + libfaad2 */
7400 #define HAVE_UNISTD_H 1
7401 /* libfaad2 + libdvdread */
7402 #define STDC_HEADERS 1
7403 #define HAVE_MEMCPY 1
7405 #define HAVE_STDLIB_H 1
7406 #define HAVE_STRING_H 1
7407 #define HAVE_STRINGS_H 1
7408 #define HAVE_SYS_STAT_H 1
7409 #define HAVE_SYS_TYPES_H 1
7411 #define READ_CACHE_TRACE 0
7413 #define HAVE_DLFCN_H 1
7417 /* system headers */
7419 $def_alsa_asoundlib_h
7423 $def_mman_has_map_failed
7425 $def_sys_asoundlib_h
7426 $def_sys_soundcard_h
7433 /* system functions */
7456 /* system-specific features */
7471 $def_restrict_keyword
7476 /* configurable options */
7480 $def_dynamic_plugins
7483 $def_runtime_cpudetection
7491 #define __CPU__ $iproc
7495 $(ff_config_enable "$arch_all" "$arch" "ARCH")
7496 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
7497 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
7500 /* Blu-ray/DVD/VCD/CD */
7501 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
7502 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
7523 /* codec libraries */
7553 #define BINARY_CODECS_PATH "$_codecsdir"
7554 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7557 /* Audio output drivers */
7573 $def_ossaudio_devdsp
7574 $def_ossaudio_devmixer
7587 $def_ioctl_bt848_h_name
7588 $def_ioctl_meteor_h_name
7676 $def_vidix_drv_cyberblade
7678 $def_vidix_drv_mach64
7680 $def_vidix_drv_mga_crtc2
7681 $def_vidix_drv_nvidia
7683 $def_vidix_drv_radeon
7684 $def_vidix_drv_rage128
7686 $def_vidix_drv_sh_veu
7688 $def_vidix_drv_unichrome
7707 $def_ffmpeg_eval_api
7708 $def_ffmpeg_internals
7734 #define HAVE_INLINE_ASM 1
7736 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
7738 #define HAVE_EBP_AVAILABLE 1
7740 #define HAVE_EBP_AVAILABLE 0
7743 #endif /* MPLAYER_CONFIG_H */
7746 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
7747 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
7749 #############################################################################
7751 .
/version.sh
`$_cc -dumpversion`
7755 Config files successfully generated by ./configure $configuration !
7757 Install prefix: $_prefix
7758 Data directory: $_datadir
7759 Config direct.: $_confdir
7761 Byte order: $_byte_order
7762 Optimizing for: $_optimizing
7765 Messages (in addition to English): $language_msg
7766 Manual pages: $language_man
7767 Documentation: $language_doc
7769 Enabled optional drivers:
7770 Input: $inputmodules
7771 Codecs: $codecmodules
7772 Audio output: $aomodules
7773 Video output: $vomodules
7775 Disabled optional drivers:
7776 Input: $noinputmodules
7777 Codecs: $nocodecmodules
7778 Audio output: $noaomodules
7779 Video output: $novomodules
7781 'config.h' and 'config.mak' contain your configuration options.
7782 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7783 compile *** DO NOT REPORT BUGS if you tweak these files ***
7785 'make' will now compile MPlayer and 'make install' will install it.
7786 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7791 if test "$_mtrr" = yes ; then
7792 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)"
7798 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7799 operating system ($system_name). You may encounter a few files that cannot
7800 be played due to missing open source video/audio codec support.
7807 Check $TMPLOG if you wonder why an autodetection failed (make sure
7808 development headers/packages are installed).
7810 NOTE: The --enable-* parameters unconditionally force options on, completely
7811 skipping autodetection. This behavior is unlike what you may be used to from
7812 autoconf-based configure scripts that can decide to override you. This greater
7813 level of control comes at a price. You may have to provide the correct compiler
7814 and linker flags yourself.
7815 If you used one of these options (except --enable-menu and similar ones that
7816 turn on internal features) and experience a compilation or linking failure,
7817 make sure you have passed the necessary compiler/linker flags to configure.
7819 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
7823 if test "$warn_cflags" = yes; then
7826 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
7829 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7831 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7832 To do so, execute 'CFLAGS= ./configure <options>'
7838 rm -rf "$mplayer_tmpdir"