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_a disable static FFmpeg [autodetect]
341 --disable-ffmpeg_so disable shared FFmpeg [autodetect]
342 --disable-tremor-internal disable internal Tremor [enabled]
343 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
344 --enable-tremor enable external Tremor [autodetect]
345 --disable-libvorbis disable libvorbis support [autodetect]
346 --disable-speex disable Speex support [autodetect]
347 --enable-theora enable OggTheora libraries [autodetect]
348 --enable-faad enable external FAAD2 (AAC) [autodetect]
349 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
350 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
351 --disable-ladspa disable LADSPA plugin support [autodetect]
352 --disable-libbs2b disable libbs2b audio filter support [autodetect]
353 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
354 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
355 --disable-mad disable libmad (MPEG audio) support [autodetect]
356 --enable-xmms enable XMMS input plugin support [disabled]
357 --enable-libdca enable libdca support [autodetect]
358 --disable-mp3lib disable builtin mp3lib [autodetect]
359 --disable-liba52 disable liba52 [autodetect]
360 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
361 --disable-musepack disable musepack support [autodetect]
364 --disable-vidix disable VIDIX [for x86 *nix]
365 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
366 Available: cyberblade, ivtv, mach64, mga, mga_crtc2,
367 nvidia, pm2, pm3, radeon, rage128, s3, sis, unichrome
368 --disable-vidix-pcidb disable VIDIX PCI device name database
369 --enable-dhahelper enable VIDIX dhahelper support
370 --enable-svgalib_helper enable VIDIX svgalib_helper support
371 --enable-gl enable OpenGL video output [autodetect]
372 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
373 --enable-dga2 enable DGA 2 support [autodetect]
374 --enable-dga1 enable DGA 1 support [autodetect]
375 --enable-vesa enable VESA video output [autodetect]
376 --enable-svga enable SVGAlib video output [autodetect]
377 --enable-sdl enable SDL video output [autodetect]
378 --enable-kva enable KVA video output [autodetect]
379 --enable-aa enable AAlib video output [autodetect]
380 --enable-caca enable CACA video output [autodetect]
381 --enable-ggi enable GGI video output [autodetect]
382 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
383 --enable-direct3d enable Direct3D video output [autodetect]
384 --enable-directx enable DirectX video output [autodetect]
385 --enable-dxr2 enable DXR2 video output [autodetect]
386 --enable-dxr3 enable DXR3/H+ video output [autodetect]
387 --enable-ivtv enable IVTV TV-Out video output [autodetect]
388 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
389 --enable-dvb enable DVB video output [autodetect]
390 --enable-mga enable mga_vid video output [autodetect]
391 --enable-xmga enable mga_vid X11 video output [autodetect]
392 --enable-xv enable Xv video output [autodetect]
393 --enable-xvmc enable XvMC acceleration [disable]
394 --enable-vdpau enable VDPAU acceleration [autodetect]
395 --enable-vm enable XF86VidMode support [autodetect]
396 --enable-xinerama enable Xinerama support [autodetect]
397 --enable-x11 enable X11 video output [autodetect]
398 --enable-xshape enable XShape support [autodetect]
399 --disable-xss disable screensaver support via xss [autodetect]
400 --enable-fbdev enable FBDev video output [autodetect]
401 --enable-mlib enable mediaLib video output (Solaris) [disable]
402 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
403 --enable-tdfxfb enable tdfxfb video output [disable]
404 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
405 --enable-wii enable Nintendo Wii/GameCube video output [disable]
406 --enable-directfb enable DirectFB video output [autodetect]
407 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
408 --enable-bl enable Blinkenlights video output [disable]
409 --enable-tdfxvid enable tdfx_vid video output [disable]
410 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
411 --disable-tga disable Targa video output [enable]
412 --disable-pnm disable PNM video output [enable]
413 --disable-md5sum disable md5sum video output [enable]
414 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
415 --disable-corevideo disable CoreVideo video output [autodetect]
416 --disable-quartz disable Quartz video output [autodetect]
419 --disable-alsa disable ALSA audio output [autodetect]
420 --disable-ossaudio disable OSS audio output [autodetect]
421 --disable-arts disable aRts audio output [autodetect]
422 --disable-esd disable esd audio output [autodetect]
423 --disable-pulse disable Pulseaudio audio output [autodetect]
424 --disable-jack disable JACK audio output [autodetect]
425 --enable-openal enable OpenAL audio output [disable]
426 --disable-nas disable NAS audio output [autodetect]
427 --disable-sgiaudio disable SGI audio output [autodetect]
428 --disable-sunaudio disable Sun audio output [autodetect]
429 --disable-kai disable KAI audio output [autodetect]
430 --disable-dart disable DART audio output [autodetect]
431 --disable-win32waveout disable Windows waveout audio output [autodetect]
432 --disable-coreaudio disable CoreAudio audio output [autodetect]
433 --disable-select disable using select() on the audio device [enable]
436 --enable-translation enable support for translated output [disable]
437 --charset=charset convert the console messages to this character set
438 --language-doc=lang language to use for the documentation [en]
439 --language-man=lang language to use for the man pages [en]
440 --language-msg=lang extra languages for program messages [all]
441 --language=lang default language to use [en]
442 Specific options override --language. You can pass a list of languages separated
443 by whitespace or commas instead of a single language. Nonexisting translations
444 will be dropped from each list. All translations available in the list will be
445 installed. The value "all" will activate all translations. The LINGUAS
446 environment variable is honored. In all cases the fallback is English.
447 The program always supports English-language output; additional message
448 languages are only installed if --enable-translation is also specified.
449 Available values for --language-doc are: all $doc_lang_all
450 Available values for --language-man are: all $man_lang_all
451 Available values for --language-msg are: all $msg_lang_all
453 Miscellaneous options:
454 --enable-runtime-cpudetection enable runtime CPU detection [disable]
455 --enable-cross-compile enable cross-compilation [autodetect]
456 --cc=COMPILER C compiler to build MPlayer [gcc]
457 --host-cc=COMPILER C compiler for tools needed while building [gcc]
458 --as=ASSEMBLER assembler to build MPlayer [as]
459 --nm=NM nm tool to build MPlayer [nm]
460 --yasm=YASM Yasm assembler to build MPlayer [yasm]
461 --ar=AR librarian to build MPlayer [ar]
462 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
463 --windres=WINDRES windres to build MPlayer [windres]
464 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
465 --enable-static build a statically linked binary
466 --with-install=PATH path to a custom install program
469 --enable-mmx enable MMX [autodetect]
470 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
471 --enable-3dnow enable 3DNow! [autodetect]
472 --enable-3dnowext enable extended 3DNow! [autodetect]
473 --enable-sse enable SSE [autodetect]
474 --enable-sse2 enable SSE2 [autodetect]
475 --enable-ssse3 enable SSSE3 [autodetect]
476 --enable-shm enable shm [autodetect]
477 --enable-altivec enable AltiVec (PowerPC) [autodetect]
478 --enable-armv5te enable DSP extensions (ARM) [autodetect]
479 --enable-armv6 enable ARMv6 (ARM) [autodetect]
480 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
481 --enable-armvfp enable ARM VFP (ARM) [autodetect]
482 --enable-neon enable NEON (ARM) [autodetect]
483 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
484 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
485 --enable-big-endian force byte order to big-endian [autodetect]
486 --enable-debug[=1-3] compile-in debugging information [disable]
487 --enable-profile compile-in profiling information [disable]
488 --disable-sighandler disable sighandler for crashes [enable]
489 --enable-crash-debug enable automatic gdb attach on crash [disable]
490 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
491 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
493 Use these options if autodetection fails:
494 --extra-cflags=FLAGS extra CFLAGS
495 --extra-ldflags=FLAGS extra LDFLAGS
496 --extra-libs=FLAGS extra linker flags
497 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
498 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
500 --with-freetype-config=PATH path to freetype-config
501 --with-glib-config=PATH path to glib*-config
502 --with-gtk-config=PATH path to gtk*-config
503 --with-sdl-config=PATH path to sdl*-config
504 --with-dvdnav-config=PATH path to dvdnav-config
505 --with-dvdread-config=PATH path to dvdread-config
507 This configure script is NOT autoconf-based, even though its output is similar.
508 It will try to autodetect all configuration options. If you --enable an option
509 it will be forcefully turned on, skipping autodetection. This can break
510 compilation, so you need to know what you are doing.
515 # GOTCHA: the variables below defines the default behavior for autodetection
516 # and have - unless stated otherwise - at least 2 states : yes no
517 # If autodetection is available then the third state is: auto
541 test "$CC" && _cc
="$CC"
545 _runtime_cpudetection
=no
557 _xvmc
=no
#auto when complete
620 _dvdnavconfig
=dvdnav-config
621 _dvdreadconfig
=dvdread-config
623 _dvdread_internal
=auto
624 _libdvdcss_internal
=auto
635 _mlib
=no
#broken, thus disabled
707 _freetypeconfig
='freetype-config'
722 def_dos_paths
="#define HAVE_DOS_PATHS 0"
723 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
724 def_priority
="#undef CONFIG_PRIORITY"
725 def_pthread_cache
="#undef PTHREAD_CACHE"
733 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
736 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
739 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
742 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
745 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
748 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
751 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
754 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
758 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
761 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
765 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
767 --with-freetype-config=*)
768 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
771 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
773 --with-glib-config=*)
774 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
776 --with-dvdnav-config=*)
777 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
779 --with-dvdread-config=*)
780 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
784 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
787 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
790 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
792 --extra-libs-mplayer=*)
793 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
797 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
803 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
806 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
809 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
812 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
815 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
818 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
821 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
824 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
827 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
830 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
833 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
836 language
=$
(echo $ac_option | cut
-d '=' -f 2)
855 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
860 --enable-translation) _translation
=yes ;;
861 --disable-translation) _translation
=no
;;
862 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
863 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
864 --enable-cross-compile) _cross_compile
=yes ;;
865 --disable-cross-compile) _cross_compile
=no
;;
866 --enable-mplayer) _mplayer
=yes ;;
867 --disable-mplayer) _mplayer
=no
;;
868 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
869 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
870 --enable-x11) _x11
=yes ;;
871 --disable-x11) _x11
=no
;;
872 --enable-xshape) _xshape
=yes ;;
873 --disable-xshape) _xshape
=no
;;
874 --enable-xss) _xss
=yes ;;
875 --disable-xss) _xss
=no
;;
876 --enable-xv) _xv
=yes ;;
877 --disable-xv) _xv
=no
;;
878 --enable-xvmc) _xvmc
=yes ;;
879 --disable-xvmc) _xvmc
=no
;;
880 --enable-vdpau) _vdpau
=yes ;;
881 --disable-vdpau) _vdpau
=no
;;
882 --enable-sdl) _sdl
=yes ;;
883 --disable-sdl) _sdl
=no
;;
884 --enable-kva) _kva
=yes ;;
885 --disable-kva) _kva
=no
;;
886 --enable-direct3d) _direct3d
=yes ;;
887 --disable-direct3d) _direct3d
=no
;;
888 --enable-directx) _directx
=yes ;;
889 --disable-directx) _directx
=no
;;
890 --enable-win32waveout) _win32waveout
=yes ;;
891 --disable-win32waveout) _win32waveout
=no
;;
892 --enable-nas) _nas
=yes ;;
893 --disable-nas) _nas
=no
;;
894 --enable-png) _png
=yes ;;
895 --disable-png) _png
=no
;;
896 --enable-mng) _mng
=yes ;;
897 --disable-mng) _mng
=no
;;
898 --enable-jpeg) _jpeg
=yes ;;
899 --disable-jpeg) _jpeg
=no
;;
900 --enable-pnm) _pnm
=yes ;;
901 --disable-pnm) _pnm
=no
;;
902 --enable-md5sum) _md5sum
=yes ;;
903 --disable-md5sum) _md5sum
=no
;;
904 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
905 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
906 --enable-gif) _gif
=yes ;;
907 --disable-gif) _gif
=no
;;
908 --enable-gl) _gl
=yes ;;
909 --disable-gl) _gl
=no
;;
910 --enable-matrixview) matrixview
=yes ;;
911 --disable-matrixview) matrixview
=no
;;
912 --enable-ggi) _ggi
=yes ;;
913 --disable-ggi) _ggi
=no
;;
914 --enable-ggiwmh) _ggiwmh
=yes ;;
915 --disable-ggiwmh) _ggiwmh
=no
;;
916 --enable-aa) _aa
=yes ;;
917 --disable-aa) _aa
=no
;;
918 --enable-caca) _caca
=yes ;;
919 --disable-caca) _caca
=no
;;
920 --enable-svga) _svga
=yes ;;
921 --disable-svga) _svga
=no
;;
922 --enable-vesa) _vesa
=yes ;;
923 --disable-vesa) _vesa
=no
;;
924 --enable-fbdev) _fbdev
=yes ;;
925 --disable-fbdev) _fbdev
=no
;;
926 --enable-dvb) _dvb
=yes ;;
927 --disable-dvb) _dvb
=no
;;
928 --enable-dxr2) _dxr2
=yes ;;
929 --disable-dxr2) _dxr2
=no
;;
930 --enable-dxr3) _dxr3
=yes ;;
931 --disable-dxr3) _dxr3
=no
;;
932 --enable-ivtv) _ivtv
=yes ;;
933 --disable-ivtv) _ivtv
=no
;;
934 --enable-v4l2) _v4l2
=yes ;;
935 --disable-v4l2) _v4l2
=no
;;
936 --enable-iconv) _iconv
=yes ;;
937 --disable-iconv) _iconv
=no
;;
938 --enable-langinfo) _langinfo
=yes ;;
939 --disable-langinfo) _langinfo
=no
;;
940 --enable-rtc) _rtc
=yes ;;
941 --disable-rtc) _rtc
=no
;;
942 --enable-libdv) _libdv
=yes ;;
943 --disable-libdv) _libdv
=no
;;
944 --enable-ossaudio) _ossaudio
=yes ;;
945 --disable-ossaudio) _ossaudio
=no
;;
946 --enable-arts) _arts
=yes ;;
947 --disable-arts) _arts
=no
;;
948 --enable-esd) _esd
=yes ;;
949 --disable-esd) _esd
=no
;;
950 --enable-pulse) _pulse
=yes ;;
951 --disable-pulse) _pulse
=no
;;
952 --enable-jack) _jack
=yes ;;
953 --disable-jack) _jack
=no
;;
954 --enable-openal) _openal
=yes ;;
955 --disable-openal) _openal
=no
;;
956 --enable-kai) _kai
=yes ;;
957 --disable-kai) _kai
=no
;;
958 --enable-dart) _dart
=yes ;;
959 --disable-dart) _dart
=no
;;
960 --enable-mad) _mad
=yes ;;
961 --disable-mad) _mad
=no
;;
962 --enable-libcdio) _libcdio
=yes ;;
963 --disable-libcdio) _libcdio
=no
;;
964 --enable-liblzo) _liblzo
=yes ;;
965 --disable-liblzo) _liblzo
=no
;;
966 --enable-libvorbis) _libvorbis
=yes ;;
967 --disable-libvorbis) _libvorbis
=no
;;
968 --enable-speex) _speex
=yes ;;
969 --disable-speex) _speex
=no
;;
970 --enable-tremor) _tremor
=yes ;;
971 --disable-tremor) _tremor
=no
;;
972 --enable-tremor-internal) _tremor_internal
=yes ;;
973 --disable-tremor-internal) _tremor_internal
=no
;;
974 --enable-tremor-low) _tremor_low
=yes ;;
975 --disable-tremor-low) _tremor_low
=no
;;
976 --enable-theora) _theora
=yes ;;
977 --disable-theora) _theora
=no
;;
978 --enable-mpg123) _mpg123
=yes ;;
979 --disable-mpg123) _mpg123
=no
;;
980 --enable-mp3lib) _mp3lib
=yes ;;
981 --disable-mp3lib) _mp3lib
=no
;;
982 --enable-liba52) _liba52
=yes ;;
983 --disable-liba52) _liba52
=no
;;
984 --enable-libdca) _libdca
=yes ;;
985 --disable-libdca) _libdca
=no
;;
986 --enable-libmpeg2) _libmpeg2
=yes ;;
987 --disable-libmpeg2) _libmpeg2
=no
;;
988 --enable-musepack) _musepack
=yes ;;
989 --disable-musepack) _musepack
=no
;;
990 --enable-faad) _faad
=yes ;;
991 --disable-faad) _faad
=no
;;
992 --enable-faad-internal) _faad_internal
=yes ;;
993 --disable-faad-internal) _faad_internal
=no
;;
994 --enable-faad-fixed) _faad_fixed
=yes ;;
995 --disable-faad-fixed) _faad_fixed
=no
;;
996 --enable-ladspa) _ladspa
=yes ;;
997 --disable-ladspa) _ladspa
=no
;;
998 --enable-libbs2b) _libbs2b
=yes ;;
999 --disable-libbs2b) _libbs2b
=no
;;
1000 --enable-xmms) _xmms
=yes ;;
1001 --disable-xmms) _xmms
=no
;;
1002 --enable-vcd) _vcd
=yes ;;
1003 --disable-vcd) _vcd
=no
;;
1004 --enable-bluray) _bluray
=yes ;;
1005 --disable-bluray) _bluray
=no
;;
1006 --enable-dvdread) _dvdread
=yes ;;
1007 --disable-dvdread) _dvdread
=no
;;
1008 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1009 --disable-dvdread-internal) _dvdread_internal
=no
;;
1010 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1011 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1012 --enable-dvdnav) _dvdnav
=yes ;;
1013 --disable-dvdnav) _dvdnav
=no
;;
1014 --enable-xanim) _xanim
=yes ;;
1015 --disable-xanim) _xanim
=no
;;
1016 --enable-real) _real
=yes ;;
1017 --disable-real) _real
=no
;;
1018 --enable-live) _live
=yes ;;
1019 --disable-live) _live
=no
;;
1020 --enable-nemesi) _nemesi
=yes ;;
1021 --disable-nemesi) _nemesi
=no
;;
1022 --enable-xinerama) _xinerama
=yes ;;
1023 --disable-xinerama) _xinerama
=no
;;
1024 --enable-mga) _mga
=yes ;;
1025 --disable-mga) _mga
=no
;;
1026 --enable-xmga) _xmga
=yes ;;
1027 --disable-xmga) _xmga
=no
;;
1028 --enable-vm) _vm
=yes ;;
1029 --disable-vm) _vm
=no
;;
1030 --enable-xf86keysym) _xf86keysym
=yes ;;
1031 --disable-xf86keysym) _xf86keysym
=no
;;
1032 --enable-mlib) _mlib
=yes ;;
1033 --disable-mlib) _mlib
=no
;;
1034 --enable-sunaudio) _sunaudio
=yes ;;
1035 --disable-sunaudio) _sunaudio
=no
;;
1036 --enable-sgiaudio) _sgiaudio
=yes ;;
1037 --disable-sgiaudio) _sgiaudio
=no
;;
1038 --enable-alsa) _alsa
=yes ;;
1039 --disable-alsa) _alsa
=no
;;
1040 --enable-tv) _tv
=yes ;;
1041 --disable-tv) _tv
=no
;;
1042 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1043 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1044 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1045 --disable-tv-v4l1) _tv_v4l1
=no
;;
1046 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1047 --disable-tv-v4l2) _tv_v4l2
=no
;;
1048 --enable-tv-dshow) _tv_dshow
=yes ;;
1049 --disable-tv-dshow) _tv_dshow
=no
;;
1050 --enable-radio) _radio
=yes ;;
1051 --enable-radio-capture) _radio_capture
=yes ;;
1052 --disable-radio-capture) _radio_capture
=no
;;
1053 --disable-radio) _radio
=no
;;
1054 --enable-radio-v4l) _radio_v4l
=yes ;;
1055 --disable-radio-v4l) _radio_v4l
=no
;;
1056 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1057 --disable-radio-v4l2) _radio_v4l2
=no
;;
1058 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1059 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1060 --enable-pvr) _pvr
=yes ;;
1061 --disable-pvr) _pvr
=no
;;
1062 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1063 --disable-fastmemcpy) _fastmemcpy
=no
;;
1064 --enable-networking) networking
=yes ;;
1065 --disable-networking) networking
=no
;;
1066 --enable-winsock2_h) _winsock2_h
=yes ;;
1067 --disable-winsock2_h) _winsock2_h
=no
;;
1068 --enable-smb) _smb
=yes ;;
1069 --disable-smb) _smb
=no
;;
1070 --enable-vidix) _vidix
=yes ;;
1071 --disable-vidix) _vidix
=no
;;
1072 --with-vidix-drivers=*)
1073 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1075 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1076 --enable-dhahelper) _dhahelper
=yes ;;
1077 --disable-dhahelper) _dhahelper
=no
;;
1078 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1079 --disable-svgalib_helper) _svgalib_helper
=no
;;
1080 --enable-joystick) _joystick
=yes ;;
1081 --disable-joystick) _joystick
=no
;;
1082 --enable-xvid) _xvid
=yes ;;
1083 --disable-xvid) _xvid
=no
;;
1084 --enable-libnut) _libnut
=yes ;;
1085 --disable-libnut) _libnut
=no
;;
1086 --enable-ffmpeg) ffmpeg
=yes ;;
1087 --disable-ffmpeg) ffmpeg
=no
;;
1088 --ffmpeg-source-dir=*)
1089 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1091 --enable-lirc) _lirc
=yes ;;
1092 --disable-lirc) _lirc
=no
;;
1093 --enable-lircc) _lircc
=yes ;;
1094 --disable-lircc) _lircc
=no
;;
1095 --enable-apple-remote) _apple_remote
=yes ;;
1096 --disable-apple-remote) _apple_remote
=no
;;
1097 --enable-apple-ir) _apple_ir
=yes ;;
1098 --disable-apple-ir) _apple_ir
=no
;;
1099 --enable-gui) _gui
=yes ;;
1100 --disable-gui) _gui
=no
;;
1101 --enable-gtk1) _gtk1
=yes ;;
1102 --disable-gtk1) _gtk1
=no
;;
1103 --enable-termcap) _termcap
=yes ;;
1104 --disable-termcap) _termcap
=no
;;
1105 --enable-termios) _termios
=yes ;;
1106 --disable-termios) _termios
=no
;;
1107 --enable-3dfx) _3dfx
=yes ;;
1108 --disable-3dfx) _3dfx
=no
;;
1109 --enable-s3fb) _s3fb
=yes ;;
1110 --disable-s3fb) _s3fb
=no
;;
1111 --enable-wii) _wii
=yes ;;
1112 --disable-wii) _wii
=no
;;
1113 --enable-tdfxfb) _tdfxfb
=yes ;;
1114 --disable-tdfxfb) _tdfxfb
=no
;;
1115 --disable-tdfxvid) _tdfxvid
=no
;;
1116 --enable-tdfxvid) _tdfxvid
=yes ;;
1117 --disable-xvr100) _xvr100
=no
;;
1118 --enable-xvr100) _xvr100
=yes ;;
1119 --disable-tga) _tga
=no
;;
1120 --enable-tga) _tga
=yes ;;
1121 --enable-directfb) _directfb
=yes ;;
1122 --disable-directfb) _directfb
=no
;;
1123 --enable-zr) _zr
=yes ;;
1124 --disable-zr) _zr
=no
;;
1125 --enable-bl) _bl
=yes ;;
1126 --disable-bl) _bl
=no
;;
1127 --enable-mtrr) _mtrr
=yes ;;
1128 --disable-mtrr) _mtrr
=no
;;
1129 --enable-largefiles) _largefiles
=yes ;;
1130 --disable-largefiles) _largefiles
=no
;;
1131 --enable-shm) _shm
=yes ;;
1132 --disable-shm) _shm
=no
;;
1133 --enable-select) _select
=yes ;;
1134 --disable-select) _select
=no
;;
1135 --enable-cdparanoia) _cdparanoia
=yes ;;
1136 --disable-cdparanoia) _cdparanoia
=no
;;
1137 --enable-cddb) _cddb
=yes ;;
1138 --disable-cddb) _cddb
=no
;;
1139 --enable-big-endian) _big_endian
=yes ;;
1140 --disable-big-endian) _big_endian
=no
;;
1141 --enable-bitmap-font) _bitmap_font
=yes ;;
1142 --disable-bitmap-font) _bitmap_font
=no
;;
1143 --enable-freetype) _freetype
=yes ;;
1144 --disable-freetype) _freetype
=no
;;
1145 --enable-fontconfig) _fontconfig
=yes ;;
1146 --disable-fontconfig) _fontconfig
=no
;;
1147 --enable-unrarexec) _unrar_exec
=yes ;;
1148 --disable-unrarexec) _unrar_exec
=no
;;
1149 --enable-ftp) _ftp
=yes ;;
1150 --disable-ftp) _ftp
=no
;;
1151 --enable-vstream) _vstream
=yes ;;
1152 --disable-vstream) _vstream
=no
;;
1153 --enable-pthreads) _pthreads
=yes ;;
1154 --disable-pthreads) _pthreads
=no
;;
1155 --enable-w32threads) _w32threads
=yes ;;
1156 --disable-w32threads) _w32threads
=no
;;
1157 --enable-ass) _ass
=yes ;;
1158 --disable-ass) _ass
=no
;;
1159 --enable-rpath) _rpath
=yes ;;
1160 --disable-rpath) _rpath
=no
;;
1162 --enable-fribidi) _fribidi
=yes ;;
1163 --disable-fribidi) _fribidi
=no
;;
1165 --enable-enca) _enca
=yes ;;
1166 --disable-enca) _enca
=no
;;
1168 --enable-inet6) _inet6
=yes ;;
1169 --disable-inet6) _inet6
=no
;;
1171 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1172 --disable-gethostbyname2) _gethostbyname2
=no
;;
1174 --enable-dga1) _dga1
=yes ;;
1175 --disable-dga1) _dga1
=no
;;
1176 --enable-dga2) _dga2
=yes ;;
1177 --disable-dga2) _dga2
=no
;;
1179 --enable-menu) _menu
=yes ;;
1180 --disable-menu) _menu
=no
;;
1182 --enable-qtx) _qtx
=yes ;;
1183 --disable-qtx) _qtx
=no
;;
1185 --enable-coreaudio) _coreaudio
=yes ;;
1186 --disable-coreaudio) _coreaudio
=no
;;
1187 --enable-corevideo) _corevideo
=yes ;;
1188 --disable-corevideo) _corevideo
=no
;;
1189 --enable-quartz) _quartz
=yes ;;
1190 --disable-quartz) _quartz
=no
;;
1191 --enable-macosx-finder) _macosx_finder
=yes ;;
1192 --disable-macosx-finder) _macosx_finder
=no
;;
1193 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1194 --disable-macosx-bundle) _macosx_bundle
=no
;;
1196 --enable-maemo) _maemo
=yes ;;
1197 --disable-maemo) _maemo
=no
;;
1199 --enable-sortsub) _sortsub
=yes ;;
1200 --disable-sortsub) _sortsub
=no
;;
1202 --enable-crash-debug) _crash_debug
=yes ;;
1203 --disable-crash-debug) _crash_debug
=no
;;
1204 --enable-sighandler) _sighandler
=yes ;;
1205 --disable-sighandler) _sighandler
=no
;;
1206 --enable-win32dll) _win32dll
=yes ;;
1207 --disable-win32dll) _win32dll
=no
;;
1209 --enable-sse) _sse
=yes ;;
1210 --disable-sse) _sse
=no
;;
1211 --enable-sse2) _sse2
=yes ;;
1212 --disable-sse2) _sse2
=no
;;
1213 --enable-ssse3) _ssse3
=yes ;;
1214 --disable-ssse3) _ssse3
=no
;;
1215 --enable-mmxext) _mmxext
=yes ;;
1216 --disable-mmxext) _mmxext
=no
;;
1217 --enable-3dnow) _3dnow
=yes ;;
1218 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1219 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1220 --disable-3dnowext) _3dnowext
=no
;;
1221 --enable-cmov) _cmov
=yes ;;
1222 --disable-cmov) _cmov
=no
;;
1223 --enable-fast-cmov) _fast_cmov
=yes ;;
1224 --disable-fast-cmov) _fast_cmov
=no
;;
1225 --enable-fast-clz) _fast_clz
=yes ;;
1226 --disable-fast-clz) _fast_clz
=no
;;
1227 --enable-altivec) _altivec
=yes ;;
1228 --disable-altivec) _altivec
=no
;;
1229 --enable-armv5te) _armv5te
=yes ;;
1230 --disable-armv5te) _armv5te
=no
;;
1231 --enable-armv6) _armv6
=yes ;;
1232 --disable-armv6) _armv6
=no
;;
1233 --enable-armv6t2) _armv6t2
=yes ;;
1234 --disable-armv6t2) _armv6t2
=no
;;
1235 --enable-armvfp) _armvfp
=yes ;;
1236 --disable-armvfp) _armvfp
=no
;;
1237 --enable-neon) neon
=yes ;;
1238 --disable-neon) neon
=no
;;
1239 --enable-iwmmxt) _iwmmxt
=yes ;;
1240 --disable-iwmmxt) _iwmmxt
=no
;;
1241 --enable-mmx) _mmx
=yes ;;
1242 --disable-mmx) # 3Dnow! and MMX2 require MMX
1243 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1246 echo "Unknown parameter: $ac_option"
1253 if test "$_gui" = yes ; then
1254 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1255 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1258 # Atmos: moved this here, to be correct, if --prefix is specified
1259 test -z "$_bindir" && _bindir
="$_prefix/bin"
1260 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1261 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1262 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1263 test -z "$_libdir" && _libdir
="$_prefix/lib"
1264 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1266 # Determine our OS name and CPU architecture
1267 if test -z "$_target" ; then
1269 system_name
=$
(uname
-s 2>&1)
1270 case "$system_name" in
1271 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1285 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1295 system_name
="$system_name-UNKNOWN"
1300 # host's CPU/instruction set
1301 host_arch
=$
(uname
-p 2>&1)
1302 case "$host_arch" in
1303 i386|sparc|ppc|alpha|arm|mips|vax
)
1305 powerpc
) # Darwin returns 'powerpc'
1308 *) # uname -p on Linux returns 'unknown' for the processor type,
1309 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1311 # Maybe uname -m (machine hardware name) returns something we
1314 # x86/x86pc is used by QNX
1315 case "$(uname -m 2>&1)" in
1316 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
;;
1317 ia64
) host_arch
=ia64
;;
1318 macppc|ppc
) host_arch
=ppc
;;
1319 ppc64
) host_arch
=ppc64
;;
1320 alpha
) host_arch
=alpha
;;
1321 sparc
) host_arch
=sparc
;;
1322 sparc64
) host_arch
=sparc64
;;
1323 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1324 arm
*|zaurus|cats
) host_arch
=arm
;;
1325 sh3|sh4|sh4a
) host_arch
=sh
;;
1326 s390
) host_arch
=s390
;;
1327 s390x
) host_arch
=s390x
;;
1328 *mips
*) host_arch
=mips
;;
1329 vax
) host_arch
=vax
;;
1330 xtensa
*) host_arch
=xtensa
;;
1331 *) host_arch
=UNKNOWN
;;
1335 else # if test -z "$_target"
1336 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1337 case "$(echo $system_name | tr A-Z a-z)" in
1338 linux
) system_name
=Linux
;;
1339 freebsd
) system_name
=FreeBSD
;;
1340 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1341 netbsd
) system_name
=NetBSD
;;
1342 bsd
/os
) system_name
=BSD
/OS
;;
1343 openbsd
) system_name
=OpenBSD
;;
1344 dragonfly
) system_name
=DragonFly
;;
1345 sunos
) system_name
=SunOS
;;
1346 qnx
) system_name
=QNX
;;
1347 morphos
) system_name
=MorphOS
;;
1348 amigaos
) system_name
=AmigaOS
;;
1349 mingw32
*) system_name
=MINGW32
;;
1351 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1352 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1353 if test $
(echo $host_arch) != "x86_64" ; then
1354 host_arch
=$
(echo $host_arch |
tr '_' '-')
1358 extra_cflags
="-I. $extra_cflags"
1359 _timer
=timer-linux.c
1362 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1363 extra_cflags
="$extra_cflags -I/usr/local/include"
1366 if netbsd || dragonfly
; then
1367 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1368 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1372 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1373 if test "$(basename $_cc)" != "clang" ; then
1374 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
1376 _timer
=timer-darwin.c
1380 extra_ldflags
="$extra_ldflags -lC"
1391 extra_cflags
="$extra_cflags -fno-common"
1392 # -lwinmm is always needed for osdep/timer-win2.c
1393 extra_ldflags
="$extra_ldflags -lwinmm"
1397 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1398 def_priority
="#define CONFIG_PRIORITY 1"
1410 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1411 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1415 extra_ldflags
="$extra_ldflags -lph"
1423 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1424 def_priority
="#define CONFIG_PRIORITY 1"
1427 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1428 test "$tmpdir" && break
1431 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1432 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1435 TMPC
="$mplayer_tmpdir/tmp.c"
1436 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1437 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1438 TMPH
="$mplayer_tmpdir/tmp.h"
1439 TMPS
="$mplayer_tmpdir/tmp.S"
1442 echo configuration
: $configuration > "$TMPLOG"
1446 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1447 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1451 # Checking CC version...
1452 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1453 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1454 echocheck
"$_cc version"
1456 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1457 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1458 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1459 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1460 # TODO verify older icc/ecc compatibility
1463 cc_version
="v. ?.??, bad"
1467 cc_version
="$cc_version, ok"
1470 cc_version
="$cc_version, bad"
1474 echores
"$cc_version"
1476 for _cc
in "$_cc" gcc cc
; do
1477 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1478 if test "$cc_name_tmp" = "gcc"; then
1479 cc_name
=$cc_name_tmp
1480 echocheck
"$_cc version"
1482 cc_version
=$
($_cc -dumpversion 2>&1)
1488 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1489 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1490 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1493 echores
"$cc_version"
1496 cc_name_tmp
=$
($_cc -v 2>&1 |
head -n 1 | cut
-d ' ' -f 1)
1497 if test "$cc_name_tmp" = "clang"; then
1498 echocheck
"$_cc version"
1500 cc_version
=$
($_cc -dumpversion 2>&1)
1501 res_comment
="experimental support only"
1502 echores
"clang $cc_version"
1505 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1506 if test "$cc_name_tmp" = "Sun C"; then
1507 echocheck
"$_cc version"
1509 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1510 res_comment
="experimental support only"
1511 echores
"Sun C $cc_version"
1516 test "$cc_fail" = yes && die
"unsupported compiler version"
1518 if test -z "$_target" && x86
; then
1521 int test[(int)sizeof(char *)-7];
1525 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1528 echo "Detected operating system: $system_name"
1529 echo "Detected host architecture: $host_arch"
1532 test "$_host_cc" || _host_cc
=$_cc
1535 echocheck
"cross compilation"
1536 if test $_cross_compile = auto
; then
1538 cflag_check
"" && "$TMPEXE" && _cross_compile
=no
1540 echores
$_cross_compile
1542 if test $_cross_compile = yes; then
1550 # now that we know what compiler should be used for compilation, try to find
1551 # out which assembler is used by the $_cc compiler
1552 if test "$_as" = auto
; then
1553 _as
=$
($_cc -print-prog-name=as
)
1554 test -z "$_as" && _as
=as
1557 if test "$_nm" = auto
; then
1558 _nm
=$
($_cc -print-prog-name=nm
)
1559 test -z "$_nm" && _nm
=nm
1562 # XXX: this should be ok..
1565 if test "$_runtime_cpudetection" = no
; then
1567 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1568 # FIXME: Remove the cygwin check once AMD CPUs are supported
1569 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1570 # Linux with /proc mounted, extract CPU information from it
1571 _cpuinfo
="cat /proc/cpuinfo"
1572 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1573 # FreeBSD with Linux emulation /proc mounted,
1574 # extract CPU information from it
1575 # Don't use it on x86 though, it never reports 3Dnow
1576 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1577 elif darwin
&& ! x86
; then
1578 # use hostinfo on Darwin
1581 # use 'lsattr' on AIX
1582 _cpuinfo
="lsattr -E -l proc0 -a type"
1584 # all other OSes try to extract CPU information from a small helper
1585 # program cpuinfo instead
1586 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1587 _cpuinfo
="./cpuinfo$_exesuf"
1591 # gather more CPU information
1592 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1593 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1594 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1595 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1596 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1598 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1600 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1601 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1603 for ext
in $pparam ; do
1604 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1607 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1608 test $_sse = kernel_check
&& _mmxext
=kernel_check
1610 echocheck
"CPU vendor"
1611 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1613 echocheck
"CPU type"
1617 fi # test "$_runtime_cpudetection" = no
1619 if x86
&& test "$_runtime_cpudetection" = no
; then
1621 if test "$1" = kernel_check
; then
1622 echocheck
"kernel support of $2"
1626 static void catch(int sig) { exit(1); }
1628 signal(SIGILL, catch);
1629 __asm__ volatile ("$3":::"memory"); return 0;
1633 if cc_check
&& tmp_run
; then
1636 _optimizing
="$_optimizing $2"
1641 echo "It seems that your kernel does not correctly support $2."
1642 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1649 extcheck
$_mmx "mmx" "emms"
1650 extcheck
$_mmxext "mmxext" "sfence"
1651 extcheck
$_3dnow "3dnow" "femms"
1652 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1653 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1654 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1655 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1656 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1658 echocheck
"mtrr support"
1659 if test "$_mtrr" = kernel_check
; then
1661 _optimizing
="$_optimizing mtrr"
1665 if test "$_gcc3_ext" != ""; then
1666 # if we had to disable sse/sse2 because the active kernel does not
1667 # support this instruction set extension, we also have to tell
1668 # gcc3 to not generate sse/sse2 instructions for normal C code
1669 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1675 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1676 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1677 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1678 subarch_all
='X86_32 X86_64 PPC64'
1679 case "$host_arch" in
1680 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1683 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1688 if test "$_runtime_cpudetection" = no
; then
1692 3) proc
=i386 iproc
=386 ;;
1693 4) proc
=i486 iproc
=486 ;;
1694 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1695 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1696 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1698 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1700 elif test "$pmodel" -ge 8; then
1702 elif test "$pmodel" -ge 6; then
1709 # It's a bit difficult to determine the correct type of Family 6
1710 # AMD CPUs just from their signature. Instead, we check directly
1711 # whether it supports SSE.
1712 if test "$_sse" = yes; then
1713 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1716 # Again, gcc treats athlon and athlon-tbird similarly.
1721 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1722 # caught and remedied in the optimization tests below.
1726 *) proc
=amdfam10 iproc
=686
1727 test $_fast_clz = "auto" && _fast_clz
=yes
1733 3) proc
=i386 iproc
=386 ;;
1734 4) proc
=i486 iproc
=486 ;;
1736 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1737 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1743 if test "$pmodel" -ge 15; then
1745 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1747 elif test "$pmodel" -ge 7; then
1749 elif test "$pmodel" -ge 3; then
1754 test $_fast_clz = "auto" && _fast_clz
=yes
1757 # A nocona in 32-bit mode has no more capabilities than a prescott.
1758 if test "$pmodel" -ge 3; then
1762 test $_fast_clz = "auto" && _fast_clz
=yes
1764 test $_fast_cmov = "auto" && _fast_cmov
=no
1766 *) proc
=prescott iproc
=686 ;;
1772 if test "$pmodel" -ge 8; then
1774 elif test "$pmodel" -ge 4; then
1781 if test "$pmodel" -ge 9; then
1788 *) proc
=i686 iproc
=i686
;;
1793 3) proc
=i386 iproc
=386 ;;
1794 4) proc
=i486 iproc
=486 ;;
1795 *) proc
=i586 iproc
=586 ;;
1799 proc
=i586 iproc
=586 ;;
1801 test $_fast_clz = "auto" && _fast_clz
=no
1802 fi # test "$_runtime_cpudetection" = no
1805 # check that gcc supports our CPU, if not, fall back to earlier ones
1806 # LGB: check -mcpu and -march swithing step by step with enabling
1807 # to fall back till 386.
1809 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1811 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1817 echocheck
"GCC & CPU optimization abilities"
1818 if test "$_runtime_cpudetection" = no
; then
1819 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1820 cflag_check
-march=native
&& proc
=native
1822 if test "$proc" = "amdfam10"; then
1823 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1825 if test "$proc" = "k8"; then
1826 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1828 if test "$proc" = "athlon-xp"; then
1829 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1831 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1832 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1834 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1835 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1836 if cflag_check
-march=i586
$cpuopt=i686
; then
1843 if test "$proc" = "prescott" ; then
1844 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1846 if test "$proc" = "core2" ; then
1847 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1849 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
1850 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1852 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1853 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1855 if test "$proc" = "i586"; then
1856 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1858 if test "$proc" = "i486" ; then
1859 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1861 if test "$proc" = "i386" ; then
1862 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1864 if test "$proc" = "error" ; then
1865 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1869 elif test "$proc" = "i586-i686"; then
1870 _march
="-march=i586"
1871 _mcpu
="$cpuopt=i686"
1874 _march
="-march=$proc"
1875 _mcpu
="$cpuopt=$proc"
1878 else # if test "$_runtime_cpudetection" = no
1879 _mcpu
="$cpuopt=generic"
1880 # at least i486 required, for bswap instruction
1881 _march
="-march=i486"
1882 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1883 cflag_check
$_mcpu || _mcpu
=""
1884 cflag_check
$_march $_mcpu || _march
=""
1887 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1888 ## autodetected mcpu/march parameters
1889 if test "$_target" ; then
1890 # TODO: it may be a good idea to check GCC and fall back in all cases
1891 if test "$host_arch" = "i586-i686"; then
1892 _march
="-march=i586"
1893 _mcpu
="$cpuopt=i686"
1895 _march
="-march=$host_arch"
1896 _mcpu
="$cpuopt=$host_arch"
1904 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1905 i686|athlon
*|pentium
*) iproc
=686 ;;
1910 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1915 test $_fast_clz = "auto" && _fast_clz
=yes
1922 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1929 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1930 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1933 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1934 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1939 if test "$_runtime_cpudetection" = no
; then
1944 test $_fast_clz = "auto" && _fast_clz
=no
1953 # 64-bit prescotts exist, but as far as GCC is concerned they
1954 # have the same capabilities as a nocona.
1956 test $_fast_cmov = "auto" && _fast_cmov
=no
1957 test $_fast_clz = "auto" && _fast_clz
=no
1964 fi # test "$_runtime_cpudetection" = no
1966 echocheck
"GCC & CPU optimization abilities"
1967 # This is a stripped-down version of the i386 fallback.
1968 if test "$_runtime_cpudetection" = no
; then
1969 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1970 cflag_check
-march=native
&& proc
=native
1972 # --- AMD processors ---
1973 if test "$proc" = "amdfam10"; then
1974 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1976 if test "$proc" = "k8"; then
1977 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1979 # This will fail if gcc version < 3.3, which is ok because earlier
1980 # versions don't really support 64-bit on amd64.
1981 # Is this a valid assumption? -Corey
1982 if test "$proc" = "athlon-xp"; then
1983 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1985 # --- Intel processors ---
1986 if test "$proc" = "core2"; then
1987 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1989 if test "$proc" = "x86-64"; then
1990 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
1992 if test "$proc" = "nocona"; then
1993 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1995 if test "$proc" = "pentium4"; then
1996 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1999 _march
="-march=$proc"
2000 _mcpu
="$cpuopt=$proc"
2001 if test "$proc" = "error" ; then
2002 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2006 else # if test "$_runtime_cpudetection" = no
2007 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2008 _march
="-march=x86-64"
2009 _mcpu
="$cpuopt=generic"
2010 cflag_check
$_mcpu || _mcpu
="x86-64"
2011 cflag_check
$_mcpu || _mcpu
=""
2012 cflag_check
$_march $_mcpu || _march
=""
2016 test $_fast_cmov = "auto" && _fast_cmov
=yes
2017 test $_fast_clz = "auto" && _fast_clz
=yes
2025 if test "$host_arch" = "sparc64" ; then
2028 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2030 echocheck
"CPU type"
2032 case "$(echo $karch)" in
2037 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2056 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2058 test $_fast_clz = "auto" && _fast_clz
=yes
2066 ppc|ppc64|powerpc|powerpc64
)
2068 def_dcbzl
='#define HAVE_DCBZL 0'
2069 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2072 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2074 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2076 echocheck
"CPU type"
2077 case $system_name in
2079 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2080 if test -n "$($_cpuinfo | grep altivec)"; then
2081 test $_altivec = auto
&& _altivec
=yes
2085 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2086 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2087 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2088 test $_altivec = auto
&& _altivec
=yes
2092 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2094 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2097 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2098 test $_altivec = auto
&& _altivec
=yes
2104 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2107 if test "$_altivec" = yes; then
2108 echores
"$proc altivec"
2114 echocheck
"GCC & CPU optimization abilities"
2116 if test -n "$proc"; then
2118 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2119 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2120 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2121 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2122 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2123 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2124 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2125 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2126 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2129 # gcc 3.1(.1) and up supports 7400 and 7450
2130 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2132 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2133 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2137 # gcc 3.2 and up supports 970
2138 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2140 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2141 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2145 # gcc 3.3 and up supports POWER4
2146 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2148 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2152 # gcc 3.4 and up supports 440*
2153 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2155 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2156 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2160 # gcc 4.0 and up supports POWER5
2161 if test "$_cc_major" -ge "4"; then
2163 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2169 if test -n "$_mcpu"; then
2170 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2171 echores
"$_optimizing"
2176 test $_fast_clz = "auto" && _fast_clz
=yes
2183 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2185 echocheck
"CPU type"
2188 unsigned long ver, mask;
2189 __asm__ ("implver %0" : "=r" (ver));
2190 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2191 printf("%ld-%x\n", ver, ~mask);
2195 $_cc -o "$TMPEXE" "$TMPC"
2196 case $
("$TMPEXE") in
2198 0-0) proc
="ev4"; _mvi
="0";;
2199 1-0) proc
="ev5"; _mvi
="0";;
2200 1-1) proc
="ev56"; _mvi
="0";;
2201 1-101) proc
="pca56"; _mvi
="1";;
2202 2-303) proc
="ev6"; _mvi
="1";;
2203 2-307) proc
="ev67"; _mvi
="1";;
2204 2-1307) proc
="ev68"; _mvi
="1";;
2208 echocheck
"GCC & CPU optimization abilities"
2209 if test "$proc" = "ev68" ; then
2210 cc_check
-mcpu=$proc || proc
=ev67
2212 if test "$proc" = "ev67" ; then
2213 cc_check
-mcpu=$proc || proc
=ev6
2218 test $_fast_clz = "auto" && _fast_clz
=yes
2228 echocheck
"CPU type"
2229 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2230 case "$(echo $proc)" in
2231 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2232 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2233 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2234 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2235 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2236 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2238 # gcc < 3.x does not support -mtune.
2239 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2245 test $_fast_clz = "auto" && _fast_clz
=yes
2279 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2280 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2281 die
"unsupported architecture $host_arch"
2283 esac # case "$host_arch" in
2285 if test "$_runtime_cpudetection" = yes ; then
2287 test "$_cmov" != no
&& _cmov
=yes
2289 test "$_mmx" != no
&& _mmx
=yes
2290 test "$_3dnow" != no
&& _3dnow
=yes
2291 test "$_3dnowext" != no
&& _3dnowext
=yes
2292 test "$_mmxext" != no
&& _mmxext
=yes
2293 test "$_sse" != no
&& _sse
=yes
2294 test "$_sse2" != no
&& _sse2
=yes
2295 test "$_ssse3" != no
&& _ssse3
=yes
2296 test "$_mtrr" != no
&& _mtrr
=yes
2305 echocheck
"byte order"
2306 if test "$_big_endian" = auto
; then
2308 short ascii_name[] = {
2309 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2310 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2311 int main(void) { return (long)ascii_name; }
2314 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2320 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2323 if test "$_big_endian" = yes ; then
2324 _byte_order
='big-endian'
2325 def_words_endian
='#define WORDS_BIGENDIAN 1'
2326 def_bigendian
='#define HAVE_BIGENDIAN 1'
2328 _byte_order
='little-endian'
2329 def_words_endian
='#undef WORDS_BIGENDIAN'
2330 def_bigendian
='#define HAVE_BIGENDIAN 0'
2332 echores
"$_byte_order"
2335 echocheck
"extern symbol prefix"
2339 cc_check
-c || die
"Symbol mangling check failed."
2340 sym
=$
($_nm -P -g $TMPEXE)
2341 extern_prefix
=${sym%%ff_extern*}
2342 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2343 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2344 echores
$extern_prefix
2347 echocheck
"assembler support of -pipe option"
2348 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2349 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2352 echocheck
"compiler support of named assembler arguments"
2354 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2355 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2356 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2358 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2360 echores
$_named_asm_args
2363 if darwin
&& test "$cc_vendor" = "gnu" ; then
2364 echocheck
"GCC support of -mstackrealign"
2365 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2366 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2367 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2368 # wrong code with this flag, but this can be worked around by adding
2369 # -fno-unit-at-a-time as described in the blog post at
2370 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2372 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2373 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2375 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2376 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time \
2377 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2378 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2379 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2382 # Checking for CFLAGS
2384 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2385 CFLAGS
="-O2 $_march $_mcpu $_pipe $_debug $_profile"
2386 WARNFLAGS
="-W -Wall"
2388 elif test -z "$CFLAGS" ; then
2389 if test "$cc_vendor" = "intel" ; then
2390 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2391 WARNFLAGS
="-wd167 -wd556 -wd144"
2392 elif test "$cc_vendor" = "sun" ; then
2393 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2394 elif test "$cc_vendor" = "clang"; then
2395 CFLAGS
="-O2 $_march $_pipe"
2396 elif test "$cc_vendor" != "gnu" ; then
2397 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2399 CFLAGS
="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2400 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2401 extra_ldflags
="$extra_ldflags -ffast-math"
2407 if test "$cc_vendor" = "gnu" ; then
2408 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2409 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2410 # that's the only variable specific to C now, and this option is not valid
2412 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2413 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2414 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2415 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2416 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2418 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2421 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2422 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2425 if test -n "$LDFLAGS" ; then
2426 extra_ldflags
="$extra_ldflags $LDFLAGS"
2428 elif test "$cc_vendor" = "intel" ; then
2429 extra_ldflags
="$extra_ldflags -i-static"
2431 if test -n "$CPPFLAGS" ; then
2432 extra_cflags
="$extra_cflags $CPPFLAGS"
2439 # Checking assembler (_as) compatibility...
2440 # Added workaround for older as that reads from stdin by default - atmos
2441 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2442 echocheck
"assembler ($_as $as_version)"
2444 _pref_as_version
='2.9.1'
2446 if test "$_mmx" = yes ; then
2447 echo 'emms' >> $TMPS
2449 if test "$_3dnow" = yes ; then
2450 _pref_as_version
='2.10.1'
2451 echo 'femms' >> $TMPS
2453 if test "$_3dnowext" = yes ; then
2454 _pref_as_version
='2.10.1'
2455 echo 'pswapd %mm0, %mm0' >> $TMPS
2457 if test "$_mmxext" = yes ; then
2458 _pref_as_version
='2.10.1'
2459 echo 'movntq %mm0, (%eax)' >> $TMPS
2461 if test "$_sse" = yes ; then
2462 _pref_as_version
='2.10.1'
2463 echo 'xorps %xmm0, %xmm0' >> $TMPS
2465 #if test "$_sse2" = yes ; then
2466 # _pref_as_version='2.11'
2467 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2469 if test "$_cmov" = yes ; then
2470 _pref_as_version
='2.10.1'
2471 echo 'cmovb %eax, %ebx' >> $TMPS
2473 if test "$_ssse3" = yes ; then
2474 _pref_as_version
='2.16.92'
2475 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2477 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2479 if test "$as_verc_fail" != yes ; then
2482 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2484 die
"obsolete binutils version"
2494 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2495 #error PIC not enabled
2500 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2506 echocheck
".align is a power of two"
2507 if test "$_asmalign_pot" = auto
; then
2509 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2511 if test "$_asmalign_pot" = "yes" ; then
2512 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2514 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2516 echores
$_asmalign_pot
2519 echocheck
"10 assembler operands"
2521 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2527 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2532 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2533 echores
$ten_operands
2535 echocheck
"ebx availability"
2537 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2544 // just adding ebx to clobber list seems unreliable with some
2545 // compilers, e.g. Haiku's gcc 2.95
2547 // and the above check does not work for OSX 64 bit...
2548 __asm__ volatile("":::"%ebx");
2552 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2553 echores
$ebx_available
2557 if test -z "$YASMFLAGS" ; then
2559 x86_64
&& objformat
="macho64" || objformat
="macho"
2565 # currently tested for Linux x86, x86_64
2566 YASMFLAGS
="-f $objformat"
2567 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2568 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2569 case "$objformat" in
2570 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2571 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2577 echo "pabsw xmm0, xmm0" > $TMPS
2578 yasm_check || _yasm
=""
2579 if test $_yasm ; then
2580 def_yasm
='#define HAVE_YASM 1'
2584 def_yasm
='#define HAVE_YASM 0'
2590 def_bswap
='#define HAVE_BSWAP 0'
2591 echo 'bswap %eax' > $TMPS
2592 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2597 #FIXME: This should happen before the check for CFLAGS..
2598 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2599 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2601 # check if AltiVec is supported by the compiler, and how to enable it
2602 echocheck
"GCC AltiVec flags"
2603 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2604 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2605 # check if <altivec.h> should be included
2606 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2607 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2608 inc_altivec_h
='#include <altivec.h>'
2610 if $
(cflag_check
-faltivec) ; then
2611 _altivec_gcc_flags
="-faltivec"
2614 _altivec_gcc_flags
="none, AltiVec disabled"
2618 echores
"$_altivec_gcc_flags"
2620 # check if the compiler supports braces for vector declarations
2623 int main(void) { (vector int) {1}; return 0; }
2625 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2627 # Disable runtime cpudetection if we cannot generate AltiVec code or
2628 # AltiVec is disabled by the user.
2629 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2630 && _runtime_cpudetection
=no
2632 # Show that we are optimizing for AltiVec (if enabled and supported).
2633 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2634 && _optimizing
="$_optimizing altivec"
2636 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2637 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2641 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2643 echocheck
"XFORM ASM support"
2644 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2645 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2646 echores
"$xform_asm"
2650 echocheck
"ARM pld instruction"
2652 inline_asm_check
'"pld [r0]"' && pld
=yes
2655 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2656 if test $_armv5te = "auto" ; then
2658 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2662 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2664 echocheck
"ARMv6 (SIMD instructions)"
2665 if test $_armv6 = "auto" ; then
2667 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2671 echocheck
"ARMv6t2 (SIMD instructions)"
2672 if test $_armv6t2 = "auto" ; then
2674 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2679 if test $_armvfp = "auto" ; then
2681 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2685 echocheck
"ARM NEON"
2686 if test $neon = "auto" ; then
2688 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2692 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2693 if test $_iwmmxt = "auto" ; then
2695 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2700 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'
2701 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2702 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2703 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2704 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2705 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2706 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2707 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2708 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2709 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2710 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2711 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2712 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2713 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2714 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2715 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2716 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2717 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2718 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2719 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2720 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2722 # Checking kernel version...
2723 if x86_32
&& linux
; then
2725 kernel_version
=$
(uname
-r 2>&1)
2726 echocheck
"$system_name kernel version"
2727 case "$kernel_version" in
2728 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2729 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2730 _k_verc_problem
=yes;;
2732 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2735 if test "$_k_verc_fail" ; then
2736 echores
"$kernel_version, fail"
2737 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2738 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2739 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2740 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2741 echo "2.2.x you must upgrade it to get SSE support!"
2742 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2744 echores
"$kernel_version, ok"
2748 ######################
2749 # MAIN TESTS GO HERE #
2750 ######################
2754 if cflag_check
-lposix ; then
2755 extra_ldflags
="$extra_ldflags -lposix"
2762 if cflag_check
-lm ; then
2771 echocheck
"langinfo"
2772 if test "$_langinfo" = auto
; then
2774 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2776 if test "$_langinfo" = yes ; then
2777 def_langinfo
='#define HAVE_LANGINFO 1'
2779 def_langinfo
='#undef HAVE_LANGINFO'
2781 echores
"$_langinfo"
2784 echocheck
"translation support"
2785 if test "$_translation" = yes; then
2786 def_translation
="#define CONFIG_TRANSLATION 1"
2788 def_translation
="#undef CONFIG_TRANSLATION"
2790 echores
"$_translation"
2792 echocheck
"language"
2793 # Set preferred languages, "all" uses English as main language.
2794 test -z "$language" && language
=$LINGUAS
2795 test -z "$language_doc" && language_doc
=$language
2796 test -z "$language_man" && language_man
=$language
2797 test -z "$language_msg" && language_msg
="all"
2798 language_doc
=$
(echo $language_doc |
tr , " ")
2799 language_man
=$
(echo $language_man |
tr , " ")
2800 language_msg
=$
(echo $language_msg |
tr , " ")
2802 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2803 test "$language_man" = "all" && language_man
=$man_lang_all
2804 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2806 if test "$_translation" != yes ; then
2810 # Prune non-existing translations from language lists.
2811 # Set message translation to the first available language.
2812 # Fall back on English.
2813 for lang
in $language_doc ; do
2814 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2816 language_doc
=$tmp_language_doc
2817 test -z "$language_doc" && language_doc
=en
2819 for lang
in $language_man ; do
2820 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2822 language_man
=$tmp_language_man
2823 test -z "$language_man" && language_man
=en
2825 for lang
in $language_msg ; do
2826 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2828 language_msg
=$tmp_language_msg
2830 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2833 echocheck
"enable sighandler"
2834 if test "$_sighandler" = yes ; then
2835 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2837 def_sighandler
='#undef CONFIG_SIGHANDLER'
2839 echores
"$_sighandler"
2841 echocheck
"runtime cpudetection"
2842 if test "$_runtime_cpudetection" = yes ; then
2843 _optimizing
="Runtime CPU-Detection enabled"
2844 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2846 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2848 echores
"$_runtime_cpudetection"
2851 echocheck
"restrict keyword"
2852 for restrict_keyword
in restrict __restrict __restrict__
; do
2853 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2855 def_restrict_keyword
=$restrict_keyword
2859 if [ -n "$def_restrict_keyword" ]; then
2860 echores
"$def_restrict_keyword"
2864 # Avoid infinite recursion loop ("#define restrict restrict")
2865 if [ "$def_restrict_keyword" != "restrict" ]; then
2866 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2868 def_restrict_keyword
=""
2872 echocheck
"__builtin_expect"
2873 # GCC branch prediction hint
2875 static int foo(int a) {
2876 a = __builtin_expect(a, 10);
2877 return a == 10 ? 0 : 1;
2879 int main(void) { return foo(10) && foo(0); }
2882 cc_check
&& _builtin_expect
=yes
2883 if test "$_builtin_expect" = yes ; then
2884 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2886 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2888 echores
"$_builtin_expect"
2893 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2894 if test "$_kstat" = yes ; then
2895 def_kstat
="#define HAVE_LIBKSTAT 1"
2896 extra_ldflags
="$extra_ldflags -lkstat"
2898 def_kstat
="#undef HAVE_LIBKSTAT"
2904 # required for nanosleep on some systems
2906 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2907 if test "$_posix4" = yes ; then
2908 extra_ldflags
="$extra_ldflags -lposix4"
2912 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2915 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2916 if eval test "x\$_$func" = "xyes"; then
2917 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2920 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2928 #define _XOPEN_SOURCE 500
2930 int main(void) { mkstemp(""); return 0; }
2933 cc_check
&& _mkstemp
=yes
2934 if test "$_mkstemp" = yes ; then
2935 def_mkstemp
='#define HAVE_MKSTEMP 1'
2937 def_mkstemp
='#define HAVE_MKSTEMP 0'
2942 echocheck
"nanosleep"
2944 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2945 if test "$_nanosleep" = yes ; then
2946 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2948 def_nanosleep
='#undef HAVE_NANOSLEEP'
2950 echores
"$_nanosleep"
2954 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2955 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2958 #include <sys/socket.h>
2959 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2962 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2963 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2965 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2966 if test $_winsock2_h = auto
; then
2968 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2970 test "$_ld_sock" && res_comment
="using $_ld_sock"
2974 if test $_winsock2_h = yes ; then
2976 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2978 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2982 echocheck
"arpa/inet.h"
2984 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2985 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2986 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2987 echores
"$arpa_inet_h"
2990 echocheck
"inet_pton()"
2991 def_inet_pton
='#define HAVE_INET_PTON 0'
2993 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2994 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
2996 if test $inet_pton = yes ; then
2997 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2998 def_inet_pton
='#define HAVE_INET_PTON 1'
3000 echores
"$inet_pton"
3003 echocheck
"inet_aton()"
3004 def_inet_aton
='#define HAVE_INET_ATON 0'
3006 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3007 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
3009 if test $inet_aton = yes ; then
3010 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3011 def_inet_aton
='#define HAVE_INET_ATON 1'
3013 echores
"$inet_aton"
3016 echocheck
"socklen_t"
3018 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3019 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
3021 if test "$_socklen_t" = yes ; then
3022 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3024 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3026 echores
"$_socklen_t"
3029 echocheck
"closesocket()"
3031 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
3032 if test "$_closesocket" = yes ; then
3033 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3035 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3037 echores
"$_closesocket"
3040 echocheck
"networking"
3041 test $_winsock2_h = no
&& test $inet_pton = no
&&
3042 test $inet_aton = no
&& networking
=no
3043 if test "$networking" = yes ; then
3044 def_network
='#define CONFIG_NETWORK 1'
3045 def_networking
='#define CONFIG_NETWORKING 1'
3046 extra_ldflags
="$extra_ldflags $_ld_sock"
3047 inputmodules
="networking $inputmodules"
3049 noinputmodules
="networking $noinputmodules"
3050 def_network
='#define CONFIG_NETWORK 0'
3051 def_networking
='#undef CONFIG_NETWORKING'
3053 echores
"$networking"
3057 if test "$_inet6" = auto
; then
3059 #include <sys/types.h>
3060 #if !defined(_WIN32) || defined(__CYGWIN__)
3061 #include <sys/socket.h>
3062 #include <netinet/in.h>
3064 #include <ws2tcpip.h>
3066 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3069 if cc_check
$_ld_sock ; then
3073 if test "$_inet6" = yes ; then
3074 def_inet6
='#define HAVE_AF_INET6 1'
3076 def_inet6
='#undef HAVE_AF_INET6'
3081 echocheck
"gethostbyname2"
3082 if test "$_gethostbyname2" = auto
; then
3084 #include <sys/types.h>
3085 #include <sys/socket.h>
3087 int main(void) { gethostbyname2("", AF_INET); return 0; }
3094 if test "$_gethostbyname2" = yes ; then
3095 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3097 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3099 echores
"$_gethostbyname2"
3102 echocheck
"inttypes.h (required)"
3104 header_check inttypes.h
&& _inttypes
=yes
3105 echores
"$_inttypes"
3107 if test "$_inttypes" = no
; then
3108 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3109 header_check sys
/bitypes.h
&& _inttypes
=yes
3110 if test "$_inttypes" = yes ; then
3111 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."
3113 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3118 echocheck
"int_fastXY_t in inttypes.h"
3120 #include <inttypes.h>
3121 int main(void) { volatile int_fast16_t v = 0; return v; }
3124 cc_check
&& _fast_inttypes
=yes
3125 if test "$_fast_inttypes" = no
; then
3127 typedef signed char int_fast8_t;
3128 typedef signed int int_fast16_t;
3129 typedef signed int int_fast32_t;
3130 typedef signed long long int_fast64_t;
3131 typedef unsigned char uint_fast8_t;
3132 typedef unsigned int uint_fast16_t;
3133 typedef unsigned int uint_fast32_t;
3134 typedef unsigned long long uint_fast64_t;'
3136 echores
"$_fast_inttypes"
3139 echocheck
"malloc.h"
3141 header_check malloc.h
&& _malloc
=yes
3142 if test "$_malloc" = yes ; then
3143 def_malloc_h
='#define HAVE_MALLOC_H 1'
3145 def_malloc_h
='#define HAVE_MALLOC_H 0'
3150 echocheck
"memalign()"
3151 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3152 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3154 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3155 if test "$_memalign" = yes ; then
3156 def_memalign
='#define HAVE_MEMALIGN 1'
3158 def_memalign
='#define HAVE_MEMALIGN 0'
3159 def_map_memalign
='#define memalign(a, b) malloc(b)'
3160 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3162 echores
"$_memalign"
3165 echocheck
"posix_memalign()"
3167 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3169 #define _XOPEN_SOURCE 600
3171 int main(void) { posix_memalign(NULL, 0, 0); }
3173 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3174 echores
"$posix_memalign"
3177 echocheck
"alloca.h"
3179 statement_check alloca.h
'alloca(0)' && _alloca
=yes
3181 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3183 def_alloca_h
='#undef HAVE_ALLOCA_H'
3188 echocheck
"fastmemcpy"
3189 if test "$_fastmemcpy" = yes ; then
3190 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3192 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3194 echores
"$_fastmemcpy"
3199 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
3200 if test "$_mman" = yes ; then
3201 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3203 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3204 os2
&& _need_mmap
=yes
3208 _mman_has_map_failed
=no
3209 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
3210 if test "$_mman_has_map_failed" = yes ; then
3211 def_mman_has_map_failed
=''
3213 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3216 echocheck
"dynamic loader"
3218 for _ld_tmp
in "" "-ldl"; do
3219 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3221 if test "$_dl" = yes ; then
3222 def_dl
='#define HAVE_LIBDL 1'
3224 def_dl
='#undef HAVE_LIBDL'
3229 echocheck
"dynamic a/v plugins support"
3230 if test "$_dl" = no
; then
3233 if test "$_dynamic_plugins" = yes ; then
3234 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3236 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3238 echores
"$_dynamic_plugins"
3241 def_threads
='#define HAVE_THREADS 0'
3245 THREAD_CFLAGS
=-D_REENTRANT
3246 elif freebsd || netbsd || openbsd || bsdos
; then
3247 THREAD_CFLAGS
=-D_THREAD_SAFE
3249 if test "$_pthreads" = auto
; then
3251 #include <pthread.h>
3252 static void *func(void *arg) { return arg; }
3253 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3257 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3258 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3259 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3263 if test "$_pthreads" = yes ; then
3264 test $_ld_pthread && res_comment
="using $_ld_pthread"
3265 def_pthreads
='#define HAVE_PTHREADS 1'
3266 def_threads
='#define HAVE_THREADS 1'
3267 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3269 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3270 def_pthreads
='#undef HAVE_PTHREADS'
3271 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3272 mingw32 || _win32dll
=no
3274 echores
"$_pthreads"
3277 if test "$_pthreads" = yes ; then
3278 def_pthread_cache
="#define PTHREAD_CACHE 1"
3281 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3285 echocheck
"w32threads"
3286 if test "$_pthreads" = yes ; then
3287 res_comment
="using pthread instead"
3290 if test "$_w32threads" = auto
; then
3292 mingw32
&& _w32threads
=yes
3294 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3295 echores
"$_w32threads"
3298 if test "$_rpath" = yes ; then
3299 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3300 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3307 if test "$_iconv" = auto
; then
3312 #define INBUFSIZE 1024
3313 #define OUTBUFSIZE 4096
3315 char inbuffer[INBUFSIZE];
3316 char outbuffer[OUTBUFSIZE];
3321 char *tocode="UTF-8";
3322 char *fromcode="cp1250";
3323 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3324 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3325 char *iptr=inbuffer;
3326 char *optr=outbuffer;
3327 size_t inleft=numread;
3328 size_t outleft=OUTBUFSIZE;
3329 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3331 write(1, outbuffer, OUTBUFSIZE - outleft);
3334 if (iconv_close(icdsc) == -1)
3341 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3342 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3346 if test "$_iconv" = yes ; then
3347 def_iconv
='#define CONFIG_ICONV 1'
3349 def_iconv
='#undef CONFIG_ICONV'
3354 echocheck
"soundcard.h"
3356 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3357 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3358 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3359 header_check
$_soundcard_header && _soundcard_h
=yes &&
3360 res_comment
="$_soundcard_header" && break
3363 if test "$_soundcard_h" = yes ; then
3364 if test $_soundcard_header = "sys/soundcard.h"; then
3365 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3367 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3370 echores
"$_soundcard_h"
3373 echocheck
"sys/dvdio.h"
3375 # FreeBSD 8.1 has broken dvdio.h
3376 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3377 if test "$_dvdio" = yes ; then
3378 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3380 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3385 echocheck
"sys/cdio.h"
3387 # at least OpenSolaris has a broken cdio.h
3388 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3389 if test "$_cdio" = yes ; then
3390 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3392 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3397 echocheck
"linux/cdrom.h"
3399 header_check linux
/cdrom.h
&& _cdrom
=yes
3400 if test "$_cdrom" = yes ; then
3401 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3403 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3410 header_check dvd.h
&& _dvd
=yes
3411 if test "$_dvd" = yes ; then
3412 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3414 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3420 echocheck
"BSDI dvd.h"
3422 header_check dvd.h
&& _bsdi_dvd
=yes
3423 if test "$_bsdi_dvd" = yes ; then
3424 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3426 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3428 echores
"$_bsdi_dvd"
3433 # also used by AIX, but AIX does not support VCD and/or libdvdread
3434 echocheck
"HP-UX SCSI header"
3436 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3437 if test "$_hpux_scsi_h" = yes ; then
3438 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3440 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3442 echores
"$_hpux_scsi_h"
3447 echocheck
"userspace SCSI headers (Solaris)"
3449 header_check sys
/scsi
/scsi_types.h
&&
3450 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3452 if test "$_sol_scsi_h" = yes ; then
3453 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3455 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3457 echores
"$_sol_scsi_h"
3462 if test "$_termcap" = auto
; then
3464 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3465 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3466 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3469 if test "$_termcap" = yes ; then
3470 def_termcap
='#define HAVE_TERMCAP 1'
3471 test $_ld_tmp && res_comment
="using $_ld_tmp"
3473 def_termcap
='#undef HAVE_TERMCAP'
3479 def_termios
='#undef HAVE_TERMIOS'
3480 def_termios_h
='#undef HAVE_TERMIOS_H'
3481 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3482 if test "$_termios" = auto
; then
3484 for _termios_header
in "termios.h" "sys/termios.h"; do
3485 header_check
$_termios_header && _termios
=yes &&
3486 res_comment
="using $_termios_header" && break
3490 if test "$_termios" = yes ; then
3491 def_termios
='#define HAVE_TERMIOS 1'
3492 if test "$_termios_header" = "termios.h" ; then
3493 def_termios_h
='#define HAVE_TERMIOS_H 1'
3495 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3502 if test "$_shm" = auto
; then
3504 #include <sys/shm.h>
3505 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3508 cc_check
&& _shm
=yes
3510 if test "$_shm" = yes ; then
3511 def_shm
='#define HAVE_SHM 1'
3513 def_shm
='#undef HAVE_SHM'
3518 echocheck
"strsep()"
3521 int main(void) { char *s = "Hello, world!"; strsep(&s, ","); return 0; }
3524 cc_check
&& _strsep
=yes
3525 if test "$_strsep" = yes ; then
3526 def_strsep
='#define HAVE_STRSEP 1'
3529 def_strsep
='#undef HAVE_STRSEP'
3535 echocheck
"vsscanf()"
3537 #define _ISOC99_SOURCE
3540 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3543 cc_check
&& _vsscanf
=yes
3544 if test "$_vsscanf" = yes ; then
3545 def_vsscanf
='#define HAVE_VSSCANF 1'
3548 def_vsscanf
='#undef HAVE_VSSCANF'
3556 #define _XOPEN_SOURCE 600
3558 int main(void) { int a, b; swab(&a, &b, 0); return 0; }
3561 cc_check
&& _swab
=yes
3562 if test "$_swab" = yes ; then
3563 def_swab
='#define HAVE_SWAB 1'
3566 def_swab
='#undef HAVE_SWAB'
3571 echocheck
"POSIX select()"
3575 #include <sys/types.h>
3577 #include <sys/time.h>
3579 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3582 def_posix_select
='#undef HAVE_POSIX_SELECT'
3583 #select() of kLIBC (OS/2) supports socket only
3584 ! os2
&& cc_check
&& _posix_select
=yes \
3585 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3586 echores
"$_posix_select"
3589 echocheck
"audio select()"
3590 if test "$_select" = no
; then
3591 def_select
='#undef HAVE_AUDIO_SELECT'
3592 elif test "$_select" = yes ; then
3593 def_select
='#define HAVE_AUDIO_SELECT 1'
3598 echocheck
"gettimeofday()"
3600 #include <sys/time.h>
3601 int main(void) {struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return 0; }
3604 cc_check
&& _gettimeofday
=yes
3605 if test "$_gettimeofday" = yes ; then
3606 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3607 _need_gettimeofday
=no
3609 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3610 _need_gettimeofday
=yes
3612 echores
"$_gettimeofday"
3617 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3618 if test "$_glob" = yes ; then
3619 def_glob
='#define HAVE_GLOB 1'
3622 def_glob
='#undef HAVE_GLOB'
3628 echocheck
"setenv()"
3630 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3631 if test "$_setenv" = yes ; then
3632 def_setenv
='#define HAVE_SETENV 1'
3635 def_setenv
='#undef HAVE_SETENV'
3641 echocheck
"setmode()"
3643 def_setmode
='#define HAVE_SETMODE 0'
3644 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3649 echocheck
"sysi86()"
3651 statement_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3652 if test "$_sysi86" = yes ; then
3653 def_sysi86
='#define HAVE_SYSI86 1'
3655 #include <sys/sysi86.h>
3656 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3658 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3660 def_sysi86
='#undef HAVE_SYSI86'
3666 echocheck
"sys/sysinfo.h"
3668 #include <sys/sysinfo.h>
3669 int main(void) { struct sysinfo s_info; sysinfo(&s_info); return 0; }
3672 cc_check
&& _sys_sysinfo
=yes
3673 if test "$_sys_sysinfo" = yes ; then
3674 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3676 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3678 echores
"$_sys_sysinfo"
3683 echocheck
"Mac OS X Finder Support"
3684 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3685 if test "$_macosx_finder" = yes ; then
3686 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3687 extra_ldflags
="$extra_ldflags -framework Carbon"
3689 echores
"$_macosx_finder"
3691 echocheck
"Mac OS X Bundle file locations"
3692 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3693 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3694 if test "$_macosx_bundle" = yes ; then
3695 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3696 extra_ldflags
="$extra_ldflags -framework Carbon"
3698 echores
"$_macosx_bundle"
3700 echocheck
"Apple Remote"
3701 if test "$_apple_remote" = auto
; then
3705 #include <IOKit/IOCFPlugIn.h>
3707 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3708 CFMutableDictionaryRef hidMatchDictionary;
3709 IOReturn ioReturnValue;
3711 // Set up a matching dictionary to search the I/O Registry by class.
3712 // name for all HID class devices
3713 hidMatchDictionary = IOServiceMatching("AppleIRController");
3715 // Now search I/O Registry for matching devices.
3716 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3717 hidMatchDictionary, &hidObjectIterator);
3719 // If search is unsuccessful, return nonzero.
3720 if (ioReturnValue != kIOReturnSuccess ||
3721 !IOIteratorIsValid(hidObjectIterator)) {
3727 cc_check
-framework IOKit
&& _apple_remote
=yes
3729 if test "$_apple_remote" = yes ; then
3730 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3731 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3733 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3735 echores
"$_apple_remote"
3741 echocheck
"Apple IR"
3742 if test "$_apple_ir" = auto
; then
3745 #include <linux/input.h>
3746 int main(void) { struct input_event ev; struct input_id id; return 0; }
3748 cc_check
&& _apple_ir
=yes
3750 if test "$_apple_ir" = yes ; then
3751 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3753 def_apple_ir
='#undef CONFIG_APPLE_IR'
3755 echores
"$_apple_ir"
3758 echocheck
"pkg-config"
3759 _pkg_config
=pkg-config
3760 if $
($_pkg_config --version > /dev
/null
2>&1); then
3761 if test "$_ld_static"; then
3762 _pkg_config
="$_pkg_config --static"
3771 echocheck
"Samba support (libsmbclient)"
3772 if test "$_smb" = yes; then
3773 extra_ldflags
="$extra_ldflags -lsmbclient"
3775 if test "$_smb" = auto
; then
3777 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3778 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3779 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3783 if test "$_smb" = yes; then
3784 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3785 inputmodules
="smb $inputmodules"
3787 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3788 noinputmodules
="smb $noinputmodules"
3799 if test "$_tdfxfb" = yes ; then
3800 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3801 vomodules
="tdfxfb $vomodules"
3803 def_tdfxfb
='#undef CONFIG_TDFXFB'
3804 novomodules
="tdfxfb $novomodules"
3809 if test "$_s3fb" = yes ; then
3810 def_s3fb
='#define CONFIG_S3FB 1'
3811 vomodules
="s3fb $vomodules"
3813 def_s3fb
='#undef CONFIG_S3FB'
3814 novomodules
="s3fb $novomodules"
3819 if test "$_wii" = yes ; then
3820 def_wii
='#define CONFIG_WII 1'
3821 vomodules
="wii $vomodules"
3823 def_wii
='#undef CONFIG_WII'
3824 novomodules
="wii $novomodules"
3829 if test "$_tdfxvid" = yes ; then
3830 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3831 vomodules
="tdfx_vid $vomodules"
3833 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3834 novomodules
="tdfx_vid $novomodules"
3839 if test "$_xvr100" = auto
; then
3842 #include <sys/fbio.h>
3843 #include <sys/visual_io.h>
3845 struct vis_identifier ident;
3846 struct fbgattr attr;
3847 ioctl(0, VIS_GETIDENTIFIER, &ident);
3848 ioctl(0, FBIOGATTR, &attr);
3853 cc_check
&& _xvr100
=yes
3855 if test "$_xvr100" = yes ; then
3856 def_xvr100
='#define CONFIG_XVR100 1'
3857 vomodules
="xvr100 $vomodules"
3859 def_tdfxvid
='#undef CONFIG_XVR100'
3860 novomodules
="xvr100 $novomodules"
3865 if test "$_tga" = yes ; then
3866 def_tga
='#define CONFIG_TGA 1'
3867 vomodules
="tga $vomodules"
3869 def_tga
='#undef CONFIG_TGA'
3870 novomodules
="tga $novomodules"
3875 echocheck
"md5sum support"
3876 if test "$_md5sum" = yes; then
3877 def_md5sum
="#define CONFIG_MD5SUM 1"
3878 vomodules
="md5sum $vomodules"
3880 def_md5sum
="#undef CONFIG_MD5SUM"
3881 novomodules
="md5sum $novomodules"
3886 echocheck
"yuv4mpeg support"
3887 if test "$_yuv4mpeg" = yes; then
3888 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3889 vomodules
="yuv4mpeg $vomodules"
3891 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3892 novomodules
="yuv4mpeg $novomodules"
3894 echores
"$_yuv4mpeg"
3898 if test "$_bl" = yes ; then
3899 def_bl
='#define CONFIG_BL 1'
3900 vomodules
="bl $vomodules"
3902 def_bl
='#undef CONFIG_BL'
3903 novomodules
="bl $novomodules"
3908 echocheck
"DirectFB"
3909 if test "$_directfb" = auto
; then
3912 #include <directfb.h>
3913 #include <directfb_version.h>
3914 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3915 #error "DirectFB version too old."
3917 int main(void) { DirectFBInit(0, 0); return 0; }
3919 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3920 cc_check
$_inc_tmp -ldirectfb &&
3921 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3924 if test "$_directfb" = yes ; then
3925 def_directfb
='#define CONFIG_DIRECTFB 1'
3926 vomodules
="directfb dfbmga $vomodules"
3927 libs_mplayer
="$libs_mplayer -ldirectfb"
3929 def_directfb
='#undef CONFIG_DIRECTFB'
3930 novomodules
="directfb dfbmga $novomodules"
3932 echores
"$_directfb"
3935 echocheck
"X11 headers presence"
3937 res_comment
="check if the dev(el) packages are installed"
3938 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3939 if test -f "$I/X11/Xlib.h" ; then
3945 if test $_cross_compile = no
; then
3946 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3947 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3948 if test -f "$I/X11/Xlib.h" ; then
3949 extra_cflags
="$extra_cflags -I$I"
3951 res_comment
="using $I"
3956 echores
"$_x11_headers"
3960 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3961 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3962 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3965 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3967 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3969 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3970 libs_mplayer
="$libs_mplayer $_ld_tmp" && _x11
=yes && break
3973 if test "$_x11" = yes ; then
3974 def_x11
='#define CONFIG_X11 1'
3975 vomodules
="x11 xover $vomodules"
3978 def_x11
='#undef CONFIG_X11'
3979 novomodules
="x11 $novomodules"
3980 res_comment
="check if the dev(el) packages are installed"
3981 # disable stuff that depends on X
3982 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
3986 echocheck
"Xss screensaver extensions"
3987 if test "$_xss" = auto
; then
3989 #include <X11/Xlib.h>
3990 #include <X11/extensions/scrnsaver.h>
3991 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
3994 cc_check
-lXss && _xss
=yes
3996 if test "$_xss" = yes ; then
3997 def_xss
='#define CONFIG_XSS 1'
3998 libs_mplayer
="$libs_mplayer -lXss"
4000 def_xss
='#undef CONFIG_XSS'
4007 if test "$_x11" = yes ; then
4009 #include <X11/Xmd.h>
4010 #include <X11/Xlib.h>
4011 #include <X11/Xutil.h>
4012 #include <X11/Xatom.h>
4013 #include <X11/extensions/dpms.h>
4014 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
4016 cc_check
-lXdpms && _xdpms3
=yes
4017 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
4019 if test "$_xdpms4" = yes ; then
4020 def_xdpms
='#define CONFIG_XDPMS 1'
4021 res_comment
="using Xdpms 4"
4023 elif test "$_xdpms3" = yes ; then
4024 def_xdpms
='#define CONFIG_XDPMS 1'
4025 libs_mplayer
="$libs_mplayer -lXdpms"
4026 res_comment
="using Xdpms 3"
4029 def_xdpms
='#undef CONFIG_XDPMS'
4035 if test "$_xv" = auto
; then
4037 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
4040 if test "$_xv" = yes ; then
4041 def_xv
='#define CONFIG_XV 1'
4042 libs_mplayer
="$libs_mplayer -lXv"
4043 vomodules
="xv $vomodules"
4045 def_xv
='#undef CONFIG_XV'
4046 novomodules
="xv $novomodules"
4052 if test "$_xv" = yes && test "$_xvmc" != no
; then
4055 #include <X11/Xlib.h>
4056 #include <X11/extensions/Xvlib.h>
4057 #include <X11/extensions/XvMClib.h>
4059 XvMCQueryExtension(0, 0, 0);
4060 XvMCCreateContext(0, 0, 0, 0, 0, 0, 0);
4063 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4064 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4067 if test "$_xvmc" = yes ; then
4068 def_xvmc
='#define CONFIG_XVMC 1'
4069 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4070 vomodules
="xvmc $vomodules"
4071 res_comment
="using $_xvmclib"
4073 def_xvmc
='#define CONFIG_XVMC 0'
4074 novomodules
="xvmc $novomodules"
4080 if test "$_vdpau" = auto
; then
4082 if test "$_dl" = yes ; then
4084 #include <vdpau/vdpau_x11.h>
4086 vdp_device_create_x11(0, 0, 0, 0);
4087 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4089 cc_check
-lvdpau && _vdpau
=yes
4092 if test "$_vdpau" = yes ; then
4093 def_vdpau
='#define CONFIG_VDPAU 1'
4094 libs_mplayer
="$libs_mplayer -lvdpau"
4095 vomodules
="vdpau $vomodules"
4097 def_vdpau
='#define CONFIG_VDPAU 0'
4098 novomodules
="vdpau $novomodules"
4103 echocheck
"Xinerama"
4104 if test "$_xinerama" = auto
; then
4106 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
4109 if test "$_xinerama" = yes ; then
4110 def_xinerama
='#define CONFIG_XINERAMA 1'
4111 libs_mplayer
="$libs_mplayer -lXinerama"
4113 def_xinerama
='#undef CONFIG_XINERAMA'
4115 echores
"$_xinerama"
4118 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4119 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4120 # named 'X extensions' or something similar.
4121 # This check may be useful for future mplayer versions (to change resolution)
4122 # If you run into problems, remove '-lXxf86vm'.
4124 if test "$_vm" = auto
; then
4126 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
4128 if test "$_vm" = yes ; then
4129 def_vm
='#define CONFIG_XF86VM 1'
4130 libs_mplayer
="$libs_mplayer -lXxf86vm"
4132 def_vm
='#undef CONFIG_XF86VM'
4136 # Check for the presence of special keycodes, like audio control buttons
4137 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4138 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4139 # have these new keycodes.
4140 echocheck
"XF86keysym"
4141 if test "$_xf86keysym" = auto
; then
4144 #include <X11/XF86keysym.h>
4145 int main(void) { return XF86XK_AudioPause; }
4147 cc_check
&& _xf86keysym
=yes
4149 if test "$_xf86keysym" = yes ; then
4150 def_xf86keysym
='#define CONFIG_XF86XK 1'
4152 def_xf86keysym
='#undef CONFIG_XF86XK'
4154 echores
"$_xf86keysym"
4157 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4159 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2
=yes
4161 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4163 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XF86DGASetViewPort(0, 0, 0, 0)' -lXxf86dga -lXxf86vm && _dga1
=yes
4167 def_dga
='#undef CONFIG_DGA'
4168 def_dga1
='#undef CONFIG_DGA1'
4169 def_dga2
='#undef CONFIG_DGA2'
4170 if test "$_dga1" = yes ; then
4172 def_dga1
='#define CONFIG_DGA1 1'
4173 res_comment
="using DGA 1.0"
4174 elif test "$_dga2" = yes ; then
4176 def_dga2
='#define CONFIG_DGA2 1'
4177 res_comment
="using DGA 2.0"
4179 if test "$_dga" = yes ; then
4180 def_dga
='#define CONFIG_DGA 1'
4181 libs_mplayer
="$libs_mplayer -lXxf86dga"
4182 vomodules
="dga $vomodules"
4184 novomodules
="dga $novomodules"
4190 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4191 def_3dfx
='#define CONFIG_3DFX 1'
4192 vomodules
="3dfx $vomodules"
4194 def_3dfx
='#undef CONFIG_3DFX'
4195 novomodules
="3dfx $novomodules"
4201 def_vidix
='#undef CONFIG_VIDIX'
4202 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4203 _vidix_drv_cyberblade
=no
4204 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4206 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4207 _vidix_drv_mach64
=no
4208 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4210 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4211 _vidix_drv_mga_crtc2
=no
4212 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4213 _vidix_drv_nvidia
=no
4214 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4216 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4218 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4219 _vidix_drv_radeon
=no
4220 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4221 _vidix_drv_rage128
=no
4222 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4224 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4225 _vidix_drv_sh_veu
=no
4226 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4228 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4229 _vidix_drv_unichrome
=no
4230 if test "$_vidix" = auto
; then
4232 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4234 x86_64
&& ! linux
&& _vidix
=no
4235 (ppc || alpha
) && linux
&& _vidix
=yes
4239 if test "$_vidix" = yes ; then
4240 def_vidix
='#define CONFIG_VIDIX 1'
4241 vomodules
="cvidix $vomodules"
4242 # FIXME: ivtv driver temporarily disabled until we have a proper test
4243 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4244 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4246 # some vidix drivers are architecture and os specific, discard them elsewhere
4247 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4248 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4250 for driver
in $_vidix_drivers ; do
4251 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4252 eval _vidix_drv_
${driver}=yes
4253 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4256 echocheck
"VIDIX PCI device name database"
4257 echores
"$_vidix_pcidb"
4258 if test "$_vidix_pcidb" = yes ; then
4264 echocheck
"VIDIX dhahelper support"
4265 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4266 echores
"$_dhahelper"
4268 echocheck
"VIDIX svgalib_helper support"
4269 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4270 echores
"$_svgalib_helper"
4273 novomodules
="cvidix $novomodules"
4276 if test "$_vidix" = yes && win32
; then
4278 vomodules
="winvidix $vomodules"
4279 libs_mplayer
="$libs_mplayer -lgdi32"
4281 novomodules
="winvidix $novomodules"
4283 if test "$_vidix" = yes && test "$_x11" = yes; then
4285 vomodules
="xvidix $vomodules"
4287 novomodules
="xvidix $novomodules"
4291 if test "$_ggi" = auto
; then
4293 statement_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4295 if test "$_ggi" = yes ; then
4296 def_ggi
='#define CONFIG_GGI 1'
4297 libs_mplayer
="$libs_mplayer -lggi"
4298 vomodules
="ggi $vomodules"
4300 def_ggi
='#undef CONFIG_GGI'
4301 novomodules
="ggi $novomodules"
4305 echocheck
"GGI extension: libggiwmh"
4306 if test "$_ggiwmh" = auto
; then
4308 statement_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4310 # needed to get right output on obscure combination
4311 # like --disable-ggi --enable-ggiwmh
4312 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4313 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4314 libs_mplayer
="$libs_mplayer -lggiwmh"
4317 def_ggiwmh
='#undef CONFIG_GGIWMH'
4323 if test "$_aa" = auto
; then
4330 c = aa_autoinit(&aa_defparams);
4331 p = aa_getrenderparams();
4332 aa_autoinitkbd(c, 0);
4336 for _ld_tmp
in "-laa" ; do
4337 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4340 if test "$_aa" = yes ; then
4341 def_aa
='#define CONFIG_AA 1'
4343 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4345 vomodules
="aa $vomodules"
4347 def_aa
='#undef CONFIG_AA'
4348 novomodules
="aa $novomodules"
4354 if test "$_caca" = auto
; then
4356 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4359 #ifdef CACA_API_VERSION_1
4362 int main(void) { caca_init(); return 0; }
4364 cc_check $
(caca-config
--libs) && _caca
=yes
4367 if test "$_caca" = yes ; then
4368 def_caca
='#define CONFIG_CACA 1'
4369 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4370 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4371 vomodules
="caca $vomodules"
4373 def_caca
='#undef CONFIG_CACA'
4374 novomodules
="caca $novomodules"
4380 if test "$_svga" = auto
; then
4382 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4384 if test "$_svga" = yes ; then
4385 def_svga
='#define CONFIG_SVGALIB 1'
4386 libs_mplayer
="$libs_mplayer -lvga"
4387 vomodules
="svga $vomodules"
4389 def_svga
='#undef CONFIG_SVGALIB'
4390 novomodules
="svga $novomodules"
4396 if test "$_fbdev" = auto
; then
4400 if test "$_fbdev" = yes ; then
4401 def_fbdev
='#define CONFIG_FBDEV 1'
4402 vomodules
="fbdev $vomodules"
4404 def_fbdev
='#undef CONFIG_FBDEV'
4405 novomodules
="fbdev $novomodules"
4412 if test "$_dvb" = auto
; then
4416 #include <sys/ioctl.h>
4420 #include <linux/dvb/dmx.h>
4421 #include <linux/dvb/frontend.h>
4422 #include <linux/dvb/video.h>
4423 #include <linux/dvb/audio.h>
4424 int main(void) {return 0;}
4426 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4427 cc_check
$_inc_tmp && _dvb
=yes && \
4428 extra_cflags
="$extra_cflags $_inc_tmp" && break
4432 if test "$_dvb" = yes ; then
4434 inputmodules
="dvb $inputmodules"
4435 def_dvb
='#define CONFIG_DVB 1'
4436 def_dvbin
='#define CONFIG_DVBIN 1'
4437 aomodules
="mpegpes(dvb) $aomodules"
4438 vomodules
="mpegpes(dvb) $vomodules"
4441 noinputmodules
="dvb $noinputmodules"
4442 def_dvb
='#undef CONFIG_DVB'
4443 def_dvbin
='#undef CONFIG_DVBIN '
4444 aomodules
="mpegpes(file) $aomodules"
4445 vomodules
="mpegpes(file) $vomodules"
4451 echocheck
"QuickTime"
4452 if test "$quicktime" = auto
; then
4454 #include <QuickTime/QuickTime.h>
4456 ImageDescription *desc;
4463 cc_check
-framework QuickTime
&& quicktime
=yes
4465 if test "$quicktime" = yes ; then
4466 extra_ldflags
="$extra_ldflags -framework QuickTime"
4467 def_quicktime
='#define CONFIG_QUICKTIME 1'
4469 def_quicktime
='#undef CONFIG_QUICKTIME'
4475 if test "$_quartz" = auto
; then
4477 statement_check Carbon
/Carbon.h
'CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false)' -framework Carbon
&& _quartz
=yes
4479 if test "$_quartz" = yes ; then
4480 libs_mplayer
="$libs_mplayer -framework Carbon"
4481 def_quartz
='#define CONFIG_QUARTZ 1'
4482 vomodules
="quartz $vomodules"
4484 def_quartz
='#undef CONFIG_QUARTZ'
4485 novomodules
="quartz $novomodules"
4489 echocheck
"CoreVideo"
4490 if test "$_corevideo" = auto
; then
4492 #include <Carbon/Carbon.h>
4493 #include <CoreServices/CoreServices.h>
4494 #include <OpenGL/OpenGL.h>
4495 #include <QuartzCore/CoreVideo.h>
4496 int main(void) { return 0; }
4499 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4501 if test "$_corevideo" = yes ; then
4502 vomodules
="corevideo $vomodules"
4503 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4504 def_corevideo
='#define CONFIG_COREVIDEO 1'
4506 novomodules
="corevideo $novomodules"
4507 def_corevideo
='#undef CONFIG_COREVIDEO'
4509 echores
"$_corevideo"
4514 echocheck
"PNG support"
4515 if test "$_png" = auto
; then
4518 # Don't check for -lpng on irix since it has its own libpng
4519 # incompatible with the GNU libpng
4520 res_comment
="disabled on irix (not GNU libpng)"
4527 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4528 printf("libpng: %s\n", png_libpng_ver);
4529 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4532 cc_check
-lpng -lz $_ld_lm && _png
=yes
4536 if test "$_png" = yes ; then
4537 def_png
='#define CONFIG_PNG 1'
4538 extra_ldflags
="$extra_ldflags -lpng -lz"
4540 def_png
='#undef CONFIG_PNG'
4543 echocheck
"MNG support"
4544 if test "$_mng" = auto
; then
4549 const char * p_ver = mng_version_text();
4550 return !p_ver || p_ver[0] == 0;
4553 if cc_check
-lmng -lz $_ld_lm ; then
4558 if test "$_mng" = yes ; then
4559 def_mng
='#define CONFIG_MNG 1'
4560 extra_ldflags
="$extra_ldflags -lmng -lz"
4562 def_mng
='#undef CONFIG_MNG'
4565 echocheck
"JPEG support"
4566 if test "$_jpeg" = auto
; then
4568 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
4572 if test "$_jpeg" = yes ; then
4573 def_jpeg
='#define CONFIG_JPEG 1'
4574 vomodules
="jpeg $vomodules"
4575 extra_ldflags
="$extra_ldflags -ljpeg"
4577 def_jpeg
='#undef CONFIG_JPEG'
4578 novomodules
="jpeg $novomodules"
4583 echocheck
"PNM support"
4584 if test "$_pnm" = yes; then
4585 def_pnm
="#define CONFIG_PNM 1"
4586 vomodules
="pnm $vomodules"
4588 def_pnm
="#undef CONFIG_PNM"
4589 novomodules
="pnm $novomodules"
4595 echocheck
"GIF support"
4596 # This is to appease people who want to force gif support.
4597 # If it is forced to yes, then we still do checks to determine
4598 # which gif library to use.
4599 if test "$_gif" = yes ; then
4604 if test "$_gif" = auto
; then
4606 for _ld_gif
in "-lungif" "-lgif" ; do
4607 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4611 # If no library was found, and the user wants support forced,
4612 # then we force it on with libgif, as this is the safest
4613 # assumption IMHO. (libungif & libregif both create symbolic
4614 # links to libgif. We also assume that no x11 support is needed,
4615 # because if you are forcing this, then you _should_ know what
4616 # you are doing. [ Besides, package maintainers should never
4617 # have compiled x11 deps into libungif in the first place. ] )
4620 if test "$_force_gif" = yes && test "$_gif" = no
; then
4625 if test "$_gif" = yes ; then
4626 def_gif
='#define CONFIG_GIF 1'
4627 codecmodules
="gif $codecmodules"
4628 vomodules
="gif89a $vomodules"
4629 res_comment
="old version, some encoding functions disabled"
4630 def_gif_4
='#undef CONFIG_GIF_4'
4631 extra_ldflags
="$extra_ldflags $_ld_gif"
4637 #include <gif_lib.h>
4638 static void catch(int sig) { exit(1); }
4640 signal(SIGSEGV, catch); // catch segfault
4641 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4642 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4646 if cc_check
"$_ld_gif" ; then
4647 def_gif_4
='#define CONFIG_GIF_4 1'
4651 def_gif
='#undef CONFIG_GIF'
4652 def_gif_4
='#undef CONFIG_GIF_4'
4653 novomodules
="gif89a $novomodules"
4654 nocodecmodules
="gif $nocodecmodules"
4659 case "$_gif" in yes*)
4660 echocheck
"broken giflib workaround"
4661 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4665 #include <gif_lib.h>
4667 GifFileType gif = {.UserData = NULL};
4668 printf("UserData is at address %p\n", gif.UserData);
4672 if cc_check
"$_ld_gif" ; then
4673 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4682 echocheck
"VESA support"
4683 if test "$_vesa" = auto
; then
4685 statement_check vbe.h
'vbeInit()' -lvbe -llrmi && _vesa
=yes
4687 if test "$_vesa" = yes ; then
4688 def_vesa
='#define CONFIG_VESA 1'
4689 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4690 vomodules
="vesa $vomodules"
4692 def_vesa
='#undef CONFIG_VESA'
4693 novomodules
="vesa $novomodules"
4705 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4706 if test -z "$_sdlconfig" ; then
4707 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4708 _sdlconfig
="sdl-config"
4709 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4710 _sdlconfig
="sdl11-config"
4715 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4717 #ifdef CONFIG_SDL_SDL_H
4718 #include <SDL/SDL.h>
4723 // we allow SDL hacking our main() only on OSX
4726 int main(int argc, char *argv[]) {
4727 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4732 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4733 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4735 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4739 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4740 res_comment
="using $_sdlconfig"
4742 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4743 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4745 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4746 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4748 _inc_tmp
="$($_sdlconfig --cflags)"
4749 _ld_tmp
="$($_sdlconfig --libs)"
4751 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4753 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4754 # HACK for BeOS/Haiku SDL
4755 _ld_tmp
="$_ld_tmp -lstdc++"
4760 if test "$_sdl" = yes ; then
4761 def_sdl
='#define CONFIG_SDL 1'
4762 extra_cflags
="$extra_cflags $_inc_tmp"
4763 libs_mplayer
="$libs_mplayer $_ld_tmp"
4764 vomodules
="sdl $vomodules"
4765 aomodules
="sdl $aomodules"
4767 def_sdl
='#undef CONFIG_SDL'
4768 novomodules
="sdl $novomodules"
4769 noaomodules
="sdl $noaomodules"
4774 # make sure this stays below CoreVideo to avoid issues due to namespace
4775 # conflicts between -lGL and -framework OpenGL
4777 #Note: this test is run even with --enable-gl since we autodetect linker flags
4778 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
4781 #include <windows.h>
4783 #elif defined(GL_SDL)
4785 #ifdef CONFIG_SDL_SDL_H
4786 #include <SDL/SDL.h>
4791 // we allow SDL hacking our main() only on OSX
4796 #include <X11/Xlib.h>
4799 int main(int argc, char *argv[]) {
4802 wglCreateContext(dc);
4803 #elif defined(GL_SDL)
4804 SDL_GL_SwapBuffers();
4806 glXCreateContext(NULL, NULL, NULL, True);
4813 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4814 if cc_check
$_ld_tmp $_ld_lm ; then
4817 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4821 if cc_check
-DGL_WIN32 -lopengl32 ; then
4824 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4826 # last so it can reuse any linker etc. flags detected before
4827 if test "$_sdl" = yes ; then
4828 if cc_check
-DGL_SDL ||
4829 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4832 elif cc_check
-DGL_SDL -lGL ||
4833 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4836 libs_mplayer
="$libs_mplayer -lGL"
4842 if test "$_gl" = yes ; then
4843 def_gl
='#define CONFIG_GL 1'
4844 res_comment
="backends:"
4845 if test "$_gl_win32" = yes ; then
4846 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4847 res_comment
="$res_comment win32"
4849 if test "$_gl_x11" = yes ; then
4850 def_gl_x11
='#define CONFIG_GL_X11 1'
4851 res_comment
="$res_comment x11"
4853 if test "$_gl_sdl" = yes ; then
4854 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4855 res_comment
="$res_comment sdl"
4857 vomodules
="opengl $vomodules"
4859 def_gl
='#undef CONFIG_GL'
4860 def_gl_win32
='#undef CONFIG_GL_WIN32'
4861 def_gl_x11
='#undef CONFIG_GL_X11'
4862 def_gl_sdl
='#undef CONFIG_GL_SDL'
4863 novomodules
="opengl $novomodules"
4868 echocheck
"MatrixView"
4869 if test "$_gl" = no
; then
4872 if test "$matrixview" = yes ; then
4873 vomodules
="matrixview $vomodules"
4874 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
4876 novomodules
="matrixview $novomodules"
4877 def_matrixview
='#undef CONFIG_MATRIXVIEW'
4879 echores
"$matrixview"
4883 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
4884 if test "$_kva" = auto
; then
4886 header_check_broken os2.h kva.h
-lkva && _kva
=yes
4888 if test "$_kva" = yes ; then
4889 def_kva
='#define CONFIG_KVA 1'
4890 libs_mplayer
="$libs_mplayer -lkva"
4891 vomodules
="kva $vomodules"
4893 def_kva
='#undef CONFIG_KVA'
4894 novomodules
="kva $novomodules"
4902 echocheck
"Windows waveout"
4903 if test "$_win32waveout" = auto
; then
4905 header_check_broken windows.h mmsystem.h
-lwinmm && _win32waveout
=yes
4907 if test "$_win32waveout" = yes ; then
4908 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
4909 libs_mplayer
="$libs_mplayer -lwinmm"
4910 aomodules
="win32 $aomodules"
4912 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
4913 noaomodules
="win32 $noaomodules"
4915 echores
"$_win32waveout"
4917 echocheck
"Direct3D"
4918 if test "$_direct3d" = auto
; then
4920 header_check d3d9.h
&& _direct3d
=yes
4922 if test "$_direct3d" = yes ; then
4923 def_direct3d
='#define CONFIG_DIRECT3D 1'
4924 vomodules
="direct3d $vomodules"
4926 def_direct3d
='#undef CONFIG_DIRECT3D'
4927 novomodules
="direct3d $novomodules"
4929 echores
"$_direct3d"
4932 if test "$_directx" = auto
; then
4936 int main(void) { return 0; }
4939 cc_check
-lgdi32 && _directx
=yes
4941 if test "$_directx" = yes ; then
4942 def_directx
='#define CONFIG_DIRECTX 1'
4943 libs_mplayer
="$libs_mplayer -lgdi32"
4944 vomodules
="directx $vomodules"
4945 aomodules
="dsound $aomodules"
4947 def_directx
='#undef CONFIG_DIRECTX'
4948 novomodules
="directx $novomodules"
4949 noaomodules
="dsound $noaomodules"
4957 if test "$_dxr2" = auto
; then
4959 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4960 header_check dxr2ioctl.h
$_inc_tmp && _dxr2
=yes &&
4961 extra_cflags
="$extra_cflags $_inc_tmp" && break
4964 if test "$_dxr2" = yes; then
4965 def_dxr2
='#define CONFIG_DXR2 1'
4966 aomodules
="dxr2 $aomodules"
4967 vomodules
="dxr2 $vomodules"
4969 def_dxr2
='#undef CONFIG_DXR2'
4970 noaomodules
="dxr2 $noaomodules"
4971 novomodules
="dxr2 $novomodules"
4976 if test "$_dxr3" = auto
; then
4978 header_check linux
/em8300.h
&& _dxr3
=yes
4980 if test "$_dxr3" = yes ; then
4981 def_dxr3
='#define CONFIG_DXR3 1'
4982 vomodules
="dxr3 $vomodules"
4984 def_dxr3
='#undef CONFIG_DXR3'
4985 novomodules
="dxr3 $novomodules"
4990 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
4991 if test "$_ivtv" = auto
; then
4993 #include <linux/videodev2.h>
4994 #include <linux/ivtv.h>
4995 #include <sys/ioctl.h>
4997 struct ivtv_cfg_stop_decode sd;
4998 struct ivtv_cfg_start_decode sd1;
4999 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5000 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5004 cc_check
&& _ivtv
=yes
5006 if test "$_ivtv" = yes ; then
5007 def_ivtv
='#define CONFIG_IVTV 1'
5008 vomodules
="ivtv $vomodules"
5009 aomodules
="ivtv $aomodules"
5011 def_ivtv
='#undef CONFIG_IVTV'
5012 novomodules
="ivtv $novomodules"
5013 noaomodules
="ivtv $noaomodules"
5018 echocheck
"V4L2 MPEG Decoder"
5019 if test "$_v4l2" = auto
; then
5021 #include <linux/videodev2.h>
5022 #include <linux/version.h>
5024 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5025 #error kernel headers too old, need 2.6.22
5027 struct v4l2_ext_controls ctrls;
5028 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5033 cc_check
&& _v4l2
=yes
5035 if test "$_v4l2" = yes ; then
5036 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5037 vomodules
="v4l2 $vomodules"
5038 aomodules
="v4l2 $aomodules"
5040 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5041 novomodules
="v4l2 $novomodules"
5042 noaomodules
="v4l2 $noaomodules"
5053 echocheck
"OSS Audio"
5054 if test "$_ossaudio" = auto
; then
5056 #include <$_soundcard_header>
5057 int main(void) { return SNDCTL_DSP_SETFRAGMENT; }
5060 cc_check
&& _ossaudio
=yes
5062 if test "$_ossaudio" = yes ; then
5063 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5064 aomodules
="oss $aomodules"
5066 #include <$_soundcard_header>
5067 #ifdef OPEN_SOUND_SYSTEM
5068 int main(void) { return 0; }
5070 #error Not the real thing
5074 cc_check
&& _real_ossaudio
=yes
5075 if test "$_real_ossaudio" = yes; then
5076 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5077 # Check for OSS4 headers (override default headers)
5078 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5079 if test -f /etc
/oss.conf
; then
5081 _ossinc
="$OSSLIBDIR/include"
5082 if test -f "$_ossinc/sys/soundcard.h"; then
5083 extra_cflags
="-I$_ossinc $extra_cflags"
5086 elif netbsd || openbsd
; then
5087 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5088 extra_ldflags
="$extra_ldflags -lossaudio"
5090 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5092 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5094 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5095 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5096 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5097 noaomodules
="oss $noaomodules"
5099 echores
"$_ossaudio"
5103 if test "$_arts" = auto
; then
5105 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5106 statement_check artsc.h
'arts_init()' $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
5111 if test "$_arts" = yes ; then
5112 def_arts
='#define CONFIG_ARTS 1'
5113 aomodules
="arts $aomodules"
5114 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5115 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5117 noaomodules
="arts $noaomodules"
5123 if test "$_esd" = auto
; then
5125 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5126 statement_check esd.h
'esd_open_sound("test")' $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5131 if test "$_esd" = yes ; then
5132 def_esd
='#define CONFIG_ESD 1'
5133 aomodules
="esd $aomodules"
5134 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5135 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5137 echocheck
"esd_get_latency()"
5138 statement_check esd.h
'esd_get_latency(0)' $
(esd-config
--libs) $
(esd-config
--cflags) &&
5139 _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5140 echores
"$_esd_latency"
5142 def_esd
='#undef CONFIG_ESD'
5143 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5144 noaomodules
="esd $noaomodules"
5149 if test "$_nas" = auto
; then
5151 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
5153 if test "$_nas" = yes ; then
5154 def_nas
='#define CONFIG_NAS 1'
5155 libs_mplayer
="$libs_mplayer -laudio -lXt"
5156 aomodules
="nas $aomodules"
5158 noaomodules
="nas $noaomodules"
5159 def_nas
='#undef CONFIG_NAS'
5165 if test "$_pulse" = auto
; then
5167 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5168 header_check pulse
/pulseaudio.h $
($_pkg_config --libs --cflags libpulse
) &&
5174 if test "$_pulse" = yes ; then
5175 def_pulse
='#define CONFIG_PULSE 1'
5176 aomodules
="pulse $aomodules"
5177 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5178 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5180 def_pulse
='#undef CONFIG_PULSE'
5181 noaomodules
="pulse $noaomodules"
5186 if test "$_jack" = auto
; then
5188 if statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' -ljack ; then
5189 libs_mplayer
="$libs_mplayer -ljack"
5190 elif statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5191 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5192 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5198 if test "$_jack" = yes ; then
5199 def_jack
='#define CONFIG_JACK 1'
5200 aomodules
="jack $aomodules"
5202 noaomodules
="jack $noaomodules"
5207 if test "$_openal" = auto
; then
5211 #include <OpenAL/al.h>
5216 alSourceQueueBuffers(0, 0, 0);
5217 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5221 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5222 cc_check
$I && _openal
=yes && break
5223 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5225 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5227 if test "$_openal" = yes ; then
5228 def_openal
='#define CONFIG_OPENAL 1'
5229 aomodules
="openal $aomodules"
5231 noaomodules
="openal $noaomodules"
5235 echocheck
"ALSA audio"
5236 if test "$_alloca" != yes ; then
5238 res_comment
="alloca missing"
5240 if test "$_alsa" != no
; then
5243 #include <sys/asoundlib.h>
5244 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5245 #error "alsa version != 0.5.x"
5247 int main(void) { return 0; }
5249 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5252 #include <sys/asoundlib.h>
5253 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5254 #error "alsa version != 0.9.x"
5256 int main(void) { return 0; }
5258 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5260 #include <alsa/asoundlib.h>
5261 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5262 #error "alsa version != 0.9.x"
5264 int main(void) { return 0; }
5266 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5269 #include <sys/asoundlib.h>
5270 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5271 #error "alsa version != 1.0.x"
5273 int main(void) { return 0; }
5275 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5277 #include <alsa/asoundlib.h>
5278 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5279 #error "alsa version != 1.0.x"
5281 int main(void) { return 0; }
5283 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5285 def_alsa
='#undef CONFIG_ALSA'
5286 def_alsa5
='#undef CONFIG_ALSA5'
5287 def_alsa9
='#undef CONFIG_ALSA9'
5288 def_alsa1x
='#undef CONFIG_ALSA1X'
5289 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5290 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5291 if test "$_alsaver" ; then
5293 if test "$_alsaver" = '0.5.x' ; then
5295 aomodules
="alsa5 $aomodules"
5296 def_alsa5
='#define CONFIG_ALSA5 1'
5297 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5298 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5299 elif test "$_alsaver" = '0.9.x-sys' ; then
5301 aomodules
="alsa $aomodules"
5302 def_alsa
='#define CONFIG_ALSA 1'
5303 def_alsa9
='#define CONFIG_ALSA9 1'
5304 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5305 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5306 elif test "$_alsaver" = '0.9.x-alsa' ; then
5308 aomodules
="alsa $aomodules"
5309 def_alsa
='#define CONFIG_ALSA 1'
5310 def_alsa9
='#define CONFIG_ALSA9 1'
5311 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5312 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5313 elif test "$_alsaver" = '1.0.x-sys' ; then
5315 aomodules
="alsa $aomodules"
5316 def_alsa
='#define CONFIG_ALSA 1'
5317 def_alsa1x
="#define CONFIG_ALSA1X 1"
5318 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5319 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5320 elif test "$_alsaver" = '1.0.x-alsa' ; then
5322 aomodules
="alsa $aomodules"
5323 def_alsa
='#define CONFIG_ALSA 1'
5324 def_alsa1x
="#define CONFIG_ALSA1X 1"
5325 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5326 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5329 res_comment
="unknown version"
5331 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5333 noaomodules
="alsa $noaomodules"
5338 echocheck
"Sun audio"
5339 if test "$_sunaudio" = auto
; then
5341 #include <sys/types.h>
5342 #include <sys/audioio.h>
5343 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5346 cc_check
&& _sunaudio
=yes
5348 if test "$_sunaudio" = yes ; then
5349 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5350 aomodules
="sun $aomodules"
5352 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5353 noaomodules
="sun $noaomodules"
5355 echores
"$_sunaudio"
5358 def_mlib
='#define CONFIG_MLIB 0'
5360 echocheck
"Sun mediaLib"
5361 if test "$_mlib" = auto
; then
5363 cc_check mlib.h
"mlib_VideoColorYUV2ABGR420(0, 0, 0, 0, 0, 0, 0, 0, 0)" -lmlib &&
5364 _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5371 echocheck
"CoreAudio"
5372 if test "$_coreaudio" = auto
; then
5374 #include <CoreAudio/CoreAudio.h>
5375 #include <AudioToolbox/AudioToolbox.h>
5376 #include <AudioUnit/AudioUnit.h>
5377 int main(void) { return 0; }
5380 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5382 if test "$_coreaudio" = yes ; then
5383 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5384 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5385 aomodules
="coreaudio $aomodules"
5387 def_coreaudio
='#undef CONFIG_COREAUDIO'
5388 noaomodules
="coreaudio $noaomodules"
5395 echocheck
"SGI audio"
5396 if test "$_sgiaudio" = auto
; then
5398 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5400 if test "$_sgiaudio" = "yes" ; then
5401 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5402 libs_mplayer
="$libs_mplayer -laudio"
5403 aomodules
="sgi $aomodules"
5405 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5406 noaomodules
="sgi $noaomodules"
5408 echores
"$_sgiaudio"
5413 echocheck
"KAI (UNIAUD/DART)"
5414 if test "$_kai" = auto
; then
5416 header_check_broken os2.h kai.h
-lkai && _kai
=yes
5418 if test "$_kai" = yes ; then
5419 def_kai
='#define CONFIG_KAI 1'
5420 libs_mplayer
="$libs_mplayer -lkai"
5421 aomodules
="kai $aomodules"
5423 def_kai
='#undef CONFIG_KAI'
5424 noaomodules
="kai $noaomodules"
5429 if test "$_dart" = auto
; then
5431 header_check_broken os2.h dart.h
-ldart && _dart
=yes
5433 if test "$_dart" = yes ; then
5434 def_dart
='#define CONFIG_DART 1'
5435 libs_mplayer
="$libs_mplayer -ldart"
5436 aomodules
="dart $aomodules"
5438 def_dart
='#undef CONFIG_DART'
5439 noaomodules
="dart $noaomodules"
5445 # set default CD/DVD devices
5446 if win32 || os2
; then
5447 default_cdrom_device
="D:"
5449 default_cdrom_device
="/dev/disk1"
5450 elif dragonfly
; then
5451 default_cdrom_device
="/dev/cd0"
5453 default_cdrom_device
="/dev/acd0"
5455 default_cdrom_device
="/dev/rcd0c"
5457 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5458 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5459 # file system and the volfs service.
5460 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5462 default_cdrom_device
="a1ide.device:2"
5464 default_cdrom_device
="/dev/cdrom"
5467 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5468 default_dvd_device
=$default_cdrom_device
5470 default_dvd_device
="/dev/rdiskN"
5472 default_dvd_device
="/dev/dvd"
5476 echocheck
"VCD support"
5477 if test "$_vcd" = auto
; then
5479 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
5482 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5485 if test "$_vcd" = yes; then
5486 inputmodules
="vcd $inputmodules"
5487 def_vcd
='#define CONFIG_VCD 1'
5489 def_vcd
='#undef CONFIG_VCD'
5490 noinputmodules
="vcd $noinputmodules"
5491 res_comment
="not supported on this OS"
5497 echocheck
"Blu-ray support"
5498 if test "$_bluray" = auto
; then
5500 statement_check libbluray
/bluray.h
'bd_get_title_info(0, 0)' -lbluray && _bluray
=yes
5502 if test "$_bluray" = yes ; then
5503 def_bluray
='#define CONFIG_LIBBLURAY 1'
5504 extra_ldflags
="$extra_ldflags -lbluray"
5505 inputmodules
="bluray $inputmodules"
5507 def_bluray
='#undef CONFIG_LIBBLURAY'
5508 noinputmodules
="bluray $noinputmodules"
5513 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5514 _dvdread_internal
=no
5516 if test "$_dvdread_internal" = auto
; then
5517 _dvdread_internal
=no
5519 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5520 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5521 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5522 || darwin || win32 || os2
; then
5523 _dvdread_internal
=yes
5525 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5527 elif test "$_dvdread" = auto
; then
5529 if test "$_dl" = yes; then
5530 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
5531 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
5532 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5534 extra_cflags
="$extra_cflags $_dvdreadcflags"
5535 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5536 res_comment
="external"
5541 if test "$_dvdread_internal" = yes; then
5542 def_dvdread
='#define CONFIG_DVDREAD 1'
5543 inputmodules
="dvdread(internal) $inputmodules"
5545 res_comment
="internal"
5546 elif test "$_dvdread" = yes; then
5547 def_dvdread
='#define CONFIG_DVDREAD 1'
5549 extra_ldflags
="$extra_ldflags -ldvdread"
5550 inputmodules
="dvdread(external) $inputmodules"
5551 res_comment
="external"
5553 def_dvdread
='#undef CONFIG_DVDREAD'
5554 noinputmodules
="dvdread $noinputmodules"
5559 echocheck
"internal libdvdcss"
5560 if test "$_libdvdcss_internal" = auto
; then
5561 _libdvdcss_internal
=no
5562 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
5563 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5565 if test "$_libdvdcss_internal" = yes ; then
5566 if linux || netbsd || openbsd || bsdos
; then
5567 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5568 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5569 elif freebsd || dragonfly
; then
5570 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5572 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5573 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5575 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5577 cflags_libdvdcss
="-DSYS_BEOS"
5579 cflags_libdvdcss
="-DSYS_OS2"
5581 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5582 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5583 inputmodules
="libdvdcss(internal) $inputmodules"
5586 noinputmodules
="libdvdcss(internal) $noinputmodules"
5588 echores
"$_libdvdcss_internal"
5591 echocheck
"cdparanoia"
5592 if test "$_cdparanoia" = auto
; then
5594 #include <cdda_interface.h>
5595 #include <cdda_paranoia.h>
5596 // This need a better test. How ?
5597 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5600 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5601 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5602 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5605 if test "$_cdparanoia" = yes ; then
5607 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5608 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5610 echores
"$_cdparanoia"
5614 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5617 #include <cdio/version.h>
5618 #include <cdio/cdda.h>
5619 #include <cdio/paranoia.h>
5621 void *test = cdda_verbose_set;
5622 printf("%s\n", CDIO_VERSION);
5623 return test == (void *)1;
5627 for _ld_tmp
in "" "-lwinmm" ; do
5628 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5629 cc_check
$_ld_tmp $_ld_lm \
5630 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5632 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5633 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5634 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5635 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5636 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5639 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5641 def_libcdio
='#define CONFIG_LIBCDIO 1'
5642 def_havelibcdio
='yes'
5644 if test "$_cdparanoia" = yes ; then
5645 res_comment
="using cdparanoia"
5647 def_libcdio
='#undef CONFIG_LIBCDIO'
5648 def_havelibcdio
='no'
5652 if test "$_cdda" = yes ; then
5653 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5654 def_cdparanoia
='#define CONFIG_CDDA 1'
5655 inputmodules
="cdda $inputmodules"
5657 def_cdparanoia
='#undef CONFIG_CDDA'
5658 noinputmodules
="cdda $noinputmodules"
5661 if test "$_cddb" = yes ; then
5662 def_cddb
='#define CONFIG_CDDB 1'
5663 inputmodules
="cddb $inputmodules"
5666 def_cddb
='#undef CONFIG_CDDB'
5667 noinputmodules
="cddb $noinputmodules"
5670 echocheck
"bitmap font support"
5671 if test "$_bitmap_font" = yes ; then
5672 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5674 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5676 echores
"$_bitmap_font"
5679 echocheck
"freetype >= 2.0.9"
5681 # freetype depends on iconv
5682 if test "$_iconv" = no
; then
5684 res_comment
="iconv support needed"
5687 if test "$_freetype" = auto
; then
5688 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5691 #include <ft2build.h>
5692 #include FT_FREETYPE_H
5693 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5694 #error "Need FreeType 2.0.9 or newer"
5698 FT_Init_FreeType(&library);
5703 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
5708 if test "$_freetype" = yes ; then
5709 def_freetype
='#define CONFIG_FREETYPE 1'
5710 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
5711 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
5713 def_freetype
='#undef CONFIG_FREETYPE'
5715 echores
"$_freetype"
5717 if test "$_freetype" = no
; then
5719 res_comment
="FreeType support needed"
5721 echocheck
"fontconfig"
5722 if test "$_fontconfig" = auto
; then
5726 #include <fontconfig/fontconfig.h>
5727 #if FC_VERSION < 20402
5728 #error At least version 2.4.2 of fontconfig required
5732 if (err == FcFalse) {
5733 printf("Couldn't initialize fontconfig lib\n");
5740 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
5741 _ld_tmp
="-lfontconfig $_ld_tmp"
5742 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5744 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5745 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
5746 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
5747 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5748 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5751 if test "$_fontconfig" = yes ; then
5752 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5754 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5756 echores
"$_fontconfig"
5759 echocheck
"SSA/ASS support"
5760 if test "$_ass" = auto
-o "$_ass" = yes ; then
5761 if $_pkg_config libass
; then
5763 def_ass
='#define CONFIG_ASS 1'
5764 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
5765 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
5768 def_ass
='#undef CONFIG_ASS'
5771 def_ass
='#undef CONFIG_ASS'
5776 echocheck
"fribidi with charsets"
5779 if test "$_fribidi" = auto
; then
5782 /* workaround for fribidi 0.10.4 and below */
5783 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5784 #include <fribidi/fribidi.h>
5786 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
5794 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5795 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
5796 test "$_fribidi" = no
; then
5797 _inc_tmp
="$($_pkg_config --cflags)"
5798 _ld_tmp
="$($_pkg_config --libs)"
5799 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5802 if test "$_fribidi" = yes ; then
5803 def_fribidi
='#define CONFIG_FRIBIDI 1'
5804 extra_cflags
="$extra_cflags $_inc_tmp"
5805 extra_ldflags
="$extra_ldflags $_ld_tmp"
5807 def_fribidi
='#undef CONFIG_FRIBIDI'
5813 if test "$_enca" = auto
; then
5815 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
5817 if test "$_enca" = yes ; then
5818 def_enca
='#define CONFIG_ENCA 1'
5819 extra_ldflags
="$extra_ldflags -lenca"
5821 def_enca
='#undef CONFIG_ENCA'
5828 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
5829 if test "$_zlib" = yes ; then
5830 def_zlib
='#define CONFIG_ZLIB 1'
5831 extra_ldflags
="$extra_ldflags -lz"
5833 def_zlib
='#define CONFIG_ZLIB 0'
5840 def_bzlib
='#define CONFIG_BZLIB 0'
5841 statement_check bzlib.h
'BZ2_bzlibVersion()' -lbz2 && bzlib
=yes
5842 if test "$bzlib" = yes ; then
5843 def_bzlib
='#define CONFIG_BZLIB 1'
5844 extra_ldflags
="$extra_ldflags -lbz2"
5850 if test "$_rtc" = auto
; then
5852 #include <sys/ioctl.h>
5854 #include <linux/rtc.h>
5857 #define RTC_PIE_ON RTCIO_PIE_ON
5859 int main(void) { return RTC_PIE_ON; }
5862 cc_check
&& _rtc
=yes
5865 if test "$_rtc" = yes ; then
5866 def_rtc
='#define HAVE_RTC 1'
5868 def_rtc
='#undef HAVE_RTC'
5873 echocheck
"liblzo2 support"
5874 if test "$_liblzo" = auto
; then
5876 statement_check lzo
/lzo1x.h
'lzo_init()' -llzo2 && _liblzo
=yes
5878 if test "$_liblzo" = yes ; then
5879 def_liblzo
='#define CONFIG_LIBLZO 1'
5880 extra_ldflags
="$extra_ldflags -llzo2"
5881 codecmodules
="liblzo $codecmodules"
5883 def_liblzo
='#undef CONFIG_LIBLZO'
5884 nocodecmodules
="liblzo $nocodecmodules"
5889 echocheck
"mad support"
5890 if test "$_mad" = auto
; then
5892 header_check mad.h
-lmad && _mad
=yes
5894 if test "$_mad" = yes ; then
5895 def_mad
='#define CONFIG_LIBMAD 1'
5896 extra_ldflags
="$extra_ldflags -lmad"
5897 codecmodules
="libmad $codecmodules"
5899 def_mad
='#undef CONFIG_LIBMAD'
5900 nocodecmodules
="libmad $nocodecmodules"
5904 echocheck
"OggVorbis support"
5905 if test "$_tremor_internal" = yes; then
5907 elif test "$_tremor" = auto
; then
5909 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
5911 if test "$_libvorbis" = auto
; then
5913 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes
5915 if test "$_tremor_internal" = yes ; then
5917 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5918 def_tremor
='#define CONFIG_TREMOR 1'
5919 codecmodules
="tremor(internal) $codecmodules"
5920 res_comment
="internal Tremor"
5921 if test "$_tremor_low" = yes ; then
5922 cflags_tremor_low
="-D_LOW_ACCURACY_"
5923 res_comment
="internal low accuracy Tremor"
5925 elif test "$_tremor" = yes ; then
5927 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5928 def_tremor
='#define CONFIG_TREMOR 1'
5929 codecmodules
="tremor(external) $codecmodules"
5930 res_comment
="external Tremor"
5931 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
5932 elif test "$_libvorbis" = yes ; then
5934 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5935 codecmodules
="libvorbis $codecmodules"
5936 res_comment
="libvorbis"
5937 extra_ldflags
="$extra_ldflags -lvorbis -logg"
5940 nocodecmodules
="libvorbis $nocodecmodules"
5944 echocheck
"libspeex (version >= 1.1 required)"
5945 if test "$_speex" = auto
; then
5949 #include <speex/speex.h>
5950 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
5952 cc_check
-lspeex $_ld_lm && _speex
=yes
5954 if test "$_speex" = yes ; then
5955 def_speex
='#define CONFIG_SPEEX 1'
5956 extra_ldflags
="$extra_ldflags -lspeex"
5957 codecmodules
="speex $codecmodules"
5959 def_speex
='#undef CONFIG_SPEEX'
5960 nocodecmodules
="speex $nocodecmodules"
5964 echocheck
"OggTheora support"
5965 if test "$_theora" = auto
; then
5968 #include <theora/theora.h>
5971 /* Theora is in flux, make sure that all interface routines and datatypes
5972 * exist and work the way we expect it, so we don't break MPlayer. */
5981 theora_info_init(&inf);
5982 theora_comment_init(&tc);
5986 /* we don't want to execute this kind of nonsense; just for making sure
5987 * that compilation works... */
5988 memset(&op, 0, sizeof(op));
5989 r = theora_decode_header(&inf, &tc, &op);
5990 r = theora_decode_init(&st, &inf);
5991 t = theora_granule_time(&st, op.granulepos);
5992 r = theora_decode_packetin(&st, &op);
5993 r = theora_decode_YUVout(&st, &yuv);
5999 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6000 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6001 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6002 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6003 if test _theora
= no
; then
6004 _ld_theora
="-ltheora -logg"
6005 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6007 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6008 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6009 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6010 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6011 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6012 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6013 if test _theora
= no
; then
6014 _ld_theora
="-ltheora -logg"
6015 cc_check tremor
/bitwise.c
$_ld_theora &&
6016 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6020 if test "$_theora" = yes ; then
6021 def_theora
='#define CONFIG_OGGTHEORA 1'
6022 codecmodules
="libtheora $codecmodules"
6023 # when --enable-theora is forced, we'd better provide a probably sane
6024 # $_ld_theora than nothing
6025 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6027 def_theora
='#undef CONFIG_OGGTHEORA'
6028 nocodecmodules
="libtheora $nocodecmodules"
6032 echocheck
"mp3lib support"
6033 if test "$_mp3lib" = auto
; then
6034 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6036 if test "$_mp3lib" = yes ; then
6037 def_mp3lib
='#define CONFIG_MP3LIB 1'
6038 codecmodules
="mp3lib(internal) $codecmodules"
6040 def_mp3lib
='#undef CONFIG_MP3LIB'
6041 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6045 # Any version of libmpg123 shall be fine.
6046 echocheck
"mpg123 support"
6047 def_mpg123
='#undef CONFIG_MPG123'
6048 if test "$_mpg123" = auto
; then
6050 statement_check mpg123.h
'mpg123_init()' -lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
6052 if test "$_mpg123" = yes ; then
6053 def_mpg123
='#define CONFIG_MPG123 1'
6054 codecmodules
="mpg123 $codecmodules"
6056 nocodecmodules
="mpg123 $nocodecmodules"
6060 echocheck
"liba52 support"
6061 def_liba52
='#undef CONFIG_LIBA52'
6062 if test "$_liba52" = auto
; then
6065 #include <inttypes.h>
6066 #include <a52dec/a52.h>
6067 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6069 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6071 if test "$_liba52" = yes ; then
6072 def_liba52
='#define CONFIG_LIBA52 1'
6073 codecmodules
="liba52 $codecmodules"
6075 nocodecmodules
="liba52 $nocodecmodules"
6079 echocheck
"internal libmpeg2 support"
6080 if test "$_libmpeg2" = auto
; then
6082 if alpha
&& test cc_vendor
=gnu
; then
6084 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6086 res_comment
="broken gcc"
6091 if test "$_libmpeg2" = yes ; then
6092 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6093 codecmodules
="libmpeg2(internal) $codecmodules"
6095 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6096 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6098 echores
"$_libmpeg2"
6100 echocheck
"libdca support"
6101 if test "$_libdca" = auto
; then
6103 for _ld_dca
in -ldca -ldts ; do
6104 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
6105 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
6108 if test "$_libdca" = yes ; then
6109 def_libdca
='#define CONFIG_LIBDCA 1'
6110 codecmodules
="libdca $codecmodules"
6112 def_libdca
='#undef CONFIG_LIBDCA'
6113 nocodecmodules
="libdca $nocodecmodules"
6117 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6118 if test "$_musepack" = auto
; then
6122 #include <mpcdec/mpcdec.h>
6124 mpc_streaminfo info;
6125 mpc_decoder decoder;
6126 mpc_decoder_set_streaminfo(&decoder, &info);
6127 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6131 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6133 if test "$_musepack" = yes ; then
6134 def_musepack
='#define CONFIG_MUSEPACK 1'
6135 extra_ldflags
="$extra_ldflags -lmpcdec"
6136 codecmodules
="musepack $codecmodules"
6138 def_musepack
='#undef CONFIG_MUSEPACK'
6139 nocodecmodules
="musepack $nocodecmodules"
6141 echores
"$_musepack"
6144 echocheck
"FAAD2 support"
6145 if test "$_faad_internal" = auto
; then
6146 if x86_32
&& test cc_vendor
=gnu
; then
6148 3.1*|
3.2) # ICE/insn with these versions
6150 res_comment
="broken gcc"
6162 if test "$_faad" = auto
; then
6165 #ifndef FAAD_MIN_STREAMSIZE
6166 #error Too old version
6168 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6169 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6171 cc_check
-lfaad $_ld_lm && _faad
=yes
6174 def_faad
='#undef CONFIG_FAAD'
6175 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6176 if test "$_faad_internal" = yes ; then
6177 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6178 res_comment
="internal floating-point"
6179 if test "$_faad_fixed" = yes ; then
6180 # The FIXED_POINT implementation of FAAD2 improves performance
6181 # on some platforms, especially for SBR files.
6182 cflags_faad_fixed
="-DFIXED_POINT"
6183 res_comment
="internal fixed-point"
6185 elif test "$_faad" = yes ; then
6186 extra_ldflags
="$extra_ldflags -lfaad"
6189 if test "$_faad" = yes ; then
6190 def_faad
='#define CONFIG_FAAD 1'
6191 if test "$_faad_internal" = yes ; then
6192 codecmodules
="faad2(internal) $codecmodules"
6194 codecmodules
="faad2 $codecmodules"
6198 nocodecmodules
="faad2 $nocodecmodules"
6203 echocheck
"LADSPA plugin support"
6204 if test "$_ladspa" = auto
; then
6206 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
6208 if test "$_ladspa" = yes; then
6209 def_ladspa
="#define CONFIG_LADSPA 1"
6211 def_ladspa
="#undef CONFIG_LADSPA"
6216 echocheck
"libbs2b audio filter support"
6217 if test "$_libbs2b" = auto
; then
6220 #if BS2B_VERSION_MAJOR < 3
6221 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6231 if $_pkg_config --exists libbs2b
; then
6232 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6233 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6234 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6235 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6237 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6238 -I/usr
/local
/include
/bs2b
; do
6239 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6240 extra_ldflags
="$extra_ldflags -lbs2b"
6241 extra_cflags
="$extra_cflags $_inc_tmp"
6248 def_libbs2b
="#undef CONFIG_LIBBS2B"
6249 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6253 if test -z "$_codecsdir" ; then
6254 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6255 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6256 if test -d "$dir" ; then
6262 # Fall back on default directory.
6263 if test -z "$_codecsdir" ; then
6264 _codecsdir
="$_libdir/codecs"
6265 mingw32 || os2
&& _codecsdir
="codecs"
6269 echocheck
"Win32 codecs"
6270 if test "$_win32dll" = auto
; then
6272 if x86_32
&& ! qnx
; then
6276 if test "$_win32dll" = yes ; then
6277 def_win32dll
='#define CONFIG_WIN32DLL 1'
6279 def_win32_loader
='#define WIN32_LOADER 1'
6280 _win32_emulation
=yes
6282 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6283 res_comment
="using native windows"
6285 codecmodules
="win32 $codecmodules"
6287 def_win32dll
='#undef CONFIG_WIN32DLL'
6288 def_win32_loader
='#undef WIN32_LOADER'
6289 nocodecmodules
="win32 $nocodecmodules"
6291 echores
"$_win32dll"
6294 echocheck
"XAnim codecs"
6295 if test "$_xanim" = auto
; then
6297 res_comment
="dynamic loader support needed"
6298 if test "$_dl" = yes ; then
6302 if test "$_xanim" = yes ; then
6303 def_xanim
='#define CONFIG_XANIM 1'
6304 codecmodules
="xanim $codecmodules"
6306 def_xanim
='#undef CONFIG_XANIM'
6307 nocodecmodules
="xanim $nocodecmodules"
6312 echocheck
"RealPlayer codecs"
6313 if test "$_real" = auto
; then
6315 res_comment
="dynamic loader support needed"
6316 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6317 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
6321 if test "$_real" = yes ; then
6322 def_real
='#define CONFIG_REALCODECS 1'
6323 codecmodules
="real $codecmodules"
6325 def_real
='#undef CONFIG_REALCODECS'
6326 nocodecmodules
="real $nocodecmodules"
6331 echocheck
"QuickTime codecs"
6333 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6334 if test "$_qtx" = auto
; then
6335 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6337 if test "$_qtx" = yes ; then
6338 def_qtx
='#define CONFIG_QTX_CODECS 1'
6339 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6340 codecmodules
="qtx $codecmodules"
6341 darwin || win32 || _qtx_emulation
=yes
6343 def_qtx
='#undef CONFIG_QTX_CODECS'
6344 nocodecmodules
="qtx $nocodecmodules"
6348 echocheck
"Nemesi Streaming Media libraries"
6349 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
6351 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6352 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6353 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6357 if test "$_nemesi" = yes; then
6359 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6360 inputmodules
="nemesi $inputmodules"
6362 _native_rtsp
="$networking"
6364 def_nemesi
='#undef CONFIG_LIBNEMESI'
6365 noinputmodules
="nemesi $noinputmodules"
6369 echocheck
"LIVE555 Streaming Media libraries"
6370 if test "$_live" = auto
&& test "$networking" = yes ; then
6371 cat > $TMPCPP << EOF
6372 #include <liveMedia.hh>
6373 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6374 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6376 int main(void) { return 0; }
6380 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
6381 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6382 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6383 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6384 $_livelibdir/groupsock/libgroupsock.a \
6385 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6386 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6387 $extra_ldflags -lstdc++" \
6388 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6389 -I$_livelibdir/UsageEnvironment/include \
6390 -I$_livelibdir/BasicUsageEnvironment/include \
6391 -I$_livelibdir/groupsock/include" && \
6394 if test "$_live" != yes ; then
6395 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6396 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6401 if test "$_live" = yes && test "$networking" = yes; then
6402 test $_livelibdir && res_comment
="using $_livelibdir"
6403 def_live
='#define CONFIG_LIVE555 1'
6404 inputmodules
="live555 $inputmodules"
6405 elif test "$_live_dist" = yes && test "$networking" = yes; then
6406 res_comment
="using distribution version"
6408 def_live
='#define CONFIG_LIVE555 1'
6409 extra_ldflags
="$extra_ldflags $ld_tmp"
6410 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6411 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6412 inputmodules
="live555 $inputmodules"
6415 def_live
='#undef CONFIG_LIVE555'
6416 noinputmodules
="live555 $noinputmodules"
6422 all_ffmpeg_libs
="libavutil libavcodec libavformat libswscale libpostproc"
6423 echocheck
"FFmpeg ($all_ffmpeg_libs)"
6424 if test "$ffmpeg" = auto
; then
6426 if $_pkg_config --exists $all_ffmpeg_libs ; then
6427 inc_ffmpeg
=$
($_pkg_config --cflags $all_ffmpeg_libs)
6428 _ld_tmp
=$
($_pkg_config --libs $all_ffmpeg_libs)
6429 extra_ldflags
="$extra_ldflags $_ld_tmp"
6430 extra_cflags
="$extra_cflags $inc_ffmpeg"
6432 elif header_check libavcore
/avutil.h
-lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
6433 extra_ldflags
="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
6439 def_ffmpeg_eval_api
="#undef CONFIG_FFMPEG_EVAL_API"
6440 if test "$ffmpeg" = yes; then
6441 def_ffmpeg
='#define CONFIG_FFMPEG 1'
6442 codecmodules
="ffmpeg $codecmodules"
6443 if $_pkg_config --atleast-version=50.18.0 libavutil
; then
6445 def_ffmpeg_eval_api
="#define CONFIG_FFMPEG_EVAL_API 1"
6448 def_ffmpeg
='#undef CONFIG_FFMPEG'
6449 nocodecmodules
="ffmpeg $nocodecmodules"
6453 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
6454 if ! test -z "$_ffmpeg_source" ; then
6455 test "$ffmpeg" = yes && def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
6460 echocheck
"libdv-0.9.5+"
6461 if test "$_libdv" = auto
; then
6463 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
6465 if test "$_libdv" = yes ; then
6466 def_libdv
='#define CONFIG_LIBDV095 1'
6467 extra_ldflags
="$extra_ldflags -ldv"
6468 codecmodules
="libdv $codecmodules"
6470 def_libdv
='#undef CONFIG_LIBDV095'
6471 nocodecmodules
="libdv $nocodecmodules"
6477 if test "$_xvid" = auto
; then
6479 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6480 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
6481 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
6485 if test "$_xvid" = yes ; then
6486 def_xvid
='#define CONFIG_XVID4 1'
6487 codecmodules
="xvid $codecmodules"
6489 def_xvid
='#undef CONFIG_XVID4'
6490 nocodecmodules
="xvid $nocodecmodules"
6496 if test "$_libnut" = auto
; then
6499 nut_context_tt * nut;
6500 int main(void) { nut_error(0); return 0; }
6503 cc_check
-lnut && _libnut
=yes
6506 if test "$_libnut" = yes ; then
6507 def_libnut
='#define CONFIG_LIBNUT 1'
6508 extra_ldflags
="$extra_ldflags -lnut"
6510 def_libnut
='#undef CONFIG_LIBNUT'
6514 # These VO checks must be done after the FFmpeg one
6515 echocheck
"/dev/mga_vid"
6516 if test "$_mga" = auto
; then
6518 test -c /dev
/mga_vid
&& _mga
=yes
6520 if test "$_mga" = yes ; then
6521 def_mga
='#define CONFIG_MGA 1'
6522 vomodules
="mga $vomodules"
6524 def_mga
='#undef CONFIG_MGA'
6525 novomodules
="mga $novomodules"
6531 if test "$_xmga" = auto
; then
6533 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
6535 if test "$_xmga" = yes ; then
6536 def_xmga
='#define CONFIG_XMGA 1'
6537 vomodules
="xmga $vomodules"
6539 def_xmga
='#undef CONFIG_XMGA'
6540 novomodules
="xmga $novomodules"
6545 if test "$_zr" = auto
; then
6546 #36067's seem to identify themselves as 36057PQC's, so the line
6547 #below should work for 36067's and 36057's.
6548 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
6554 if test "$_zr" = yes ; then
6555 if test "$ffmpeg_internals" = yes ; then
6556 def_zr
='#define CONFIG_ZR 1'
6557 vomodules
="zr zr2 $vomodules"
6559 res_comment
="FFmpeg internal headers are required by zr, sorry"
6560 novomodules
="zr $novomodules"
6561 def_zr
='#undef CONFIG_ZR'
6564 def_zr
='#undef CONFIG_ZR'
6565 novomodules
="zr zr2 $novomodules"
6570 echocheck
"UnRAR executable"
6571 if test "$_unrar_exec" = auto
; then
6573 mingw32
&& _unrar_exec
="no"
6575 if test "$_unrar_exec" = yes ; then
6576 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
6578 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
6580 echores
"$_unrar_exec"
6582 echocheck
"TV interface"
6583 if test "$_tv" = yes ; then
6584 def_tv
='#define CONFIG_TV 1'
6585 inputmodules
="tv $inputmodules"
6587 noinputmodules
="tv $noinputmodules"
6588 def_tv
='#undef CONFIG_TV'
6593 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
6594 echocheck
"*BSD BT848 bt8xx header"
6596 for file in "machine/ioctl_bt848.h" \
6597 "dev/bktr/ioctl_bt848.h" \
6598 "dev/video/bktr/ioctl_bt848.h" \
6599 "dev/ic/bt8xx.h" ; do
6601 #include <sys/types.h>
6602 #include <sys/ioctl.h>
6604 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
6608 _ioctl_bt848_h_name
="$file"
6612 if test "$_ioctl_bt848_h" = yes ; then
6613 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6614 res_comment
="using $_ioctl_bt848_h_name"
6616 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6618 echores
"$_ioctl_bt848_h"
6620 echocheck
"*BSD ioctl_meteor.h"
6622 for file in "machine/ioctl_meteor.h" \
6623 "dev/bktr/ioctl_meteor.h" \
6624 "dev/video/bktr/ioctl_meteor.h" ; do
6626 #include <sys/types.h>
6628 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
6632 _ioctl_meteor_h_name
="$file"
6636 if test "$_ioctl_meteor_h" = yes ; then
6637 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6638 res_comment
="using $_ioctl_meteor_h_name"
6640 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6642 echores
"$_ioctl_meteor_h"
6644 echocheck
"*BSD BrookTree 848 TV interface"
6645 if test "$_tv_bsdbt848" = auto
; then
6647 if test "$_tv" = yes ; then
6649 #include <sys/types.h>
6650 $def_ioctl_meteor_h_name
6651 $def_ioctl_bt848_h_name
6652 #ifdef IOCTL_METEOR_H_NAME
6653 #include IOCTL_METEOR_H_NAME
6655 #ifdef IOCTL_BT848_H_NAME
6656 #include IOCTL_BT848_H_NAME
6659 ioctl(0, METEORSINPUT, 0);
6660 ioctl(0, TVTUNER_GETFREQ, 0);
6664 cc_check
&& _tv_bsdbt848
=yes
6667 if test "$_tv_bsdbt848" = yes ; then
6668 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
6669 inputmodules
="tv-bsdbt848 $inputmodules"
6671 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
6672 noinputmodules
="tv-bsdbt848 $noinputmodules"
6674 echores
"$_tv_bsdbt848"
6675 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
6678 echocheck
"DirectShow TV interface"
6679 if test "$_tv_dshow" = auto
; then
6681 if test "$_tv" = yes && win32
; then
6686 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
6690 cc_check
-lole32 -luuid && _tv_dshow
=yes
6693 if test "$_tv_dshow" = yes ; then
6694 inputmodules
="tv-dshow $inputmodules"
6695 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
6696 extra_ldflags
="$extra_ldflags -lole32 -luuid"
6698 noinputmodules
="tv-dshow $noinputmodules"
6699 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
6701 echores
"$_tv_dshow"
6704 echocheck
"Video 4 Linux TV interface"
6705 if test "$_tv_v4l1" = auto
; then
6707 if test "$_tv" = yes && linux
; then
6708 header_check linux
/videodev.h
&& _tv_v4l1
=yes
6711 if test "$_tv_v4l1" = yes ; then
6714 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6715 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
6716 inputmodules
="tv-v4l $inputmodules"
6718 noinputmodules
="tv-v4l1 $noinputmodules"
6719 def_tv_v4l
='#undef CONFIG_TV_V4L'
6724 echocheck
"Video 4 Linux 2 TV interface"
6725 if test "$_tv_v4l2" = auto
; then
6727 if test "$_tv" = yes && linux
; then
6728 header_check linux
/videodev2.h
&& _tv_v4l2
=yes
6731 if test "$_tv_v4l2" = yes ; then
6734 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6735 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
6736 inputmodules
="tv-v4l2 $inputmodules"
6738 noinputmodules
="tv-v4l2 $noinputmodules"
6739 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
6744 echocheck
"Radio interface"
6745 if test "$_radio" = yes ; then
6746 def_radio
='#define CONFIG_RADIO 1'
6747 inputmodules
="radio $inputmodules"
6748 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6751 if test "$_radio_capture" = yes ; then
6753 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
6755 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6758 noinputmodules
="radio $noinputmodules"
6759 def_radio
='#undef CONFIG_RADIO'
6760 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6764 echocheck
"Capture for Radio interface"
6765 echores
"$_radio_capture"
6767 echocheck
"Video 4 Linux 2 Radio interface"
6768 if test "$_radio_v4l2" = auto
; then
6770 if test "$_radio" = yes && linux
; then
6771 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
6774 if test "$_radio_v4l2" = yes ; then
6775 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
6777 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
6779 echores
"$_radio_v4l2"
6781 echocheck
"Video 4 Linux Radio interface"
6782 if test "$_radio_v4l" = auto
; then
6784 if test "$_radio" = yes && linux
; then
6785 header_check linux
/videodev.h
&& _radio_v4l
=yes
6788 if test "$_radio_v4l" = yes ; then
6789 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
6791 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
6793 echores
"$_radio_v4l"
6795 if freebsd || netbsd || openbsd || dragonfly || bsdos \
6796 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6797 echocheck
"*BSD BrookTree 848 Radio interface"
6800 #include <sys/types.h>
6801 $def_ioctl_bt848_h_name
6802 #ifdef IOCTL_BT848_H_NAME
6803 #include IOCTL_BT848_H_NAME
6805 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
6807 cc_check
&& _radio_bsdbt848
=yes
6808 echores
"$_radio_bsdbt848"
6809 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
6811 if test "$_radio_bsdbt848" = yes ; then
6812 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
6814 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
6817 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6818 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6819 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6822 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6823 if test "$_pvr" = auto
; then
6825 if test "$_tv_v4l2" = yes && linux
; then
6827 #include <linux/videodev2.h>
6828 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
6830 cc_check
&& _pvr
=yes
6833 if test "$_pvr" = yes ; then
6834 def_pvr
='#define CONFIG_PVR 1'
6835 inputmodules
="pvr $inputmodules"
6837 noinputmodules
="pvr $noinputmodules"
6838 def_pvr
='#undef CONFIG_PVR'
6844 if test "$_ftp" = "auto" ; then
6845 test "$networking" = "yes" && ! beos
&& _ftp
=yes
6847 if test "$_ftp" = yes ; then
6848 def_ftp
='#define CONFIG_FTP 1'
6849 inputmodules
="ftp $inputmodules"
6851 noinputmodules
="ftp $noinputmodules"
6852 def_ftp
='#undef CONFIG_FTP'
6856 echocheck
"vstream client"
6857 if test "$_vstream" = auto
; then
6860 #include <vstream-client.h>
6861 void vstream_error(const char *format, ... ) {}
6862 int main(void) { vstream_start(); return 0; }
6864 cc_check
-lvstream-client && _vstream
=yes
6866 if test "$_vstream" = yes ; then
6867 def_vstream
='#define CONFIG_VSTREAM 1'
6868 inputmodules
="vstream $inputmodules"
6869 extra_ldflags
="$extra_ldflags -lvstream-client"
6871 noinputmodules
="vstream $noinputmodules"
6872 def_vstream
='#undef CONFIG_VSTREAM'
6877 echocheck
"OSD menu"
6878 if test "$_menu" = yes ; then
6879 def_menu
='#define CONFIG_MENU 1'
6880 test $_dvbin = "yes" && _menu_dvbin
=yes
6882 def_menu
='#undef CONFIG_MENU'
6888 echocheck
"Subtitles sorting"
6889 if test "$_sortsub" = yes ; then
6890 def_sortsub
='#define CONFIG_SORTSUB 1'
6892 def_sortsub
='#undef CONFIG_SORTSUB'
6897 echocheck
"XMMS inputplugin support"
6898 if test "$_xmms" = yes ; then
6899 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6900 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
6901 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
6903 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6904 _xmmslibdir
=/usr
/lib
6907 def_xmms
='#define CONFIG_XMMS 1'
6909 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
6911 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6914 def_xmms
='#undef CONFIG_XMMS'
6918 if test "$_charset" != "noconv" ; then
6919 def_charset
="#define MSG_CHARSET \"$_charset\""
6921 def_charset
="#undef MSG_CHARSET"
6925 #############################################################################
6927 echocheck
"automatic gdb attach"
6928 if test "$_crash_debug" = yes ; then
6929 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
6931 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
6934 echores
"$_crash_debug"
6936 echocheck
"compiler support for noexecstack"
6937 if cflag_check
-Wl,-z,noexecstack
; then
6938 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
6944 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
6945 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
6946 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
6953 # Dynamic linking flags
6954 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6956 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
6957 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
6958 _ld_dl_dynamic
='-rdynamic'
6961 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6962 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
6963 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
6965 def_debug
='#undef MP_DEBUG'
6966 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
6969 echocheck
"joystick"
6970 def_joystick
='#undef CONFIG_JOYSTICK'
6971 if test "$_joystick" = yes ; then
6972 if linux || freebsd
; then
6973 # TODO add some check
6974 def_joystick
='#define CONFIG_JOYSTICK 1'
6977 res_comment
="unsupported under $system_name"
6980 echores
"$_joystick"
6983 if test "$_lirc" = auto
; then
6985 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
6987 if test "$_lirc" = yes ; then
6988 def_lirc
='#define CONFIG_LIRC 1'
6989 libs_mplayer
="$libs_mplayer -llirc_client"
6991 def_lirc
='#undef CONFIG_LIRC'
6996 if test "$_lircc" = auto
; then
6998 header_check lirc
/lircc.h
-llircc && _lircc
=yes
7000 if test "$_lircc" = yes ; then
7001 def_lircc
='#define CONFIG_LIRCC 1'
7002 libs_mplayer
="$libs_mplayer -llircc"
7004 def_lircc
='#undef CONFIG_LIRCC'
7009 # Detect maemo development platform libraries availability (http://www.maemo.org),
7010 # they are used when run on Nokia 770|8x0
7011 echocheck
"maemo (Nokia 770|8x0)"
7012 if test "$_maemo" = auto
; then
7014 statement_check libosso.h
'osso_initialize('', '', 0, NULL)' $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
7016 if test "$_maemo" = yes ; then
7017 def_maemo
='#define CONFIG_MAEMO 1'
7018 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
7019 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
7021 def_maemo
='#undef CONFIG_MAEMO'
7026 #############################################################################
7028 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
7029 # the OMF format needs to come after the 'extern symbol prefix' check, which
7032 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
7035 #############################################################################
7036 # 64 bit file offsets?
7037 if test "$_largefiles" = yes || freebsd
; then
7038 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7039 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7040 # dvdread support requires this (for off64_t)
7041 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7045 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
7047 # This must be the last test to be performed. Any other tests following it
7048 # could fail due to linker errors. libdvdnavmini is intentionally not linked
7049 # against libdvdread (to permit MPlayer to use its own copy of the library).
7050 # So any compilation using the flags added here but not linking against
7051 # libdvdread can fail.
7052 echocheck
"DVD support (libdvdnav)"
7053 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
7057 if test "$_dvdnav" = auto
; then
7058 if test "$_dvdread_internal" = yes ; then
7061 res_comment
="internal"
7063 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7066 if test "$_dvdnav" = auto
; then
7068 _dvdnavdir
=$
($_dvdnavconfig --cflags)
7069 _dvdnavlibs
=$
($_dvdnavconfig --libs)
7070 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7072 if test "$_dvdnav" = yes ; then
7074 def_dvdnav
='#define CONFIG_DVDNAV 1'
7075 if test "$dvdnav_internal" = yes ; then
7076 cflags_libdvdnav
="-Ilibdvdnav"
7077 inputmodules
="dvdnav(internal) $inputmodules"
7079 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
7080 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
7081 inputmodules
="dvdnav $inputmodules"
7084 def_dvdnav
='#undef CONFIG_DVDNAV'
7085 noinputmodules
="dvdnav $noinputmodules"
7089 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
7090 # Read dvdnav comment above.
7093 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7094 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7096 for part
in $list; do
7097 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7098 echo "${nprefix}_$part = yes"
7103 #############################################################################
7104 echo "Creating config.mak"
7105 cat > config.mak
<< EOF
7106 # -------- Generated by configure -----------
7108 # Ensure that locale settings do not interfere with shell commands.
7111 CONFIGURATION = $configuration
7114 DOC_LANGS = $language_doc
7115 DOC_LANG_ALL = $doc_lang_all
7116 MAN_LANGS = $language_man
7117 MAN_LANG_ALL = $man_lang_all
7118 MSG_LANGS = $language_msg
7119 MSG_LANG_ALL = $msg_lang_all
7121 prefix = \$(DESTDIR)$_prefix
7122 BINDIR = \$(DESTDIR)$_bindir
7123 DATADIR = \$(DESTDIR)$_datadir
7124 LIBDIR = \$(DESTDIR)$_libdir
7125 MANDIR = \$(DESTDIR)$_mandir
7126 CONFDIR = \$(DESTDIR)$_confdir
7127 LOCALEDIR = \$(DESTDIR)$_localedir
7135 INSTALLSTRIP = $_install_strip
7138 CFLAGS = $WARNFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
7139 CXXFLAGS = $WARNFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
7140 DEPFLAGS = $DEPFLAGS
7142 CFLAGS_DHAHELPER = $cflags_dhahelper
7143 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
7144 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7145 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7146 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7147 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7148 CFLAGS_STACKREALIGN = $cflags_stackrealign
7149 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7150 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7152 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7153 EXTRALIBS_MPLAYER = $libs_mplayer
7162 $(mak_enable "$arch_all" "$arch" ARCH)
7163 $(mak_enable "$subarch_all" "$subarch" ARCH)
7164 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
7168 NEED_GETTIMEOFDAY = $_need_gettimeofday
7169 NEED_GLOB = $_need_glob
7170 NEED_MMAP = $_need_mmap
7171 NEED_SETENV = $_need_setenv
7172 NEED_SHMEM = $_need_shmem
7173 NEED_STRSEP = $_need_strsep
7174 NEED_SWAB = $_need_swab
7175 NEED_VSSCANF = $_need_vsscanf
7183 APPLE_IR = $_apple_ir
7184 APPLE_REMOTE = $_apple_remote
7186 AUDIO_INPUT = $_audio_input
7187 BITMAP_FONT = $_bitmap_font
7192 COREAUDIO = $_coreaudio
7193 COREVIDEO = $_corevideo
7196 DIRECT3D = $_direct3d
7197 DIRECTFB = $_directfb
7201 DVDNAV_INTERNAL = $dvdnav_internal
7203 DVDREAD_INTERNAL = $_dvdread_internal
7208 FAAD_INTERNAL = $_faad_internal
7209 FASTMEMCPY = $_fastmemcpy
7211 FREETYPE = $_freetype
7216 GL_WIN32 = $_gl_win32
7219 MATRIXVIEW = $matrixview
7220 HAVE_POSIX_SELECT = $_posix_select
7221 HAVE_SYS_MMAN_H = $_mman
7224 JOYSTICK = $_joystick
7231 LIBBLURAY = $_bluray
7235 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7239 LIBMENU_DVBIN = $_menu_dvbin
7240 LIBMPEG2 = $_libmpeg2
7241 LIBNEMESI = $_nemesi
7243 LIBSMBCLIENT = $_smb
7244 LIBTHEORA = $_theora
7247 MACOSX_FINDER = $_macosx_finder
7253 MUSEPACK = $_musepack
7255 NATIVE_RTSP = $_native_rtsp
7256 NETWORKING = $networking
7259 PE_EXECUTABLE = $_pe_executable
7262 PRIORITY = $_priority
7266 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7267 QTX_EMULATION = $_qtx_emulation
7270 RADIO_CAPTURE=$_radio_capture
7271 REAL_CODECS = $_real
7275 STREAM_CACHE = $_stream_cache
7276 SGIAUDIO = $_sgiaudio
7277 SUNAUDIO = $_sunaudio
7282 TREMOR_INTERNAL = $_tremor_internal
7284 TV_BSDBT848 = $_tv_bsdbt848
7285 TV_DSHOW = $_tv_dshow
7289 UNRAR_EXEC = $_unrar_exec
7295 VIDIX_PCIDB = $_vidix_pcidb_val
7296 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7297 VIDIX_IVTV=$_vidix_drv_ivtv
7298 VIDIX_MACH64=$_vidix_drv_mach64
7299 VIDIX_MGA=$_vidix_drv_mga
7300 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7301 VIDIX_NVIDIA=$_vidix_drv_nvidia
7302 VIDIX_PM2=$_vidix_drv_pm2
7303 VIDIX_PM3=$_vidix_drv_pm3
7304 VIDIX_RADEON=$_vidix_drv_radeon
7305 VIDIX_RAGE128=$_vidix_drv_rage128
7306 VIDIX_S3=$_vidix_drv_s3
7307 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7308 VIDIX_SIS=$_vidix_drv_sis
7309 VIDIX_UNICHROME=$_vidix_drv_unichrome
7313 WIN32DLL = $_win32dll
7314 WIN32WAVEOUT = $_win32waveout
7315 WIN32_EMULATION = $_win32_emulation
7316 WINVIDIX = $winvidix
7318 XANIM_CODECS = $_xanim
7320 XMMS_PLUGINS = $_xmms
7326 YUV4MPEG = $_yuv4mpeg
7331 FFMPEG_EVAL_API = $ffmpeg_eval_api
7332 FFMPEG_INTERNALS = $ffmpeg_internals
7333 FFMPEG_SOURCE_PATH = $_ffmpeg_source
7337 YASMFLAGS = $YASMFLAGS
7339 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
7343 CONFIG_H264DSP = yes
7348 CONFIG_BZLIB = $bzlib
7349 CONFIG_ENCODERS = yes
7351 CONFIG_MLIB = $_mlib
7352 CONFIG_VDPAU = $_vdpau
7353 CONFIG_XVMC = $_xvmc
7354 CONFIG_ZLIB = $_zlib
7356 HAVE_PTHREADS = $_pthreads
7358 HAVE_W32THREADS = $_w32threads
7359 HAVE_YASM = $have_yasm
7363 #############################################################################
7365 ff_config_enable
() {
7366 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7367 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7369 test -z "$_nprefix" && _nprefix
='CONFIG'
7370 for part
in $list; do
7371 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7372 echo "#define ${_nprefix}_$part 1"
7374 echo "#define ${_nprefix}_$part 0"
7379 echo "Creating config.h"
7381 /*----------------------------------------------------------------------------
7382 ** This file has been automatically generated by configure any changes in it
7383 ** will be lost when you run configure again.
7384 ** Instead of modifying definitions here, use the --enable/--disable options
7385 ** of the configure script! See ./configure --help for details.
7386 *---------------------------------------------------------------------------*/
7388 #ifndef MPLAYER_CONFIG_H
7389 #define MPLAYER_CONFIG_H
7391 /* Undefine this if you do not want to select mono audio (left or right)
7392 with a stereo MPEG layer 2/3 audio stream. The command line option
7393 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7394 right-only), with 0 being the default.
7396 #define CONFIG_FAKE_MONO 1
7398 /* set up audio OUTBURST. Do not change this! */
7399 #define OUTBURST 512
7401 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7403 #undef FAST_OSD_TABLE
7405 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
7406 #define MPEG12_POSTPROC 1
7407 #define ATTRIBUTE_ALIGNED_MAX 16
7411 #define CONFIGURATION "$configuration"
7413 #define MPLAYER_DATADIR "$_datadir"
7414 #define MPLAYER_CONFDIR "$_confdir"
7415 #define MPLAYER_LIBDIR "$_libdir"
7416 #define MPLAYER_LOCALEDIR "$_localedir"
7420 /* definitions needed by included libraries */
7421 #define HAVE_INTTYPES_H 1
7422 /* libmpeg2 + FFmpeg */
7425 #define HAVE_ERRNO_H 1
7426 /* libdvdcss + libdvdread */
7427 #define HAVE_LIMITS_H 1
7428 /* libdvdcss + libfaad2 */
7429 #define HAVE_UNISTD_H 1
7430 /* libfaad2 + libdvdread */
7431 #define STDC_HEADERS 1
7432 #define HAVE_MEMCPY 1
7434 #define HAVE_STDLIB_H 1
7435 #define HAVE_STRING_H 1
7436 #define HAVE_STRINGS_H 1
7437 #define HAVE_SYS_STAT_H 1
7438 #define HAVE_SYS_TYPES_H 1
7440 #define READ_CACHE_TRACE 0
7442 #define HAVE_DLFCN_H 1
7446 /* system headers */
7448 $def_alsa_asoundlib_h
7452 $def_mman_has_map_failed
7454 $def_sys_asoundlib_h
7455 $def_sys_soundcard_h
7462 /* system functions */
7485 /* system-specific features */
7500 $def_restrict_keyword
7505 /* configurable options */
7509 $def_dynamic_plugins
7512 $def_runtime_cpudetection
7520 #define __CPU__ $iproc
7524 $(ff_config_enable "$arch_all" "$arch" "ARCH")
7525 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
7526 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
7529 /* Blu-ray/DVD/VCD/CD */
7530 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
7531 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
7552 /* codec libraries */
7582 #define BINARY_CODECS_PATH "$_codecsdir"
7583 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7586 /* Audio output drivers */
7602 $def_ossaudio_devdsp
7603 $def_ossaudio_devmixer
7616 $def_ioctl_bt848_h_name
7617 $def_ioctl_meteor_h_name
7705 $def_vidix_drv_cyberblade
7707 $def_vidix_drv_mach64
7709 $def_vidix_drv_mga_crtc2
7710 $def_vidix_drv_nvidia
7712 $def_vidix_drv_radeon
7713 $def_vidix_drv_rage128
7715 $def_vidix_drv_sh_veu
7717 $def_vidix_drv_unichrome
7736 $def_ffmpeg_eval_api
7737 $def_ffmpeg_internals
7739 #define CONFIG_DECODERS 1
7740 #define CONFIG_ENCODERS 1
7741 #define CONFIG_DEMUXERS 1
7768 #define CONFIG_FASTDIV 0
7769 #define CONFIG_FFSERVER 0
7770 #define CONFIG_GPL 1
7771 #define CONFIG_GRAY 0
7772 #define CONFIG_HARDCODED_TABLES 0
7773 #define CONFIG_LIBVORBIS 0
7774 #define CONFIG_POWERPC_PERF 0
7775 #define CONFIG_SMALL 0
7776 #define CONFIG_SWSCALE_ALPHA 1
7778 #define HAVE_ATTRIBUTE_PACKED 1
7779 #define HAVE_GETHRTIME 0
7780 #define HAVE_INLINE_ASM 1
7781 #define HAVE_LDBRX 0
7782 #define HAVE_POLL_H 1
7783 #define HAVE_PPC4XX 0
7784 #define HAVE_VFP_ARGS 1
7785 #define HAVE_VIRTUALALLOC 0
7787 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
7788 #define CONFIG_AANDCT 1
7789 #define CONFIG_DCT 1
7790 #define CONFIG_DWT 1
7791 #define CONFIG_FFT 1
7792 #define CONFIG_GOLOMB 1
7793 #define CONFIG_H264DSP 1
7794 #define CONFIG_LPC 1
7795 #define CONFIG_MDCT 1
7796 #define CONFIG_RDFT 1
7798 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
7800 #define HAVE_EBP_AVAILABLE 1
7802 #define HAVE_EBP_AVAILABLE 0
7805 #endif /* MPLAYER_CONFIG_H */
7808 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
7809 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
7811 #############################################################################
7813 .
/version.sh
`$_cc -dumpversion`
7817 Config files successfully generated by ./configure $configuration !
7819 Install prefix: $_prefix
7820 Data directory: $_datadir
7821 Config direct.: $_confdir
7823 Byte order: $_byte_order
7824 Optimizing for: $_optimizing
7827 Messages (in addition to English): $language_msg
7828 Manual pages: $language_man
7829 Documentation: $language_doc
7831 Enabled optional drivers:
7832 Input: $inputmodules
7833 Codecs: $codecmodules
7834 Audio output: $aomodules
7835 Video output: $vomodules
7837 Disabled optional drivers:
7838 Input: $noinputmodules
7839 Codecs: $nocodecmodules
7840 Audio output: $noaomodules
7841 Video output: $novomodules
7843 'config.h' and 'config.mak' contain your configuration options.
7844 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7845 compile *** DO NOT REPORT BUGS if you tweak these files ***
7847 'make' will now compile MPlayer and 'make install' will install it.
7848 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7853 if test "$_mtrr" = yes ; then
7854 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)"
7860 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7861 operating system ($system_name). You may encounter a few files that cannot
7862 be played due to missing open source video/audio codec support.
7869 Check $TMPLOG if you wonder why an autodetection failed (make sure
7870 development headers/packages are installed).
7872 NOTE: The --enable-* parameters unconditionally force options on, completely
7873 skipping autodetection. This behavior is unlike what you may be used to from
7874 autoconf-based configure scripts that can decide to override you. This greater
7875 level of control comes at a price. You may have to provide the correct compiler
7876 and linker flags yourself.
7877 If you used one of these options (except --enable-menu and similar ones that
7878 turn on internal features) and experience a compilation or linking failure,
7879 make sure you have passed the necessary compiler/linker flags to configure.
7881 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
7885 if test "$warn_cflags" = yes; then
7888 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
7891 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7893 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7894 To do so, execute 'CFLAGS= ./configure <options>'
7900 rm -rf "$mplayer_tmpdir"