3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: Check the Subversion log.
8 # Cleanups all over the place (c) 2001 pl
11 # This configure script is *not* autoconf-based and has different semantics.
12 # It attempts to autodetect all settings and options where possible. It is
13 # possible to override autodetection with the --enable-option/--disable-option
14 # command line parameters. --enable-option forces the option on skipping
15 # autodetection. Yes, this means that compilation may fail and yes, this is not
16 # how autoconf-based configure scripts behave.
18 # configure generates a series of configuration files:
19 # - config.h contains #defines that are used in the C code.
20 # - config.mak is included from the Makefiles.
22 # If you want to add a new check for $feature, look at the existing checks
23 # and try to use helper functions where you can.
25 # Furthermore you need to add the variable _feature to the list of default
26 # settings and set it to one of yes/no/auto. Also add appropriate
27 # --enable-feature/--disable-feature command line options.
28 # The results of the check should be written to config.h and config.mak
29 # at the end of this script. The variable names used for this should be
30 # uniform, i.e. if the option is named 'feature':
32 # _feature : should have a value of yes/no/auto
33 # def_feature : '#define ... 1' or '#undef ...' for conditional compilation
34 # _ld_feature : '-L/path/dir -lfeature' GCC options
36 #############################################################################
38 # Prevent locale nonsense from breaking basic text processing utils
41 # Store the configure line that was used
44 # Prefer these macros to full length text !
45 # These macros only return an error code - NO display is done
50 cat "$source" >> "$TMPLOG"
52 echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o $TMPEXE $@" >> "$TMPLOG"
54 $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
62 compile_check
$TMPC $@
66 compile_check
$TMPCPP $@
-lstdc++
71 int main(void) { return 0; }
73 compile_check
$TMPC $@
79 int main(void) { $2; return 0; }
83 compile_check
$TMPC $@
89 int main(void) { return 0; }
92 compile_check
$TMPC $@
97 int main(void) { __asm__ volatile ($1); return 0; }
100 compile_check
$TMPC $@
103 # The following checks are special and should only be used with broken and
104 # non-selfsufficient headers that do not include all of their dependencies.
106 header_check_broken
() {
110 int main(void) { return 0; }
114 compile_check
$TMPC $@
117 statement_check_broken
() {
121 int main(void) { $3; return 0; }
124 compile_check
$TMPC $@
129 cat "$TMPS" >> "$TMPLOG"
131 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
133 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
141 "$TMPEXE" >> "$TMPLOG" 2>&1
144 # Display error message, flushes tempfile, exit
149 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
150 echo "Check \"$TMPLOG\" if you do not understand why it failed."
154 # OS test booleans functions
156 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
158 aix
() { issystem
"AIX"; }
159 amigaos
() { issystem
"AmigaOS"; }
160 beos
() { issystem
"BEOS"; }
161 bsdos
() { issystem
"BSD/OS"; }
162 cygwin
() { issystem
"CYGWIN"; }
163 darwin
() { issystem
"Darwin"; }
164 dragonfly
() { issystem
"DragonFly"; }
165 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
166 gnu
() { issystem
"GNU"; }
167 hpux
() { issystem
"HP-UX"; }
168 irix
() { issystem
"IRIX"; }
169 linux
() { issystem
"Linux"; }
170 mingw32
() { issystem
"MINGW32"; }
171 morphos
() { issystem
"MorphOS"; }
172 netbsd
() { issystem
"NetBSD"; }
173 openbsd
() { issystem
"OpenBSD"; }
174 os2
() { issystem
"OS/2"; }
175 qnx
() { issystem
"QNX"; }
176 sunos
() { issystem
"SunOS"; }
177 win32
() { cygwin || mingw32
; }
179 # arch test boolean functions
180 # x86/x86pc is used by QNX
183 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
190 x86_64|amd64
) return 0 ;;
201 ppc|ppc64|powerpc|powerpc64
) return 0;;
220 # Use this before starting a check
222 echo "============ Checking for $@ ============" >> "$TMPLOG"
223 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
226 # Use this to echo the results of a check
228 if test "$res_comment" ; then
229 res_comment
="($res_comment)"
231 echo "Result is: $@ $res_comment" >> "$TMPLOG"
232 echo "##########################################" >> "$TMPLOG"
234 echo "$@ $res_comment"
237 #############################################################################
239 # Check how echo works in this /bin/sh
241 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
242 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
246 ls po
/*.po
>/dev
/null
2>&1 && msg_lang_all
=$
(echo po
/*.po |
sed -e 's:po/\([^[:space:]]*\)\.po:\1:g')
247 man_lang_all
=$
(echo DOCS
/man
/??
/mplayer
.1 DOCS
/man
/??_??
/mplayer
.1 |
sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g")
248 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
252 Usage: $0 [OPTIONS]...
255 -h, --help display this help and exit
257 Installation directories:
258 --prefix=DIR prefix directory for installation [/usr/local]
259 --bindir=DIR directory for installing binaries [PREFIX/bin]
260 --datadir=DIR directory for installing machine independent
261 data files (skins, etc) [PREFIX/share/mplayer]
262 --mandir=DIR directory for installing man pages [PREFIX/share/man]
263 --confdir=DIR directory for installing configuration files
265 --localedir=DIR directory for locale tree [PREFIX/share/locale]
266 --libdir=DIR directory for object code libraries [PREFIX/lib]
267 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
270 --disable-mplayer disable MPlayer compilation [enable]
271 --disable-largefiles disable support for files > 2GB [enable]
272 --enable-termcap use termcap database for key codes [autodetect]
273 --enable-termios use termios database for key codes [autodetect]
274 --disable-iconv disable iconv for encoding conversion [autodetect]
275 --disable-langinfo do not use langinfo [autodetect]
276 --enable-lirc enable LIRC (remote control) support [autodetect]
277 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
278 --enable-joystick enable joystick support [disable]
279 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
280 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
281 --disable-vm disable X video mode extensions [autodetect]
282 --disable-xf86keysym disable support for multimedia keys [autodetect]
283 --enable-radio enable radio interface [disable]
284 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
285 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
286 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
287 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
288 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
289 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
290 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
291 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
292 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
293 --disable-networking disable networking [enable]
294 --enable-winsock2_h enable winsock2_h [autodetect]
295 --enable-smb enable Samba (SMB) input [autodetect]
296 --enable-live enable LIVE555 Streaming Media [autodetect]
297 --enable-nemesi enable Nemesi Streaming Media [autodetect]
298 --disable-vcd disable VCD support [autodetect]
299 --disable-bluray disable Blu-ray support [autodetect]
300 --disable-dvdnav disable libdvdnav [autodetect]
301 --disable-dvdread disable libdvdread [autodetect]
302 --disable-dvdread-internal disable internal libdvdread [autodetect]
303 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
304 --disable-cdparanoia disable cdparanoia [autodetect]
305 --disable-cddb disable cddb [autodetect]
306 --disable-bitmap-font disable bitmap font support [enable]
307 --disable-freetype disable FreeType 2 font rendering [autodetect]
308 --disable-fontconfig disable fontconfig font lookup [autodetect]
309 --disable-unrarexec disable using of UnRAR executable [enabled]
310 --enable-menu enable OSD menu (not DVD menu) [disabled]
311 --disable-sortsub disable subtitle sorting [enabled]
312 --enable-fribidi enable the FriBiDi libs [autodetect]
313 --disable-enca disable ENCA charset oracle library [autodetect]
314 --disable-maemo disable maemo specific features [autodetect]
315 --enable-macosx-finder enable Mac OS X Finder invocation parameter
317 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
318 --disable-inet6 disable IPv6 support [autodetect]
319 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
320 --disable-ftp disable FTP support [enabled]
321 --disable-vstream disable TiVo vstream client support [autodetect]
322 --disable-pthreads disable Posix threads support [autodetect]
323 --disable-w32threads disable Win32 threads support [autodetect]
324 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
325 --enable-rpath enable runtime linker path for extra libs [disabled]
328 --enable-gif enable GIF support [autodetect]
329 --enable-png enable PNG input/output support [autodetect]
330 --enable-mng enable MNG input support [autodetect]
331 --enable-jpeg enable JPEG input/output support [autodetect]
332 --enable-libcdio enable libcdio support [autodetect]
333 --enable-liblzo enable liblzo support [autodetect]
334 --disable-win32dll disable Win32 DLL support [autodetect]
335 --disable-qtx disable QuickTime codecs support [enabled]
336 --disable-xanim disable XAnim codecs support [enabled]
337 --disable-real disable RealPlayer codecs support [enabled]
338 --disable-xvid disable Xvid [autodetect]
339 --disable-libnut disable libnut [autodetect]
340 --disable-ffmpeg disable FFmpeg [autodetect]
341 --disable-tremor-internal disable internal Tremor [enabled]
342 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
343 --enable-tremor enable external Tremor [autodetect]
344 --disable-libvorbis disable libvorbis support [autodetect]
345 --disable-speex disable Speex support [autodetect]
346 --enable-theora enable OggTheora libraries [autodetect]
347 --enable-faad enable external FAAD2 (AAC) [autodetect]
348 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
349 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
350 --disable-ladspa disable LADSPA plugin support [autodetect]
351 --disable-libbs2b disable libbs2b audio filter support [autodetect]
352 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
353 --disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
354 --disable-mad disable libmad (MPEG audio) support [autodetect]
355 --enable-xmms enable XMMS input plugin support [disabled]
356 --enable-libdca enable libdca support [autodetect]
357 --disable-mp3lib disable builtin mp3lib [autodetect]
358 --disable-liba52 disable liba52 [autodetect]
359 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
360 --disable-musepack disable musepack support [autodetect]
363 --disable-vidix disable VIDIX [for x86 *nix]
364 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
365 Available: cyberblade, ivtv, mach64, mga, mga_crtc2,
366 nvidia, pm2, pm3, radeon, rage128, s3, sis, unichrome
367 --disable-vidix-pcidb disable VIDIX PCI device name database
368 --enable-dhahelper enable VIDIX dhahelper support
369 --enable-svgalib_helper enable VIDIX svgalib_helper support
370 --enable-gl enable OpenGL video output [autodetect]
371 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
372 --enable-dga2 enable DGA 2 support [autodetect]
373 --enable-dga1 enable DGA 1 support [autodetect]
374 --enable-vesa enable VESA video output [autodetect]
375 --enable-svga enable SVGAlib video output [autodetect]
376 --enable-sdl enable SDL video output [autodetect]
377 --enable-kva enable KVA video output [autodetect]
378 --enable-aa enable AAlib video output [autodetect]
379 --enable-caca enable CACA video output [autodetect]
380 --enable-ggi enable GGI video output [autodetect]
381 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
382 --enable-direct3d enable Direct3D video output [autodetect]
383 --enable-directx enable DirectX video output [autodetect]
384 --enable-dxr2 enable DXR2 video output [autodetect]
385 --enable-dxr3 enable DXR3/H+ video output [autodetect]
386 --enable-ivtv enable IVTV TV-Out video output [autodetect]
387 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
388 --enable-dvb enable DVB video output [autodetect]
389 --enable-mga enable mga_vid video output [autodetect]
390 --enable-xmga enable mga_vid X11 video output [autodetect]
391 --enable-xv enable Xv video output [autodetect]
392 --enable-xvmc enable XvMC acceleration [disable]
393 --enable-vdpau enable VDPAU acceleration [autodetect]
394 --enable-vm enable XF86VidMode support [autodetect]
395 --enable-xinerama enable Xinerama support [autodetect]
396 --enable-x11 enable X11 video output [autodetect]
397 --enable-xshape enable XShape support [autodetect]
398 --disable-xss disable screensaver support via xss [autodetect]
399 --enable-fbdev enable FBDev video output [autodetect]
400 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
401 --enable-tdfxfb enable tdfxfb video output [disable]
402 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
403 --enable-wii enable Nintendo Wii/GameCube video output [disable]
404 --enable-directfb enable DirectFB video output [autodetect]
405 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
406 --enable-bl enable Blinkenlights video output [disable]
407 --enable-tdfxvid enable tdfx_vid video output [disable]
408 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
409 --disable-tga disable Targa video output [enable]
410 --disable-pnm disable PNM video output [enable]
411 --disable-md5sum disable md5sum video output [enable]
412 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
413 --disable-corevideo disable CoreVideo video output [autodetect]
414 --disable-quartz disable Quartz video output [autodetect]
415 --disable-glamo disable Glamo accelerated video output [enable]
418 --disable-alsa disable ALSA audio output [autodetect]
419 --disable-ossaudio disable OSS audio output [autodetect]
420 --disable-arts disable aRts audio output [autodetect]
421 --disable-esd disable esd audio output [autodetect]
422 --disable-pulse disable Pulseaudio audio output [autodetect]
423 --disable-jack disable JACK audio output [autodetect]
424 --enable-openal enable OpenAL audio output [disable]
425 --disable-nas disable NAS audio output [autodetect]
426 --disable-sgiaudio disable SGI audio output [autodetect]
427 --disable-sunaudio disable Sun audio output [autodetect]
428 --disable-kai disable KAI audio output [autodetect]
429 --disable-dart disable DART audio output [autodetect]
430 --disable-win32waveout disable Windows waveout audio output [autodetect]
431 --disable-coreaudio disable CoreAudio audio output [autodetect]
432 --disable-select disable using select() on the audio device [enable]
435 --enable-translation enable support for translated output [disable]
436 --charset=charset convert the console messages to this character set
437 --language-doc=lang language to use for the documentation [en]
438 --language-man=lang language to use for the man pages [en]
439 --language-msg=lang extra languages for program messages [all]
440 --language=lang default language to use [en]
441 Specific options override --language. You can pass a list of languages separated
442 by whitespace or commas instead of a single language. Nonexisting translations
443 will be dropped from each list. All translations available in the list will be
444 installed. The value "all" will activate all translations. The LINGUAS
445 environment variable is honored. In all cases the fallback is English.
446 The program always supports English-language output; additional message
447 languages are only installed if --enable-translation is also specified.
448 Available values for --language-doc are: all $doc_lang_all
449 Available values for --language-man are: all $man_lang_all
450 Available values for --language-msg are: all $msg_lang_all
452 Miscellaneous options:
453 --enable-runtime-cpudetection enable runtime CPU detection [disable]
454 --enable-cross-compile enable cross-compilation [autodetect]
455 --cc=COMPILER C compiler to build MPlayer [gcc]
456 --host-cc=COMPILER C compiler for tools needed while building [gcc]
457 --as=ASSEMBLER assembler to build MPlayer [as]
458 --nm=NM nm tool to build MPlayer [nm]
459 --yasm=YASM Yasm assembler to build MPlayer [yasm]
460 --ar=AR librarian to build MPlayer [ar]
461 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
462 --windres=WINDRES windres to build MPlayer [windres]
463 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
464 --enable-static build a statically linked binary
465 --with-install=PATH path to a custom install program
468 --enable-mmx enable MMX [autodetect]
469 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
470 --enable-3dnow enable 3DNow! [autodetect]
471 --enable-3dnowext enable extended 3DNow! [autodetect]
472 --enable-sse enable SSE [autodetect]
473 --enable-sse2 enable SSE2 [autodetect]
474 --enable-ssse3 enable SSSE3 [autodetect]
475 --enable-shm enable shm [autodetect]
476 --enable-altivec enable AltiVec (PowerPC) [autodetect]
477 --enable-armv5te enable DSP extensions (ARM) [autodetect]
478 --enable-armv6 enable ARMv6 (ARM) [autodetect]
479 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
480 --enable-armvfp enable ARM VFP (ARM) [autodetect]
481 --enable-neon enable NEON (ARM) [autodetect]
482 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
483 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
484 --enable-big-endian force byte order to big-endian [autodetect]
485 --enable-debug[=1-3] compile-in debugging information [disable]
486 --enable-profile compile-in profiling information [disable]
487 --disable-sighandler disable sighandler for crashes [enable]
488 --enable-crash-debug enable automatic gdb attach on crash [disable]
489 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
490 --ffmpeg-source-dir=PATH enable features requiring internal FFmpeg headers
492 Use these options if autodetection fails:
493 --extra-cflags=FLAGS extra CFLAGS
494 --extra-ldflags=FLAGS extra LDFLAGS
495 --extra-libs=FLAGS extra linker flags
496 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
497 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
499 --with-freetype-config=PATH path to freetype-config
500 --with-glib-config=PATH path to glib*-config
501 --with-gtk-config=PATH path to gtk*-config
502 --with-sdl-config=PATH path to sdl*-config
503 --with-dvdnav-config=PATH path to dvdnav-config
504 --with-dvdread-config=PATH path to dvdread-config
506 This configure script is NOT autoconf-based, even though its output is similar.
507 It will try to autodetect all configuration options. If you --enable an option
508 it will be forcefully turned on, skipping autodetection. This can break
509 compilation, so you need to know what you are doing.
514 # GOTCHA: the variables below defines the default behavior for autodetection
515 # and have - unless stated otherwise - at least 2 states : yes no
516 # If autodetection is available then the third state is: auto
540 test "$CC" && _cc
="$CC"
544 _runtime_cpudetection
=no
556 _xvmc
=no
#auto when complete
619 _dvdnavconfig
=dvdnav-config
620 _dvdreadconfig
=dvdread-config
622 _dvdread_internal
=auto
623 _libdvdcss_internal
=auto
706 _freetypeconfig
='freetype-config'
721 def_dos_paths
="#define HAVE_DOS_PATHS 0"
722 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
723 def_priority
="#undef CONFIG_PRIORITY"
724 def_pthread_cache
="#undef PTHREAD_CACHE"
732 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
735 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
738 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
741 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
744 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
747 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
750 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
753 _localedir
=$
(echo $ac_option | cut
-d '=' -f 2)
757 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
760 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
764 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
766 --with-freetype-config=*)
767 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
770 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
772 --with-glib-config=*)
773 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
775 --with-dvdnav-config=*)
776 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
778 --with-dvdread-config=*)
779 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
783 extra_cflags
="$extra_cflags $(echo $ac_option | cut -d '=' -f 2-)"
786 extra_ldflags
="$extra_ldflags $(echo $ac_option | cut -d '=' -f 2-)"
789 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
791 --extra-libs-mplayer=*)
792 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
796 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
799 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
802 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
805 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
808 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
811 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
814 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
817 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
820 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
823 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
826 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
829 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
832 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
835 language
=$
(echo $ac_option | cut
-d '=' -f 2)
854 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
859 --enable-translation) _translation
=yes ;;
860 --disable-translation) _translation
=no
;;
861 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
862 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
863 --enable-cross-compile) _cross_compile
=yes ;;
864 --disable-cross-compile) _cross_compile
=no
;;
865 --enable-mplayer) _mplayer
=yes ;;
866 --disable-mplayer) _mplayer
=no
;;
867 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
868 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
869 --enable-x11) _x11
=yes ;;
870 --disable-x11) _x11
=no
;;
871 --enable-xshape) _xshape
=yes ;;
872 --disable-xshape) _xshape
=no
;;
873 --enable-xss) _xss
=yes ;;
874 --disable-xss) _xss
=no
;;
875 --enable-xv) _xv
=yes ;;
876 --disable-xv) _xv
=no
;;
877 --enable-xvmc) _xvmc
=yes ;;
878 --disable-xvmc) _xvmc
=no
;;
879 --enable-vdpau) _vdpau
=yes ;;
880 --disable-vdpau) _vdpau
=no
;;
881 --enable-sdl) _sdl
=yes ;;
882 --disable-sdl) _sdl
=no
;;
883 --enable-kva) _kva
=yes ;;
884 --disable-kva) _kva
=no
;;
885 --enable-direct3d) _direct3d
=yes ;;
886 --disable-direct3d) _direct3d
=no
;;
887 --enable-directx) _directx
=yes ;;
888 --disable-directx) _directx
=no
;;
889 --enable-win32waveout) _win32waveout
=yes ;;
890 --disable-win32waveout) _win32waveout
=no
;;
891 --enable-nas) _nas
=yes ;;
892 --disable-nas) _nas
=no
;;
893 --enable-png) _png
=yes ;;
894 --disable-png) _png
=no
;;
895 --enable-mng) _mng
=yes ;;
896 --disable-mng) _mng
=no
;;
897 --enable-jpeg) _jpeg
=yes ;;
898 --disable-jpeg) _jpeg
=no
;;
899 --enable-pnm) _pnm
=yes ;;
900 --disable-pnm) _pnm
=no
;;
901 --enable-md5sum) _md5sum
=yes ;;
902 --disable-md5sum) _md5sum
=no
;;
903 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
904 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
905 --enable-gif) _gif
=yes ;;
906 --disable-gif) _gif
=no
;;
907 --enable-gl) _gl
=yes ;;
908 --disable-gl) _gl
=no
;;
909 --enable-matrixview) matrixview
=yes ;;
910 --disable-matrixview) matrixview
=no
;;
911 --enable-ggi) _ggi
=yes ;;
912 --disable-ggi) _ggi
=no
;;
913 --enable-ggiwmh) _ggiwmh
=yes ;;
914 --disable-ggiwmh) _ggiwmh
=no
;;
915 --enable-aa) _aa
=yes ;;
916 --disable-aa) _aa
=no
;;
917 --enable-caca) _caca
=yes ;;
918 --disable-caca) _caca
=no
;;
919 --enable-svga) _svga
=yes ;;
920 --disable-svga) _svga
=no
;;
921 --enable-vesa) _vesa
=yes ;;
922 --disable-vesa) _vesa
=no
;;
923 --enable-fbdev) _fbdev
=yes ;;
924 --disable-fbdev) _fbdev
=no
;;
925 --enable-dvb) _dvb
=yes ;;
926 --disable-dvb) _dvb
=no
;;
927 --enable-dxr2) _dxr2
=yes ;;
928 --disable-dxr2) _dxr2
=no
;;
929 --enable-dxr3) _dxr3
=yes ;;
930 --disable-dxr3) _dxr3
=no
;;
931 --enable-ivtv) _ivtv
=yes ;;
932 --disable-ivtv) _ivtv
=no
;;
933 --enable-v4l2) _v4l2
=yes ;;
934 --disable-v4l2) _v4l2
=no
;;
935 --enable-iconv) _iconv
=yes ;;
936 --disable-iconv) _iconv
=no
;;
937 --enable-langinfo) _langinfo
=yes ;;
938 --disable-langinfo) _langinfo
=no
;;
939 --enable-rtc) _rtc
=yes ;;
940 --disable-rtc) _rtc
=no
;;
941 --enable-libdv) _libdv
=yes ;;
942 --disable-libdv) _libdv
=no
;;
943 --enable-ossaudio) _ossaudio
=yes ;;
944 --disable-ossaudio) _ossaudio
=no
;;
945 --enable-arts) _arts
=yes ;;
946 --disable-arts) _arts
=no
;;
947 --enable-esd) _esd
=yes ;;
948 --disable-esd) _esd
=no
;;
949 --enable-pulse) _pulse
=yes ;;
950 --disable-pulse) _pulse
=no
;;
951 --enable-jack) _jack
=yes ;;
952 --disable-jack) _jack
=no
;;
953 --enable-openal) _openal
=yes ;;
954 --disable-openal) _openal
=no
;;
955 --enable-kai) _kai
=yes ;;
956 --disable-kai) _kai
=no
;;
957 --enable-dart) _dart
=yes ;;
958 --disable-dart) _dart
=no
;;
959 --enable-mad) _mad
=yes ;;
960 --disable-mad) _mad
=no
;;
961 --enable-libcdio) _libcdio
=yes ;;
962 --disable-libcdio) _libcdio
=no
;;
963 --enable-liblzo) _liblzo
=yes ;;
964 --disable-liblzo) _liblzo
=no
;;
965 --enable-libvorbis) _libvorbis
=yes ;;
966 --disable-libvorbis) _libvorbis
=no
;;
967 --enable-speex) _speex
=yes ;;
968 --disable-speex) _speex
=no
;;
969 --enable-tremor) _tremor
=yes ;;
970 --disable-tremor) _tremor
=no
;;
971 --enable-tremor-internal) _tremor_internal
=yes ;;
972 --disable-tremor-internal) _tremor_internal
=no
;;
973 --enable-tremor-low) _tremor_low
=yes ;;
974 --disable-tremor-low) _tremor_low
=no
;;
975 --enable-theora) _theora
=yes ;;
976 --disable-theora) _theora
=no
;;
977 --enable-mpg123) _mpg123
=yes ;;
978 --disable-mpg123) _mpg123
=no
;;
979 --enable-mp3lib) _mp3lib
=yes ;;
980 --disable-mp3lib) _mp3lib
=no
;;
981 --enable-liba52) _liba52
=yes ;;
982 --disable-liba52) _liba52
=no
;;
983 --enable-libdca) _libdca
=yes ;;
984 --disable-libdca) _libdca
=no
;;
985 --enable-libmpeg2) _libmpeg2
=yes ;;
986 --disable-libmpeg2) _libmpeg2
=no
;;
987 --enable-musepack) _musepack
=yes ;;
988 --disable-musepack) _musepack
=no
;;
989 --enable-faad) _faad
=yes ;;
990 --disable-faad) _faad
=no
;;
991 --enable-faad-internal) _faad_internal
=yes ;;
992 --disable-faad-internal) _faad_internal
=no
;;
993 --enable-faad-fixed) _faad_fixed
=yes ;;
994 --disable-faad-fixed) _faad_fixed
=no
;;
995 --enable-ladspa) _ladspa
=yes ;;
996 --disable-ladspa) _ladspa
=no
;;
997 --enable-libbs2b) _libbs2b
=yes ;;
998 --disable-libbs2b) _libbs2b
=no
;;
999 --enable-xmms) _xmms
=yes ;;
1000 --disable-xmms) _xmms
=no
;;
1001 --enable-vcd) _vcd
=yes ;;
1002 --disable-vcd) _vcd
=no
;;
1003 --enable-bluray) _bluray
=yes ;;
1004 --disable-bluray) _bluray
=no
;;
1005 --enable-dvdread) _dvdread
=yes ;;
1006 --disable-dvdread) _dvdread
=no
;;
1007 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1008 --disable-dvdread-internal) _dvdread_internal
=no
;;
1009 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1010 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1011 --enable-dvdnav) _dvdnav
=yes ;;
1012 --disable-dvdnav) _dvdnav
=no
;;
1013 --enable-xanim) _xanim
=yes ;;
1014 --disable-xanim) _xanim
=no
;;
1015 --enable-real) _real
=yes ;;
1016 --disable-real) _real
=no
;;
1017 --enable-live) _live
=yes ;;
1018 --disable-live) _live
=no
;;
1019 --enable-nemesi) _nemesi
=yes ;;
1020 --disable-nemesi) _nemesi
=no
;;
1021 --enable-xinerama) _xinerama
=yes ;;
1022 --disable-xinerama) _xinerama
=no
;;
1023 --enable-mga) _mga
=yes ;;
1024 --disable-mga) _mga
=no
;;
1025 --enable-xmga) _xmga
=yes ;;
1026 --disable-xmga) _xmga
=no
;;
1027 --enable-vm) _vm
=yes ;;
1028 --disable-vm) _vm
=no
;;
1029 --enable-xf86keysym) _xf86keysym
=yes ;;
1030 --disable-xf86keysym) _xf86keysym
=no
;;
1031 --enable-sunaudio) _sunaudio
=yes ;;
1032 --disable-sunaudio) _sunaudio
=no
;;
1033 --enable-sgiaudio) _sgiaudio
=yes ;;
1034 --disable-sgiaudio) _sgiaudio
=no
;;
1035 --enable-alsa) _alsa
=yes ;;
1036 --disable-alsa) _alsa
=no
;;
1037 --enable-tv) _tv
=yes ;;
1038 --disable-tv) _tv
=no
;;
1039 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1040 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1041 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1042 --disable-tv-v4l1) _tv_v4l1
=no
;;
1043 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1044 --disable-tv-v4l2) _tv_v4l2
=no
;;
1045 --enable-tv-dshow) _tv_dshow
=yes ;;
1046 --disable-tv-dshow) _tv_dshow
=no
;;
1047 --enable-radio) _radio
=yes ;;
1048 --enable-radio-capture) _radio_capture
=yes ;;
1049 --disable-radio-capture) _radio_capture
=no
;;
1050 --disable-radio) _radio
=no
;;
1051 --enable-radio-v4l) _radio_v4l
=yes ;;
1052 --disable-radio-v4l) _radio_v4l
=no
;;
1053 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1054 --disable-radio-v4l2) _radio_v4l2
=no
;;
1055 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1056 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1057 --enable-pvr) _pvr
=yes ;;
1058 --disable-pvr) _pvr
=no
;;
1059 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1060 --disable-fastmemcpy) _fastmemcpy
=no
;;
1061 --enable-networking) networking
=yes ;;
1062 --disable-networking) networking
=no
;;
1063 --enable-winsock2_h) _winsock2_h
=yes ;;
1064 --disable-winsock2_h) _winsock2_h
=no
;;
1065 --enable-smb) _smb
=yes ;;
1066 --disable-smb) _smb
=no
;;
1067 --enable-vidix) _vidix
=yes ;;
1068 --disable-vidix) _vidix
=no
;;
1069 --with-vidix-drivers=*)
1070 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1072 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1073 --enable-dhahelper) _dhahelper
=yes ;;
1074 --disable-dhahelper) _dhahelper
=no
;;
1075 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1076 --disable-svgalib_helper) _svgalib_helper
=no
;;
1077 --enable-joystick) _joystick
=yes ;;
1078 --disable-joystick) _joystick
=no
;;
1079 --enable-xvid) _xvid
=yes ;;
1080 --disable-xvid) _xvid
=no
;;
1081 --enable-libnut) _libnut
=yes ;;
1082 --disable-libnut) _libnut
=no
;;
1083 --enable-ffmpeg) ffmpeg
=yes ;;
1084 --disable-ffmpeg) ffmpeg
=no
;;
1085 --ffmpeg-source-dir=*)
1086 _ffmpeg_source
=$
(echo $ac_option | cut
-d '=' -f 2 ) ;;
1088 --enable-lirc) _lirc
=yes ;;
1089 --disable-lirc) _lirc
=no
;;
1090 --enable-lircc) _lircc
=yes ;;
1091 --disable-lircc) _lircc
=no
;;
1092 --enable-apple-remote) _apple_remote
=yes ;;
1093 --disable-apple-remote) _apple_remote
=no
;;
1094 --enable-apple-ir) _apple_ir
=yes ;;
1095 --disable-apple-ir) _apple_ir
=no
;;
1096 --enable-gui) _gui
=yes ;;
1097 --disable-gui) _gui
=no
;;
1098 --enable-gtk1) _gtk1
=yes ;;
1099 --disable-gtk1) _gtk1
=no
;;
1100 --enable-termcap) _termcap
=yes ;;
1101 --disable-termcap) _termcap
=no
;;
1102 --enable-termios) _termios
=yes ;;
1103 --disable-termios) _termios
=no
;;
1104 --enable-3dfx) _3dfx
=yes ;;
1105 --disable-3dfx) _3dfx
=no
;;
1106 --enable-s3fb) _s3fb
=yes ;;
1107 --disable-s3fb) _s3fb
=no
;;
1108 --enable-wii) _wii
=yes ;;
1109 --disable-wii) _wii
=no
;;
1110 --enable-tdfxfb) _tdfxfb
=yes ;;
1111 --disable-tdfxfb) _tdfxfb
=no
;;
1112 --disable-tdfxvid) _tdfxvid
=no
;;
1113 --enable-tdfxvid) _tdfxvid
=yes ;;
1114 --disable-xvr100) _xvr100
=no
;;
1115 --enable-xvr100) _xvr100
=yes ;;
1116 --disable-tga) _tga
=no
;;
1117 --enable-tga) _tga
=yes ;;
1118 --enable-directfb) _directfb
=yes ;;
1119 --disable-directfb) _directfb
=no
;;
1120 --enable-zr) _zr
=yes ;;
1121 --disable-zr) _zr
=no
;;
1122 --enable-bl) _bl
=yes ;;
1123 --disable-bl) _bl
=no
;;
1124 --enable-glamo) _glamo
=yes ;;
1125 --disable-glamo) _glamo
=no
;;
1126 --enable-mtrr) _mtrr
=yes ;;
1127 --disable-mtrr) _mtrr
=no
;;
1128 --enable-largefiles) _largefiles
=yes ;;
1129 --disable-largefiles) _largefiles
=no
;;
1130 --enable-shm) _shm
=yes ;;
1131 --disable-shm) _shm
=no
;;
1132 --enable-select) _select
=yes ;;
1133 --disable-select) _select
=no
;;
1134 --enable-cdparanoia) _cdparanoia
=yes ;;
1135 --disable-cdparanoia) _cdparanoia
=no
;;
1136 --enable-cddb) _cddb
=yes ;;
1137 --disable-cddb) _cddb
=no
;;
1138 --enable-big-endian) _big_endian
=yes ;;
1139 --disable-big-endian) _big_endian
=no
;;
1140 --enable-bitmap-font) _bitmap_font
=yes ;;
1141 --disable-bitmap-font) _bitmap_font
=no
;;
1142 --enable-freetype) _freetype
=yes ;;
1143 --disable-freetype) _freetype
=no
;;
1144 --enable-fontconfig) _fontconfig
=yes ;;
1145 --disable-fontconfig) _fontconfig
=no
;;
1146 --enable-unrarexec) _unrar_exec
=yes ;;
1147 --disable-unrarexec) _unrar_exec
=no
;;
1148 --enable-ftp) _ftp
=yes ;;
1149 --disable-ftp) _ftp
=no
;;
1150 --enable-vstream) _vstream
=yes ;;
1151 --disable-vstream) _vstream
=no
;;
1152 --enable-pthreads) _pthreads
=yes ;;
1153 --disable-pthreads) _pthreads
=no
;;
1154 --enable-w32threads) _w32threads
=yes ;;
1155 --disable-w32threads) _w32threads
=no
;;
1156 --enable-ass) _ass
=yes ;;
1157 --disable-ass) _ass
=no
;;
1158 --enable-rpath) _rpath
=yes ;;
1159 --disable-rpath) _rpath
=no
;;
1161 --enable-fribidi) _fribidi
=yes ;;
1162 --disable-fribidi) _fribidi
=no
;;
1164 --enable-enca) _enca
=yes ;;
1165 --disable-enca) _enca
=no
;;
1167 --enable-inet6) _inet6
=yes ;;
1168 --disable-inet6) _inet6
=no
;;
1170 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1171 --disable-gethostbyname2) _gethostbyname2
=no
;;
1173 --enable-dga1) _dga1
=yes ;;
1174 --disable-dga1) _dga1
=no
;;
1175 --enable-dga2) _dga2
=yes ;;
1176 --disable-dga2) _dga2
=no
;;
1178 --enable-menu) _menu
=yes ;;
1179 --disable-menu) _menu
=no
;;
1181 --enable-qtx) _qtx
=yes ;;
1182 --disable-qtx) _qtx
=no
;;
1184 --enable-coreaudio) _coreaudio
=yes ;;
1185 --disable-coreaudio) _coreaudio
=no
;;
1186 --enable-corevideo) _corevideo
=yes ;;
1187 --disable-corevideo) _corevideo
=no
;;
1188 --enable-quartz) _quartz
=yes ;;
1189 --disable-quartz) _quartz
=no
;;
1190 --enable-macosx-finder) _macosx_finder
=yes ;;
1191 --disable-macosx-finder) _macosx_finder
=no
;;
1192 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1193 --disable-macosx-bundle) _macosx_bundle
=no
;;
1195 --enable-maemo) _maemo
=yes ;;
1196 --disable-maemo) _maemo
=no
;;
1198 --enable-sortsub) _sortsub
=yes ;;
1199 --disable-sortsub) _sortsub
=no
;;
1201 --enable-crash-debug) _crash_debug
=yes ;;
1202 --disable-crash-debug) _crash_debug
=no
;;
1203 --enable-sighandler) _sighandler
=yes ;;
1204 --disable-sighandler) _sighandler
=no
;;
1205 --enable-win32dll) _win32dll
=yes ;;
1206 --disable-win32dll) _win32dll
=no
;;
1208 --enable-sse) _sse
=yes ;;
1209 --disable-sse) _sse
=no
;;
1210 --enable-sse2) _sse2
=yes ;;
1211 --disable-sse2) _sse2
=no
;;
1212 --enable-ssse3) _ssse3
=yes ;;
1213 --disable-ssse3) _ssse3
=no
;;
1214 --enable-mmxext) _mmxext
=yes ;;
1215 --disable-mmxext) _mmxext
=no
;;
1216 --enable-3dnow) _3dnow
=yes ;;
1217 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1218 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1219 --disable-3dnowext) _3dnowext
=no
;;
1220 --enable-cmov) _cmov
=yes ;;
1221 --disable-cmov) _cmov
=no
;;
1222 --enable-fast-cmov) _fast_cmov
=yes ;;
1223 --disable-fast-cmov) _fast_cmov
=no
;;
1224 --enable-fast-clz) _fast_clz
=yes ;;
1225 --disable-fast-clz) _fast_clz
=no
;;
1226 --enable-altivec) _altivec
=yes ;;
1227 --disable-altivec) _altivec
=no
;;
1228 --enable-armv5te) _armv5te
=yes ;;
1229 --disable-armv5te) _armv5te
=no
;;
1230 --enable-armv6) _armv6
=yes ;;
1231 --disable-armv6) _armv6
=no
;;
1232 --enable-armv6t2) _armv6t2
=yes ;;
1233 --disable-armv6t2) _armv6t2
=no
;;
1234 --enable-armvfp) _armvfp
=yes ;;
1235 --disable-armvfp) _armvfp
=no
;;
1236 --enable-neon) neon
=yes ;;
1237 --disable-neon) neon
=no
;;
1238 --enable-iwmmxt) _iwmmxt
=yes ;;
1239 --disable-iwmmxt) _iwmmxt
=no
;;
1240 --enable-mmx) _mmx
=yes ;;
1241 --disable-mmx) # 3Dnow! and MMX2 require MMX
1242 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1245 echo "Unknown parameter: $ac_option"
1252 if test "$_gui" = yes ; then
1253 die
"Internal GUI was removed from MPlayer. Please use one of many available\n frontends\
1254 (http://www.mplayerhq.hu/design7/projects.html#mplayer_frontends)."
1257 # Atmos: moved this here, to be correct, if --prefix is specified
1258 test -z "$_bindir" && _bindir
="$_prefix/bin"
1259 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1260 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1261 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1262 test -z "$_libdir" && _libdir
="$_prefix/lib"
1263 test -z "$_localedir" && _localedir
="$_prefix/share/locale"
1265 # Determine our OS name and CPU architecture
1266 if test -z "$_target" ; then
1268 system_name
=$
(uname
-s 2>&1)
1269 case "$system_name" in
1270 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1284 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1294 system_name
="$system_name-UNKNOWN"
1299 # host's CPU/instruction set
1300 host_arch
=$
(uname
-p 2>&1)
1301 case "$host_arch" in
1302 i386|sparc|ppc|alpha|arm|mips|vax
)
1304 powerpc
) # Darwin returns 'powerpc'
1307 *) # uname -p on Linux returns 'unknown' for the processor type,
1308 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1310 # Maybe uname -m (machine hardware name) returns something we
1313 # x86/x86pc is used by QNX
1314 case "$(uname -m 2>&1)" in
1315 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
;;
1316 ia64
) host_arch
=ia64
;;
1317 macppc|ppc
) host_arch
=ppc
;;
1318 ppc64
) host_arch
=ppc64
;;
1319 alpha
) host_arch
=alpha
;;
1320 sparc
) host_arch
=sparc
;;
1321 sparc64
) host_arch
=sparc64
;;
1322 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1323 arm
*|zaurus|cats
) host_arch
=arm
;;
1324 sh3|sh4|sh4a
) host_arch
=sh
;;
1325 s390
) host_arch
=s390
;;
1326 s390x
) host_arch
=s390x
;;
1327 *mips
*) host_arch
=mips
;;
1328 vax
) host_arch
=vax
;;
1329 xtensa
*) host_arch
=xtensa
;;
1330 *) host_arch
=UNKNOWN
;;
1334 else # if test -z "$_target"
1335 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1336 case "$(echo $system_name | tr A-Z a-z)" in
1337 linux
) system_name
=Linux
;;
1338 freebsd
) system_name
=FreeBSD
;;
1339 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1340 netbsd
) system_name
=NetBSD
;;
1341 bsd
/os
) system_name
=BSD
/OS
;;
1342 openbsd
) system_name
=OpenBSD
;;
1343 dragonfly
) system_name
=DragonFly
;;
1344 sunos
) system_name
=SunOS
;;
1345 qnx
) system_name
=QNX
;;
1346 morphos
) system_name
=MorphOS
;;
1347 amigaos
) system_name
=AmigaOS
;;
1348 mingw32
*) system_name
=MINGW32
;;
1350 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1351 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1352 if test $
(echo $host_arch) != "x86_64" ; then
1353 host_arch
=$
(echo $host_arch |
tr '_' '-')
1357 extra_cflags
="-I. $extra_cflags"
1358 _timer
=timer-linux.c
1361 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1362 extra_cflags
="$extra_cflags -I/usr/local/include"
1365 if netbsd || dragonfly
; then
1366 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1367 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1371 extra_cflags
="-mdynamic-no-pic $extra_cflags"
1372 if test "$(basename $_cc)" != "clang" ; then
1373 extra_cflags
="-falign-loops=16 -shared-libgcc $extra_cflags"
1375 _timer
=timer-darwin.c
1379 extra_ldflags
="$extra_ldflags -lC"
1390 extra_cflags
="$extra_cflags -fno-common"
1391 # -lwinmm is always needed for osdep/timer-win2.c
1392 extra_ldflags
="$extra_ldflags -lwinmm"
1396 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1397 def_priority
="#define CONFIG_PRIORITY 1"
1409 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1410 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1414 extra_ldflags
="$extra_ldflags -lph"
1422 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1423 def_priority
="#define CONFIG_PRIORITY 1"
1426 for tmpdir
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1427 test "$tmpdir" && break
1430 mplayer_tmpdir
="$tmpdir/mplayer-configure-$RANDOM-$$"
1431 mkdir
$mplayer_tmpdir || die
"Unable to create tmpdir."
1434 TMPC
="$mplayer_tmpdir/tmp.c"
1435 TMPCPP
="$mplayer_tmpdir/tmp.cpp"
1436 TMPEXE
="$mplayer_tmpdir/tmp$_exesuf"
1437 TMPH
="$mplayer_tmpdir/tmp.h"
1438 TMPS
="$mplayer_tmpdir/tmp.S"
1441 echo configuration
: $configuration > "$TMPLOG"
1445 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1446 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1450 # Checking CC version...
1451 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1452 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1453 echocheck
"$_cc version"
1455 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1456 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1457 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1458 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1459 # TODO verify older icc/ecc compatibility
1462 cc_version
="v. ?.??, bad"
1466 cc_version
="$cc_version, ok"
1469 cc_version
="$cc_version, bad"
1473 echores
"$cc_version"
1475 for _cc
in "$_cc" gcc cc
; do
1476 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1477 if test "$cc_name_tmp" = "gcc"; then
1478 cc_name
=$cc_name_tmp
1479 echocheck
"$_cc version"
1481 cc_version
=$
($_cc -dumpversion 2>&1)
1487 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1488 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1489 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1492 echores
"$cc_version"
1495 cc_name_tmp
=$
($_cc -v 2>&1 |
head -n 1 | cut
-d ' ' -f 1)
1496 if test "$cc_name_tmp" = "clang"; then
1497 echocheck
"$_cc version"
1499 cc_version
=$
($_cc -dumpversion 2>&1)
1500 res_comment
="experimental support only"
1501 echores
"clang $cc_version"
1504 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1505 if test "$cc_name_tmp" = "Sun C"; then
1506 echocheck
"$_cc version"
1508 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1509 res_comment
="experimental support only"
1510 echores
"Sun C $cc_version"
1515 test "$cc_fail" = yes && die
"unsupported compiler version"
1517 if test -z "$_target" && x86
; then
1520 int test[(int)sizeof(char *)-7];
1524 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1527 echo "Detected operating system: $system_name"
1528 echo "Detected host architecture: $host_arch"
1531 test "$_host_cc" || _host_cc
=$_cc
1534 echocheck
"cross compilation"
1535 if test $_cross_compile = auto
; then
1537 cflag_check
"" && "$TMPEXE" && _cross_compile
=no
1539 echores
$_cross_compile
1541 if test $_cross_compile = yes; then
1549 # now that we know what compiler should be used for compilation, try to find
1550 # out which assembler is used by the $_cc compiler
1551 if test "$_as" = auto
; then
1552 _as
=$
($_cc -print-prog-name=as
)
1553 test -z "$_as" && _as
=as
1556 if test "$_nm" = auto
; then
1557 _nm
=$
($_cc -print-prog-name=nm
)
1558 test -z "$_nm" && _nm
=nm
1561 # XXX: this should be ok..
1564 if test "$_runtime_cpudetection" = no
; then
1566 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1567 # FIXME: Remove the cygwin check once AMD CPUs are supported
1568 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1569 # Linux with /proc mounted, extract CPU information from it
1570 _cpuinfo
="cat /proc/cpuinfo"
1571 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1572 # FreeBSD with Linux emulation /proc mounted,
1573 # extract CPU information from it
1574 # Don't use it on x86 though, it never reports 3Dnow
1575 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1576 elif darwin
&& ! x86
; then
1577 # use hostinfo on Darwin
1580 # use 'lsattr' on AIX
1581 _cpuinfo
="lsattr -E -l proc0 -a type"
1583 # all other OSes try to extract CPU information from a small helper
1584 # program cpuinfo instead
1585 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1586 _cpuinfo
="./cpuinfo$_exesuf"
1590 # gather more CPU information
1591 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1592 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1593 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1594 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1595 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1597 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1599 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1600 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1602 for ext
in $pparam ; do
1603 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1606 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1607 test $_sse = kernel_check
&& _mmxext
=kernel_check
1609 echocheck
"CPU vendor"
1610 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1612 echocheck
"CPU type"
1616 fi # test "$_runtime_cpudetection" = no
1618 if x86
&& test "$_runtime_cpudetection" = no
; then
1620 if test "$1" = kernel_check
; then
1621 echocheck
"kernel support of $2"
1625 static void catch(int sig) { exit(1); }
1627 signal(SIGILL, catch);
1628 __asm__ volatile ("$3":::"memory"); return 0;
1632 if cc_check
&& tmp_run
; then
1635 _optimizing
="$_optimizing $2"
1640 echo "It seems that your kernel does not correctly support $2."
1641 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1648 extcheck
$_mmx "mmx" "emms"
1649 extcheck
$_mmxext "mmxext" "sfence"
1650 extcheck
$_3dnow "3dnow" "femms"
1651 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1652 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1653 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1654 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1655 extcheck
$_cmov "cmov" "cmovb %%eax, %%ebx"
1657 echocheck
"mtrr support"
1658 if test "$_mtrr" = kernel_check
; then
1660 _optimizing
="$_optimizing mtrr"
1664 if test "$_gcc3_ext" != ""; then
1665 # if we had to disable sse/sse2 because the active kernel does not
1666 # support this instruction set extension, we also have to tell
1667 # gcc3 to not generate sse/sse2 instructions for normal C code
1668 cflag_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1674 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1675 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1676 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1677 subarch_all
='X86_32 X86_64 PPC64'
1678 case "$host_arch" in
1679 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1682 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1687 if test "$_runtime_cpudetection" = no
; then
1691 3) proc
=i386 iproc
=386 ;;
1692 4) proc
=i486 iproc
=486 ;;
1693 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1694 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1695 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1697 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1699 elif test "$pmodel" -ge 8; then
1701 elif test "$pmodel" -ge 6; then
1708 # It's a bit difficult to determine the correct type of Family 6
1709 # AMD CPUs just from their signature. Instead, we check directly
1710 # whether it supports SSE.
1711 if test "$_sse" = yes; then
1712 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1715 # Again, gcc treats athlon and athlon-tbird similarly.
1720 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1721 # caught and remedied in the optimization tests below.
1725 *) proc
=amdfam10 iproc
=686
1726 test $_fast_clz = "auto" && _fast_clz
=yes
1732 3) proc
=i386 iproc
=386 ;;
1733 4) proc
=i486 iproc
=486 ;;
1735 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1736 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1742 if test "$pmodel" -ge 15; then
1744 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1746 elif test "$pmodel" -ge 7; then
1748 elif test "$pmodel" -ge 3; then
1753 test $_fast_clz = "auto" && _fast_clz
=yes
1756 # A nocona in 32-bit mode has no more capabilities than a prescott.
1757 if test "$pmodel" -ge 3; then
1761 test $_fast_clz = "auto" && _fast_clz
=yes
1763 test $_fast_cmov = "auto" && _fast_cmov
=no
1765 *) proc
=prescott iproc
=686 ;;
1771 if test "$pmodel" -ge 8; then
1773 elif test "$pmodel" -ge 4; then
1780 if test "$pmodel" -ge 9; then
1787 *) proc
=i686 iproc
=i686
;;
1792 3) proc
=i386 iproc
=386 ;;
1793 4) proc
=i486 iproc
=486 ;;
1794 *) proc
=i586 iproc
=586 ;;
1798 proc
=i586 iproc
=586 ;;
1800 test $_fast_clz = "auto" && _fast_clz
=no
1801 fi # test "$_runtime_cpudetection" = no
1804 # check that gcc supports our CPU, if not, fall back to earlier ones
1805 # LGB: check -mcpu and -march swithing step by step with enabling
1806 # to fall back till 386.
1808 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1810 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1816 echocheck
"GCC & CPU optimization abilities"
1817 if test "$_runtime_cpudetection" = no
; then
1818 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1819 cflag_check
-march=native
&& proc
=native
1821 if test "$proc" = "amdfam10"; then
1822 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1824 if test "$proc" = "k8"; then
1825 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1827 if test "$proc" = "athlon-xp"; then
1828 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon
1830 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1831 cflag_check
-march=$proc $cpuopt=$proc || proc
=k6
1833 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1834 if ! cflag_check
-march=$proc $cpuopt=$proc; then
1835 if cflag_check
-march=i586
$cpuopt=i686
; then
1842 if test "$proc" = "prescott" ; then
1843 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1845 if test "$proc" = "core2" ; then
1846 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1848 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
1849 cflag_check
-march=$proc $cpuopt=$proc || proc
=i686
1851 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1852 cflag_check
-march=$proc $cpuopt=$proc || proc
=i586
1854 if test "$proc" = "i586"; then
1855 cflag_check
-march=$proc $cpuopt=$proc || proc
=i486
1857 if test "$proc" = "i486" ; then
1858 cflag_check
-march=$proc $cpuopt=$proc || proc
=i386
1860 if test "$proc" = "i386" ; then
1861 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1863 if test "$proc" = "error" ; then
1864 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1868 elif test "$proc" = "i586-i686"; then
1869 _march
="-march=i586"
1870 _mcpu
="$cpuopt=i686"
1873 _march
="-march=$proc"
1874 _mcpu
="$cpuopt=$proc"
1877 else # if test "$_runtime_cpudetection" = no
1878 _mcpu
="$cpuopt=generic"
1879 # at least i486 required, for bswap instruction
1880 _march
="-march=i486"
1881 cflag_check
$_mcpu || _mcpu
="$cpuopt=i686"
1882 cflag_check
$_mcpu || _mcpu
=""
1883 cflag_check
$_march $_mcpu || _march
=""
1886 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1887 ## autodetected mcpu/march parameters
1888 if test "$_target" ; then
1889 # TODO: it may be a good idea to check GCC and fall back in all cases
1890 if test "$host_arch" = "i586-i686"; then
1891 _march
="-march=i586"
1892 _mcpu
="$cpuopt=i686"
1894 _march
="-march=$host_arch"
1895 _mcpu
="$cpuopt=$host_arch"
1903 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1904 i686|athlon
*|pentium
*) iproc
=686 ;;
1909 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1914 test $_fast_clz = "auto" && _fast_clz
=yes
1921 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1928 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1929 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1932 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1933 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1938 if test "$_runtime_cpudetection" = no
; then
1943 test $_fast_clz = "auto" && _fast_clz
=no
1952 # 64-bit prescotts exist, but as far as GCC is concerned they
1953 # have the same capabilities as a nocona.
1955 test $_fast_cmov = "auto" && _fast_cmov
=no
1956 test $_fast_clz = "auto" && _fast_clz
=no
1963 fi # test "$_runtime_cpudetection" = no
1965 echocheck
"GCC & CPU optimization abilities"
1966 # This is a stripped-down version of the i386 fallback.
1967 if test "$_runtime_cpudetection" = no
; then
1968 if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
1969 cflag_check
-march=native
&& proc
=native
1971 # --- AMD processors ---
1972 if test "$proc" = "amdfam10"; then
1973 cflag_check
-march=$proc $cpuopt=$proc || proc
=k8
1975 if test "$proc" = "k8"; then
1976 cflag_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1978 # This will fail if gcc version < 3.3, which is ok because earlier
1979 # versions don't really support 64-bit on amd64.
1980 # Is this a valid assumption? -Corey
1981 if test "$proc" = "athlon-xp"; then
1982 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1984 # --- Intel processors ---
1985 if test "$proc" = "core2"; then
1986 cflag_check
-march=$proc $cpuopt=$proc || proc
=x86-64
1988 if test "$proc" = "x86-64"; then
1989 cflag_check
-march=$proc $cpuopt=$proc || proc
=nocona
1991 if test "$proc" = "nocona"; then
1992 cflag_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1994 if test "$proc" = "pentium4"; then
1995 cflag_check
-march=$proc $cpuopt=$proc || proc
=error
1998 _march
="-march=$proc"
1999 _mcpu
="$cpuopt=$proc"
2000 if test "$proc" = "error" ; then
2001 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2005 else # if test "$_runtime_cpudetection" = no
2006 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2007 _march
="-march=x86-64"
2008 _mcpu
="$cpuopt=generic"
2009 cflag_check
$_mcpu || _mcpu
="x86-64"
2010 cflag_check
$_mcpu || _mcpu
=""
2011 cflag_check
$_march $_mcpu || _march
=""
2015 test $_fast_cmov = "auto" && _fast_cmov
=yes
2016 test $_fast_clz = "auto" && _fast_clz
=yes
2024 if test "$host_arch" = "sparc64" ; then
2027 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2029 echocheck
"CPU type"
2031 case "$(echo $karch)" in
2036 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2055 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2057 test $_fast_clz = "auto" && _fast_clz
=yes
2065 ppc|ppc64|powerpc|powerpc64
)
2067 def_dcbzl
='#define HAVE_DCBZL 0'
2068 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2071 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2073 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2075 echocheck
"CPU type"
2076 case $system_name in
2078 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2079 if test -n "$($_cpuinfo | grep altivec)"; then
2080 test $_altivec = auto
&& _altivec
=yes
2084 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2085 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2086 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2087 test $_altivec = auto
&& _altivec
=yes
2091 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2093 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2096 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2097 test $_altivec = auto
&& _altivec
=yes
2103 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2106 if test "$_altivec" = yes; then
2107 echores
"$proc altivec"
2113 echocheck
"GCC & CPU optimization abilities"
2115 if test -n "$proc"; then
2117 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2118 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2119 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2120 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2121 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2122 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2123 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2124 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2125 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2128 # gcc 3.1(.1) and up supports 7400 and 7450
2129 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2131 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2132 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2136 # gcc 3.2 and up supports 970
2137 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2139 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2140 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2144 # gcc 3.3 and up supports POWER4
2145 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2147 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2151 # gcc 3.4 and up supports 440*
2152 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2154 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2155 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2159 # gcc 4.0 and up supports POWER5
2160 if test "$_cc_major" -ge "4"; then
2162 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2168 if test -n "$_mcpu"; then
2169 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2170 echores
"$_optimizing"
2175 test $_fast_clz = "auto" && _fast_clz
=yes
2182 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2184 echocheck
"CPU type"
2187 unsigned long ver, mask;
2188 __asm__ ("implver %0" : "=r" (ver));
2189 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2190 printf("%ld-%x\n", ver, ~mask);
2194 $_cc -o "$TMPEXE" "$TMPC"
2195 case $
("$TMPEXE") in
2197 0-0) proc
="ev4"; _mvi
="0";;
2198 1-0) proc
="ev5"; _mvi
="0";;
2199 1-1) proc
="ev56"; _mvi
="0";;
2200 1-101) proc
="pca56"; _mvi
="1";;
2201 2-303) proc
="ev6"; _mvi
="1";;
2202 2-307) proc
="ev67"; _mvi
="1";;
2203 2-1307) proc
="ev68"; _mvi
="1";;
2207 echocheck
"GCC & CPU optimization abilities"
2208 if test "$proc" = "ev68" ; then
2209 cc_check
-mcpu=$proc || proc
=ev67
2211 if test "$proc" = "ev67" ; then
2212 cc_check
-mcpu=$proc || proc
=ev6
2217 test $_fast_clz = "auto" && _fast_clz
=yes
2227 echocheck
"CPU type"
2228 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2229 case "$(echo $proc)" in
2230 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2231 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2232 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2233 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2234 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2235 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2237 # gcc < 3.x does not support -mtune.
2238 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2244 test $_fast_clz = "auto" && _fast_clz
=yes
2278 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2279 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2280 die
"unsupported architecture $host_arch"
2282 esac # case "$host_arch" in
2284 if test "$_runtime_cpudetection" = yes ; then
2286 test "$_cmov" != no
&& _cmov
=yes
2288 test "$_mmx" != no
&& _mmx
=yes
2289 test "$_3dnow" != no
&& _3dnow
=yes
2290 test "$_3dnowext" != no
&& _3dnowext
=yes
2291 test "$_mmxext" != no
&& _mmxext
=yes
2292 test "$_sse" != no
&& _sse
=yes
2293 test "$_sse2" != no
&& _sse2
=yes
2294 test "$_ssse3" != no
&& _ssse3
=yes
2295 test "$_mtrr" != no
&& _mtrr
=yes
2304 echocheck
"byte order"
2305 if test "$_big_endian" = auto
; then
2307 short ascii_name[] = {
2308 'M' << 8 | 'P', 'l' << 8 | 'a', 'y' << 8 | 'e', 'r' << 8 | 'B',
2309 'i' << 8 | 'g', 'E' << 8 | 'n', 'd' << 8 | 'i', 'a' << 8 | 'n', 0 };
2310 int main(void) { return (long)ascii_name; }
2313 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2319 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2322 if test "$_big_endian" = yes ; then
2323 _byte_order
='big-endian'
2324 def_words_endian
='#define WORDS_BIGENDIAN 1'
2325 def_bigendian
='#define HAVE_BIGENDIAN 1'
2327 _byte_order
='little-endian'
2328 def_words_endian
='#undef WORDS_BIGENDIAN'
2329 def_bigendian
='#define HAVE_BIGENDIAN 0'
2331 echores
"$_byte_order"
2334 echocheck
"extern symbol prefix"
2338 cc_check
-c || die
"Symbol mangling check failed."
2339 sym
=$
($_nm -P -g $TMPEXE)
2340 extern_prefix
=${sym%%ff_extern*}
2341 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2342 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2343 echores
$extern_prefix
2346 echocheck
"assembler support of -pipe option"
2347 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2348 cflag_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2351 echocheck
"compiler support of named assembler arguments"
2353 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2354 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2355 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2357 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2359 echores
$_named_asm_args
2362 if darwin
&& test "$cc_vendor" = "gnu" ; then
2363 echocheck
"GCC support of -mstackrealign"
2364 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2365 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2366 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2367 # wrong code with this flag, but this can be worked around by adding
2368 # -fno-unit-at-a-time as described in the blog post at
2369 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2371 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2372 int main(void) { return foo3(1, 2, 3) == 3 ? 0 : 1; }
2374 cc_check
-O2 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2375 test -z "$cflags_stackrealign" && cc_check
-O2 -mstackrealign -fno-unit-at-a-time \
2376 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2377 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2378 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2381 # Checking for CFLAGS
2383 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2384 CFLAGS
="-O2 $_march $_mcpu $_pipe $_debug $_profile"
2385 WARNFLAGS
="-W -Wall"
2387 elif test -z "$CFLAGS" ; then
2388 if test "$cc_vendor" = "intel" ; then
2389 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2390 WARNFLAGS
="-wd167 -wd556 -wd144"
2391 elif test "$cc_vendor" = "sun" ; then
2392 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2393 elif test "$cc_vendor" = "clang"; then
2394 CFLAGS
="-O2 $_march $_pipe"
2395 elif test "$cc_vendor" != "gnu" ; then
2396 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2398 CFLAGS
="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2399 WARNFLAGS
="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
2400 extra_ldflags
="$extra_ldflags -ffast-math"
2406 if test "$cc_vendor" = "gnu" ; then
2407 cflag_check
-Wundef && WARNFLAGS
="-Wundef $WARNFLAGS"
2408 # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because
2409 # that's the only variable specific to C now, and this option is not valid
2411 cflag_check
-std=gnu99
&& WARN_CFLAGS
="-std=gnu99 $WARN_CFLAGS"
2412 cflag_check
-Wno-pointer-sign && WARN_CFLAGS
="-Wno-pointer-sign $WARN_CFLAGS"
2413 cflag_check
-Wdisabled-optimization && WARN_CFLAGS
="-Wdisabled-optimization $WARN_CFLAGS"
2414 cflag_check
-Wmissing-prototypes && WARN_CFLAGS
="-Wmissing-prototypes $WARN_CFLAGS"
2415 cflag_check
-Wstrict-prototypes && WARN_CFLAGS
="-Wstrict-prototypes $WARN_CFLAGS"
2417 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2420 cflag_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2421 cflag_check
-MD -MP && DEPFLAGS
="-MD -MP"
2424 if test -n "$LDFLAGS" ; then
2425 extra_ldflags
="$extra_ldflags $LDFLAGS"
2427 elif test "$cc_vendor" = "intel" ; then
2428 extra_ldflags
="$extra_ldflags -i-static"
2430 if test -n "$CPPFLAGS" ; then
2431 extra_cflags
="$extra_cflags $CPPFLAGS"
2438 # Checking assembler (_as) compatibility...
2439 # Added workaround for older as that reads from stdin by default - atmos
2440 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2441 echocheck
"assembler ($_as $as_version)"
2443 _pref_as_version
='2.9.1'
2445 if test "$_mmx" = yes ; then
2446 echo 'emms' >> $TMPS
2448 if test "$_3dnow" = yes ; then
2449 _pref_as_version
='2.10.1'
2450 echo 'femms' >> $TMPS
2452 if test "$_3dnowext" = yes ; then
2453 _pref_as_version
='2.10.1'
2454 echo 'pswapd %mm0, %mm0' >> $TMPS
2456 if test "$_mmxext" = yes ; then
2457 _pref_as_version
='2.10.1'
2458 echo 'movntq %mm0, (%eax)' >> $TMPS
2460 if test "$_sse" = yes ; then
2461 _pref_as_version
='2.10.1'
2462 echo 'xorps %xmm0, %xmm0' >> $TMPS
2464 #if test "$_sse2" = yes ; then
2465 # _pref_as_version='2.11'
2466 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2468 if test "$_cmov" = yes ; then
2469 _pref_as_version
='2.10.1'
2470 echo 'cmovb %eax, %ebx' >> $TMPS
2472 if test "$_ssse3" = yes ; then
2473 _pref_as_version
='2.16.92'
2474 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2476 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2478 if test "$as_verc_fail" != yes ; then
2481 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2483 die
"obsolete binutils version"
2493 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2494 #error PIC not enabled
2499 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2505 echocheck
".align is a power of two"
2506 if test "$_asmalign_pot" = auto
; then
2508 inline_asm_check
'".align 3"' && _asmalign_pot
=yes
2510 if test "$_asmalign_pot" = "yes" ; then
2511 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2513 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2515 echores
$_asmalign_pot
2518 echocheck
"10 assembler operands"
2520 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2526 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2531 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2532 echores
$ten_operands
2534 echocheck
"ebx availability"
2536 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2543 // just adding ebx to clobber list seems unreliable with some
2544 // compilers, e.g. Haiku's gcc 2.95
2546 // and the above check does not work for OSX 64 bit...
2547 __asm__ volatile("":::"%ebx");
2551 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2552 echores
$ebx_available
2556 if test -z "$YASMFLAGS" ; then
2558 x86_64
&& objformat
="macho64" || objformat
="macho"
2564 # currently tested for Linux x86, x86_64
2565 YASMFLAGS
="-f $objformat"
2566 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2567 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2568 case "$objformat" in
2569 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2570 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2576 echo "pabsw xmm0, xmm0" > $TMPS
2577 yasm_check || _yasm
=""
2578 if test $_yasm ; then
2579 def_yasm
='#define HAVE_YASM 1'
2583 def_yasm
='#define HAVE_YASM 0'
2589 def_bswap
='#define HAVE_BSWAP 0'
2590 echo 'bswap %eax' > $TMPS
2591 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2596 #FIXME: This should happen before the check for CFLAGS..
2597 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2598 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2600 # check if AltiVec is supported by the compiler, and how to enable it
2601 echocheck
"GCC AltiVec flags"
2602 if $
(cflag_check
-maltivec -mabi=altivec
) ; then
2603 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2604 # check if <altivec.h> should be included
2605 if $
(header_check altivec.h
$_altivec_gcc_flags) ; then
2606 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2607 inc_altivec_h
='#include <altivec.h>'
2609 if $
(cflag_check
-faltivec) ; then
2610 _altivec_gcc_flags
="-faltivec"
2613 _altivec_gcc_flags
="none, AltiVec disabled"
2617 echores
"$_altivec_gcc_flags"
2619 # check if the compiler supports braces for vector declarations
2622 int main(void) { (vector int) {1}; return 0; }
2624 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2626 # Disable runtime cpudetection if we cannot generate AltiVec code or
2627 # AltiVec is disabled by the user.
2628 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2629 && _runtime_cpudetection
=no
2631 # Show that we are optimizing for AltiVec (if enabled and supported).
2632 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2633 && _optimizing
="$_optimizing altivec"
2635 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2636 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2640 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2642 echocheck
"XFORM ASM support"
2643 inline_asm_check
'"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' &&
2644 xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2645 echores
"$xform_asm"
2649 echocheck
"ARM pld instruction"
2651 inline_asm_check
'"pld [r0]"' && pld
=yes
2654 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2655 if test $_armv5te = "auto" ; then
2657 inline_asm_check
'"qadd r0, r0, r0"' && _armv5te
=yes
2661 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2663 echocheck
"ARMv6 (SIMD instructions)"
2664 if test $_armv6 = "auto" ; then
2666 inline_asm_check
'"sadd16 r0, r0, r0"' && _armv6
=yes
2670 echocheck
"ARMv6t2 (SIMD instructions)"
2671 if test $_armv6t2 = "auto" ; then
2673 inline_asm_check
'"movt r0, #0"' && _armv6t2
=yes
2678 if test $_armvfp = "auto" ; then
2680 inline_asm_check
'"fadds s0, s0, s0"' && _armvfp
=yes
2684 echocheck
"ARM NEON"
2685 if test $neon = "auto" ; then
2687 inline_asm_check
'"vadd.i16 q0, q0, q0"' && neon
=yes
2691 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2692 if test $_iwmmxt = "auto" ; then
2694 inline_asm_check
'"wunpckelub wr6, wr4"' && _iwmmxt
=yes
2699 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'
2700 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2701 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2702 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2703 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2704 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2705 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2706 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2707 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2708 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2709 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2710 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2711 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2712 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2713 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2714 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2715 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2716 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2717 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2718 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2719 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2721 # Checking kernel version...
2722 if x86_32
&& linux
; then
2724 kernel_version
=$
(uname
-r 2>&1)
2725 echocheck
"$system_name kernel version"
2726 case "$kernel_version" in
2727 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2728 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2729 _k_verc_problem
=yes;;
2731 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2734 if test "$_k_verc_fail" ; then
2735 echores
"$kernel_version, fail"
2736 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2737 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2738 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2739 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2740 echo "2.2.x you must upgrade it to get SSE support!"
2741 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2743 echores
"$kernel_version, ok"
2747 ######################
2748 # MAIN TESTS GO HERE #
2749 ######################
2753 if cflag_check
-lposix ; then
2754 extra_ldflags
="$extra_ldflags -lposix"
2761 if cflag_check
-lm ; then
2770 echocheck
"langinfo"
2771 if test "$_langinfo" = auto
; then
2773 statement_check langinfo.h
'nl_langinfo(CODESET)' && _langinfo
=yes
2775 if test "$_langinfo" = yes ; then
2776 def_langinfo
='#define HAVE_LANGINFO 1'
2778 def_langinfo
='#undef HAVE_LANGINFO'
2780 echores
"$_langinfo"
2783 echocheck
"translation support"
2784 if test "$_translation" = yes; then
2785 def_translation
="#define CONFIG_TRANSLATION 1"
2787 def_translation
="#undef CONFIG_TRANSLATION"
2789 echores
"$_translation"
2791 echocheck
"language"
2792 # Set preferred languages, "all" uses English as main language.
2793 test -z "$language" && language
=$LINGUAS
2794 test -z "$language_doc" && language_doc
=$language
2795 test -z "$language_man" && language_man
=$language
2796 test -z "$language_msg" && language_msg
="all"
2797 language_doc
=$
(echo $language_doc |
tr , " ")
2798 language_man
=$
(echo $language_man |
tr , " ")
2799 language_msg
=$
(echo $language_msg |
tr , " ")
2801 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2802 test "$language_man" = "all" && language_man
=$man_lang_all
2803 test "$language_msg" = "all" && language_msg
=$msg_lang_all
2805 if test "$_translation" != yes ; then
2809 # Prune non-existing translations from language lists.
2810 # Set message translation to the first available language.
2811 # Fall back on English.
2812 for lang
in $language_doc ; do
2813 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2815 language_doc
=$tmp_language_doc
2816 test -z "$language_doc" && language_doc
=en
2818 for lang
in $language_man ; do
2819 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2821 language_man
=$tmp_language_man
2822 test -z "$language_man" && language_man
=en
2824 for lang
in $language_msg ; do
2825 test -f po
/$lang.po
&& tmp_language_msg
="$tmp_language_msg $lang"
2827 language_msg
=$tmp_language_msg
2829 echores
"messages (en+): $language_msg - man pages: $language_man - documentation: $language_doc"
2832 echocheck
"enable sighandler"
2833 if test "$_sighandler" = yes ; then
2834 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2836 def_sighandler
='#undef CONFIG_SIGHANDLER'
2838 echores
"$_sighandler"
2840 echocheck
"runtime cpudetection"
2841 if test "$_runtime_cpudetection" = yes ; then
2842 _optimizing
="Runtime CPU-Detection enabled"
2843 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2845 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2847 echores
"$_runtime_cpudetection"
2850 echocheck
"restrict keyword"
2851 for restrict_keyword
in restrict __restrict __restrict__
; do
2852 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2854 def_restrict_keyword
=$restrict_keyword
2858 if [ -n "$def_restrict_keyword" ]; then
2859 echores
"$def_restrict_keyword"
2863 # Avoid infinite recursion loop ("#define restrict restrict")
2864 if [ "$def_restrict_keyword" != "restrict" ]; then
2865 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2867 def_restrict_keyword
=""
2871 echocheck
"__builtin_expect"
2872 # GCC branch prediction hint
2874 static int foo(int a) {
2875 a = __builtin_expect(a, 10);
2876 return a == 10 ? 0 : 1;
2878 int main(void) { return foo(10) && foo(0); }
2881 cc_check
&& _builtin_expect
=yes
2882 if test "$_builtin_expect" = yes ; then
2883 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2885 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2887 echores
"$_builtin_expect"
2892 statement_check kstat.h
'kstat_open()' -lkstat && _kstat
=yes
2893 if test "$_kstat" = yes ; then
2894 def_kstat
="#define HAVE_LIBKSTAT 1"
2895 extra_ldflags
="$extra_ldflags -lkstat"
2897 def_kstat
="#undef HAVE_LIBKSTAT"
2903 # required for nanosleep on some systems
2905 statement_check
time.h
'nanosleep(0, 0)' -lposix4 && _posix4
=yes
2906 if test "$_posix4" = yes ; then
2907 extra_ldflags
="$extra_ldflags -lposix4"
2911 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
2914 statement_check math.h
"${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
2915 if eval test "x\$_$func" = "xyes"; then
2916 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
2919 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
2927 #define _XOPEN_SOURCE 500
2929 int main(void) { mkstemp(""); return 0; }
2932 cc_check
&& _mkstemp
=yes
2933 if test "$_mkstemp" = yes ; then
2934 def_mkstemp
='#define HAVE_MKSTEMP 1'
2936 def_mkstemp
='#define HAVE_MKSTEMP 0'
2941 echocheck
"nanosleep"
2943 statement_check
time.h
'nanosleep(0, 0)' && _nanosleep
=yes
2944 if test "$_nanosleep" = yes ; then
2945 def_nanosleep
='#define HAVE_NANOSLEEP 1'
2947 def_nanosleep
='#undef HAVE_NANOSLEEP'
2949 echores
"$_nanosleep"
2953 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2954 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2957 #include <sys/socket.h>
2958 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
2961 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2962 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2964 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
2965 if test $_winsock2_h = auto
; then
2967 statement_check winsock2.h
'gethostbyname(0)' -lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
2969 test "$_ld_sock" && res_comment
="using $_ld_sock"
2973 if test $_winsock2_h = yes ; then
2975 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
2977 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
2981 echocheck
"arpa/inet.h"
2983 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
2984 header_check arpa
/inet.h
&& arpa_inet_h
=yes &&
2985 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
2986 echores
"$arpa_inet_h"
2989 echocheck
"inet_pton()"
2990 def_inet_pton
='#define HAVE_INET_PTON 0'
2992 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
2993 statement_check arpa
/inet.h
'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton
=yes && break
2995 if test $inet_pton = yes ; then
2996 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
2997 def_inet_pton
='#define HAVE_INET_PTON 1'
2999 echores
"$inet_pton"
3002 echocheck
"inet_aton()"
3003 def_inet_aton
='#define HAVE_INET_ATON 0'
3005 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3006 statement_check arpa
/inet.h
'inet_aton(0, 0)' $_ld_tmp && inet_aton
=yes && break
3008 if test $inet_aton = yes ; then
3009 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3010 def_inet_aton
='#define HAVE_INET_ATON 1'
3012 echores
"$inet_aton"
3015 echocheck
"socklen_t"
3017 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3018 statement_check
$header 'socklen_t v = 0' && _socklen_t
=yes && break
3020 if test "$_socklen_t" = yes ; then
3021 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3023 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3025 echores
"$_socklen_t"
3028 echocheck
"closesocket()"
3030 statement_check winsock2.h
'closesocket(~0)' $_ld_sock && _closesocket
=yes
3031 if test "$_closesocket" = yes ; then
3032 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3034 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3036 echores
"$_closesocket"
3039 echocheck
"networking"
3040 test $_winsock2_h = no
&& test $inet_pton = no
&&
3041 test $inet_aton = no
&& networking
=no
3042 if test "$networking" = yes ; then
3043 def_network
='#define CONFIG_NETWORK 1'
3044 def_networking
='#define CONFIG_NETWORKING 1'
3045 extra_ldflags
="$extra_ldflags $_ld_sock"
3046 inputmodules
="networking $inputmodules"
3048 noinputmodules
="networking $noinputmodules"
3049 def_network
='#define CONFIG_NETWORK 0'
3050 def_networking
='#undef CONFIG_NETWORKING'
3052 echores
"$networking"
3056 if test "$_inet6" = auto
; then
3058 #include <sys/types.h>
3059 #if !defined(_WIN32) || defined(__CYGWIN__)
3060 #include <sys/socket.h>
3061 #include <netinet/in.h>
3063 #include <ws2tcpip.h>
3065 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3068 if cc_check
$_ld_sock ; then
3072 if test "$_inet6" = yes ; then
3073 def_inet6
='#define HAVE_AF_INET6 1'
3075 def_inet6
='#undef HAVE_AF_INET6'
3080 echocheck
"gethostbyname2"
3081 if test "$_gethostbyname2" = auto
; then
3083 #include <sys/types.h>
3084 #include <sys/socket.h>
3086 int main(void) { gethostbyname2("", AF_INET); return 0; }
3093 if test "$_gethostbyname2" = yes ; then
3094 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3096 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3098 echores
"$_gethostbyname2"
3101 echocheck
"inttypes.h (required)"
3103 header_check inttypes.h
&& _inttypes
=yes
3104 echores
"$_inttypes"
3106 if test "$_inttypes" = no
; then
3107 echocheck
"sys/bitypes.h (inttypes.h predecessor)"
3108 header_check sys
/bitypes.h
&& _inttypes
=yes
3109 if test "$_inttypes" = yes ; then
3110 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."
3112 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3117 echocheck
"int_fastXY_t in inttypes.h"
3119 #include <inttypes.h>
3120 int main(void) { volatile int_fast16_t v = 0; return v; }
3123 cc_check
&& _fast_inttypes
=yes
3124 if test "$_fast_inttypes" = no
; then
3126 typedef signed char int_fast8_t;
3127 typedef signed int int_fast16_t;
3128 typedef signed int int_fast32_t;
3129 typedef signed long long int_fast64_t;
3130 typedef unsigned char uint_fast8_t;
3131 typedef unsigned int uint_fast16_t;
3132 typedef unsigned int uint_fast32_t;
3133 typedef unsigned long long uint_fast64_t;'
3135 echores
"$_fast_inttypes"
3138 echocheck
"malloc.h"
3140 header_check malloc.h
&& _malloc
=yes
3141 if test "$_malloc" = yes ; then
3142 def_malloc_h
='#define HAVE_MALLOC_H 1'
3144 def_malloc_h
='#define HAVE_MALLOC_H 0'
3149 echocheck
"memalign()"
3150 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3151 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3153 statement_check malloc.h
'memalign(64, sizeof(char))' && _memalign
=yes
3154 if test "$_memalign" = yes ; then
3155 def_memalign
='#define HAVE_MEMALIGN 1'
3157 def_memalign
='#define HAVE_MEMALIGN 0'
3158 def_map_memalign
='#define memalign(a, b) malloc(b)'
3159 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3161 echores
"$_memalign"
3164 echocheck
"posix_memalign()"
3166 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3168 #define _XOPEN_SOURCE 600
3170 int main(void) { posix_memalign(NULL, 0, 0); }
3172 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3173 echores
"$posix_memalign"
3176 echocheck
"alloca.h"
3178 statement_check alloca.h
'alloca(0)' && _alloca
=yes
3180 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3182 def_alloca_h
='#undef HAVE_ALLOCA_H'
3187 echocheck
"fastmemcpy"
3188 if test "$_fastmemcpy" = yes ; then
3189 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3191 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3193 echores
"$_fastmemcpy"
3198 statement_check sys
/mman.h
'mmap(0, 0, 0, 0, 0, 0)' && _mman
=yes
3199 if test "$_mman" = yes ; then
3200 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3202 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3203 os2
&& _need_mmap
=yes
3207 _mman_has_map_failed
=no
3208 statement_check sys
/mman.h
'void *p = MAP_FAILED' && _mman_has_map_failed
=yes
3209 if test "$_mman_has_map_failed" = yes ; then
3210 def_mman_has_map_failed
=''
3212 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3215 echocheck
"dynamic loader"
3217 for _ld_tmp
in "" "-ldl"; do
3218 statement_check dlfcn.h
'dlopen("", 0)' $_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3220 if test "$_dl" = yes ; then
3221 def_dl
='#define HAVE_LIBDL 1'
3223 def_dl
='#undef HAVE_LIBDL'
3228 echocheck
"dynamic a/v plugins support"
3229 if test "$_dl" = no
; then
3232 if test "$_dynamic_plugins" = yes ; then
3233 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3235 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3237 echores
"$_dynamic_plugins"
3240 def_threads
='#define HAVE_THREADS 0'
3244 THREAD_CFLAGS
=-D_REENTRANT
3245 elif freebsd || netbsd || openbsd || bsdos
; then
3246 THREAD_CFLAGS
=-D_THREAD_SAFE
3248 if test "$_pthreads" = auto
; then
3250 #include <pthread.h>
3251 static void *func(void *arg) { return arg; }
3252 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3256 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3257 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3258 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3262 if test "$_pthreads" = yes ; then
3263 test $_ld_pthread && res_comment
="using $_ld_pthread"
3264 def_pthreads
='#define HAVE_PTHREADS 1'
3265 def_threads
='#define HAVE_THREADS 1'
3266 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3268 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3269 def_pthreads
='#undef HAVE_PTHREADS'
3270 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3271 mingw32 || _win32dll
=no
3273 echores
"$_pthreads"
3276 if test "$_pthreads" = yes ; then
3277 def_pthread_cache
="#define PTHREAD_CACHE 1"
3280 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3284 echocheck
"w32threads"
3285 if test "$_pthreads" = yes ; then
3286 res_comment
="using pthread instead"
3289 if test "$_w32threads" = auto
; then
3291 mingw32
&& _w32threads
=yes
3293 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3294 echores
"$_w32threads"
3297 if test "$_rpath" = yes ; then
3298 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3299 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3306 if test "$_iconv" = auto
; then
3311 #define INBUFSIZE 1024
3312 #define OUTBUFSIZE 4096
3314 char inbuffer[INBUFSIZE];
3315 char outbuffer[OUTBUFSIZE];
3320 char *tocode="UTF-8";
3321 char *fromcode="cp1250";
3322 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3323 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3324 char *iptr=inbuffer;
3325 char *optr=outbuffer;
3326 size_t inleft=numread;
3327 size_t outleft=OUTBUFSIZE;
3328 if (iconv(icdsc, &iptr, &inleft, &optr, &outleft)
3330 write(1, outbuffer, OUTBUFSIZE - outleft);
3333 if (iconv_close(icdsc) == -1)
3340 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3341 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3345 if test "$_iconv" = yes ; then
3346 def_iconv
='#define CONFIG_ICONV 1'
3348 def_iconv
='#undef CONFIG_ICONV'
3353 echocheck
"soundcard.h"
3355 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3356 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3357 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3358 header_check
$_soundcard_header && _soundcard_h
=yes &&
3359 res_comment
="$_soundcard_header" && break
3362 if test "$_soundcard_h" = yes ; then
3363 if test $_soundcard_header = "sys/soundcard.h"; then
3364 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3366 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3369 echores
"$_soundcard_h"
3372 echocheck
"sys/dvdio.h"
3374 # FreeBSD 8.1 has broken dvdio.h
3375 header_check_broken sys
/types.h sys
/dvdio.h
&& _dvdio
=yes
3376 if test "$_dvdio" = yes ; then
3377 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3379 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3384 echocheck
"sys/cdio.h"
3386 # at least OpenSolaris has a broken cdio.h
3387 header_check_broken sys
/types.h sys
/cdio.h
&& _cdio
=yes
3388 if test "$_cdio" = yes ; then
3389 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3391 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3396 echocheck
"linux/cdrom.h"
3398 header_check linux
/cdrom.h
&& _cdrom
=yes
3399 if test "$_cdrom" = yes ; then
3400 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3402 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3409 header_check dvd.h
&& _dvd
=yes
3410 if test "$_dvd" = yes ; then
3411 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3413 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3419 echocheck
"BSDI dvd.h"
3421 header_check dvd.h
&& _bsdi_dvd
=yes
3422 if test "$_bsdi_dvd" = yes ; then
3423 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3425 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3427 echores
"$_bsdi_dvd"
3432 # also used by AIX, but AIX does not support VCD and/or libdvdread
3433 echocheck
"HP-UX SCSI header"
3435 header_check sys
/scsi.h
&& _hpux_scsi_h
=yes
3436 if test "$_hpux_scsi_h" = yes ; then
3437 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3439 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3441 echores
"$_hpux_scsi_h"
3446 echocheck
"userspace SCSI headers (Solaris)"
3448 header_check sys
/scsi
/scsi_types.h
&&
3449 header_check_broken sys
/types.h sys
/scsi
/impl
/uscsi.h
&&
3451 if test "$_sol_scsi_h" = yes ; then
3452 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3454 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3456 echores
"$_sol_scsi_h"
3461 if test "$_termcap" = auto
; then
3463 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3464 statement_check term.h
'tgetent(0, 0)' $_ld_tmp &&
3465 extra_ldflags
="$extra_ldflags $_ld_tmp" && _termcap
=yes && break
3468 if test "$_termcap" = yes ; then
3469 def_termcap
='#define HAVE_TERMCAP 1'
3470 test $_ld_tmp && res_comment
="using $_ld_tmp"
3472 def_termcap
='#undef HAVE_TERMCAP'
3478 def_termios
='#undef HAVE_TERMIOS'
3479 def_termios_h
='#undef HAVE_TERMIOS_H'
3480 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3481 if test "$_termios" = auto
; then
3483 for _termios_header
in "termios.h" "sys/termios.h"; do
3484 header_check
$_termios_header && _termios
=yes &&
3485 res_comment
="using $_termios_header" && break
3489 if test "$_termios" = yes ; then
3490 def_termios
='#define HAVE_TERMIOS 1'
3491 if test "$_termios_header" = "termios.h" ; then
3492 def_termios_h
='#define HAVE_TERMIOS_H 1'
3494 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3501 if test "$_shm" = auto
; then
3503 #include <sys/shm.h>
3504 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3507 cc_check
&& _shm
=yes
3509 if test "$_shm" = yes ; then
3510 def_shm
='#define HAVE_SHM 1'
3512 def_shm
='#undef HAVE_SHM'
3517 echocheck
"strsep()"
3520 int main(void) { char *s = "Hello, world!"; strsep(&s, ","); return 0; }
3523 cc_check
&& _strsep
=yes
3524 if test "$_strsep" = yes ; then
3525 def_strsep
='#define HAVE_STRSEP 1'
3528 def_strsep
='#undef HAVE_STRSEP'
3534 echocheck
"vsscanf()"
3536 #define _ISOC99_SOURCE
3539 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3542 cc_check
&& _vsscanf
=yes
3543 if test "$_vsscanf" = yes ; then
3544 def_vsscanf
='#define HAVE_VSSCANF 1'
3547 def_vsscanf
='#undef HAVE_VSSCANF'
3555 #define _XOPEN_SOURCE 600
3557 int main(void) { int a, b; swab(&a, &b, 0); return 0; }
3560 cc_check
&& _swab
=yes
3561 if test "$_swab" = yes ; then
3562 def_swab
='#define HAVE_SWAB 1'
3565 def_swab
='#undef HAVE_SWAB'
3570 echocheck
"POSIX select()"
3574 #include <sys/types.h>
3576 #include <sys/time.h>
3578 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
3581 def_posix_select
='#undef HAVE_POSIX_SELECT'
3582 #select() of kLIBC (OS/2) supports socket only
3583 ! os2
&& cc_check
&& _posix_select
=yes \
3584 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3585 echores
"$_posix_select"
3588 echocheck
"audio select()"
3589 if test "$_select" = no
; then
3590 def_select
='#undef HAVE_AUDIO_SELECT'
3591 elif test "$_select" = yes ; then
3592 def_select
='#define HAVE_AUDIO_SELECT 1'
3597 echocheck
"gettimeofday()"
3599 #include <sys/time.h>
3600 int main(void) {struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return 0; }
3603 cc_check
&& _gettimeofday
=yes
3604 if test "$_gettimeofday" = yes ; then
3605 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3606 _need_gettimeofday
=no
3608 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3609 _need_gettimeofday
=yes
3611 echores
"$_gettimeofday"
3616 statement_check glob.h
'glob("filename", 0, 0, 0)' && _glob
=yes
3617 if test "$_glob" = yes ; then
3618 def_glob
='#define HAVE_GLOB 1'
3621 def_glob
='#undef HAVE_GLOB'
3627 echocheck
"setenv()"
3629 statement_check stdlib.h
'setenv("", "", 0)' && _setenv
=yes
3630 if test "$_setenv" = yes ; then
3631 def_setenv
='#define HAVE_SETENV 1'
3634 def_setenv
='#undef HAVE_SETENV'
3640 echocheck
"setmode()"
3642 def_setmode
='#define HAVE_SETMODE 0'
3643 statement_check io.h
'setmode(0, 0)' && _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
3648 echocheck
"sysi86()"
3650 statement_check sys
/sysi86.h
'sysi86(0)' && _sysi86
=yes
3651 if test "$_sysi86" = yes ; then
3652 def_sysi86
='#define HAVE_SYSI86 1'
3654 #include <sys/sysi86.h>
3655 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3657 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3659 def_sysi86
='#undef HAVE_SYSI86'
3665 echocheck
"sys/sysinfo.h"
3667 #include <sys/sysinfo.h>
3668 int main(void) { struct sysinfo s_info; sysinfo(&s_info); return 0; }
3671 cc_check
&& _sys_sysinfo
=yes
3672 if test "$_sys_sysinfo" = yes ; then
3673 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3675 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3677 echores
"$_sys_sysinfo"
3682 echocheck
"Mac OS X Finder Support"
3683 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3684 if test "$_macosx_finder" = yes ; then
3685 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3686 extra_ldflags
="$extra_ldflags -framework Carbon"
3688 echores
"$_macosx_finder"
3690 echocheck
"Mac OS X Bundle file locations"
3691 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3692 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3693 if test "$_macosx_bundle" = yes ; then
3694 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3695 extra_ldflags
="$extra_ldflags -framework Carbon"
3697 echores
"$_macosx_bundle"
3699 echocheck
"Apple Remote"
3700 if test "$_apple_remote" = auto
; then
3704 #include <IOKit/IOCFPlugIn.h>
3706 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3707 CFMutableDictionaryRef hidMatchDictionary;
3708 IOReturn ioReturnValue;
3710 // Set up a matching dictionary to search the I/O Registry by class.
3711 // name for all HID class devices
3712 hidMatchDictionary = IOServiceMatching("AppleIRController");
3714 // Now search I/O Registry for matching devices.
3715 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3716 hidMatchDictionary, &hidObjectIterator);
3718 // If search is unsuccessful, return nonzero.
3719 if (ioReturnValue != kIOReturnSuccess ||
3720 !IOIteratorIsValid(hidObjectIterator)) {
3726 cc_check
-framework IOKit
&& _apple_remote
=yes
3728 if test "$_apple_remote" = yes ; then
3729 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3730 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3732 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3734 echores
"$_apple_remote"
3740 echocheck
"Apple IR"
3741 if test "$_apple_ir" = auto
; then
3744 #include <linux/input.h>
3745 int main(void) { struct input_event ev; struct input_id id; return 0; }
3747 cc_check
&& _apple_ir
=yes
3749 if test "$_apple_ir" = yes ; then
3750 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3752 def_apple_ir
='#undef CONFIG_APPLE_IR'
3754 echores
"$_apple_ir"
3757 echocheck
"pkg-config"
3758 _pkg_config
=pkg-config
3759 if $
($_pkg_config --version > /dev
/null
2>&1); then
3760 if test "$_ld_static"; then
3761 _pkg_config
="$_pkg_config --static"
3770 echocheck
"Samba support (libsmbclient)"
3771 if test "$_smb" = yes; then
3772 extra_ldflags
="$extra_ldflags -lsmbclient"
3774 if test "$_smb" = auto
; then
3776 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3777 statement_check libsmbclient.h
'smbc_opendir("smb://")' $_ld_tmp &&
3778 extra_ldflags
="$extra_ldflags $_ld_tmp" && _smb
=yes && break
3782 if test "$_smb" = yes; then
3783 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
3784 inputmodules
="smb $inputmodules"
3786 def_smb
="#undef CONFIG_LIBSMBCLIENT"
3787 noinputmodules
="smb $noinputmodules"
3798 if test "$_tdfxfb" = yes ; then
3799 def_tdfxfb
='#define CONFIG_TDFXFB 1'
3800 vomodules
="tdfxfb $vomodules"
3802 def_tdfxfb
='#undef CONFIG_TDFXFB'
3803 novomodules
="tdfxfb $novomodules"
3808 if test "$_s3fb" = yes ; then
3809 def_s3fb
='#define CONFIG_S3FB 1'
3810 vomodules
="s3fb $vomodules"
3812 def_s3fb
='#undef CONFIG_S3FB'
3813 novomodules
="s3fb $novomodules"
3818 if test "$_wii" = yes ; then
3819 def_wii
='#define CONFIG_WII 1'
3820 vomodules
="wii $vomodules"
3822 def_wii
='#undef CONFIG_WII'
3823 novomodules
="wii $novomodules"
3828 if test "$_tdfxvid" = yes ; then
3829 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
3830 vomodules
="tdfx_vid $vomodules"
3832 def_tdfxvid
='#undef CONFIG_TDFX_VID'
3833 novomodules
="tdfx_vid $novomodules"
3838 if test "$_xvr100" = auto
; then
3841 #include <sys/fbio.h>
3842 #include <sys/visual_io.h>
3844 struct vis_identifier ident;
3845 struct fbgattr attr;
3846 ioctl(0, VIS_GETIDENTIFIER, &ident);
3847 ioctl(0, FBIOGATTR, &attr);
3852 cc_check
&& _xvr100
=yes
3854 if test "$_xvr100" = yes ; then
3855 def_xvr100
='#define CONFIG_XVR100 1'
3856 vomodules
="xvr100 $vomodules"
3858 def_tdfxvid
='#undef CONFIG_XVR100'
3859 novomodules
="xvr100 $novomodules"
3864 if test "$_tga" = yes ; then
3865 def_tga
='#define CONFIG_TGA 1'
3866 vomodules
="tga $vomodules"
3868 def_tga
='#undef CONFIG_TGA'
3869 novomodules
="tga $novomodules"
3874 echocheck
"md5sum support"
3875 if test "$_md5sum" = yes; then
3876 def_md5sum
="#define CONFIG_MD5SUM 1"
3877 vomodules
="md5sum $vomodules"
3879 def_md5sum
="#undef CONFIG_MD5SUM"
3880 novomodules
="md5sum $novomodules"
3885 echocheck
"yuv4mpeg support"
3886 if test "$_yuv4mpeg" = yes; then
3887 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
3888 vomodules
="yuv4mpeg $vomodules"
3890 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
3891 novomodules
="yuv4mpeg $novomodules"
3893 echores
"$_yuv4mpeg"
3897 if test "$_bl" = yes ; then
3898 def_bl
='#define CONFIG_BL 1'
3899 vomodules
="bl $vomodules"
3901 def_bl
='#undef CONFIG_BL'
3902 novomodules
="bl $novomodules"
3907 echocheck
"DirectFB"
3908 if test "$_directfb" = auto
; then
3911 #include <directfb.h>
3912 #include <directfb_version.h>
3913 #if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22)
3914 #error "DirectFB version too old."
3916 int main(void) { DirectFBInit(0, 0); return 0; }
3918 for _inc_tmp
in "" -I/usr
/local
/include
/directfb
-I/usr
/include
/directfb
-I/usr
/local
/include
; do
3919 cc_check
$_inc_tmp -ldirectfb &&
3920 _directfb
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
3923 if test "$_directfb" = yes ; then
3924 def_directfb
='#define CONFIG_DIRECTFB 1'
3925 vomodules
="directfb dfbmga $vomodules"
3926 libs_mplayer
="$libs_mplayer -ldirectfb"
3928 def_directfb
='#undef CONFIG_DIRECTFB'
3929 novomodules
="directfb dfbmga $novomodules"
3931 echores
"$_directfb"
3934 echocheck
"X11 headers presence"
3936 res_comment
="check if the dev(el) packages are installed"
3937 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
3938 if test -f "$I/X11/Xlib.h" ; then
3944 if test $_cross_compile = no
; then
3945 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
3946 /usr
/include
/X11R6
/usr
/openwin
/include
; do
3947 if test -f "$I/X11/Xlib.h" ; then
3948 extra_cflags
="$extra_cflags -I$I"
3950 res_comment
="using $I"
3955 echores
"$_x11_headers"
3959 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3960 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
3961 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
3964 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
3966 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3968 statement_check X11
/Xutil.h
'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp &&
3969 libs_mplayer
="$libs_mplayer $_ld_tmp" && _x11
=yes && break
3972 if test "$_x11" = yes ; then
3973 def_x11
='#define CONFIG_X11 1'
3974 vomodules
="x11 xover $vomodules"
3977 def_x11
='#undef CONFIG_X11'
3978 novomodules
="x11 $novomodules"
3979 res_comment
="check if the dev(el) packages are installed"
3980 # disable stuff that depends on X
3981 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
3985 echocheck
"Xss screensaver extensions"
3986 if test "$_xss" = auto
; then
3988 #include <X11/Xlib.h>
3989 #include <X11/extensions/scrnsaver.h>
3990 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
3993 cc_check
-lXss && _xss
=yes
3995 if test "$_xss" = yes ; then
3996 def_xss
='#define CONFIG_XSS 1'
3997 libs_mplayer
="$libs_mplayer -lXss"
3999 def_xss
='#undef CONFIG_XSS'
4006 if test "$_x11" = yes ; then
4008 #include <X11/Xmd.h>
4009 #include <X11/Xlib.h>
4010 #include <X11/Xutil.h>
4011 #include <X11/Xatom.h>
4012 #include <X11/extensions/dpms.h>
4013 int main(void) { DPMSQueryExtension(0, 0, 0); return 0; }
4015 cc_check
-lXdpms && _xdpms3
=yes
4016 statement_check_broken X11
/Xlib.h X11
/extensions
/dpms.h
'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4
=yes
4018 if test "$_xdpms4" = yes ; then
4019 def_xdpms
='#define CONFIG_XDPMS 1'
4020 res_comment
="using Xdpms 4"
4022 elif test "$_xdpms3" = yes ; then
4023 def_xdpms
='#define CONFIG_XDPMS 1'
4024 libs_mplayer
="$libs_mplayer -lXdpms"
4025 res_comment
="using Xdpms 3"
4028 def_xdpms
='#undef CONFIG_XDPMS'
4034 if test "$_xv" = auto
; then
4036 statement_check_broken X11
/Xlib.h X11
/extensions
/Xvlib.h
'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv
=yes
4039 if test "$_xv" = yes ; then
4040 def_xv
='#define CONFIG_XV 1'
4041 libs_mplayer
="$libs_mplayer -lXv"
4042 vomodules
="xv $vomodules"
4044 def_xv
='#undef CONFIG_XV'
4045 novomodules
="xv $novomodules"
4051 if test "$_xv" = yes && test "$_xvmc" != no
; then
4054 #include <X11/Xlib.h>
4055 #include <X11/extensions/Xvlib.h>
4056 #include <X11/extensions/XvMClib.h>
4058 XvMCQueryExtension(0, 0, 0);
4059 XvMCCreateContext(0, 0, 0, 0, 0, 0, 0);
4062 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4063 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4066 if test "$_xvmc" = yes ; then
4067 def_xvmc
='#define CONFIG_XVMC 1'
4068 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4069 vomodules
="xvmc $vomodules"
4070 res_comment
="using $_xvmclib"
4072 def_xvmc
='#define CONFIG_XVMC 0'
4073 novomodules
="xvmc $novomodules"
4079 if test "$_vdpau" = auto
; then
4081 if test "$_dl" = yes ; then
4083 #include <vdpau/vdpau_x11.h>
4085 vdp_device_create_x11(0, 0, 0, 0);
4086 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4088 cc_check
-lvdpau && _vdpau
=yes
4091 if test "$_vdpau" = yes ; then
4092 def_vdpau
='#define CONFIG_VDPAU 1'
4093 libs_mplayer
="$libs_mplayer -lvdpau"
4094 vomodules
="vdpau $vomodules"
4096 def_vdpau
='#define CONFIG_VDPAU 0'
4097 novomodules
="vdpau $novomodules"
4102 echocheck
"Xinerama"
4103 if test "$_xinerama" = auto
; then
4105 statement_check X11
/extensions
/Xinerama.h
'XineramaIsActive(0)' -lXinerama && _xinerama
=yes
4108 if test "$_xinerama" = yes ; then
4109 def_xinerama
='#define CONFIG_XINERAMA 1'
4110 libs_mplayer
="$libs_mplayer -lXinerama"
4112 def_xinerama
='#undef CONFIG_XINERAMA'
4114 echores
"$_xinerama"
4117 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4118 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4119 # named 'X extensions' or something similar.
4120 # This check may be useful for future mplayer versions (to change resolution)
4121 # If you run into problems, remove '-lXxf86vm'.
4123 if test "$_vm" = auto
; then
4125 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86vmode.h
'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm
=yes
4127 if test "$_vm" = yes ; then
4128 def_vm
='#define CONFIG_XF86VM 1'
4129 libs_mplayer
="$libs_mplayer -lXxf86vm"
4131 def_vm
='#undef CONFIG_XF86VM'
4135 # Check for the presence of special keycodes, like audio control buttons
4136 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4137 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4138 # have these new keycodes.
4139 echocheck
"XF86keysym"
4140 if test "$_xf86keysym" = auto
; then
4143 #include <X11/XF86keysym.h>
4144 int main(void) { return XF86XK_AudioPause; }
4146 cc_check
&& _xf86keysym
=yes
4148 if test "$_xf86keysym" = yes ; then
4149 def_xf86keysym
='#define CONFIG_XF86XK 1'
4151 def_xf86keysym
='#undef CONFIG_XF86XK'
4153 echores
"$_xf86keysym"
4156 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4158 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XDGASetViewport(0, 0, 0, 0, 0)' -lXxf86dga && _dga2
=yes
4160 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4162 statement_check_broken X11
/Xlib.h X11
/extensions
/xf86dga.h
'XF86DGASetViewPort(0, 0, 0, 0)' -lXxf86dga -lXxf86vm && _dga1
=yes
4166 def_dga
='#undef CONFIG_DGA'
4167 def_dga1
='#undef CONFIG_DGA1'
4168 def_dga2
='#undef CONFIG_DGA2'
4169 if test "$_dga1" = yes ; then
4171 def_dga1
='#define CONFIG_DGA1 1'
4172 res_comment
="using DGA 1.0"
4173 elif test "$_dga2" = yes ; then
4175 def_dga2
='#define CONFIG_DGA2 1'
4176 res_comment
="using DGA 2.0"
4178 if test "$_dga" = yes ; then
4179 def_dga
='#define CONFIG_DGA 1'
4180 libs_mplayer
="$libs_mplayer -lXxf86dga"
4181 vomodules
="dga $vomodules"
4183 novomodules
="dga $novomodules"
4189 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4190 def_3dfx
='#define CONFIG_3DFX 1'
4191 vomodules
="3dfx $vomodules"
4193 def_3dfx
='#undef CONFIG_3DFX'
4194 novomodules
="3dfx $novomodules"
4200 def_vidix
='#undef CONFIG_VIDIX'
4201 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4202 _vidix_drv_cyberblade
=no
4203 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4205 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4206 _vidix_drv_mach64
=no
4207 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4209 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4210 _vidix_drv_mga_crtc2
=no
4211 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4212 _vidix_drv_nvidia
=no
4213 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4215 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4217 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4218 _vidix_drv_radeon
=no
4219 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4220 _vidix_drv_rage128
=no
4221 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4223 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4224 _vidix_drv_sh_veu
=no
4225 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4227 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4228 _vidix_drv_unichrome
=no
4229 if test "$_vidix" = auto
; then
4231 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4233 x86_64
&& ! linux
&& _vidix
=no
4234 (ppc || alpha
) && linux
&& _vidix
=yes
4238 if test "$_vidix" = yes ; then
4239 def_vidix
='#define CONFIG_VIDIX 1'
4240 vomodules
="cvidix $vomodules"
4241 # FIXME: ivtv driver temporarily disabled until we have a proper test
4242 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4243 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4245 # some vidix drivers are architecture and os specific, discard them elsewhere
4246 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4247 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4249 for driver
in $_vidix_drivers ; do
4250 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4251 eval _vidix_drv_
${driver}=yes
4252 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4255 echocheck
"VIDIX PCI device name database"
4256 echores
"$_vidix_pcidb"
4257 if test "$_vidix_pcidb" = yes ; then
4263 echocheck
"VIDIX dhahelper support"
4264 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4265 echores
"$_dhahelper"
4267 echocheck
"VIDIX svgalib_helper support"
4268 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4269 echores
"$_svgalib_helper"
4272 novomodules
="cvidix $novomodules"
4275 if test "$_vidix" = yes && win32
; then
4277 vomodules
="winvidix $vomodules"
4278 libs_mplayer
="$libs_mplayer -lgdi32"
4280 novomodules
="winvidix $novomodules"
4282 if test "$_vidix" = yes && test "$_x11" = yes; then
4284 vomodules
="xvidix $vomodules"
4286 novomodules
="xvidix $novomodules"
4290 if test "$_ggi" = auto
; then
4292 statement_check ggi
/ggi.h
'ggiInit()' -lggi && _ggi
=yes
4294 if test "$_ggi" = yes ; then
4295 def_ggi
='#define CONFIG_GGI 1'
4296 libs_mplayer
="$libs_mplayer -lggi"
4297 vomodules
="ggi $vomodules"
4299 def_ggi
='#undef CONFIG_GGI'
4300 novomodules
="ggi $novomodules"
4304 echocheck
"GGI extension: libggiwmh"
4305 if test "$_ggiwmh" = auto
; then
4307 statement_check ggi
/wmh.h
'ggiWmhInit()' -lggi -lggiwmh && _ggiwmh
=yes
4309 # needed to get right output on obscure combination
4310 # like --disable-ggi --enable-ggiwmh
4311 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4312 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4313 libs_mplayer
="$libs_mplayer -lggiwmh"
4316 def_ggiwmh
='#undef CONFIG_GGIWMH'
4322 if test "$_aa" = auto
; then
4329 c = aa_autoinit(&aa_defparams);
4330 p = aa_getrenderparams();
4331 aa_autoinitkbd(c, 0);
4335 for _ld_tmp
in "-laa" ; do
4336 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4339 if test "$_aa" = yes ; then
4340 def_aa
='#define CONFIG_AA 1'
4342 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4344 vomodules
="aa $vomodules"
4346 def_aa
='#undef CONFIG_AA'
4347 novomodules
="aa $novomodules"
4353 if test "$_caca" = auto
; then
4355 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4358 #ifdef CACA_API_VERSION_1
4361 int main(void) { caca_init(); return 0; }
4363 cc_check $
(caca-config
--libs) && _caca
=yes
4366 if test "$_caca" = yes ; then
4367 def_caca
='#define CONFIG_CACA 1'
4368 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4369 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4370 vomodules
="caca $vomodules"
4372 def_caca
='#undef CONFIG_CACA'
4373 novomodules
="caca $novomodules"
4379 if test "$_svga" = auto
; then
4381 header_check vga.h
-lvga $_ld_lm && _svga
=yes
4383 if test "$_svga" = yes ; then
4384 def_svga
='#define CONFIG_SVGALIB 1'
4385 libs_mplayer
="$libs_mplayer -lvga"
4386 vomodules
="svga $vomodules"
4388 def_svga
='#undef CONFIG_SVGALIB'
4389 novomodules
="svga $novomodules"
4395 if test "$_fbdev" = auto
; then
4399 if test "$_fbdev" = yes ; then
4400 def_fbdev
='#define CONFIG_FBDEV 1'
4401 vomodules
="fbdev $vomodules"
4403 def_fbdev
='#undef CONFIG_FBDEV'
4404 novomodules
="fbdev $novomodules"
4411 if test "$_dvb" = auto
; then
4415 #include <sys/ioctl.h>
4419 #include <linux/dvb/dmx.h>
4420 #include <linux/dvb/frontend.h>
4421 #include <linux/dvb/video.h>
4422 #include <linux/dvb/audio.h>
4423 int main(void) {return 0;}
4425 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4426 cc_check
$_inc_tmp && _dvb
=yes && \
4427 extra_cflags
="$extra_cflags $_inc_tmp" && break
4431 if test "$_dvb" = yes ; then
4433 inputmodules
="dvb $inputmodules"
4434 def_dvb
='#define CONFIG_DVB 1'
4435 def_dvbin
='#define CONFIG_DVBIN 1'
4436 aomodules
="mpegpes(dvb) $aomodules"
4437 vomodules
="mpegpes(dvb) $vomodules"
4440 noinputmodules
="dvb $noinputmodules"
4441 def_dvb
='#undef CONFIG_DVB'
4442 def_dvbin
='#undef CONFIG_DVBIN '
4443 aomodules
="mpegpes(file) $aomodules"
4444 vomodules
="mpegpes(file) $vomodules"
4450 echocheck
"QuickTime"
4451 if test "$quicktime" = auto
; then
4453 #include <QuickTime/QuickTime.h>
4455 ImageDescription *desc;
4462 cc_check
-framework QuickTime
&& quicktime
=yes
4464 if test "$quicktime" = yes ; then
4465 extra_ldflags
="$extra_ldflags -framework QuickTime"
4466 def_quicktime
='#define CONFIG_QUICKTIME 1'
4468 def_quicktime
='#undef CONFIG_QUICKTIME'
4474 if test "$_quartz" = auto
; then
4476 statement_check Carbon
/Carbon.h
'CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false)' -framework Carbon
&& _quartz
=yes
4478 if test "$_quartz" = yes ; then
4479 libs_mplayer
="$libs_mplayer -framework Carbon"
4480 def_quartz
='#define CONFIG_QUARTZ 1'
4481 vomodules
="quartz $vomodules"
4483 def_quartz
='#undef CONFIG_QUARTZ'
4484 novomodules
="quartz $novomodules"
4488 echocheck
"CoreVideo"
4489 if test "$_corevideo" = auto
; then
4491 #include <Carbon/Carbon.h>
4492 #include <CoreServices/CoreServices.h>
4493 #include <OpenGL/OpenGL.h>
4494 #include <QuartzCore/CoreVideo.h>
4495 int main(void) { return 0; }
4498 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4500 if test "$_corevideo" = yes ; then
4501 vomodules
="corevideo $vomodules"
4502 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4503 def_corevideo
='#define CONFIG_COREVIDEO 1'
4505 novomodules
="corevideo $novomodules"
4506 def_corevideo
='#undef CONFIG_COREVIDEO'
4508 echores
"$_corevideo"
4513 echocheck
"PNG support"
4514 if test "$_png" = auto
; then
4517 # Don't check for -lpng on irix since it has its own libpng
4518 # incompatible with the GNU libpng
4519 res_comment
="disabled on irix (not GNU libpng)"
4526 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4527 printf("libpng: %s\n", png_libpng_ver);
4528 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4531 cc_check
-lpng -lz $_ld_lm && _png
=yes
4535 if test "$_png" = yes ; then
4536 def_png
='#define CONFIG_PNG 1'
4537 extra_ldflags
="$extra_ldflags -lpng -lz"
4539 def_png
='#undef CONFIG_PNG'
4542 echocheck
"MNG support"
4543 if test "$_mng" = auto
; then
4548 const char * p_ver = mng_version_text();
4549 return !p_ver || p_ver[0] == 0;
4552 if cc_check
-lmng -lz $_ld_lm ; then
4557 if test "$_mng" = yes ; then
4558 def_mng
='#define CONFIG_MNG 1'
4559 extra_ldflags
="$extra_ldflags -lmng -lz"
4561 def_mng
='#undef CONFIG_MNG'
4564 echocheck
"JPEG support"
4565 if test "$_jpeg" = auto
; then
4567 header_check_broken stdio.h jpeglib.h
-ljpeg $_ld_lm && _jpeg
=yes
4571 if test "$_jpeg" = yes ; then
4572 def_jpeg
='#define CONFIG_JPEG 1'
4573 vomodules
="jpeg $vomodules"
4574 extra_ldflags
="$extra_ldflags -ljpeg"
4576 def_jpeg
='#undef CONFIG_JPEG'
4577 novomodules
="jpeg $novomodules"
4582 echocheck
"PNM support"
4583 if test "$_pnm" = yes; then
4584 def_pnm
="#define CONFIG_PNM 1"
4585 vomodules
="pnm $vomodules"
4587 def_pnm
="#undef CONFIG_PNM"
4588 novomodules
="pnm $novomodules"
4594 echocheck
"GIF support"
4595 # This is to appease people who want to force gif support.
4596 # If it is forced to yes, then we still do checks to determine
4597 # which gif library to use.
4598 if test "$_gif" = yes ; then
4603 if test "$_gif" = auto
; then
4605 for _ld_gif
in "-lungif" "-lgif" ; do
4606 statement_check gif_lib.h
'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif
=yes && break
4610 # If no library was found, and the user wants support forced,
4611 # then we force it on with libgif, as this is the safest
4612 # assumption IMHO. (libungif & libregif both create symbolic
4613 # links to libgif. We also assume that no x11 support is needed,
4614 # because if you are forcing this, then you _should_ know what
4615 # you are doing. [ Besides, package maintainers should never
4616 # have compiled x11 deps into libungif in the first place. ] )
4619 if test "$_force_gif" = yes && test "$_gif" = no
; then
4624 if test "$_gif" = yes ; then
4625 def_gif
='#define CONFIG_GIF 1'
4626 codecmodules
="gif $codecmodules"
4627 vomodules
="gif89a $vomodules"
4628 res_comment
="old version, some encoding functions disabled"
4629 def_gif_4
='#undef CONFIG_GIF_4'
4630 extra_ldflags
="$extra_ldflags $_ld_gif"
4636 #include <gif_lib.h>
4637 static void catch(int sig) { exit(1); }
4639 signal(SIGSEGV, catch); // catch segfault
4640 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4641 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4645 if cc_check
"$_ld_gif" ; then
4646 def_gif_4
='#define CONFIG_GIF_4 1'
4650 def_gif
='#undef CONFIG_GIF'
4651 def_gif_4
='#undef CONFIG_GIF_4'
4652 novomodules
="gif89a $novomodules"
4653 nocodecmodules
="gif $nocodecmodules"
4658 case "$_gif" in yes*)
4659 echocheck
"broken giflib workaround"
4660 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
4664 #include <gif_lib.h>
4666 GifFileType gif = {.UserData = NULL};
4667 printf("UserData is at address %p\n", gif.UserData);
4671 if cc_check
"$_ld_gif" ; then
4672 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
4681 echocheck
"VESA support"
4682 if test "$_vesa" = auto
; then
4684 statement_check vbe.h
'vbeInit()' -lvbe -llrmi && _vesa
=yes
4686 if test "$_vesa" = yes ; then
4687 def_vesa
='#define CONFIG_VESA 1'
4688 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
4689 vomodules
="vesa $vomodules"
4691 def_vesa
='#undef CONFIG_VESA'
4692 novomodules
="vesa $novomodules"
4704 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
4705 if test -z "$_sdlconfig" ; then
4706 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4707 _sdlconfig
="sdl-config"
4708 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4709 _sdlconfig
="sdl11-config"
4714 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4716 #ifdef CONFIG_SDL_SDL_H
4717 #include <SDL/SDL.h>
4722 // we allow SDL hacking our main() only on OSX
4725 int main(int argc, char *argv[]) {
4726 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4731 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
4732 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
4734 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
4738 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4739 res_comment
="using $_sdlconfig"
4741 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
4742 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
4744 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
4745 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
4747 _inc_tmp
="$($_sdlconfig --cflags)"
4748 _ld_tmp
="$($_sdlconfig --libs)"
4750 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
4752 elif cc_check
$_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
4753 # HACK for BeOS/Haiku SDL
4754 _ld_tmp
="$_ld_tmp -lstdc++"
4759 if test "$_sdl" = yes ; then
4760 def_sdl
='#define CONFIG_SDL 1'
4761 extra_cflags
="$extra_cflags $_inc_tmp"
4762 libs_mplayer
="$libs_mplayer $_ld_tmp"
4763 vomodules
="sdl $vomodules"
4764 aomodules
="sdl $aomodules"
4766 def_sdl
='#undef CONFIG_SDL'
4767 novomodules
="sdl $novomodules"
4768 noaomodules
="sdl $noaomodules"
4773 # make sure this stays below CoreVideo to avoid issues due to namespace
4774 # conflicts between -lGL and -framework OpenGL
4776 #Note: this test is run even with --enable-gl since we autodetect linker flags
4777 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
4780 #include <windows.h>
4782 #elif defined(GL_SDL)
4784 #ifdef CONFIG_SDL_SDL_H
4785 #include <SDL/SDL.h>
4790 // we allow SDL hacking our main() only on OSX
4795 #include <X11/Xlib.h>
4798 int main(int argc, char *argv[]) {
4801 wglCreateContext(dc);
4802 #elif defined(GL_SDL)
4803 SDL_GL_SwapBuffers();
4805 glXCreateContext(NULL, NULL, NULL, True);
4812 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
4813 if cc_check
$_ld_tmp $_ld_lm ; then
4816 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
4820 if cc_check
-DGL_WIN32 -lopengl32 ; then
4823 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4825 # last so it can reuse any linker etc. flags detected before
4826 if test "$_sdl" = yes ; then
4827 if cc_check
-DGL_SDL ||
4828 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
4831 elif cc_check
-DGL_SDL -lGL ||
4832 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
4835 libs_mplayer
="$libs_mplayer -lGL"
4841 if test "$_gl" = yes ; then
4842 def_gl
='#define CONFIG_GL 1'
4843 res_comment
="backends:"
4844 if test "$_gl_win32" = yes ; then
4845 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4846 res_comment
="$res_comment win32"
4848 if test "$_gl_x11" = yes ; then
4849 def_gl_x11
='#define CONFIG_GL_X11 1'
4850 res_comment
="$res_comment x11"
4852 if test "$_gl_sdl" = yes ; then
4853 def_gl_sdl
='#define CONFIG_GL_SDL 1'
4854 res_comment
="$res_comment sdl"
4856 vomodules
="opengl $vomodules"
4858 def_gl
='#undef CONFIG_GL'
4859 def_gl_win32
='#undef CONFIG_GL_WIN32'
4860 def_gl_x11
='#undef CONFIG_GL_X11'
4861 def_gl_sdl
='#undef CONFIG_GL_SDL'
4862 novomodules
="opengl $novomodules"
4867 echocheck
"MatrixView"
4868 if test "$_gl" = no
; then
4871 if test "$matrixview" = yes ; then
4872 vomodules
="matrixview $vomodules"
4873 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
4875 novomodules
="matrixview $novomodules"
4876 def_matrixview
='#undef CONFIG_MATRIXVIEW'
4878 echores
"$matrixview"
4882 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
4883 if test "$_kva" = auto
; then
4885 header_check_broken os2.h kva.h
-lkva && _kva
=yes
4887 if test "$_kva" = yes ; then
4888 def_kva
='#define CONFIG_KVA 1'
4889 libs_mplayer
="$libs_mplayer -lkva"
4890 vomodules
="kva $vomodules"
4892 def_kva
='#undef CONFIG_KVA'
4893 novomodules
="kva $novomodules"
4901 echocheck
"Windows waveout"
4902 if test "$_win32waveout" = auto
; then
4904 header_check_broken windows.h mmsystem.h
-lwinmm && _win32waveout
=yes
4906 if test "$_win32waveout" = yes ; then
4907 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
4908 libs_mplayer
="$libs_mplayer -lwinmm"
4909 aomodules
="win32 $aomodules"
4911 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
4912 noaomodules
="win32 $noaomodules"
4914 echores
"$_win32waveout"
4916 echocheck
"Direct3D"
4917 if test "$_direct3d" = auto
; then
4919 header_check d3d9.h
&& _direct3d
=yes
4921 if test "$_direct3d" = yes ; then
4922 def_direct3d
='#define CONFIG_DIRECT3D 1'
4923 vomodules
="direct3d $vomodules"
4925 def_direct3d
='#undef CONFIG_DIRECT3D'
4926 novomodules
="direct3d $novomodules"
4928 echores
"$_direct3d"
4931 if test "$_directx" = auto
; then
4935 int main(void) { return 0; }
4938 cc_check
-lgdi32 && _directx
=yes
4940 if test "$_directx" = yes ; then
4941 def_directx
='#define CONFIG_DIRECTX 1'
4942 libs_mplayer
="$libs_mplayer -lgdi32"
4943 vomodules
="directx $vomodules"
4944 aomodules
="dsound $aomodules"
4946 def_directx
='#undef CONFIG_DIRECTX'
4947 novomodules
="directx $novomodules"
4948 noaomodules
="dsound $noaomodules"
4956 if test "$_dxr2" = auto
; then
4958 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4959 header_check dxr2ioctl.h
$_inc_tmp && _dxr2
=yes &&
4960 extra_cflags
="$extra_cflags $_inc_tmp" && break
4963 if test "$_dxr2" = yes; then
4964 def_dxr2
='#define CONFIG_DXR2 1'
4965 aomodules
="dxr2 $aomodules"
4966 vomodules
="dxr2 $vomodules"
4968 def_dxr2
='#undef CONFIG_DXR2'
4969 noaomodules
="dxr2 $noaomodules"
4970 novomodules
="dxr2 $novomodules"
4975 if test "$_dxr3" = auto
; then
4977 header_check linux
/em8300.h
&& _dxr3
=yes
4979 if test "$_dxr3" = yes ; then
4980 def_dxr3
='#define CONFIG_DXR3 1'
4981 vomodules
="dxr3 $vomodules"
4983 def_dxr3
='#undef CONFIG_DXR3'
4984 novomodules
="dxr3 $novomodules"
4989 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
4990 if test "$_ivtv" = auto
; then
4992 #include <linux/videodev2.h>
4993 #include <linux/ivtv.h>
4994 #include <sys/ioctl.h>
4996 struct ivtv_cfg_stop_decode sd;
4997 struct ivtv_cfg_start_decode sd1;
4998 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
4999 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5003 cc_check
&& _ivtv
=yes
5005 if test "$_ivtv" = yes ; then
5006 def_ivtv
='#define CONFIG_IVTV 1'
5007 vomodules
="ivtv $vomodules"
5008 aomodules
="ivtv $aomodules"
5010 def_ivtv
='#undef CONFIG_IVTV'
5011 novomodules
="ivtv $novomodules"
5012 noaomodules
="ivtv $noaomodules"
5017 echocheck
"V4L2 MPEG Decoder"
5018 if test "$_v4l2" = auto
; then
5020 #include <linux/videodev2.h>
5021 #include <linux/version.h>
5023 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5024 #error kernel headers too old, need 2.6.22
5026 struct v4l2_ext_controls ctrls;
5027 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5032 cc_check
&& _v4l2
=yes
5034 if test "$_v4l2" = yes ; then
5035 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5036 vomodules
="v4l2 $vomodules"
5037 aomodules
="v4l2 $aomodules"
5039 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5040 novomodules
="v4l2 $novomodules"
5041 noaomodules
="v4l2 $noaomodules"
5052 echocheck
"OSS Audio"
5053 if test "$_ossaudio" = auto
; then
5055 #include <$_soundcard_header>
5056 int main(void) { return SNDCTL_DSP_SETFRAGMENT; }
5059 cc_check
&& _ossaudio
=yes
5061 if test "$_ossaudio" = yes ; then
5062 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5063 aomodules
="oss $aomodules"
5065 #include <$_soundcard_header>
5066 #ifdef OPEN_SOUND_SYSTEM
5067 int main(void) { return 0; }
5069 #error Not the real thing
5073 cc_check
&& _real_ossaudio
=yes
5074 if test "$_real_ossaudio" = yes; then
5075 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5076 # Check for OSS4 headers (override default headers)
5077 # Does not apply to systems where OSS4 is native (e.g. FreeBSD)
5078 if test -f /etc
/oss.conf
; then
5080 _ossinc
="$OSSLIBDIR/include"
5081 if test -f "$_ossinc/sys/soundcard.h"; then
5082 extra_cflags
="-I$_ossinc $extra_cflags"
5085 elif netbsd || openbsd
; then
5086 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5087 extra_ldflags
="$extra_ldflags -lossaudio"
5089 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5091 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5093 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5094 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5095 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5096 noaomodules
="oss $noaomodules"
5098 echores
"$_ossaudio"
5102 if test "$_arts" = auto
; then
5104 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5105 statement_check artsc.h
'arts_init()' $
(artsc-config
--libs) $
(artsc-config
--cflags) &&
5110 if test "$_arts" = yes ; then
5111 def_arts
='#define CONFIG_ARTS 1'
5112 aomodules
="arts $aomodules"
5113 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5114 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5116 noaomodules
="arts $noaomodules"
5122 if test "$_esd" = auto
; then
5124 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5125 statement_check esd.h
'esd_open_sound("test")' $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5130 if test "$_esd" = yes ; then
5131 def_esd
='#define CONFIG_ESD 1'
5132 aomodules
="esd $aomodules"
5133 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5134 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5136 echocheck
"esd_get_latency()"
5137 statement_check esd.h
'esd_get_latency(0)' $
(esd-config
--libs) $
(esd-config
--cflags) &&
5138 _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5139 echores
"$_esd_latency"
5141 def_esd
='#undef CONFIG_ESD'
5142 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5143 noaomodules
="esd $noaomodules"
5148 if test "$_nas" = auto
; then
5150 header_check audio
/audiolib.h
$_ld_lm -laudio -lXt && _nas
=yes
5152 if test "$_nas" = yes ; then
5153 def_nas
='#define CONFIG_NAS 1'
5154 libs_mplayer
="$libs_mplayer -laudio -lXt"
5155 aomodules
="nas $aomodules"
5157 noaomodules
="nas $noaomodules"
5158 def_nas
='#undef CONFIG_NAS'
5164 if test "$_pulse" = auto
; then
5166 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5167 header_check pulse
/pulseaudio.h $
($_pkg_config --libs --cflags libpulse
) &&
5173 if test "$_pulse" = yes ; then
5174 def_pulse
='#define CONFIG_PULSE 1'
5175 aomodules
="pulse $aomodules"
5176 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5177 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5179 def_pulse
='#undef CONFIG_PULSE'
5180 noaomodules
="pulse $noaomodules"
5185 if test "$_jack" = auto
; then
5187 if statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' -ljack ; then
5188 libs_mplayer
="$libs_mplayer -ljack"
5189 elif statement_check jack
/jack.h
'jack_client_open("test", JackUseExactName, NULL)' $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5190 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5191 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5197 if test "$_jack" = yes ; then
5198 def_jack
='#define CONFIG_JACK 1'
5199 aomodules
="jack $aomodules"
5201 noaomodules
="jack $noaomodules"
5206 if test "$_openal" = auto
; then
5210 #include <OpenAL/al.h>
5215 alSourceQueueBuffers(0, 0, 0);
5216 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5220 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5221 cc_check
$I && _openal
=yes && break
5222 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5224 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5226 if test "$_openal" = yes ; then
5227 def_openal
='#define CONFIG_OPENAL 1'
5228 aomodules
="openal $aomodules"
5230 noaomodules
="openal $noaomodules"
5234 echocheck
"ALSA audio"
5235 if test "$_alloca" != yes ; then
5237 res_comment
="alloca missing"
5239 if test "$_alsa" != no
; then
5242 #include <sys/asoundlib.h>
5243 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5244 #error "alsa version != 0.5.x"
5246 int main(void) { return 0; }
5248 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5251 #include <sys/asoundlib.h>
5252 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5253 #error "alsa version != 0.9.x"
5255 int main(void) { return 0; }
5257 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5259 #include <alsa/asoundlib.h>
5260 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5261 #error "alsa version != 0.9.x"
5263 int main(void) { return 0; }
5265 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5268 #include <sys/asoundlib.h>
5269 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5270 #error "alsa version != 1.0.x"
5272 int main(void) { return 0; }
5274 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5276 #include <alsa/asoundlib.h>
5277 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5278 #error "alsa version != 1.0.x"
5280 int main(void) { return 0; }
5282 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5284 def_alsa
='#undef CONFIG_ALSA'
5285 def_alsa5
='#undef CONFIG_ALSA5'
5286 def_alsa9
='#undef CONFIG_ALSA9'
5287 def_alsa1x
='#undef CONFIG_ALSA1X'
5288 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5289 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5290 if test "$_alsaver" ; then
5292 if test "$_alsaver" = '0.5.x' ; then
5294 aomodules
="alsa5 $aomodules"
5295 def_alsa5
='#define CONFIG_ALSA5 1'
5296 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5297 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5298 elif test "$_alsaver" = '0.9.x-sys' ; then
5300 aomodules
="alsa $aomodules"
5301 def_alsa
='#define CONFIG_ALSA 1'
5302 def_alsa9
='#define CONFIG_ALSA9 1'
5303 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5304 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5305 elif test "$_alsaver" = '0.9.x-alsa' ; then
5307 aomodules
="alsa $aomodules"
5308 def_alsa
='#define CONFIG_ALSA 1'
5309 def_alsa9
='#define CONFIG_ALSA9 1'
5310 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5311 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5312 elif test "$_alsaver" = '1.0.x-sys' ; then
5314 aomodules
="alsa $aomodules"
5315 def_alsa
='#define CONFIG_ALSA 1'
5316 def_alsa1x
="#define CONFIG_ALSA1X 1"
5317 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5318 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5319 elif test "$_alsaver" = '1.0.x-alsa' ; then
5321 aomodules
="alsa $aomodules"
5322 def_alsa
='#define CONFIG_ALSA 1'
5323 def_alsa1x
="#define CONFIG_ALSA1X 1"
5324 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5325 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5328 res_comment
="unknown version"
5330 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5332 noaomodules
="alsa $noaomodules"
5337 echocheck
"Sun audio"
5338 if test "$_sunaudio" = auto
; then
5340 #include <sys/types.h>
5341 #include <sys/audioio.h>
5342 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5345 cc_check
&& _sunaudio
=yes
5347 if test "$_sunaudio" = yes ; then
5348 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5349 aomodules
="sun $aomodules"
5351 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5352 noaomodules
="sun $noaomodules"
5354 echores
"$_sunaudio"
5358 echocheck
"CoreAudio"
5359 if test "$_coreaudio" = auto
; then
5361 #include <CoreAudio/CoreAudio.h>
5362 #include <AudioToolbox/AudioToolbox.h>
5363 #include <AudioUnit/AudioUnit.h>
5364 int main(void) { return 0; }
5367 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5369 if test "$_coreaudio" = yes ; then
5370 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5371 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5372 aomodules
="coreaudio $aomodules"
5374 def_coreaudio
='#undef CONFIG_COREAUDIO'
5375 noaomodules
="coreaudio $noaomodules"
5382 echocheck
"SGI audio"
5383 if test "$_sgiaudio" = auto
; then
5385 header_check dmedia
/audio.h
&& _sgiaudio
=yes
5387 if test "$_sgiaudio" = "yes" ; then
5388 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5389 libs_mplayer
="$libs_mplayer -laudio"
5390 aomodules
="sgi $aomodules"
5392 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5393 noaomodules
="sgi $noaomodules"
5395 echores
"$_sgiaudio"
5400 echocheck
"KAI (UNIAUD/DART)"
5401 if test "$_kai" = auto
; then
5403 header_check_broken os2.h kai.h
-lkai && _kai
=yes
5405 if test "$_kai" = yes ; then
5406 def_kai
='#define CONFIG_KAI 1'
5407 libs_mplayer
="$libs_mplayer -lkai"
5408 aomodules
="kai $aomodules"
5410 def_kai
='#undef CONFIG_KAI'
5411 noaomodules
="kai $noaomodules"
5416 if test "$_dart" = auto
; then
5418 header_check_broken os2.h dart.h
-ldart && _dart
=yes
5420 if test "$_dart" = yes ; then
5421 def_dart
='#define CONFIG_DART 1'
5422 libs_mplayer
="$libs_mplayer -ldart"
5423 aomodules
="dart $aomodules"
5425 def_dart
='#undef CONFIG_DART'
5426 noaomodules
="dart $noaomodules"
5432 # set default CD/DVD devices
5433 if win32 || os2
; then
5434 default_cdrom_device
="D:"
5436 default_cdrom_device
="/dev/disk1"
5437 elif dragonfly
; then
5438 default_cdrom_device
="/dev/cd0"
5440 default_cdrom_device
="/dev/acd0"
5442 default_cdrom_device
="/dev/rcd0c"
5444 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5445 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5446 # file system and the volfs service.
5447 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5449 default_cdrom_device
="a1ide.device:2"
5451 default_cdrom_device
="/dev/cdrom"
5454 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5455 default_dvd_device
=$default_cdrom_device
5457 default_dvd_device
="/dev/rdiskN"
5459 default_dvd_device
="/dev/dvd"
5463 echocheck
"VCD support"
5464 if test "$_vcd" = auto
; then
5466 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
5469 header_check
ddk
/ntddcdrm.h
&& _vcd
=yes
5472 if test "$_vcd" = yes; then
5473 inputmodules
="vcd $inputmodules"
5474 def_vcd
='#define CONFIG_VCD 1'
5476 def_vcd
='#undef CONFIG_VCD'
5477 noinputmodules
="vcd $noinputmodules"
5478 res_comment
="not supported on this OS"
5484 echocheck
"Blu-ray support"
5485 if test "$_bluray" = auto
; then
5487 statement_check libbluray
/bluray.h
'bd_get_title_info(0, 0)' -lbluray && _bluray
=yes
5489 if test "$_bluray" = yes ; then
5490 def_bluray
='#define CONFIG_LIBBLURAY 1'
5491 extra_ldflags
="$extra_ldflags -lbluray"
5492 inputmodules
="bluray $inputmodules"
5494 def_bluray
='#undef CONFIG_LIBBLURAY'
5495 noinputmodules
="bluray $noinputmodules"
5500 if test "$_dvdread_internal" = auto
&& test ! -f "libdvdread4/dvd_reader.c" ; then
5501 _dvdread_internal
=no
5503 if test "$_dvdread_internal" = auto
; then
5504 _dvdread_internal
=no
5506 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5507 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5508 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5509 || darwin || win32 || os2
; then
5510 _dvdread_internal
=yes
5512 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5514 elif test "$_dvdread" = auto
; then
5516 if test "$_dl" = yes; then
5517 _dvdreadcflags
=$
($_dvdreadconfig --cflags 2> /dev
/null
)
5518 _dvdreadlibs
=$
($_dvdreadconfig --libs 2> /dev
/null
)
5519 if header_check dvdread
/dvd_reader.h
$_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5521 extra_cflags
="$extra_cflags $_dvdreadcflags"
5522 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5523 res_comment
="external"
5528 if test "$_dvdread_internal" = yes; then
5529 def_dvdread
='#define CONFIG_DVDREAD 1'
5530 inputmodules
="dvdread(internal) $inputmodules"
5532 res_comment
="internal"
5533 elif test "$_dvdread" = yes; then
5534 def_dvdread
='#define CONFIG_DVDREAD 1'
5536 extra_ldflags
="$extra_ldflags -ldvdread"
5537 inputmodules
="dvdread(external) $inputmodules"
5538 res_comment
="external"
5540 def_dvdread
='#undef CONFIG_DVDREAD'
5541 noinputmodules
="dvdread $noinputmodules"
5546 echocheck
"internal libdvdcss"
5547 if test "$_libdvdcss_internal" = auto
; then
5548 _libdvdcss_internal
=no
5549 test "$_dvdread_internal" = yes && test -d libdvdcss
&& _libdvdcss_internal
=yes
5550 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
5552 if test "$_libdvdcss_internal" = yes ; then
5553 if linux || netbsd || openbsd || bsdos
; then
5554 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5555 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5556 elif freebsd || dragonfly
; then
5557 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5559 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5560 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
5562 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
5564 cflags_libdvdcss
="-DSYS_BEOS"
5566 cflags_libdvdcss
="-DSYS_OS2"
5568 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
5569 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
5570 inputmodules
="libdvdcss(internal) $inputmodules"
5573 noinputmodules
="libdvdcss(internal) $noinputmodules"
5575 echores
"$_libdvdcss_internal"
5578 echocheck
"cdparanoia"
5579 if test "$_cdparanoia" = auto
; then
5581 #include <cdda_interface.h>
5582 #include <cdda_paranoia.h>
5583 // This need a better test. How ?
5584 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5587 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5588 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5589 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
5592 if test "$_cdparanoia" = yes ; then
5594 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
5595 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
5597 echores
"$_cdparanoia"
5601 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5604 #include <cdio/version.h>
5605 #include <cdio/cdda.h>
5606 #include <cdio/paranoia.h>
5608 void *test = cdda_verbose_set;
5609 printf("%s\n", CDIO_VERSION);
5610 return test == (void *)1;
5614 for _ld_tmp
in "" "-lwinmm" ; do
5615 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5616 cc_check
$_ld_tmp $_ld_lm \
5617 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5619 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5620 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
5621 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
5622 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5623 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5626 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5628 def_libcdio
='#define CONFIG_LIBCDIO 1'
5629 def_havelibcdio
='yes'
5631 if test "$_cdparanoia" = yes ; then
5632 res_comment
="using cdparanoia"
5634 def_libcdio
='#undef CONFIG_LIBCDIO'
5635 def_havelibcdio
='no'
5639 if test "$_cdda" = yes ; then
5640 test $_cddb = auto
&& test $networking = yes && _cddb
=yes
5641 def_cdparanoia
='#define CONFIG_CDDA 1'
5642 inputmodules
="cdda $inputmodules"
5644 def_cdparanoia
='#undef CONFIG_CDDA'
5645 noinputmodules
="cdda $noinputmodules"
5648 if test "$_cddb" = yes ; then
5649 def_cddb
='#define CONFIG_CDDB 1'
5650 inputmodules
="cddb $inputmodules"
5653 def_cddb
='#undef CONFIG_CDDB'
5654 noinputmodules
="cddb $noinputmodules"
5657 echocheck
"bitmap font support"
5658 if test "$_bitmap_font" = yes ; then
5659 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
5661 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
5663 echores
"$_bitmap_font"
5666 echocheck
"freetype >= 2.0.9"
5668 # freetype depends on iconv
5669 if test "$_iconv" = no
; then
5671 res_comment
="iconv support needed"
5674 if test "$_freetype" = auto
; then
5675 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5678 #include <ft2build.h>
5679 #include FT_FREETYPE_H
5680 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5681 #error "Need FreeType 2.0.9 or newer"
5685 FT_Init_FreeType(&library);
5690 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
5695 if test "$_freetype" = yes ; then
5696 def_freetype
='#define CONFIG_FREETYPE 1'
5697 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
5698 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
5700 def_freetype
='#undef CONFIG_FREETYPE'
5702 echores
"$_freetype"
5704 if test "$_freetype" = no
; then
5706 res_comment
="FreeType support needed"
5708 echocheck
"fontconfig"
5709 if test "$_fontconfig" = auto
; then
5713 #include <fontconfig/fontconfig.h>
5714 #if FC_VERSION < 20402
5715 #error At least version 2.4.2 of fontconfig required
5719 if (err == FcFalse) {
5720 printf("Couldn't initialize fontconfig lib\n");
5727 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
5728 _ld_tmp
="-lfontconfig $_ld_tmp"
5729 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
5731 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5732 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
5733 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
5734 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5735 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
5738 if test "$_fontconfig" = yes ; then
5739 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
5741 def_fontconfig
='#undef CONFIG_FONTCONFIG'
5743 echores
"$_fontconfig"
5746 echocheck
"SSA/ASS support"
5747 if test "$_ass" = auto
-o "$_ass" = yes ; then
5748 if $_pkg_config libass
; then
5750 def_ass
='#define CONFIG_ASS 1'
5751 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libass)"
5752 extra_cflags
="$extra_cflags $($_pkg_config --cflags libass)"
5755 def_ass
='#undef CONFIG_ASS'
5758 def_ass
='#undef CONFIG_ASS'
5763 echocheck
"fribidi with charsets"
5766 if test "$_fribidi" = auto
; then
5769 /* workaround for fribidi 0.10.4 and below */
5770 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5771 #include <fribidi/fribidi.h>
5773 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
5781 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5782 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
5783 test "$_fribidi" = no
; then
5784 _inc_tmp
="$($_pkg_config --cflags)"
5785 _ld_tmp
="$($_pkg_config --libs)"
5786 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
5789 if test "$_fribidi" = yes ; then
5790 def_fribidi
='#define CONFIG_FRIBIDI 1'
5791 extra_cflags
="$extra_cflags $_inc_tmp"
5792 extra_ldflags
="$extra_ldflags $_ld_tmp"
5794 def_fribidi
='#undef CONFIG_FRIBIDI'
5800 if test "$_enca" = auto
; then
5802 statement_check enca.h
'enca_get_languages(NULL)' -lenca $_ld_lm && _enca
=yes
5804 if test "$_enca" = yes ; then
5805 def_enca
='#define CONFIG_ENCA 1'
5806 extra_ldflags
="$extra_ldflags -lenca"
5808 def_enca
='#undef CONFIG_ENCA'
5815 statement_check zlib.h
'inflate(0, Z_NO_FLUSH)' -lz && _zlib
=yes
5816 if test "$_zlib" = yes ; then
5817 def_zlib
='#define CONFIG_ZLIB 1'
5818 extra_ldflags
="$extra_ldflags -lz"
5820 def_zlib
='#define CONFIG_ZLIB 0'
5827 def_bzlib
='#define CONFIG_BZLIB 0'
5828 statement_check bzlib.h
'BZ2_bzlibVersion()' -lbz2 && bzlib
=yes
5829 if test "$bzlib" = yes ; then
5830 def_bzlib
='#define CONFIG_BZLIB 1'
5831 extra_ldflags
="$extra_ldflags -lbz2"
5837 if test "$_rtc" = auto
; then
5839 #include <sys/ioctl.h>
5841 #include <linux/rtc.h>
5844 #define RTC_PIE_ON RTCIO_PIE_ON
5846 int main(void) { return RTC_PIE_ON; }
5849 cc_check
&& _rtc
=yes
5852 if test "$_rtc" = yes ; then
5853 def_rtc
='#define HAVE_RTC 1'
5855 def_rtc
='#undef HAVE_RTC'
5860 echocheck
"liblzo2 support"
5861 if test "$_liblzo" = auto
; then
5863 statement_check lzo
/lzo1x.h
'lzo_init()' -llzo2 && _liblzo
=yes
5865 if test "$_liblzo" = yes ; then
5866 def_liblzo
='#define CONFIG_LIBLZO 1'
5867 extra_ldflags
="$extra_ldflags -llzo2"
5868 codecmodules
="liblzo $codecmodules"
5870 def_liblzo
='#undef CONFIG_LIBLZO'
5871 nocodecmodules
="liblzo $nocodecmodules"
5876 echocheck
"mad support"
5877 if test "$_mad" = auto
; then
5879 header_check mad.h
-lmad && _mad
=yes
5881 if test "$_mad" = yes ; then
5882 def_mad
='#define CONFIG_LIBMAD 1'
5883 extra_ldflags
="$extra_ldflags -lmad"
5884 codecmodules
="libmad $codecmodules"
5886 def_mad
='#undef CONFIG_LIBMAD'
5887 nocodecmodules
="libmad $nocodecmodules"
5891 echocheck
"OggVorbis support"
5892 if test "$_tremor_internal" = yes; then
5894 elif test "$_tremor" = auto
; then
5896 statement_check tremor
/ivorbiscodec.h
'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
5898 if test "$_libvorbis" = auto
; then
5900 statement_check vorbis
/codec.h
'vorbis_packet_blocksize(0, 0)' -lvorbis -logg $_ld_lm && _libvorbis
=yes
5902 if test "$_tremor_internal" = yes ; then
5904 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5905 def_tremor
='#define CONFIG_TREMOR 1'
5906 codecmodules
="tremor(internal) $codecmodules"
5907 res_comment
="internal Tremor"
5908 if test "$_tremor_low" = yes ; then
5909 cflags_tremor_low
="-D_LOW_ACCURACY_"
5910 res_comment
="internal low accuracy Tremor"
5912 elif test "$_tremor" = yes ; then
5914 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5915 def_tremor
='#define CONFIG_TREMOR 1'
5916 codecmodules
="tremor(external) $codecmodules"
5917 res_comment
="external Tremor"
5918 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
5919 elif test "$_libvorbis" = yes ; then
5921 def_vorbis
='#define CONFIG_OGGVORBIS 1'
5922 codecmodules
="libvorbis $codecmodules"
5923 res_comment
="libvorbis"
5924 extra_ldflags
="$extra_ldflags -lvorbis -logg"
5927 nocodecmodules
="libvorbis $nocodecmodules"
5931 echocheck
"libspeex (version >= 1.1 required)"
5932 if test "$_speex" = auto
; then
5936 #include <speex/speex.h>
5937 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
5939 cc_check
-lspeex $_ld_lm && _speex
=yes
5941 if test "$_speex" = yes ; then
5942 def_speex
='#define CONFIG_SPEEX 1'
5943 extra_ldflags
="$extra_ldflags -lspeex"
5944 codecmodules
="speex $codecmodules"
5946 def_speex
='#undef CONFIG_SPEEX'
5947 nocodecmodules
="speex $nocodecmodules"
5951 echocheck
"OggTheora support"
5952 if test "$_theora" = auto
; then
5955 #include <theora/theora.h>
5958 /* Theora is in flux, make sure that all interface routines and datatypes
5959 * exist and work the way we expect it, so we don't break MPlayer. */
5968 theora_info_init(&inf);
5969 theora_comment_init(&tc);
5973 /* we don't want to execute this kind of nonsense; just for making sure
5974 * that compilation works... */
5975 memset(&op, 0, sizeof(op));
5976 r = theora_decode_header(&inf, &tc, &op);
5977 r = theora_decode_init(&st, &inf);
5978 t = theora_granule_time(&st, op.granulepos);
5979 r = theora_decode_packetin(&st, &op);
5980 r = theora_decode_YUVout(&st, &yuv);
5986 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
5987 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
5988 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
5989 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
5990 if test _theora
= no
; then
5991 _ld_theora
="-ltheora -logg"
5992 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
5994 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5995 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
5996 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
5997 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
5998 extra_ldflags
="$extra_ldflags $_ld_theora" &&
5999 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6000 if test _theora
= no
; then
6001 _ld_theora
="-ltheora -logg"
6002 cc_check tremor
/bitwise.c
$_ld_theora &&
6003 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6007 if test "$_theora" = yes ; then
6008 def_theora
='#define CONFIG_OGGTHEORA 1'
6009 codecmodules
="libtheora $codecmodules"
6010 # when --enable-theora is forced, we'd better provide a probably sane
6011 # $_ld_theora than nothing
6012 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6014 def_theora
='#undef CONFIG_OGGTHEORA'
6015 nocodecmodules
="libtheora $nocodecmodules"
6019 echocheck
"mp3lib support"
6020 if test "$_mp3lib" = auto
; then
6021 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6023 if test "$_mp3lib" = yes ; then
6024 def_mp3lib
='#define CONFIG_MP3LIB 1'
6025 codecmodules
="mp3lib(internal) $codecmodules"
6027 def_mp3lib
='#undef CONFIG_MP3LIB'
6028 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6032 # Any version of libmpg123 shall be fine.
6033 echocheck
"mpg123 support"
6034 def_mpg123
='#undef CONFIG_MPG123'
6035 if test "$_mpg123" = auto
; then
6037 statement_check mpg123.h
'mpg123_init()' -lmpg123 && _mpg123
=yes && extra_ldflags
="$extra_ldflags -lmpg123"
6039 if test "$_mpg123" = yes ; then
6040 def_mpg123
='#define CONFIG_MPG123 1'
6041 codecmodules
="mpg123 $codecmodules"
6043 nocodecmodules
="mpg123 $nocodecmodules"
6047 echocheck
"liba52 support"
6048 def_liba52
='#undef CONFIG_LIBA52'
6049 if test "$_liba52" = auto
; then
6052 #include <inttypes.h>
6053 #include <a52dec/a52.h>
6054 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6056 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6058 if test "$_liba52" = yes ; then
6059 def_liba52
='#define CONFIG_LIBA52 1'
6060 codecmodules
="liba52 $codecmodules"
6062 nocodecmodules
="liba52 $nocodecmodules"
6066 echocheck
"internal libmpeg2 support"
6067 if test "$_libmpeg2" = auto
; then
6069 if alpha
&& test cc_vendor
=gnu
; then
6071 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6073 res_comment
="broken gcc"
6078 if test "$_libmpeg2" = yes ; then
6079 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6080 codecmodules
="libmpeg2(internal) $codecmodules"
6082 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6083 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6085 echores
"$_libmpeg2"
6087 echocheck
"libdca support"
6088 if test "$_libdca" = auto
; then
6090 for _ld_dca
in -ldca -ldts ; do
6091 statement_check_broken stdint.h dts.h
'dts_init(0)' $_ld_dca $_ld_lm &&
6092 extra_ldflags
="$extra_ldflags $_ld_dca" && _libdca
=yes && break
6095 if test "$_libdca" = yes ; then
6096 def_libdca
='#define CONFIG_LIBDCA 1'
6097 codecmodules
="libdca $codecmodules"
6099 def_libdca
='#undef CONFIG_LIBDCA'
6100 nocodecmodules
="libdca $nocodecmodules"
6104 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6105 if test "$_musepack" = auto
; then
6109 #include <mpcdec/mpcdec.h>
6111 mpc_streaminfo info;
6112 mpc_decoder decoder;
6113 mpc_decoder_set_streaminfo(&decoder, &info);
6114 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6118 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6120 if test "$_musepack" = yes ; then
6121 def_musepack
='#define CONFIG_MUSEPACK 1'
6122 extra_ldflags
="$extra_ldflags -lmpcdec"
6123 codecmodules
="musepack $codecmodules"
6125 def_musepack
='#undef CONFIG_MUSEPACK'
6126 nocodecmodules
="musepack $nocodecmodules"
6128 echores
"$_musepack"
6131 echocheck
"FAAD2 support"
6132 if test "$_faad_internal" = auto
; then
6133 if x86_32
&& test cc_vendor
=gnu
; then
6135 3.1*|
3.2) # ICE/insn with these versions
6137 res_comment
="broken gcc"
6149 if test "$_faad" = auto
; then
6152 #ifndef FAAD_MIN_STREAMSIZE
6153 #error Too old version
6155 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6156 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6158 cc_check
-lfaad $_ld_lm && _faad
=yes
6161 def_faad
='#undef CONFIG_FAAD'
6162 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6163 if test "$_faad_internal" = yes ; then
6164 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6165 res_comment
="internal floating-point"
6166 if test "$_faad_fixed" = yes ; then
6167 # The FIXED_POINT implementation of FAAD2 improves performance
6168 # on some platforms, especially for SBR files.
6169 cflags_faad_fixed
="-DFIXED_POINT"
6170 res_comment
="internal fixed-point"
6172 elif test "$_faad" = yes ; then
6173 extra_ldflags
="$extra_ldflags -lfaad"
6176 if test "$_faad" = yes ; then
6177 def_faad
='#define CONFIG_FAAD 1'
6178 if test "$_faad_internal" = yes ; then
6179 codecmodules
="faad2(internal) $codecmodules"
6181 codecmodules
="faad2 $codecmodules"
6185 nocodecmodules
="faad2 $nocodecmodules"
6190 echocheck
"LADSPA plugin support"
6191 if test "$_ladspa" = auto
; then
6193 statement_check ladspa.h
'LADSPA_Descriptor ld = {0}' && _ladspa
=yes
6195 if test "$_ladspa" = yes; then
6196 def_ladspa
="#define CONFIG_LADSPA 1"
6198 def_ladspa
="#undef CONFIG_LADSPA"
6203 echocheck
"libbs2b audio filter support"
6204 if test "$_libbs2b" = auto
; then
6207 #if BS2B_VERSION_MAJOR < 3
6208 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6218 if $_pkg_config --exists libbs2b
; then
6219 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6220 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6221 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6222 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6224 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6225 -I/usr
/local
/include
/bs2b
; do
6226 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6227 extra_ldflags
="$extra_ldflags -lbs2b"
6228 extra_cflags
="$extra_cflags $_inc_tmp"
6235 def_libbs2b
="#undef CONFIG_LIBBS2B"
6236 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6240 if test -z "$_codecsdir" ; then
6241 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6242 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6243 if test -d "$dir" ; then
6249 # Fall back on default directory.
6250 if test -z "$_codecsdir" ; then
6251 _codecsdir
="$_libdir/codecs"
6252 mingw32 || os2
&& _codecsdir
="codecs"
6256 echocheck
"Win32 codecs"
6257 if test "$_win32dll" = auto
; then
6259 if x86_32
&& ! qnx
; then
6263 if test "$_win32dll" = yes ; then
6264 def_win32dll
='#define CONFIG_WIN32DLL 1'
6266 def_win32_loader
='#define WIN32_LOADER 1'
6267 _win32_emulation
=yes
6269 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6270 res_comment
="using native windows"
6272 codecmodules
="win32 $codecmodules"
6274 def_win32dll
='#undef CONFIG_WIN32DLL'
6275 def_win32_loader
='#undef WIN32_LOADER'
6276 nocodecmodules
="win32 $nocodecmodules"
6278 echores
"$_win32dll"
6281 echocheck
"XAnim codecs"
6282 if test "$_xanim" = auto
; then
6284 res_comment
="dynamic loader support needed"
6285 if test "$_dl" = yes ; then
6289 if test "$_xanim" = yes ; then
6290 def_xanim
='#define CONFIG_XANIM 1'
6291 codecmodules
="xanim $codecmodules"
6293 def_xanim
='#undef CONFIG_XANIM'
6294 nocodecmodules
="xanim $nocodecmodules"
6299 echocheck
"RealPlayer codecs"
6300 if test "$_real" = auto
; then
6302 res_comment
="dynamic loader support needed"
6303 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6304 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
6308 if test "$_real" = yes ; then
6309 def_real
='#define CONFIG_REALCODECS 1'
6310 codecmodules
="real $codecmodules"
6312 def_real
='#undef CONFIG_REALCODECS'
6313 nocodecmodules
="real $nocodecmodules"
6318 echocheck
"QuickTime codecs"
6320 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6321 if test "$_qtx" = auto
; then
6322 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6324 if test "$_qtx" = yes ; then
6325 def_qtx
='#define CONFIG_QTX_CODECS 1'
6326 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6327 codecmodules
="qtx $codecmodules"
6328 darwin || win32 || _qtx_emulation
=yes
6330 def_qtx
='#undef CONFIG_QTX_CODECS'
6331 nocodecmodules
="qtx $nocodecmodules"
6335 echocheck
"Nemesi Streaming Media libraries"
6336 if test "$_nemesi" = auto
&& test "$networking" = yes ; then
6338 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6339 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6340 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6344 if test "$_nemesi" = yes; then
6346 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6347 inputmodules
="nemesi $inputmodules"
6349 _native_rtsp
="$networking"
6351 def_nemesi
='#undef CONFIG_LIBNEMESI'
6352 noinputmodules
="nemesi $noinputmodules"
6356 echocheck
"LIVE555 Streaming Media libraries"
6357 if test "$_live" = auto
&& test "$networking" = yes ; then
6358 cat > $TMPCPP << EOF
6359 #include <liveMedia.hh>
6360 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6361 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6363 int main(void) { return 0; }
6367 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
6368 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6369 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6370 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6371 $_livelibdir/groupsock/libgroupsock.a \
6372 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6373 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6374 $extra_ldflags -lstdc++" \
6375 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6376 -I$_livelibdir/UsageEnvironment/include \
6377 -I$_livelibdir/BasicUsageEnvironment/include \
6378 -I$_livelibdir/groupsock/include" && \
6381 if test "$_live" != yes ; then
6382 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6383 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
6388 if test "$_live" = yes && test "$networking" = yes; then
6389 test $_livelibdir && res_comment
="using $_livelibdir"
6390 def_live
='#define CONFIG_LIVE555 1'
6391 inputmodules
="live555 $inputmodules"
6392 elif test "$_live_dist" = yes && test "$networking" = yes; then
6393 res_comment
="using distribution version"
6395 def_live
='#define CONFIG_LIVE555 1'
6396 extra_ldflags
="$extra_ldflags $ld_tmp"
6397 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6398 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6399 inputmodules
="live555 $inputmodules"
6402 def_live
='#undef CONFIG_LIVE555'
6403 noinputmodules
="live555 $noinputmodules"
6409 all_ffmpeg_libs
="libavutil libavcodec libavformat libswscale libpostproc"
6410 echocheck
"FFmpeg ($all_ffmpeg_libs)"
6411 if test "$ffmpeg" = auto
; then
6413 if $_pkg_config --exists $all_ffmpeg_libs ; then
6414 inc_ffmpeg
=$
($_pkg_config --cflags $all_ffmpeg_libs)
6415 _ld_tmp
=$
($_pkg_config --libs $all_ffmpeg_libs)
6416 extra_ldflags
="$extra_ldflags $_ld_tmp"
6417 extra_cflags
="$extra_cflags $inc_ffmpeg"
6419 elif header_check libavcore
/avutil.h
-lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
6420 extra_ldflags
="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
6426 def_ffmpeg_eval_api
="#undef CONFIG_FFMPEG_EVAL_API"
6427 if test "$ffmpeg" = yes; then
6428 def_ffmpeg
='#define CONFIG_FFMPEG 1'
6429 codecmodules
="ffmpeg $codecmodules"
6430 if $_pkg_config --atleast-version=50.18.0 libavutil
; then
6432 def_ffmpeg_eval_api
="#define CONFIG_FFMPEG_EVAL_API 1"
6435 def_ffmpeg
='#undef CONFIG_FFMPEG'
6436 nocodecmodules
="ffmpeg $nocodecmodules"
6440 def_ffmpeg_internals
="#undef CONFIG_FFMPEG_INTERNALS"
6441 if ! test -z "$_ffmpeg_source" ; then
6442 test "$ffmpeg" = yes && def_ffmpeg_internals
="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals
=yes
6447 echocheck
"libdv-0.9.5+"
6448 if test "$_libdv" = auto
; then
6450 statement_check libdv
/dv.h
'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv
=yes
6452 if test "$_libdv" = yes ; then
6453 def_libdv
='#define CONFIG_LIBDV095 1'
6454 extra_ldflags
="$extra_ldflags -ldv"
6455 codecmodules
="libdv $codecmodules"
6457 def_libdv
='#undef CONFIG_LIBDV095'
6458 nocodecmodules
="libdv $nocodecmodules"
6464 if test "$_xvid" = auto
; then
6466 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6467 statement_check xvid.h
'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
6468 extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
6472 if test "$_xvid" = yes ; then
6473 def_xvid
='#define CONFIG_XVID4 1'
6474 codecmodules
="xvid $codecmodules"
6476 def_xvid
='#undef CONFIG_XVID4'
6477 nocodecmodules
="xvid $nocodecmodules"
6483 if test "$_libnut" = auto
; then
6486 nut_context_tt * nut;
6487 int main(void) { nut_error(0); return 0; }
6490 cc_check
-lnut && _libnut
=yes
6493 if test "$_libnut" = yes ; then
6494 def_libnut
='#define CONFIG_LIBNUT 1'
6495 extra_ldflags
="$extra_ldflags -lnut"
6497 def_libnut
='#undef CONFIG_LIBNUT'
6501 # These VO checks must be done after the FFmpeg one
6502 echocheck
"/dev/mga_vid"
6503 if test "$_mga" = auto
; then
6505 test -c /dev
/mga_vid
&& _mga
=yes
6507 if test "$_mga" = yes ; then
6508 def_mga
='#define CONFIG_MGA 1'
6509 vomodules
="mga $vomodules"
6511 def_mga
='#undef CONFIG_MGA'
6512 novomodules
="mga $novomodules"
6518 if test "$_xmga" = auto
; then
6520 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
6522 if test "$_xmga" = yes ; then
6523 def_xmga
='#define CONFIG_XMGA 1'
6524 vomodules
="xmga $vomodules"
6526 def_xmga
='#undef CONFIG_XMGA'
6527 novomodules
="xmga $novomodules"
6532 if test "$_zr" = auto
; then
6533 #36067's seem to identify themselves as 36057PQC's, so the line
6534 #below should work for 36067's and 36057's.
6535 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
6541 if test "$_zr" = yes ; then
6542 if test "$ffmpeg_internals" = yes ; then
6543 def_zr
='#define CONFIG_ZR 1'
6544 vomodules
="zr zr2 $vomodules"
6546 res_comment
="FFmpeg internal headers are required by zr, sorry"
6547 novomodules
="zr $novomodules"
6548 def_zr
='#undef CONFIG_ZR'
6551 def_zr
='#undef CONFIG_ZR'
6552 novomodules
="zr zr2 $novomodules"
6557 if test "$_glamo" = yes ; then
6558 def_glamo
='#define CONFIG_GLAMO 1'
6559 _vomodules
="glamo $_vomodules"
6561 def_glamo
='#undef CONFIG_GLAMO'
6562 _novomodules
="glamo $_novomodules"
6566 echocheck
"UnRAR executable"
6567 if test "$_unrar_exec" = auto
; then
6569 mingw32
&& _unrar_exec
="no"
6571 if test "$_unrar_exec" = yes ; then
6572 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
6574 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
6576 echores
"$_unrar_exec"
6578 echocheck
"TV interface"
6579 if test "$_tv" = yes ; then
6580 def_tv
='#define CONFIG_TV 1'
6581 inputmodules
="tv $inputmodules"
6583 noinputmodules
="tv $noinputmodules"
6584 def_tv
='#undef CONFIG_TV'
6589 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
6590 echocheck
"*BSD BT848 bt8xx header"
6592 for file in "machine/ioctl_bt848.h" \
6593 "dev/bktr/ioctl_bt848.h" \
6594 "dev/video/bktr/ioctl_bt848.h" \
6595 "dev/ic/bt8xx.h" ; do
6597 #include <sys/types.h>
6598 #include <sys/ioctl.h>
6600 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
6604 _ioctl_bt848_h_name
="$file"
6608 if test "$_ioctl_bt848_h" = yes ; then
6609 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6610 res_comment
="using $_ioctl_bt848_h_name"
6612 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6614 echores
"$_ioctl_bt848_h"
6616 echocheck
"*BSD ioctl_meteor.h"
6618 for file in "machine/ioctl_meteor.h" \
6619 "dev/bktr/ioctl_meteor.h" \
6620 "dev/video/bktr/ioctl_meteor.h" ; do
6622 #include <sys/types.h>
6624 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
6628 _ioctl_meteor_h_name
="$file"
6632 if test "$_ioctl_meteor_h" = yes ; then
6633 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6634 res_comment
="using $_ioctl_meteor_h_name"
6636 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6638 echores
"$_ioctl_meteor_h"
6640 echocheck
"*BSD BrookTree 848 TV interface"
6641 if test "$_tv_bsdbt848" = auto
; then
6643 if test "$_tv" = yes ; then
6645 #include <sys/types.h>
6646 $def_ioctl_meteor_h_name
6647 $def_ioctl_bt848_h_name
6648 #ifdef IOCTL_METEOR_H_NAME
6649 #include IOCTL_METEOR_H_NAME
6651 #ifdef IOCTL_BT848_H_NAME
6652 #include IOCTL_BT848_H_NAME
6655 ioctl(0, METEORSINPUT, 0);
6656 ioctl(0, TVTUNER_GETFREQ, 0);
6660 cc_check
&& _tv_bsdbt848
=yes
6663 if test "$_tv_bsdbt848" = yes ; then
6664 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
6665 inputmodules
="tv-bsdbt848 $inputmodules"
6667 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
6668 noinputmodules
="tv-bsdbt848 $noinputmodules"
6670 echores
"$_tv_bsdbt848"
6671 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
6674 echocheck
"DirectShow TV interface"
6675 if test "$_tv_dshow" = auto
; then
6677 if test "$_tv" = yes && win32
; then
6682 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
6686 cc_check
-lole32 -luuid && _tv_dshow
=yes
6689 if test "$_tv_dshow" = yes ; then
6690 inputmodules
="tv-dshow $inputmodules"
6691 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
6692 extra_ldflags
="$extra_ldflags -lole32 -luuid"
6694 noinputmodules
="tv-dshow $noinputmodules"
6695 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
6697 echores
"$_tv_dshow"
6700 echocheck
"Video 4 Linux TV interface"
6701 if test "$_tv_v4l1" = auto
; then
6703 if test "$_tv" = yes && linux
; then
6704 header_check linux
/videodev.h
&& _tv_v4l1
=yes
6707 if test "$_tv_v4l1" = yes ; then
6710 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6711 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
6712 inputmodules
="tv-v4l $inputmodules"
6714 noinputmodules
="tv-v4l1 $noinputmodules"
6715 def_tv_v4l
='#undef CONFIG_TV_V4L'
6720 echocheck
"Video 4 Linux 2 TV interface"
6721 if test "$_tv_v4l2" = auto
; then
6723 if test "$_tv" = yes && linux
; then
6724 header_check linux
/videodev2.h
&& _tv_v4l2
=yes
6727 if test "$_tv_v4l2" = yes ; then
6730 def_tv_v4l
='#define CONFIG_TV_V4L 1'
6731 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
6732 inputmodules
="tv-v4l2 $inputmodules"
6734 noinputmodules
="tv-v4l2 $noinputmodules"
6735 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
6740 echocheck
"Radio interface"
6741 if test "$_radio" = yes ; then
6742 def_radio
='#define CONFIG_RADIO 1'
6743 inputmodules
="radio $inputmodules"
6744 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6747 if test "$_radio_capture" = yes ; then
6749 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
6751 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6754 noinputmodules
="radio $noinputmodules"
6755 def_radio
='#undef CONFIG_RADIO'
6756 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
6760 echocheck
"Capture for Radio interface"
6761 echores
"$_radio_capture"
6763 echocheck
"Video 4 Linux 2 Radio interface"
6764 if test "$_radio_v4l2" = auto
; then
6766 if test "$_radio" = yes && linux
; then
6767 header_check linux
/videodev2.h
&& _radio_v4l2
=yes
6770 if test "$_radio_v4l2" = yes ; then
6771 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
6773 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
6775 echores
"$_radio_v4l2"
6777 echocheck
"Video 4 Linux Radio interface"
6778 if test "$_radio_v4l" = auto
; then
6780 if test "$_radio" = yes && linux
; then
6781 header_check linux
/videodev.h
&& _radio_v4l
=yes
6784 if test "$_radio_v4l" = yes ; then
6785 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
6787 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
6789 echores
"$_radio_v4l"
6791 if freebsd || netbsd || openbsd || dragonfly || bsdos \
6792 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6793 echocheck
"*BSD BrookTree 848 Radio interface"
6796 #include <sys/types.h>
6797 $def_ioctl_bt848_h_name
6798 #ifdef IOCTL_BT848_H_NAME
6799 #include IOCTL_BT848_H_NAME
6801 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
6803 cc_check
&& _radio_bsdbt848
=yes
6804 echores
"$_radio_bsdbt848"
6805 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
6807 if test "$_radio_bsdbt848" = yes ; then
6808 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
6810 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
6813 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6814 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6815 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6818 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6819 if test "$_pvr" = auto
; then
6821 if test "$_tv_v4l2" = yes && linux
; then
6823 #include <linux/videodev2.h>
6824 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
6826 cc_check
&& _pvr
=yes
6829 if test "$_pvr" = yes ; then
6830 def_pvr
='#define CONFIG_PVR 1'
6831 inputmodules
="pvr $inputmodules"
6833 noinputmodules
="pvr $noinputmodules"
6834 def_pvr
='#undef CONFIG_PVR'
6840 if test "$_ftp" = "auto" ; then
6841 test "$networking" = "yes" && ! beos
&& _ftp
=yes
6843 if test "$_ftp" = yes ; then
6844 def_ftp
='#define CONFIG_FTP 1'
6845 inputmodules
="ftp $inputmodules"
6847 noinputmodules
="ftp $noinputmodules"
6848 def_ftp
='#undef CONFIG_FTP'
6852 echocheck
"vstream client"
6853 if test "$_vstream" = auto
; then
6856 #include <vstream-client.h>
6857 void vstream_error(const char *format, ... ) {}
6858 int main(void) { vstream_start(); return 0; }
6860 cc_check
-lvstream-client && _vstream
=yes
6862 if test "$_vstream" = yes ; then
6863 def_vstream
='#define CONFIG_VSTREAM 1'
6864 inputmodules
="vstream $inputmodules"
6865 extra_ldflags
="$extra_ldflags -lvstream-client"
6867 noinputmodules
="vstream $noinputmodules"
6868 def_vstream
='#undef CONFIG_VSTREAM'
6873 echocheck
"OSD menu"
6874 if test "$_menu" = yes ; then
6875 def_menu
='#define CONFIG_MENU 1'
6876 test $_dvbin = "yes" && _menu_dvbin
=yes
6878 def_menu
='#undef CONFIG_MENU'
6884 echocheck
"Subtitles sorting"
6885 if test "$_sortsub" = yes ; then
6886 def_sortsub
='#define CONFIG_SORTSUB 1'
6888 def_sortsub
='#undef CONFIG_SORTSUB'
6893 echocheck
"XMMS inputplugin support"
6894 if test "$_xmms" = yes ; then
6895 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6896 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
6897 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
6899 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6900 _xmmslibdir
=/usr
/lib
6903 def_xmms
='#define CONFIG_XMMS 1'
6905 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
6907 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6910 def_xmms
='#undef CONFIG_XMMS'
6914 if test "$_charset" != "noconv" ; then
6915 def_charset
="#define MSG_CHARSET \"$_charset\""
6917 def_charset
="#undef MSG_CHARSET"
6921 #############################################################################
6923 echocheck
"automatic gdb attach"
6924 if test "$_crash_debug" = yes ; then
6925 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
6927 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
6930 echores
"$_crash_debug"
6932 echocheck
"compiler support for noexecstack"
6933 if cflag_check
-Wl,-z,noexecstack
; then
6934 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
6940 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
6941 if cflag_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
6942 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
6949 # Dynamic linking flags
6950 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6952 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
6953 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
6954 _ld_dl_dynamic
='-rdynamic'
6957 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6958 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
6959 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
6961 def_debug
='#undef MP_DEBUG'
6962 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
6965 echocheck
"joystick"
6966 def_joystick
='#undef CONFIG_JOYSTICK'
6967 if test "$_joystick" = yes ; then
6968 if linux || freebsd
; then
6969 # TODO add some check
6970 def_joystick
='#define CONFIG_JOYSTICK 1'
6973 res_comment
="unsupported under $system_name"
6976 echores
"$_joystick"
6979 if test "$_lirc" = auto
; then
6981 header_check lirc
/lirc_client.h
-llirc_client && _lirc
=yes
6983 if test "$_lirc" = yes ; then
6984 def_lirc
='#define CONFIG_LIRC 1'
6985 libs_mplayer
="$libs_mplayer -llirc_client"
6987 def_lirc
='#undef CONFIG_LIRC'
6992 if test "$_lircc" = auto
; then
6994 header_check lirc
/lircc.h
-llircc && _lircc
=yes
6996 if test "$_lircc" = yes ; then
6997 def_lircc
='#define CONFIG_LIRCC 1'
6998 libs_mplayer
="$libs_mplayer -llircc"
7000 def_lircc
='#undef CONFIG_LIRCC'
7005 # Detect maemo development platform libraries availability (http://www.maemo.org),
7006 # they are used when run on Nokia 770|8x0
7007 echocheck
"maemo (Nokia 770|8x0)"
7008 if test "$_maemo" = auto
; then
7010 statement_check libosso.h
'osso_initialize('', '', 0, NULL)' $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
7012 if test "$_maemo" = yes ; then
7013 def_maemo
='#define CONFIG_MAEMO 1'
7014 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
7015 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
7017 def_maemo
='#undef CONFIG_MAEMO'
7022 #############################################################################
7024 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
7025 # the OMF format needs to come after the 'extern symbol prefix' check, which
7028 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
7031 #############################################################################
7032 # 64 bit file offsets?
7033 if test "$_largefiles" = yes || freebsd
; then
7034 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7035 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7036 # dvdread support requires this (for off64_t)
7037 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7041 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
7043 # This must be the last test to be performed. Any other tests following it
7044 # could fail due to linker errors. libdvdnavmini is intentionally not linked
7045 # against libdvdread (to permit MPlayer to use its own copy of the library).
7046 # So any compilation using the flags added here but not linking against
7047 # libdvdread can fail.
7048 echocheck
"DVD support (libdvdnav)"
7049 if test "$_dvdread_internal" = yes && test ! -f "libdvdnav/dvdnav.c" ; then
7053 if test "$_dvdnav" = auto
; then
7054 if test "$_dvdread_internal" = yes ; then
7057 res_comment
="internal"
7059 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7062 if test "$_dvdnav" = auto
; then
7064 _dvdnavdir
=$
($_dvdnavconfig --cflags)
7065 _dvdnavlibs
=$
($_dvdnavconfig --libs)
7066 statement_check_broken stdint.h dvdnav
/dvdnav.h
'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7068 if test "$_dvdnav" = yes ; then
7070 def_dvdnav
='#define CONFIG_DVDNAV 1'
7071 if test "$dvdnav_internal" = yes ; then
7072 cflags_libdvdnav
="-Ilibdvdnav"
7073 inputmodules
="dvdnav(internal) $inputmodules"
7075 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
7076 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
7077 inputmodules
="dvdnav $inputmodules"
7080 def_dvdnav
='#undef CONFIG_DVDNAV'
7081 noinputmodules
="dvdnav $noinputmodules"
7085 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
7086 # Read dvdnav comment above.
7089 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7090 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7092 for part
in $list; do
7093 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7094 echo "${nprefix}_$part = yes"
7099 #############################################################################
7100 echo "Creating config.mak"
7101 cat > config.mak
<< EOF
7102 # -------- Generated by configure -----------
7104 # Ensure that locale settings do not interfere with shell commands.
7107 CONFIGURATION = $configuration
7110 DOC_LANGS = $language_doc
7111 DOC_LANG_ALL = $doc_lang_all
7112 MAN_LANGS = $language_man
7113 MAN_LANG_ALL = $man_lang_all
7114 MSG_LANGS = $language_msg
7115 MSG_LANG_ALL = $msg_lang_all
7117 prefix = \$(DESTDIR)$_prefix
7118 BINDIR = \$(DESTDIR)$_bindir
7119 DATADIR = \$(DESTDIR)$_datadir
7120 LIBDIR = \$(DESTDIR)$_libdir
7121 MANDIR = \$(DESTDIR)$_mandir
7122 CONFDIR = \$(DESTDIR)$_confdir
7123 LOCALEDIR = \$(DESTDIR)$_localedir
7131 INSTALLSTRIP = $_install_strip
7134 CFLAGS = $WARNFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
7135 CXXFLAGS = $WARNFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
7136 DEPFLAGS = $DEPFLAGS
7138 CFLAGS_DHAHELPER = $cflags_dhahelper
7139 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
7140 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
7141 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
7142 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
7143 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7144 CFLAGS_STACKREALIGN = $cflags_stackrealign
7145 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7146 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7148 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
7149 EXTRALIBS_MPLAYER = $libs_mplayer
7158 $(mak_enable "$arch_all" "$arch" ARCH)
7159 $(mak_enable "$subarch_all" "$subarch" ARCH)
7160 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
7164 NEED_GETTIMEOFDAY = $_need_gettimeofday
7165 NEED_GLOB = $_need_glob
7166 NEED_MMAP = $_need_mmap
7167 NEED_SETENV = $_need_setenv
7168 NEED_SHMEM = $_need_shmem
7169 NEED_STRSEP = $_need_strsep
7170 NEED_SWAB = $_need_swab
7171 NEED_VSSCANF = $_need_vsscanf
7179 APPLE_IR = $_apple_ir
7180 APPLE_REMOTE = $_apple_remote
7182 AUDIO_INPUT = $_audio_input
7183 BITMAP_FONT = $_bitmap_font
7188 COREAUDIO = $_coreaudio
7189 COREVIDEO = $_corevideo
7192 DIRECT3D = $_direct3d
7193 DIRECTFB = $_directfb
7197 DVDNAV_INTERNAL = $dvdnav_internal
7199 DVDREAD_INTERNAL = $_dvdread_internal
7204 FAAD_INTERNAL = $_faad_internal
7205 FASTMEMCPY = $_fastmemcpy
7208 FREETYPE = $_freetype
7213 GL_WIN32 = $_gl_win32
7216 MATRIXVIEW = $matrixview
7217 HAVE_POSIX_SELECT = $_posix_select
7218 HAVE_SYS_MMAN_H = $_mman
7221 JOYSTICK = $_joystick
7228 LIBBLURAY = $_bluray
7232 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
7236 LIBMENU_DVBIN = $_menu_dvbin
7237 LIBMPEG2 = $_libmpeg2
7238 LIBNEMESI = $_nemesi
7240 LIBSMBCLIENT = $_smb
7241 LIBTHEORA = $_theora
7244 MACOSX_FINDER = $_macosx_finder
7250 MUSEPACK = $_musepack
7252 NATIVE_RTSP = $_native_rtsp
7253 NETWORKING = $networking
7256 PE_EXECUTABLE = $_pe_executable
7259 PRIORITY = $_priority
7263 QTX_CODECS_WIN32 = $_qtx_codecs_win32
7264 QTX_EMULATION = $_qtx_emulation
7267 RADIO_CAPTURE=$_radio_capture
7268 REAL_CODECS = $_real
7272 STREAM_CACHE = $_stream_cache
7273 SGIAUDIO = $_sgiaudio
7274 SUNAUDIO = $_sunaudio
7279 TREMOR_INTERNAL = $_tremor_internal
7281 TV_BSDBT848 = $_tv_bsdbt848
7282 TV_DSHOW = $_tv_dshow
7286 UNRAR_EXEC = $_unrar_exec
7292 VIDIX_PCIDB = $_vidix_pcidb_val
7293 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7294 VIDIX_IVTV=$_vidix_drv_ivtv
7295 VIDIX_MACH64=$_vidix_drv_mach64
7296 VIDIX_MGA=$_vidix_drv_mga
7297 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7298 VIDIX_NVIDIA=$_vidix_drv_nvidia
7299 VIDIX_PM2=$_vidix_drv_pm2
7300 VIDIX_PM3=$_vidix_drv_pm3
7301 VIDIX_RADEON=$_vidix_drv_radeon
7302 VIDIX_RAGE128=$_vidix_drv_rage128
7303 VIDIX_S3=$_vidix_drv_s3
7304 VIDIX_SH_VEU=$_vidix_drv_sh_veu
7305 VIDIX_SIS=$_vidix_drv_sis
7306 VIDIX_UNICHROME=$_vidix_drv_unichrome
7310 WIN32DLL = $_win32dll
7311 WIN32WAVEOUT = $_win32waveout
7312 WIN32_EMULATION = $_win32_emulation
7313 WINVIDIX = $winvidix
7315 XANIM_CODECS = $_xanim
7317 XMMS_PLUGINS = $_xmms
7323 YUV4MPEG = $_yuv4mpeg
7328 FFMPEG_EVAL_API = $ffmpeg_eval_api
7329 FFMPEG_INTERNALS = $ffmpeg_internals
7330 FFMPEG_SOURCE_PATH = $_ffmpeg_source
7334 YASMFLAGS = $YASMFLAGS
7336 CONFIG_BZLIB = $bzlib
7337 CONFIG_VDPAU = $_vdpau
7338 CONFIG_XVMC = $_xvmc
7339 CONFIG_ZLIB = $_zlib
7341 HAVE_PTHREADS = $_pthreads
7343 HAVE_W32THREADS = $_w32threads
7344 HAVE_YASM = $have_yasm
7348 #############################################################################
7350 ff_config_enable
() {
7351 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
7352 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
7354 test -z "$_nprefix" && _nprefix
='CONFIG'
7355 for part
in $list; do
7356 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
7357 echo "#define ${_nprefix}_$part 1"
7359 echo "#define ${_nprefix}_$part 0"
7364 echo "Creating config.h"
7366 /*----------------------------------------------------------------------------
7367 ** This file has been automatically generated by configure any changes in it
7368 ** will be lost when you run configure again.
7369 ** Instead of modifying definitions here, use the --enable/--disable options
7370 ** of the configure script! See ./configure --help for details.
7371 *---------------------------------------------------------------------------*/
7373 #ifndef MPLAYER_CONFIG_H
7374 #define MPLAYER_CONFIG_H
7376 /* Undefine this if you do not want to select mono audio (left or right)
7377 with a stereo MPEG layer 2/3 audio stream. The command line option
7378 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7379 right-only), with 0 being the default.
7381 #define CONFIG_FAKE_MONO 1
7383 /* set up audio OUTBURST. Do not change this! */
7384 #define OUTBURST 512
7386 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7388 #undef FAST_OSD_TABLE
7390 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
7391 #define MPEG12_POSTPROC 1
7392 #define ATTRIBUTE_ALIGNED_MAX 16
7396 #define CONFIGURATION "$configuration"
7398 #define MPLAYER_DATADIR "$_datadir"
7399 #define MPLAYER_CONFDIR "$_confdir"
7400 #define MPLAYER_LIBDIR "$_libdir"
7401 #define MPLAYER_LOCALEDIR "$_localedir"
7405 /* definitions needed by included libraries */
7406 #define HAVE_INTTYPES_H 1
7407 /* libmpeg2 + FFmpeg */
7410 #define HAVE_ERRNO_H 1
7411 /* libdvdcss + libdvdread */
7412 #define HAVE_LIMITS_H 1
7413 /* libdvdcss + libfaad2 */
7414 #define HAVE_UNISTD_H 1
7415 /* libfaad2 + libdvdread */
7416 #define STDC_HEADERS 1
7417 #define HAVE_MEMCPY 1
7419 #define HAVE_STDLIB_H 1
7420 #define HAVE_STRING_H 1
7421 #define HAVE_STRINGS_H 1
7422 #define HAVE_SYS_STAT_H 1
7423 #define HAVE_SYS_TYPES_H 1
7425 #define READ_CACHE_TRACE 0
7427 #define HAVE_DLFCN_H 1
7431 /* system headers */
7433 $def_alsa_asoundlib_h
7437 $def_mman_has_map_failed
7439 $def_sys_asoundlib_h
7440 $def_sys_soundcard_h
7447 /* system functions */
7470 /* system-specific features */
7485 $def_restrict_keyword
7490 /* configurable options */
7494 $def_dynamic_plugins
7497 $def_runtime_cpudetection
7505 #define __CPU__ $iproc
7509 $(ff_config_enable "$arch_all" "$arch" "ARCH")
7510 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
7511 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
7514 /* Blu-ray/DVD/VCD/CD */
7515 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
7516 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
7537 /* codec libraries */
7567 #define BINARY_CODECS_PATH "$_codecsdir"
7568 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7571 /* Audio output drivers */
7587 $def_ossaudio_devdsp
7588 $def_ossaudio_devmixer
7601 $def_ioctl_bt848_h_name
7602 $def_ioctl_meteor_h_name
7691 $def_vidix_drv_cyberblade
7693 $def_vidix_drv_mach64
7695 $def_vidix_drv_mga_crtc2
7696 $def_vidix_drv_nvidia
7698 $def_vidix_drv_radeon
7699 $def_vidix_drv_rage128
7701 $def_vidix_drv_sh_veu
7703 $def_vidix_drv_unichrome
7722 $def_ffmpeg_eval_api
7723 $def_ffmpeg_internals
7749 #define HAVE_INLINE_ASM 1
7751 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
7753 #define HAVE_EBP_AVAILABLE 1
7755 #define HAVE_EBP_AVAILABLE 0
7758 #endif /* MPLAYER_CONFIG_H */
7761 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
7762 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
7764 #############################################################################
7766 .
/version.sh
`$_cc -dumpversion`
7770 Config files successfully generated by ./configure $configuration !
7772 Install prefix: $_prefix
7773 Data directory: $_datadir
7774 Config direct.: $_confdir
7776 Byte order: $_byte_order
7777 Optimizing for: $_optimizing
7780 Messages (in addition to English): $language_msg
7781 Manual pages: $language_man
7782 Documentation: $language_doc
7784 Enabled optional drivers:
7785 Input: $inputmodules
7786 Codecs: $codecmodules
7787 Audio output: $aomodules
7788 Video output: $vomodules
7790 Disabled optional drivers:
7791 Input: $noinputmodules
7792 Codecs: $nocodecmodules
7793 Audio output: $noaomodules
7794 Video output: $novomodules
7796 'config.h' and 'config.mak' contain your configuration options.
7797 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7798 compile *** DO NOT REPORT BUGS if you tweak these files ***
7800 'make' will now compile MPlayer and 'make install' will install it.
7801 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7806 if test "$_mtrr" = yes ; then
7807 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)"
7813 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7814 operating system ($system_name). You may encounter a few files that cannot
7815 be played due to missing open source video/audio codec support.
7822 Check $TMPLOG if you wonder why an autodetection failed (make sure
7823 development headers/packages are installed).
7825 NOTE: The --enable-* parameters unconditionally force options on, completely
7826 skipping autodetection. This behavior is unlike what you may be used to from
7827 autoconf-based configure scripts that can decide to override you. This greater
7828 level of control comes at a price. You may have to provide the correct compiler
7829 and linker flags yourself.
7830 If you used one of these options (except --enable-menu and similar ones that
7831 turn on internal features) and experience a compilation or linking failure,
7832 make sure you have passed the necessary compiler/linker flags to configure.
7834 If you suspect a bug, please read DOCS/HTML/$language_doc/bugreports.html.
7838 if test "$warn_cflags" = yes; then
7841 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
7844 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7846 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7847 To do so, execute 'CFLAGS= ./configure <options>'
7853 rm -rf "$mplayer_tmpdir"