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, here is a simple skeleton:
24 # echocheck "$feature"
25 # if test "$_feature" = auto; then
27 # #include <feature.h>
28 # int main(void) { return 0; }
31 # cc_check && _feature=yes
33 # if test "$_feature" = yes ; then
34 # def_feature='#define CONFIG_FEATURE 1'
36 # def_feature='#undef CONFIG_FEATURE'
40 # Furthermore you need to add the variable _feature to the list of default
41 # settings and set it to one of yes/no/auto. Also add appropriate
42 # --enable-feature/--disable-feature command line options.
43 # The results of the check should be written to config.h and config.mak
44 # at the end of this script. The variable names used for this should be
45 # uniform, i.e. if the option is named 'feature':
47 # _feature : should have a value of yes/no/auto
48 # def_feature : '#define ... 1' or '#undef ...' for conditional compilation
49 # _ld_feature : '-L/path/dir -lfeature' GCC options
51 #############################################################################
53 # Prevent locale nonsense from breaking basic text processing utils
56 # Store the configure line that was used
59 # Prefer these macros to full length text !
60 # These macros only return an error code - NO display is done
65 echo "$_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
67 $_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
75 compile_check
$TMPC $@
79 compile_check
$TMPCPP $@
-lstdc++
84 cat "$TMPS" >> "$TMPLOG"
86 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
88 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
96 "$TMPEXE" >> "$TMPLOG" 2>&1
99 # Display error message, flushes tempfile, exit
104 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
105 echo "Check \"$TMPLOG\" if you do not understand why it failed."
109 # OS test booleans functions
111 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
113 aix
() { issystem
"AIX"; }
114 amigaos
() { issystem
"AmigaOS"; }
115 beos
() { issystem
"BEOS"; }
116 bsdos
() { issystem
"BSD/OS"; }
117 cygwin
() { issystem
"CYGWIN"; }
118 darwin
() { issystem
"Darwin"; }
119 dragonfly
() { issystem
"DragonFly"; }
120 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
121 gnu
() { issystem
"GNU"; }
122 hpux
() { issystem
"HP-UX"; }
123 irix
() { issystem
"IRIX"; }
124 linux
() { issystem
"Linux"; }
125 mingw32
() { issystem
"MINGW32"; }
126 morphos
() { issystem
"MorphOS"; }
127 netbsd
() { issystem
"NetBSD"; }
128 openbsd
() { issystem
"OpenBSD"; }
129 os2
() { issystem
"OS/2"; }
130 qnx
() { issystem
"QNX"; }
131 sunos
() { issystem
"SunOS"; }
132 win32
() { cygwin || mingw32
; }
134 # arch test boolean functions
135 # x86/x86pc is used by QNX
138 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
145 x86_64|amd64
) return 0 ;;
156 ppc|ppc64|powerpc|powerpc64
) return 0;;
175 # Use this before starting a check
177 echo "============ Checking for $@ ============" >> "$TMPLOG"
178 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
181 # Use this to echo the results of a check
183 if test "$_res_comment" ; then
184 _res_comment
="($_res_comment)"
186 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
187 echo "##########################################" >> "$TMPLOG"
189 echo "$@ $_res_comment"
192 #############################################################################
194 # Check how echo works in this /bin/sh
196 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
197 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
200 msg_lang_all
=$
(echo help
/help_mp-??.h help
/help_mp-??_??.h |
sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g")
201 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")
202 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
206 Usage: $0 [OPTIONS]...
209 -h, --help display this help and exit
211 Installation directories:
212 --prefix=DIR prefix directory for installation [/usr/local]
213 --bindir=DIR directory for installing binaries [PREFIX/bin]
214 --datadir=DIR directory for installing machine independent
215 data files (skins, etc) [PREFIX/share/mplayer]
216 --mandir=DIR directory for installing man pages [PREFIX/share/man]
217 --confdir=DIR directory for installing configuration files
219 --libdir=DIR directory for object code libraries [PREFIX/lib]
220 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
223 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
224 --disable-mplayer disable MPlayer compilation [enable]
225 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
226 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
227 --disable-largefiles disable support for files > 2GB [enable]
228 --enable-linux-devfs set default devices to devfs [disable]
229 --enable-termcap use termcap database for key codes [autodetect]
230 --enable-termios use termios database for key codes [autodetect]
231 --disable-iconv disable iconv for encoding conversion [autodetect]
232 --disable-langinfo do not use langinfo [autodetect]
233 --enable-lirc enable LIRC (remote control) support [autodetect]
234 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
235 --enable-joystick enable joystick support [disable]
236 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
237 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
238 --disable-vm disable X video mode extensions [autodetect]
239 --disable-xf86keysym disable support for multimedia keys [autodetect]
240 --enable-radio enable radio interface [disable]
241 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
242 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
243 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
244 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
245 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
246 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
247 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
248 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
249 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
250 --disable-network disable networking [enable]
251 --enable-winsock2_h enable winsock2_h [autodetect]
252 --enable-smb enable Samba (SMB) input [autodetect]
253 --enable-live enable LIVE555 Streaming Media [autodetect]
254 --enable-nemesi enable Nemesi Streaming Media [autodetect]
255 --disable-vcd disable VCD support [autodetect]
256 --disable-dvdnav disable libdvdnav [autodetect]
257 --disable-dvdread disable libdvdread [autodetect]
258 --disable-dvdread-internal disable internal libdvdread [autodetect]
259 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
260 --disable-cdparanoia disable cdparanoia [autodetect]
261 --disable-cddb disable cddb [autodetect]
262 --disable-bitmap-font disable bitmap font support [enable]
263 --disable-freetype disable FreeType 2 font rendering [autodetect]
264 --disable-fontconfig disable fontconfig font lookup [autodetect]
265 --disable-unrarexec disable using of UnRAR executable [enabled]
266 --enable-menu enable OSD menu (not DVD menu) [disabled]
267 --disable-sortsub disable subtitle sorting [enabled]
268 --enable-fribidi enable the FriBiDi libs [autodetect]
269 --disable-enca disable ENCA charset oracle library [autodetect]
270 --disable-maemo disable maemo specific features [autodetect]
271 --enable-macosx-finder enable Mac OS X Finder invocation parameter
273 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
274 --disable-inet6 disable IPv6 support [autodetect]
275 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
276 --disable-ftp disable FTP support [enabled]
277 --disable-vstream disable TiVo vstream client support [autodetect]
278 --disable-pthreads disable Posix threads support [autodetect]
279 --disable-w32threads disable Win32 threads support [autodetect]
280 --disable-ass-internal disable internal SSA/ASS subtitle support [autodetect]
281 --disable-ass disable SSA/ASS subtitle support [autodetect]
282 --enable-rpath enable runtime linker path for extra libs [disabled]
285 --enable-gif enable GIF support [autodetect]
286 --enable-png enable PNG input/output support [autodetect]
287 --enable-mng enable MNG input support [autodetect]
288 --enable-jpeg enable JPEG input/output support [autodetect]
289 --enable-libcdio enable libcdio support [autodetect]
290 --enable-liblzo enable liblzo support [autodetect]
291 --disable-win32dll disable Win32 DLL support [autodetect]
292 --disable-qtx disable QuickTime codecs support [enabled]
293 --disable-xanim disable XAnim codecs support [enabled]
294 --disable-real disable RealPlayer codecs support [enabled]
295 --disable-xvid disable Xvid [autodetect]
296 --disable-xvid-lavc disable Xvid in libavcodec [autodetect]
297 --disable-x264 disable x264 [autodetect]
298 --disable-x264-lavc disable x264 in libavcodec [autodetect]
299 --disable-libdirac-lavc disable Dirac in libavcodec [autodetect]
300 --disable-libschroedinger-lavc disable Dirac in libavcodec (Schroedinger
301 decoder) [autodetect]
302 --disable-libnut disable libnut [autodetect]
303 --disable-libavutil_a disable static libavutil [autodetect]
304 --disable-libavcodec_a disable static libavcodec [autodetect]
305 --disable-libavformat_a disable static libavformat [autodetect]
306 --disable-libpostproc_a disable static libpostproc [autodetect]
307 --disable-libswscale_a disable static libswscale [autodetect]
308 --disable-libavutil_so disable shared libavutil [autodetect]
309 --disable-libavcodec_so disable shared libavcodec [autodetect]
310 --disable-libavformat_so disable shared libavformat [autodetect]
311 --disable-libpostproc_so disable shared libpostproc [autodetect]
312 --disable-libswscale_so disable shared libswscale [autodetect]
313 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
314 in libavcodec [enabled]
315 --disable-tremor-internal disable internal Tremor [enabled]
316 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
317 --enable-tremor enable external Tremor [autodetect]
318 --disable-libvorbis disable libvorbis support [autodetect]
319 --disable-speex disable Speex support [autodetect]
320 --enable-theora enable OggTheora libraries [autodetect]
321 --enable-faad enable external FAAD2 (AAC) [autodetect]
322 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
323 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
324 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
325 --disable-faac-lavc disable support for FAAC in libavcodec [autodetect]
326 --disable-ladspa disable LADSPA plugin support [autodetect]
327 --disable-libbs2b disable libbs2b audio filter support [autodetect]
328 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
329 --disable-mad disable libmad (MPEG audio) support [autodetect]
330 --disable-mp3lame disable LAME MP3 encoding support [autodetect]
331 --disable-mp3lame-lavc disable LAME in libavcodec [autodetect]
332 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
333 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
334 --enable-xmms enable XMMS input plugin support [disabled]
335 --enable-libdca enable libdca support [autodetect]
336 --disable-mp3lib disable builtin mp3lib [autodetect]
337 --disable-liba52 disable liba52 [autodetect]
338 --enable-liba52-internal enable builtin liba52 [disabled]
339 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
340 --disable-musepack disable musepack support [autodetect]
341 --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect]
342 --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect]
343 --disable-libopenjpeg disable OpenJPEG (JPEG2000) input/output support [autodetect]
344 --disable-decoder=DECODER disable specified FFmpeg decoder
345 --enable-decoder=DECODER enable specified FFmpeg decoder
346 --disable-encoder=ENCODER disable specified FFmpeg encoder
347 --enable-encoder=ENCODER enable specified FFmpeg encoder
348 --disable-parser=PARSER disable specified FFmpeg parser
349 --enable-parser=PARSER enable specified FFmpeg parser
350 --disable-protocol=PROTO disable specified FFmpeg protocol
351 --enable-protocol=PROTO enable specified FFmpeg protocol
352 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
353 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
354 --disable-muxer=MUXER disable specified FFmpeg muxer
355 --enable-muxer=MUXER enable specified FFmpeg muxer
358 --disable-vidix disable VIDIX [for x86 *nix]
359 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
360 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
361 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
362 --disable-vidix-pcidb disable VIDIX PCI device name database
363 --enable-dhahelper enable VIDIX dhahelper support
364 --enable-svgalib_helper enable VIDIX svgalib_helper support
365 --enable-gl enable OpenGL video output [autodetect]
366 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
367 --enable-dga2 enable DGA 2 support [autodetect]
368 --enable-dga1 enable DGA 1 support [autodetect]
369 --enable-vesa enable VESA video output [autodetect]
370 --enable-svga enable SVGAlib video output [autodetect]
371 --enable-sdl enable SDL video output [autodetect]
372 --enable-kva enable KVA video output [autodetect]
373 --enable-aa enable AAlib video output [autodetect]
374 --enable-caca enable CACA video output [autodetect]
375 --enable-ggi enable GGI video output [autodetect]
376 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
377 --enable-direct3d enable Direct3D video output [autodetect]
378 --enable-directx enable DirectX video output [autodetect]
379 --enable-dxr2 enable DXR2 video output [autodetect]
380 --enable-dxr3 enable DXR3/H+ video output [autodetect]
381 --enable-ivtv enable IVTV TV-Out video output [autodetect]
382 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
383 --enable-dvb enable DVB video output [autodetect]
384 --enable-mga enable mga_vid video output [autodetect]
385 --enable-xmga enable mga_vid X11 video output [autodetect]
386 --enable-xv enable Xv video output [autodetect]
387 --enable-xvmc enable XvMC acceleration [disable]
388 --enable-vdpau enable VDPAU acceleration [autodetect]
389 --enable-vm enable XF86VidMode support [autodetect]
390 --enable-xinerama enable Xinerama support [autodetect]
391 --enable-x11 enable X11 video output [autodetect]
392 --enable-xshape enable XShape support [autodetect]
393 --disable-xss disable screensaver support via xss [autodetect]
394 --enable-fbdev enable FBDev video output [autodetect]
395 --enable-mlib enable mediaLib video output (Solaris) [disable]
396 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
397 --enable-tdfxfb enable tdfxfb video output [disable]
398 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
399 --enable-wii enable Nintendo Wii/GameCube video output [disable]
400 --enable-directfb enable DirectFB video output [autodetect]
401 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
402 --enable-bl enable Blinkenlights video output [disable]
403 --enable-tdfxvid enable tdfx_vid video output [disable]
404 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
405 --disable-tga disable Targa video output [enable]
406 --disable-pnm disable PNM video output [enable]
407 --disable-md5sum disable md5sum video output [enable]
408 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
409 --disable-corevideo disable CoreVideo video output [autodetect]
410 --disable-quartz disable Quartz video output [autodetect]
413 --disable-alsa disable ALSA audio output [autodetect]
414 --disable-ossaudio disable OSS audio output [autodetect]
415 --disable-arts disable aRts audio output [autodetect]
416 --disable-esd disable esd audio output [autodetect]
417 --disable-pulse disable Pulseaudio audio output [autodetect]
418 --disable-jack disable JACK audio output [autodetect]
419 --disable-openal disable OpenAL audio output [autodetect]
420 --disable-nas disable NAS audio output [autodetect]
421 --disable-sgiaudio disable SGI audio output [autodetect]
422 --disable-sunaudio disable Sun audio output [autodetect]
423 --disable-kai disable KAI audio output [autodetect]
424 --disable-dart disable DART audio output [autodetect]
425 --disable-win32waveout disable Windows waveout audio output [autodetect]
426 --disable-coreaudio disable CoreAudio audio output [autodetect]
427 --disable-select disable using select() on the audio device [enable]
430 --charset=charset convert the console messages to this character set
431 --language-doc=lang language to use for the documentation [en]
432 --language-man=lang language to use for the man pages [en]
433 --language-msg=lang language to use for the messages and the GUI [en]
434 --language=lang default language to use [en]
435 Specific options override --language. You can pass a list of languages separated
436 by whitespace or commas instead of a single language. Nonexisting translations
437 will be dropped from each list. All documentation and man page translations
438 available in the list will be installed, for the messages the first available
439 translation will be used. The value "all" will activate all translations. The
440 LINGUAS environment variable is honored. In all cases the fallback is English.
441 Available values are: all $msg_lang_all
443 Miscellaneous options:
444 --enable-runtime-cpudetection enable runtime CPU detection [disable]
445 --enable-cross-compile enable cross-compilation [autodetect]
446 --cc=COMPILER C compiler to build MPlayer [gcc]
447 --host-cc=COMPILER C compiler for tools needed while building [gcc]
448 --as=ASSEMBLER assembler to build MPlayer [as]
449 --nm=NM nm tool to build MPlayer [nm]
450 --yasm=YASM Yasm assembler to build MPlayer [yasm]
451 --ar=AR librarian to build MPlayer [ar]
452 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
453 --windres=WINDRES windres to build MPlayer [windres]
454 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
455 --enable-static build a statically linked binary
456 --with-install=PATH path to a custom install program
459 --enable-mmx enable MMX [autodetect]
460 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
461 --enable-3dnow enable 3DNow! [autodetect]
462 --enable-3dnowext enable extended 3DNow! [autodetect]
463 --enable-sse enable SSE [autodetect]
464 --enable-sse2 enable SSE2 [autodetect]
465 --enable-ssse3 enable SSSE3 [autodetect]
466 --enable-shm enable shm [autodetect]
467 --enable-altivec enable AltiVec (PowerPC) [autodetect]
468 --enable-armv5te enable DSP extensions (ARM) [autodetect]
469 --enable-armv6 enable ARMv6 (ARM) [autodetect]
470 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
471 --enable-armvfp enable ARM VFP (ARM) [autodetect]
472 --enable-neon enable NEON (ARM) [autodetect]
473 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
474 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
475 --enable-hardcoded-tables put tables in binary instead of calculating them at startup [disable]
476 --enable-big-endian force byte order to big-endian [autodetect]
477 --enable-debug[=1-3] compile-in debugging information [disable]
478 --enable-profile compile-in profiling information [disable]
479 --disable-sighandler disable sighandler for crashes [enable]
480 --enable-crash-debug enable automatic gdb attach on crash [disable]
481 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
483 Use these options if autodetection fails:
484 --extra-cflags=FLAGS extra CFLAGS
485 --extra-ldflags=FLAGS extra LDFLAGS
486 --extra-libs=FLAGS extra linker flags
487 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
488 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
489 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
491 --with-freetype-config=PATH path to freetype-config
492 --with-fribidi-config=PATH path to fribidi-config
493 --with-glib-config=PATH path to glib*-config
494 --with-gtk-config=PATH path to gtk*-config
495 --with-sdl-config=PATH path to sdl*-config
496 --with-dvdnav-config=PATH path to dvdnav-config
497 --with-dvdread-config=PATH path to dvdread-config
499 This configure script is NOT autoconf-based, even though its output is similar.
500 It will try to autodetect all configuration options. If you --enable an option
501 it will be forcefully turned on, skipping autodetection. This can break
502 compilation, so you need to know what you are doing.
507 # GOTCHA: the variables below defines the default behavior for autodetection
508 # and have - unless stated otherwise - at least 2 states : yes no
509 # If autodetection is available then the third state is: auto
533 test "$CC" && _cc
="$CC"
537 _runtime_cpudetection
=no
543 _libopencore_amrnb
=auto
544 _libopencore_amrwb
=auto
546 _libavdecoders_all
=$
(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
547 _libavdecoders
=$
(echo $_libavdecoders_all |
sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s
/MPEG4AAC_DECODER
//)
548 _libavencoders_all
=$
(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
549 _libavencoders
=$
(echo $_libavencoders_all |
sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s
/AAC_ENCODER
//)
550 _libavparsers_all
=$
(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
551 _libavparsers
=$_libavparsers_all
552 _libavbsfs_all
=$
(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
553 _libavbsfs
=$_libavbsfs_all
554 _libavhwaccels_all
=$
(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
555 # Disable all hardware accelerators for now.
557 _libavdemuxers_all
=$
(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
558 _libavdemuxers
=$
(echo $_libavdemuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s
/REDIR_DEMUXER
// -e s
/AVISYNTH_DEMUXER
//)
559 _libavmuxers_all
=$
(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
560 _libavmuxers
=$
(echo $_libavmuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s
/RTP_MUXER
// -e s
/RTSP_MUXER
//)
561 _libavprotocols_all
=$
(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
562 _libavprotocols
=$_libavprotocols_all
570 _libavcodec_mpegaudio_hp
=yes
579 _xvmc
=no
#auto when complete
647 _dvdnavconfig
=dvdnav-config
648 _dvdreadconfig
=dvdread-config
650 _dvdread_internal
=auto
651 _libdvdcss_internal
=auto
662 _mlib
=no
#broken, thus disabled
684 _struct_addrinfo
=auto
686 _struct_sockaddr_storage
=auto
698 _libschroedinger_lavc
=auto
743 _freetypeconfig
='freetype-config'
745 _fribidiconfig
='fribidi-config'
760 def_dos_paths
="#define HAVE_DOS_PATHS 0"
761 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
762 def_priority
="#undef CONFIG_PRIORITY"
763 def_pthread_cache
="#undef PTHREAD_CACHE"
771 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
774 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
777 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
780 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
783 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
786 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
789 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
793 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
796 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
802 --with-freetype-config=*)
803 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
805 --with-fribidi-config=*)
806 _fribidiconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
809 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
811 --with-glib-config=*)
812 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
814 --with-dvdnav-config=*)
815 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
817 --with-dvdread-config=*)
818 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
822 extra_cflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
825 extra_ldflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
828 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
830 --extra-libs-mplayer=*)
831 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
833 --extra-libs-mencoder=*)
834 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
838 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
841 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
844 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
847 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
850 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
853 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
856 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
859 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
862 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
865 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
868 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
871 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
874 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
877 language
=$
(echo $ac_option | cut
-d '=' -f 2)
896 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
901 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
902 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
903 --enable-cross-compile) _cross_compile
=yes ;;
904 --disable-cross-compile) _cross_compile
=no
;;
905 --enable-mencoder) _mencoder
=yes ;;
906 --disable-mencoder) _mencoder
=no
;;
907 --enable-mplayer) _mplayer
=yes ;;
908 --disable-mplayer) _mplayer
=no
;;
909 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
910 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
911 --enable-x11) _x11
=yes ;;
912 --disable-x11) _x11
=no
;;
913 --enable-xshape) _xshape
=yes ;;
914 --disable-xshape) _xshape
=no
;;
915 --enable-xss) _xss
=yes ;;
916 --disable-xss) _xss
=no
;;
917 --enable-xv) _xv
=yes ;;
918 --disable-xv) _xv
=no
;;
919 --enable-xvmc) _xvmc
=yes ;;
920 --disable-xvmc) _xvmc
=no
;;
921 --enable-vdpau) _vdpau
=yes ;;
922 --disable-vdpau) _vdpau
=no
;;
923 --enable-sdl) _sdl
=yes ;;
924 --disable-sdl) _sdl
=no
;;
925 --enable-kva) _kva
=yes ;;
926 --disable-kva) _kva
=no
;;
927 --enable-direct3d) _direct3d
=yes ;;
928 --disable-direct3d) _direct3d
=no
;;
929 --enable-directx) _directx
=yes ;;
930 --disable-directx) _directx
=no
;;
931 --enable-win32waveout) _win32waveout
=yes ;;
932 --disable-win32waveout) _win32waveout
=no
;;
933 --enable-nas) _nas
=yes ;;
934 --disable-nas) _nas
=no
;;
935 --enable-png) _png
=yes ;;
936 --disable-png) _png
=no
;;
937 --enable-mng) _mng
=yes ;;
938 --disable-mng) _mng
=no
;;
939 --enable-jpeg) _jpeg
=yes ;;
940 --disable-jpeg) _jpeg
=no
;;
941 --enable-libopenjpeg) libopenjpeg
=yes ;;
942 --disable-libopenjpeg)libopenjpeg
=no
;;
943 --enable-pnm) _pnm
=yes ;;
944 --disable-pnm) _pnm
=no
;;
945 --enable-md5sum) _md5sum
=yes ;;
946 --disable-md5sum) _md5sum
=no
;;
947 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
948 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
949 --enable-gif) _gif
=yes ;;
950 --disable-gif) _gif
=no
;;
951 --enable-gl) _gl
=yes ;;
952 --disable-gl) _gl
=no
;;
953 --enable-matrixview) matrixview
=yes ;;
954 --disable-matrixview) matrixview
=no
;;
955 --enable-ggi) _ggi
=yes ;;
956 --disable-ggi) _ggi
=no
;;
957 --enable-ggiwmh) _ggiwmh
=yes ;;
958 --disable-ggiwmh) _ggiwmh
=no
;;
959 --enable-aa) _aa
=yes ;;
960 --disable-aa) _aa
=no
;;
961 --enable-caca) _caca
=yes ;;
962 --disable-caca) _caca
=no
;;
963 --enable-svga) _svga
=yes ;;
964 --disable-svga) _svga
=no
;;
965 --enable-vesa) _vesa
=yes ;;
966 --disable-vesa) _vesa
=no
;;
967 --enable-fbdev) _fbdev
=yes ;;
968 --disable-fbdev) _fbdev
=no
;;
969 --enable-dvb) _dvb
=yes ;;
970 --disable-dvb) _dvb
=no
;;
971 --enable-dxr2) _dxr2
=yes ;;
972 --disable-dxr2) _dxr2
=no
;;
973 --enable-dxr3) _dxr3
=yes ;;
974 --disable-dxr3) _dxr3
=no
;;
975 --enable-ivtv) _ivtv
=yes ;;
976 --disable-ivtv) _ivtv
=no
;;
977 --enable-v4l2) _v4l2
=yes ;;
978 --disable-v4l2) _v4l2
=no
;;
979 --enable-iconv) _iconv
=yes ;;
980 --disable-iconv) _iconv
=no
;;
981 --enable-langinfo) _langinfo
=yes ;;
982 --disable-langinfo) _langinfo
=no
;;
983 --enable-rtc) _rtc
=yes ;;
984 --disable-rtc) _rtc
=no
;;
985 --enable-libdv) _libdv
=yes ;;
986 --disable-libdv) _libdv
=no
;;
987 --enable-ossaudio) _ossaudio
=yes ;;
988 --disable-ossaudio) _ossaudio
=no
;;
989 --enable-arts) _arts
=yes ;;
990 --disable-arts) _arts
=no
;;
991 --enable-esd) _esd
=yes ;;
992 --disable-esd) _esd
=no
;;
993 --enable-pulse) _pulse
=yes ;;
994 --disable-pulse) _pulse
=no
;;
995 --enable-jack) _jack
=yes ;;
996 --disable-jack) _jack
=no
;;
997 --enable-openal) _openal
=yes ;;
998 --disable-openal) _openal
=no
;;
999 --enable-kai) _kai
=yes ;;
1000 --disable-kai) _kai
=no
;;
1001 --enable-dart) _dart
=yes ;;
1002 --disable-dart) _dart
=no
;;
1003 --enable-mad) _mad
=yes ;;
1004 --disable-mad) _mad
=no
;;
1005 --enable-mp3lame) _mp3lame
=yes ;;
1006 --disable-mp3lame) _mp3lame
=no
;;
1007 --enable-mp3lame-lavc) _mp3lame_lavc
=yes ;;
1008 --disable-mp3lame-lavc) _mp3lame_lavc
=no
;;
1009 --enable-toolame) _toolame
=yes ;;
1010 --disable-toolame) _toolame
=no
;;
1011 --enable-twolame) _twolame
=yes ;;
1012 --disable-twolame) _twolame
=no
;;
1013 --enable-libcdio) _libcdio
=yes ;;
1014 --disable-libcdio) _libcdio
=no
;;
1015 --enable-liblzo) _liblzo
=yes ;;
1016 --disable-liblzo) _liblzo
=no
;;
1017 --enable-libvorbis) _libvorbis
=yes ;;
1018 --disable-libvorbis) _libvorbis
=no
;;
1019 --enable-speex) _speex
=yes ;;
1020 --disable-speex) _speex
=no
;;
1021 --enable-tremor) _tremor
=yes ;;
1022 --disable-tremor) _tremor
=no
;;
1023 --enable-tremor-internal) _tremor_internal
=yes ;;
1024 --disable-tremor-internal) _tremor_internal
=no
;;
1025 --enable-tremor-low) _tremor_low
=yes ;;
1026 --disable-tremor-low) _tremor_low
=no
;;
1027 --enable-theora) _theora
=yes ;;
1028 --disable-theora) _theora
=no
;;
1029 --enable-mp3lib) _mp3lib
=yes ;;
1030 --disable-mp3lib) _mp3lib
=no
;;
1031 --enable-liba52-internal) _liba52_internal
=yes ;;
1032 --disable-liba52-internal) _liba52_internal
=no
;;
1033 --enable-liba52) _liba52
=yes ;;
1034 --disable-liba52) _liba52
=no
;;
1035 --enable-libdca) _libdca
=yes ;;
1036 --disable-libdca) _libdca
=no
;;
1037 --enable-libmpeg2) _libmpeg2
=yes ;;
1038 --disable-libmpeg2) _libmpeg2
=no
;;
1039 --enable-musepack) _musepack
=yes ;;
1040 --disable-musepack) _musepack
=no
;;
1041 --enable-faad) _faad
=yes ;;
1042 --disable-faad) _faad
=no
;;
1043 --enable-faad-internal) _faad_internal
=yes ;;
1044 --disable-faad-internal) _faad_internal
=no
;;
1045 --enable-faad-fixed) _faad_fixed
=yes ;;
1046 --disable-faad-fixed) _faad_fixed
=no
;;
1047 --enable-faac) _faac
=yes ;;
1048 --disable-faac) _faac
=no
;;
1049 --enable-faac-lavc) _faac_lavc
=yes ;;
1050 --disable-faac-lavc) _faac_lavc
=no
;;
1051 --enable-ladspa) _ladspa
=yes ;;
1052 --disable-ladspa) _ladspa
=no
;;
1053 --enable-libbs2b) _libbs2b
=yes ;;
1054 --disable-libbs2b) _libbs2b
=no
;;
1055 --enable-xmms) _xmms
=yes ;;
1056 --disable-xmms) _xmms
=no
;;
1057 --enable-vcd) _vcd
=yes ;;
1058 --disable-vcd) _vcd
=no
;;
1059 --enable-dvdread) _dvdread
=yes ;;
1060 --disable-dvdread) _dvdread
=no
;;
1061 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1062 --disable-dvdread-internal) _dvdread_internal
=no
;;
1063 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1064 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1065 --enable-dvdnav) _dvdnav
=yes ;;
1066 --disable-dvdnav) _dvdnav
=no
;;
1067 --enable-xanim) _xanim
=yes ;;
1068 --disable-xanim) _xanim
=no
;;
1069 --enable-real) _real
=yes ;;
1070 --disable-real) _real
=no
;;
1071 --enable-live) _live
=yes ;;
1072 --disable-live) _live
=no
;;
1073 --enable-nemesi) _nemesi
=yes ;;
1074 --disable-nemesi) _nemesi
=no
;;
1075 --enable-xinerama) _xinerama
=yes ;;
1076 --disable-xinerama) _xinerama
=no
;;
1077 --enable-mga) _mga
=yes ;;
1078 --disable-mga) _mga
=no
;;
1079 --enable-xmga) _xmga
=yes ;;
1080 --disable-xmga) _xmga
=no
;;
1081 --enable-vm) _vm
=yes ;;
1082 --disable-vm) _vm
=no
;;
1083 --enable-xf86keysym) _xf86keysym
=yes ;;
1084 --disable-xf86keysym) _xf86keysym
=no
;;
1085 --enable-mlib) _mlib
=yes ;;
1086 --disable-mlib) _mlib
=no
;;
1087 --enable-sunaudio) _sunaudio
=yes ;;
1088 --disable-sunaudio) _sunaudio
=no
;;
1089 --enable-sgiaudio) _sgiaudio
=yes ;;
1090 --disable-sgiaudio) _sgiaudio
=no
;;
1091 --enable-alsa) _alsa
=yes ;;
1092 --disable-alsa) _alsa
=no
;;
1093 --enable-tv) _tv
=yes ;;
1094 --disable-tv) _tv
=no
;;
1095 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1096 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1097 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1098 --disable-tv-v4l1) _tv_v4l1
=no
;;
1099 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1100 --disable-tv-v4l2) _tv_v4l2
=no
;;
1101 --enable-tv-dshow) _tv_dshow
=yes ;;
1102 --disable-tv-dshow) _tv_dshow
=no
;;
1103 --enable-radio) _radio
=yes ;;
1104 --enable-radio-capture) _radio_capture
=yes ;;
1105 --disable-radio-capture) _radio_capture
=no
;;
1106 --disable-radio) _radio
=no
;;
1107 --enable-radio-v4l) _radio_v4l
=yes ;;
1108 --disable-radio-v4l) _radio_v4l
=no
;;
1109 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1110 --disable-radio-v4l2) _radio_v4l2
=no
;;
1111 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1112 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1113 --enable-pvr) _pvr
=yes ;;
1114 --disable-pvr) _pvr
=no
;;
1115 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1116 --disable-fastmemcpy) _fastmemcpy
=no
;;
1117 --enable-hardcoded-tables) hardcoded_tables
=yes ;;
1118 --disable-hardcoded-tables) hardcoded_tables
=no
;;
1119 --enable-network) _network
=yes ;;
1120 --disable-network) _network
=no
;;
1121 --enable-winsock2_h) _winsock2_h
=yes ;;
1122 --disable-winsock2_h) _winsock2_h
=no
;;
1123 --enable-smb) _smb
=yes ;;
1124 --disable-smb) _smb
=no
;;
1125 --enable-vidix) _vidix
=yes ;;
1126 --disable-vidix) _vidix
=no
;;
1127 --with-vidix-drivers=*)
1128 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1130 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1131 --enable-dhahelper) _dhahelper
=yes ;;
1132 --disable-dhahelper) _dhahelper
=no
;;
1133 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1134 --disable-svgalib_helper) _svgalib_helper
=no
;;
1135 --enable-joystick) _joystick
=yes ;;
1136 --disable-joystick) _joystick
=no
;;
1137 --enable-xvid) _xvid
=yes ;;
1138 --disable-xvid) _xvid
=no
;;
1139 --enable-xvid-lavc) _xvid_lavc
=yes ;;
1140 --disable-xvid-lavc) _xvid_lavc
=no
;;
1141 --enable-x264) _x264
=yes ;;
1142 --disable-x264) _x264
=no
;;
1143 --enable-x264-lavc) _x264_lavc
=yes ;;
1144 --disable-x264-lavc) _x264_lavc
=no
;;
1145 --enable-libdirac-lavc) _libdirac_lavc
=yes ;;
1146 --disable-libdirac-lavc) _libdirac_lavc
=no
;;
1147 --enable-libschroedinger-lavc) _libschroedinger_lavc
=yes ;;
1148 --disable-libschroedinger-lavc) _libschroedinger_lavc
=no
;;
1149 --enable-libnut) _libnut
=yes ;;
1150 --disable-libnut) _libnut
=no
;;
1151 --enable-libavutil_a) _libavutil_a
=yes ;;
1152 --disable-libavutil_a) _libavutil_a
=no
;;
1153 --enable-libavutil_so) _libavutil_so
=yes ;;
1154 --disable-libavutil_so) _libavutil_so
=no
;;
1155 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1156 --disable-libavcodec_a) _libavcodec_a
=no
;;
1157 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1158 --disable-libavcodec_so) _libavcodec_so
=no
;;
1159 --enable-libopencore_amrnb) _libopencore_amrnb
=yes ;;
1160 --disable-libopencore_amrnb) _libopencore_amrnb
=no
;;
1161 --enable-libopencore_amrwb) _libopencore_amrwb
=yes ;;
1162 --disable-libopencore_amrwb) _libopencore_amrwb
=no
;;
1163 --enable-decoder=*) _libavdecoders
="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1164 --disable-decoder=*) _libavdecoders
=$
(echo $_libavdecoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1165 --enable-encoder=*) _libavencoders
="$_libavencoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1166 --disable-encoder=*) _libavencoders
=$
(echo $_libavencoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1167 --enable-parser=*) _libavparsers
="$_libavparsers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1168 --disable-parser=*) _libavparsers
=$
(echo $_libavparsers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1169 --enable-protocol=*) _libavprotocols
="$_libavprotocols $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1170 --disable-protocol=*) _libavprotocols
=$
(echo $_libavprotocols |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1171 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1172 --disable-demuxer=*) _libavdemuxers
=$
(echo $_libavdemuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1173 --enable-muxer=*) _libavmuxers
="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1174 --disable-muxer=*) _libavmuxers
=$
(echo $_libavmuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1175 --enable-libavformat_a) _libavformat_a
=yes ;;
1176 --disable-libavformat_a) _libavformat_a
=no
;;
1177 --enable-libavformat_so) _libavformat_so
=yes ;;
1178 --disable-libavformat_so) _libavformat_so
=no
;;
1179 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1180 --disable-libpostproc_a) _libpostproc_a
=no
;;
1181 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1182 --disable-libpostproc_so) _libpostproc_so
=no
;;
1183 --enable-libswscale_a) _libswscale_a
=yes ;;
1184 --disable-libswscale_a) _libswscale_a
=no
;;
1185 --enable-libswscale_so) _libswscale_so
=yes ;;
1186 --disable-libswscale_so) _libswscale_so
=no
;;
1187 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1188 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1190 --enable-lirc) _lirc
=yes ;;
1191 --disable-lirc) _lirc
=no
;;
1192 --enable-lircc) _lircc
=yes ;;
1193 --disable-lircc) _lircc
=no
;;
1194 --enable-apple-remote) _apple_remote
=yes ;;
1195 --disable-apple-remote) _apple_remote
=no
;;
1196 --enable-apple-ir) _apple_ir
=yes ;;
1197 --disable-apple-ir) _apple_ir
=no
;;
1198 --enable-gui) _gui
=yes ;;
1199 --disable-gui) _gui
=no
;;
1200 --enable-gtk1) _gtk1
=yes ;;
1201 --disable-gtk1) _gtk1
=no
;;
1202 --enable-termcap) _termcap
=yes ;;
1203 --disable-termcap) _termcap
=no
;;
1204 --enable-termios) _termios
=yes ;;
1205 --disable-termios) _termios
=no
;;
1206 --enable-3dfx) _3dfx
=yes ;;
1207 --disable-3dfx) _3dfx
=no
;;
1208 --enable-s3fb) _s3fb
=yes ;;
1209 --disable-s3fb) _s3fb
=no
;;
1210 --enable-wii) _wii
=yes ;;
1211 --disable-wii) _wii
=no
;;
1212 --enable-tdfxfb) _tdfxfb
=yes ;;
1213 --disable-tdfxfb) _tdfxfb
=no
;;
1214 --disable-tdfxvid) _tdfxvid
=no
;;
1215 --enable-tdfxvid) _tdfxvid
=yes ;;
1216 --disable-xvr100) _xvr100
=no
;;
1217 --enable-xvr100) _xvr100
=yes ;;
1218 --disable-tga) _tga
=no
;;
1219 --enable-tga) _tga
=yes ;;
1220 --enable-directfb) _directfb
=yes ;;
1221 --disable-directfb) _directfb
=no
;;
1222 --enable-zr) _zr
=yes ;;
1223 --disable-zr) _zr
=no
;;
1224 --enable-bl) _bl
=yes ;;
1225 --disable-bl) _bl
=no
;;
1226 --enable-mtrr) _mtrr
=yes ;;
1227 --disable-mtrr) _mtrr
=no
;;
1228 --enable-largefiles) _largefiles
=yes ;;
1229 --disable-largefiles) _largefiles
=no
;;
1230 --enable-shm) _shm
=yes ;;
1231 --disable-shm) _shm
=no
;;
1232 --enable-select) _select
=yes ;;
1233 --disable-select) _select
=no
;;
1234 --enable-linux-devfs) _linux_devfs
=yes ;;
1235 --disable-linux-devfs) _linux_devfs
=no
;;
1236 --enable-cdparanoia) _cdparanoia
=yes ;;
1237 --disable-cdparanoia) _cdparanoia
=no
;;
1238 --enable-cddb) _cddb
=yes ;;
1239 --disable-cddb) _cddb
=no
;;
1240 --enable-big-endian) _big_endian
=yes ;;
1241 --disable-big-endian) _big_endian
=no
;;
1242 --enable-bitmap-font) _bitmap_font
=yes ;;
1243 --disable-bitmap-font) _bitmap_font
=no
;;
1244 --enable-freetype) _freetype
=yes ;;
1245 --disable-freetype) _freetype
=no
;;
1246 --enable-fontconfig) _fontconfig
=yes ;;
1247 --disable-fontconfig) _fontconfig
=no
;;
1248 --enable-unrarexec) _unrar_exec
=yes ;;
1249 --disable-unrarexec) _unrar_exec
=no
;;
1250 --enable-ftp) _ftp
=yes ;;
1251 --disable-ftp) _ftp
=no
;;
1252 --enable-vstream) _vstream
=yes ;;
1253 --disable-vstream) _vstream
=no
;;
1254 --enable-pthreads) _pthreads
=yes ;;
1255 --disable-pthreads) _pthreads
=no
;;
1256 --enable-w32threads) _w32threads
=yes ;;
1257 --disable-w32threads) _w32threads
=no
;;
1258 --enable-ass) _ass
=yes ;;
1259 --disable-ass) _ass
=no
;;
1260 --enable-ass-internal) ass_internal
=yes ;;
1261 --disable-ass-internal) ass_internal
=no
;;
1262 --enable-rpath) _rpath
=yes ;;
1263 --disable-rpath) _rpath
=no
;;
1265 --enable-fribidi) _fribidi
=yes ;;
1266 --disable-fribidi) _fribidi
=no
;;
1268 --enable-enca) _enca
=yes ;;
1269 --disable-enca) _enca
=no
;;
1271 --enable-inet6) _inet6
=yes ;;
1272 --disable-inet6) _inet6
=no
;;
1274 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1275 --disable-gethostbyname2) _gethostbyname2
=no
;;
1277 --enable-dga1) _dga1
=yes ;;
1278 --disable-dga1) _dga1
=no
;;
1279 --enable-dga2) _dga2
=yes ;;
1280 --disable-dga2) _dga2
=no
;;
1282 --enable-menu) _menu
=yes ;;
1283 --disable-menu) _menu
=no
;;
1285 --enable-qtx) _qtx
=yes ;;
1286 --disable-qtx) _qtx
=no
;;
1288 --enable-coreaudio) _coreaudio
=yes ;;
1289 --disable-coreaudio) _coreaudio
=no
;;
1290 --enable-corevideo) _corevideo
=yes ;;
1291 --disable-corevideo) _corevideo
=no
;;
1292 --enable-quartz) _quartz
=yes ;;
1293 --disable-quartz) _quartz
=no
;;
1294 --enable-macosx-finder) _macosx_finder
=yes ;;
1295 --disable-macosx-finder) _macosx_finder
=no
;;
1296 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1297 --disable-macosx-bundle) _macosx_bundle
=no
;;
1299 --enable-maemo) _maemo
=yes ;;
1300 --disable-maemo) _maemo
=no
;;
1302 --enable-sortsub) _sortsub
=yes ;;
1303 --disable-sortsub) _sortsub
=no
;;
1305 --enable-crash-debug) _crash_debug
=yes ;;
1306 --disable-crash-debug) _crash_debug
=no
;;
1307 --enable-sighandler) _sighandler
=yes ;;
1308 --disable-sighandler) _sighandler
=no
;;
1309 --enable-win32dll) _win32dll
=yes ;;
1310 --disable-win32dll) _win32dll
=no
;;
1312 --enable-sse) _sse
=yes ;;
1313 --disable-sse) _sse
=no
;;
1314 --enable-sse2) _sse2
=yes ;;
1315 --disable-sse2) _sse2
=no
;;
1316 --enable-ssse3) _ssse3
=yes ;;
1317 --disable-ssse3) _ssse3
=no
;;
1318 --enable-mmxext) _mmxext
=yes ;;
1319 --disable-mmxext) _mmxext
=no
;;
1320 --enable-3dnow) _3dnow
=yes ;;
1321 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1322 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1323 --disable-3dnowext) _3dnowext
=no
;;
1324 --enable-cmov) _cmov
=yes ;;
1325 --disable-cmov) _cmov
=no
;;
1326 --enable-fast-cmov) _fast_cmov
=yes ;;
1327 --disable-fast-cmov) _fast_cmov
=no
;;
1328 --enable-fast-clz) _fast_clz
=yes ;;
1329 --disable-fast-clz) _fast_clz
=no
;;
1330 --enable-altivec) _altivec
=yes ;;
1331 --disable-altivec) _altivec
=no
;;
1332 --enable-armv5te) _armv5te
=yes ;;
1333 --disable-armv5te) _armv5te
=no
;;
1334 --enable-armv6) _armv6
=yes ;;
1335 --disable-armv6) _armv6
=no
;;
1336 --enable-armv6t2) _armv6t2
=yes ;;
1337 --disable-armv6t2) _armv6t2
=no
;;
1338 --enable-armvfp) _armvfp
=yes ;;
1339 --disable-armvfp) _armvfp
=no
;;
1340 --enable-neon) neon
=yes ;;
1341 --disable-neon) neon
=no
;;
1342 --enable-iwmmxt) _iwmmxt
=yes ;;
1343 --disable-iwmmxt) _iwmmxt
=no
;;
1344 --enable-mmx) _mmx
=yes ;;
1345 --disable-mmx) # 3Dnow! and MMX2 require MMX
1346 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1349 echo "Unknown parameter: $ac_option"
1356 # Atmos: moved this here, to be correct, if --prefix is specified
1357 test -z "$_bindir" && _bindir
="$_prefix/bin"
1358 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1359 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1360 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1361 test -z "$_libdir" && _libdir
="$_prefix/lib"
1363 # Determine our OS name and CPU architecture
1364 if test -z "$_target" ; then
1366 system_name
=$
(uname
-s 2>&1)
1367 case "$system_name" in
1368 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1382 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1392 system_name
="$system_name-UNKNOWN"
1397 # host's CPU/instruction set
1398 host_arch
=$
(uname
-p 2>&1)
1399 case "$host_arch" in
1400 i386|sparc|ppc|alpha|arm|mips|vax
)
1402 powerpc
) # Darwin returns 'powerpc'
1405 *) # uname -p on Linux returns 'unknown' for the processor type,
1406 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1408 # Maybe uname -m (machine hardware name) returns something we
1411 # x86/x86pc is used by QNX
1412 case "$(uname -m 2>&1)" in
1413 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
;;
1414 ia64
) host_arch
=ia64
;;
1415 macppc|ppc
) host_arch
=ppc
;;
1416 ppc64
) host_arch
=ppc64
;;
1417 alpha
) host_arch
=alpha
;;
1418 sparc
) host_arch
=sparc
;;
1419 sparc64
) host_arch
=sparc64
;;
1420 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1421 arm
*|zaurus|cats
) host_arch
=arm
;;
1422 sh3|sh4|sh4a
) host_arch
=sh
;;
1423 s390
) host_arch
=s390
;;
1424 s390x
) host_arch
=s390x
;;
1425 *mips
*) host_arch
=mips
;;
1426 vax
) host_arch
=vax
;;
1427 xtensa
*) host_arch
=xtensa
;;
1428 *) host_arch
=UNKNOWN
;;
1432 else # if test -z "$_target"
1433 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1434 case "$(echo $system_name | tr A-Z a-z)" in
1435 linux
) system_name
=Linux
;;
1436 freebsd
) system_name
=FreeBSD
;;
1437 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1438 netbsd
) system_name
=NetBSD
;;
1439 bsd
/os
) system_name
=BSD
/OS
;;
1440 openbsd
) system_name
=OpenBSD
;;
1441 dragonfly
) system_name
=DragonFly
;;
1442 sunos
) system_name
=SunOS
;;
1443 qnx
) system_name
=QNX
;;
1444 morphos
) system_name
=MorphOS
;;
1445 amigaos
) system_name
=AmigaOS
;;
1446 mingw32
*) system_name
=MINGW32
;;
1448 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1449 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1450 if test $
(echo $host_arch) != "x86_64" ; then
1451 host_arch
=$
(echo $host_arch |
tr '_' '-')
1455 extra_cflags
="-I. $extra_cflags"
1456 _timer
=timer-linux.c
1459 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1460 extra_cflags
="$extra_cflags -I/usr/local/include"
1463 if netbsd || dragonfly
; then
1464 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1465 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1469 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1470 _timer
=timer-darwin.c
1474 extra_ldflags
="$extra_ldflags -lC"
1485 extra_cflags
="$extra_cflags -fno-common"
1486 # -lwinmm is always needed for osdep/timer-win2.c
1487 extra_ldflags
="$extra_ldflags -lwinmm"
1491 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1492 def_priority
="#define CONFIG_PRIORITY 1"
1504 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1505 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1509 extra_ldflags
="$extra_ldflags -lph"
1517 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1518 def_priority
="#define CONFIG_PRIORITY 1"
1521 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1526 TMPLOG
="configure.log"
1527 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1528 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1529 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1530 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1531 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1534 echo configuration
: $_configuration > "$TMPLOG"
1538 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1539 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1543 # Checking CC version...
1544 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1545 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1546 echocheck
"$_cc version"
1548 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1549 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1550 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1551 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1552 # TODO verify older icc/ecc compatibility
1555 cc_version
="v. ?.??, bad"
1559 cc_version
="$cc_version, ok"
1562 cc_version
="$cc_version, bad"
1566 echores
"$cc_version"
1568 for _cc
in "$_cc" gcc cc
; do
1569 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1570 if test "$cc_name_tmp" = "gcc"; then
1571 cc_name
=$cc_name_tmp
1572 echocheck
"$_cc version"
1574 cc_version
=$
($_cc -dumpversion 2>&1)
1580 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1581 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1582 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1585 echores
"$cc_version"
1588 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1589 if test "$cc_name_tmp" = "Sun C"; then
1590 echocheck
"$_cc version"
1592 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1593 _res_comment
="experimental support only"
1594 echores
"Sun C $cc_version"
1599 test "$cc_fail" = yes && die
"unsupported compiler version"
1601 if test -z "$_target" && x86
; then
1604 int test[(int)sizeof(char *)-7];
1608 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1611 echo "Detected operating system: $system_name"
1612 echo "Detected host architecture: $host_arch"
1615 test "$_host_cc" || _host_cc
=$_cc
1618 echocheck
"cross compilation"
1619 if test $_cross_compile = auto
; then
1621 int main(void) { return 0; }
1624 cc_check
&& "$TMPEXE" && _cross_compile
=no
1626 echores
$_cross_compile
1628 if test $_cross_compile = yes; then
1636 # now that we know what compiler should be used for compilation, try to find
1637 # out which assembler is used by the $_cc compiler
1638 if test "$_as" = auto
; then
1639 _as
=$
($_cc -print-prog-name=as
)
1640 test -z "$_as" && _as
=as
1643 if test "$_nm" = auto
; then
1644 _nm
=$
($_cc -print-prog-name=nm
)
1645 test -z "$_nm" && _nm
=nm
1648 # XXX: this should be ok..
1651 if test "$_runtime_cpudetection" = no
; then
1653 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1654 # FIXME: Remove the cygwin check once AMD CPUs are supported
1655 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1656 # Linux with /proc mounted, extract CPU information from it
1657 _cpuinfo
="cat /proc/cpuinfo"
1658 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1659 # FreeBSD with Linux emulation /proc mounted,
1660 # extract CPU information from it
1661 # Don't use it on x86 though, it never reports 3Dnow
1662 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1663 elif darwin
&& ! x86
; then
1664 # use hostinfo on Darwin
1667 # use 'lsattr' on AIX
1668 _cpuinfo
="lsattr -E -l proc0 -a type"
1670 # all other OSes try to extract CPU information from a small helper
1671 # program cpuinfo instead
1672 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1673 _cpuinfo
="./cpuinfo$_exesuf"
1676 if [ "$cc_vendor" = "gnu" ] && [ "$_cc_major" = 2 ] ; then
1677 test $_sse = auto
&& _sse
=no
1678 test $_win32dll = auto
&& _win32dll
=no
1683 # gather more CPU information
1684 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1685 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1686 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1687 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1688 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1690 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1692 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1693 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1695 for ext
in $pparam ; do
1696 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1699 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1700 test $_sse = kernel_check
&& _mmxext
=kernel_check
1702 echocheck
"CPU vendor"
1703 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1705 echocheck
"CPU type"
1709 fi # test "$_runtime_cpudetection" = no
1711 if x86
&& test "$_runtime_cpudetection" = no
; then
1713 if test "$1" = kernel_check
; then
1714 echocheck
"kernel support of $2"
1718 void catch() { exit(1); }
1720 signal(SIGILL, catch);
1721 __asm__ volatile ("$3":::"memory"); return 0;
1725 if cc_check
&& tmp_run
; then
1728 _optimizing
="$_optimizing $2"
1733 echo "It seems that your kernel does not correctly support $2."
1734 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1741 extcheck
$_mmx "mmx" "emms"
1742 extcheck
$_mmxext "mmxext" "sfence"
1743 extcheck
$_3dnow "3dnow" "femms"
1744 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1745 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1746 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1747 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1748 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1750 echocheck
"mtrr support"
1751 if test "$_mtrr" = kernel_check
; then
1753 _optimizing
="$_optimizing mtrr"
1757 if test "$_gcc3_ext" != ""; then
1758 # if we had to disable sse/sse2 because the active kernel does not
1759 # support this instruction set extension, we also have to tell
1760 # gcc3 to not generate sse/sse2 instructions for normal C code
1762 int main(void) { return 0; }
1764 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1770 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1771 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1772 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 0'
1773 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 0'
1774 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1775 subarch_all
='X86_32 X86_64 PPC64'
1776 case "$host_arch" in
1777 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1780 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1781 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
1782 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
1787 if test "$_runtime_cpudetection" = no
; then
1791 3) proc
=i386 iproc
=386 ;;
1792 4) proc
=i486 iproc
=486 ;;
1793 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1794 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1795 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1797 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1799 elif test "$pmodel" -ge 8; then
1801 elif test "$pmodel" -ge 6; then
1808 # It's a bit difficult to determine the correct type of Family 6
1809 # AMD CPUs just from their signature. Instead, we check directly
1810 # whether it supports SSE.
1811 if test "$_sse" = yes; then
1812 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1815 # Again, gcc treats athlon and athlon-tbird similarly.
1820 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1821 # caught and remedied in the optimization tests below.
1825 *) proc
=amdfam10 iproc
=686
1826 test $_fast_clz = "auto" && _fast_clz
=yes
1832 3) proc
=i386 iproc
=386 ;;
1833 4) proc
=i486 iproc
=486 ;;
1835 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1836 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1842 if test "$pmodel" -ge 15; then
1844 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1846 elif test "$pmodel" -ge 7; then
1848 elif test "$pmodel" -ge 3; then
1853 test $_fast_clz = "auto" && _fast_clz
=yes
1856 # A nocona in 32-bit mode has no more capabilities than a prescott.
1857 if test "$pmodel" -ge 3; then
1861 test $_fast_clz = "auto" && _fast_clz
=yes
1863 test $_fast_cmov = "auto" && _fast_cmov
=no
1865 *) proc
=prescott iproc
=686 ;;
1871 if test "$pmodel" -ge 8; then
1873 elif test "$pmodel" -ge 4; then
1880 if test "$pmodel" -ge 9; then
1887 *) proc
=i686 iproc
=i686
;;
1892 3) proc
=i386 iproc
=386 ;;
1893 4) proc
=i486 iproc
=486 ;;
1894 *) proc
=i586 iproc
=586 ;;
1898 proc
=i586 iproc
=586 ;;
1900 test $_fast_clz = "auto" && _fast_clz
=no
1901 fi # test "$_runtime_cpudetection" = no
1904 # check that gcc supports our CPU, if not, fall back to earlier ones
1905 # LGB: check -mcpu and -march swithing step by step with enabling
1906 # to fall back till 386.
1908 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1910 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1916 echocheck
"GCC & CPU optimization abilities"
1918 int main(void) { return 0; }
1920 if test "$_runtime_cpudetection" = no
; then
1921 if test $cc_vendor != "intel" ; then
1922 cc_check
-march=native
&& proc
=native
1924 if test "$proc" = "k8"; then
1925 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1927 if test "$proc" = "athlon-xp"; then
1928 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1930 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1931 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1933 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1934 if ! cc_check
-march=$proc $cpuopt=$proc; then
1935 if cc_check
-march=i586
$cpuopt=i686
; then
1942 if test "$proc" = "prescott" ; then
1943 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1945 if test "$proc" = "core2" ; then
1946 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1948 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
1949 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1951 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1952 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1954 if test "$proc" = "i586"; then
1955 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1957 if test "$proc" = "i486" ; then
1958 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1960 if test "$proc" = "i386" ; then
1961 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1963 if test "$proc" = "error" ; then
1964 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1968 elif test "$proc" = "i586-i686"; then
1969 _march
="-march=i586"
1970 _mcpu
="$cpuopt=i686"
1973 _march
="-march=$proc"
1974 _mcpu
="$cpuopt=$proc"
1977 else # if test "$_runtime_cpudetection" = no
1978 _mcpu
="$cpuopt=generic"
1979 # at least i486 required, for bswap instruction
1980 _march
="-march=i486"
1981 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1982 cc_check
$_mcpu || _mcpu
=""
1983 cc_check
$_march $_mcpu || _march
=""
1986 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1987 ## autodetected mcpu/march parameters
1988 if test "$_target" ; then
1989 # TODO: it may be a good idea to check GCC and fall back in all cases
1990 if test "$host_arch" = "i586-i686"; then
1991 _march
="-march=i586"
1992 _mcpu
="$cpuopt=i686"
1994 _march
="-march=$host_arch"
1995 _mcpu
="$cpuopt=$host_arch"
2003 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
2004 i686|athlon
*|pentium
*) iproc
=686 ;;
2009 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
2014 test $_fast_clz = "auto" && _fast_clz
=yes
2021 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2028 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2029 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2032 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
2033 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
2038 if test "$_runtime_cpudetection" = no
; then
2043 test $_fast_clz = "auto" && _fast_clz
=no
2052 # 64-bit prescotts exist, but as far as GCC is concerned they
2053 # have the same capabilities as a nocona.
2055 test $_fast_cmov = "auto" && _fast_cmov
=no
2056 test $_fast_clz = "auto" && _fast_clz
=no
2063 fi # test "$_runtime_cpudetection" = no
2065 echocheck
"GCC & CPU optimization abilities"
2067 int main(void) { return 0; }
2069 # This is a stripped-down version of the i386 fallback.
2070 if test "$_runtime_cpudetection" = no
; then
2071 if test $cc_vendor != "intel" ; then
2072 cc_check
-march=native
&& proc
=native
2074 # --- AMD processors ---
2075 if test "$proc" = "k8"; then
2076 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2078 # This will fail if gcc version < 3.3, which is ok because earlier
2079 # versions don't really support 64-bit on amd64.
2080 # Is this a valid assumption? -Corey
2081 if test "$proc" = "athlon-xp"; then
2082 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2084 # --- Intel processors ---
2085 if test "$proc" = "core2"; then
2086 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2088 if test "$proc" = "x86-64"; then
2089 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2091 if test "$proc" = "nocona"; then
2092 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2094 if test "$proc" = "pentium4"; then
2095 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2098 _march
="-march=$proc"
2099 _mcpu
="$cpuopt=$proc"
2100 if test "$proc" = "error" ; then
2101 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2105 else # if test "$_runtime_cpudetection" = no
2106 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2107 _march
="-march=x86-64"
2108 _mcpu
="$cpuopt=generic"
2109 cc_check
$_mcpu || _mcpu
="x86-64"
2110 cc_check
$_mcpu || _mcpu
=""
2111 cc_check
$_march $_mcpu || _march
=""
2115 test $_fast_cmov = "auto" && _fast_cmov
=yes
2116 test $_fast_clz = "auto" && _fast_clz
=yes
2124 if test "$host_arch" = "sparc64" ; then
2127 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2129 echocheck
"CPU type"
2131 case "$(echo $karch)" in
2136 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2155 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2157 test $_fast_clz = "auto" && _fast_clz
=yes
2165 ppc|ppc64|powerpc|powerpc64
)
2167 def_dcbzl
='#define HAVE_DCBZL 0'
2168 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2169 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
2170 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
2173 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2175 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2177 echocheck
"CPU type"
2178 case $system_name in
2180 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2181 if test -n "$($_cpuinfo | grep altivec)"; then
2182 test $_altivec = auto
&& _altivec
=yes
2186 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2187 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2188 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2189 test $_altivec = auto
&& _altivec
=yes
2193 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2195 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2198 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2199 test $_altivec = auto
&& _altivec
=yes
2205 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2208 if test "$_altivec" = yes; then
2209 echores
"$proc altivec"
2215 echocheck
"GCC & CPU optimization abilities"
2217 if test -n "$proc"; then
2219 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2220 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2221 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2222 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2223 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2224 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2225 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2226 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2227 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2230 # gcc 3.1(.1) and up supports 7400 and 7450
2231 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2233 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2234 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2238 # gcc 3.2 and up supports 970
2239 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2241 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2242 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2246 # gcc 3.3 and up supports POWER4
2247 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2249 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2253 # gcc 3.4 and up supports 440*
2254 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2256 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2257 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2261 # gcc 4.0 and up supports POWER5
2262 if test "$_cc_major" -ge "4"; then
2264 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2270 if test -n "$_mcpu"; then
2271 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2272 echores
"$_optimizing"
2277 test $_fast_clz = "auto" && _fast_clz
=yes
2285 echocheck
"CPU type"
2288 unsigned long ver, mask;
2289 __asm__ ("implver %0" : "=r" (ver));
2290 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2291 printf("%ld-%x\n", ver, ~mask);
2295 $_cc -o "$TMPEXE" "$TMPC"
2296 case $
("$TMPEXE") in
2298 0-0) proc
="ev4"; _mvi
="0";;
2299 1-0) proc
="ev5"; _mvi
="0";;
2300 1-1) proc
="ev56"; _mvi
="0";;
2301 1-101) proc
="pca56"; _mvi
="1";;
2302 2-303) proc
="ev6"; _mvi
="1";;
2303 2-307) proc
="ev67"; _mvi
="1";;
2304 2-1307) proc
="ev68"; _mvi
="1";;
2308 echocheck
"GCC & CPU optimization abilities"
2309 if test "$proc" = "ev68" ; then
2310 cc_check
-mcpu=$proc || proc
=ev67
2312 if test "$proc" = "ev67" ; then
2313 cc_check
-mcpu=$proc || proc
=ev6
2318 test $_fast_clz = "auto" && _fast_clz
=yes
2328 echocheck
"CPU type"
2329 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2330 case "$(echo $proc)" in
2331 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2332 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2333 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2334 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2335 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2336 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2338 # gcc < 3.x does not support -mtune.
2339 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2345 test $_fast_clz = "auto" && _fast_clz
=yes
2379 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2380 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2381 die
"unsupported architecture $host_arch"
2383 esac # case "$host_arch" in
2385 if test "$_runtime_cpudetection" = yes ; then
2387 test "$_cmov" != no
&& _cmov
=yes
2389 test "$_mmx" != no
&& _mmx
=yes
2390 test "$_3dnow" != no
&& _3dnow
=yes
2391 test "$_3dnowext" != no
&& _3dnowext
=yes
2392 test "$_mmxext" != no
&& _mmxext
=yes
2393 test "$_sse" != no
&& _sse
=yes
2394 test "$_sse2" != no
&& _sse2
=yes
2395 test "$_ssse3" != no
&& _ssse3
=yes
2396 test "$_mtrr" != no
&& _mtrr
=yes
2405 echocheck
"byte order"
2406 if test "$_big_endian" = auto
; then
2408 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2409 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2410 int main(void) { return (int)ascii_name; }
2413 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2419 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2422 if test "$_big_endian" = yes ; then
2423 _byte_order
='big-endian'
2424 def_words_endian
='#define WORDS_BIGENDIAN 1'
2425 def_bigendian
='#define HAVE_BIGENDIAN 1'
2426 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 1'
2428 _byte_order
='little-endian'
2429 def_words_endian
='#undef WORDS_BIGENDIAN'
2430 def_bigendian
='#define HAVE_BIGENDIAN 0'
2431 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 0'
2433 echores
"$_byte_order"
2436 echocheck
"extern symbol prefix"
2440 cc_check
-c || die
"Symbol mangling check failed."
2441 sym
=$
($_nm -P -g $TMPEXE)
2442 extern_prefix
=${sym%%ff_extern*}
2443 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2444 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2445 echores
$extern_prefix
2448 echocheck
"assembler support of -pipe option"
2450 int main(void) { return 0; }
2452 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2453 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2456 echocheck
"compiler support of named assembler arguments"
2458 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2459 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2460 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2462 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2464 echores
$_named_asm_args
2467 if darwin
&& test "$cc_vendor" = "gnu" ; then
2468 echocheck
"GCC support of -mstackrealign"
2469 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2470 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2471 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2472 # wrong code with this flag, but this can be worked around by adding
2473 # -fno-unit-at-a-time as described in the blog post at
2474 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2476 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2477 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2479 cc_check
-O4 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2480 test -z "$cflags_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2481 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2482 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2483 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2486 # Checking for CFLAGS
2488 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2489 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2491 elif test -z "$CFLAGS" ; then
2492 if test "$cc_vendor" = "intel" ; then
2493 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2494 elif test "$cc_vendor" = "sun" ; then
2495 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2496 elif test "$cc_vendor" != "gnu" ; then
2497 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2499 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2500 extra_ldflags
="$extra_ldflags -ffast-math"
2507 int main(void) { return 0; }
2509 if test "$cc_vendor" = "gnu" ; then
2510 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2511 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
2512 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2513 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2514 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2515 cc_check
-Wmissing-prototypes && CFLAGS
="-Wmissing-prototypes $CFLAGS"
2516 cc_check
-Wstrict-prototypes && CFLAGS
="-Wstrict-prototypes $CFLAGS"
2518 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2521 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2522 cc_check
-MD -MP && CFLAGS
="-MD -MP $CFLAGS"
2525 if test -n "$LDFLAGS" ; then
2526 extra_ldflags
="$extra_ldflags $LDFLAGS"
2528 elif test "$cc_vendor" = "intel" ; then
2529 extra_ldflags
="$extra_ldflags -i-static"
2531 if test -n "$CPPFLAGS" ; then
2532 extra_cflags
="$extra_cflags $CPPFLAGS"
2539 # Checking assembler (_as) compatibility...
2540 # Added workaround for older as that reads from stdin by default - atmos
2541 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2542 echocheck
"assembler ($_as $as_version)"
2544 _pref_as_version
='2.9.1'
2546 if test "$_mmx" = yes ; then
2547 echo 'emms' >> $TMPS
2549 if test "$_3dnow" = yes ; then
2550 _pref_as_version
='2.10.1'
2551 echo 'femms' >> $TMPS
2553 if test "$_3dnowext" = yes ; then
2554 _pref_as_version
='2.10.1'
2555 echo 'pswapd %mm0, %mm0' >> $TMPS
2557 if test "$_mmxext" = yes ; then
2558 _pref_as_version
='2.10.1'
2559 echo 'movntq %mm0, (%eax)' >> $TMPS
2561 if test "$_sse" = yes ; then
2562 _pref_as_version
='2.10.1'
2563 echo 'xorps %xmm0, %xmm0' >> $TMPS
2565 #if test "$_sse2" = yes ; then
2566 # _pref_as_version='2.11'
2567 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2569 if test "$_cmov" = yes ; then
2570 _pref_as_version
='2.10.1'
2571 echo 'cmovb %eax, %ebx' >> $TMPS
2573 if test "$_ssse3" = yes ; then
2574 _pref_as_version
='2.16.92'
2575 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2577 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2579 if test "$as_verc_fail" != yes ; then
2582 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2584 die
"obsolete binutils version"
2589 echocheck
".align is a power of two"
2590 if test "$_asmalign_pot" = auto
; then
2593 int main(void) { __asm__ (".align 3"); return 0; }
2595 cc_check
&& _asmalign_pot
=yes
2597 if test "$_asmalign_pot" = "yes" ; then
2598 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2600 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2602 echores
$_asmalign_pot
2605 echocheck
"10 assembler operands"
2607 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2613 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2618 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2619 echores
$ten_operands
2621 echocheck
"ebx availability"
2623 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2630 // just adding ebx to clobber list seems unreliable with some
2631 // compilers, e.g. Haiku's gcc 2.95
2633 // and the above check does not work for OSX 64 bit...
2634 __asm__ volatile("":::"%ebx");
2638 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2639 echores
$ebx_available
2645 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2646 #error PIC not enabled
2651 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2655 if test -z "$YASMFLAGS" ; then
2657 x86_64
&& objformat
="macho64" || objformat
="macho"
2663 # currently tested for Linux x86, x86_64
2664 YASMFLAGS
="-f $objformat"
2665 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2666 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2667 case "$objformat" in
2668 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2669 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2675 echo "pabsw xmm0, xmm0" > $TMPS
2676 yasm_check || _yasm
=""
2677 if test $_yasm ; then
2678 def_yasm
='#define HAVE_YASM 1'
2682 def_yasm
='#define HAVE_YASM 0'
2688 def_bswap
='#define HAVE_BSWAP 0'
2689 echo 'bswap %eax' > $TMPS
2690 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2695 #FIXME: This should happen before the check for CFLAGS..
2696 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2697 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2699 # check if AltiVec is supported by the compiler, and how to enable it
2700 echocheck
"GCC AltiVec flags"
2702 int main(void) { return 0; }
2704 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2705 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2706 # check if <altivec.h> should be included
2708 #include <altivec.h>
2709 int main(void) { return 0; }
2711 if $
(cc_check
$_altivec_gcc_flags) ; then
2712 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2713 inc_altivec_h
='#include <altivec.h>'
2716 int main(void) { return 0; }
2718 if $
(cc_check
-faltivec) ; then
2719 _altivec_gcc_flags
="-faltivec"
2722 _altivec_gcc_flags
="none, AltiVec disabled"
2726 echores
"$_altivec_gcc_flags"
2728 # check if the compiler supports braces for vector declarations
2731 int main(void) { (vector int) {1}; return 0; }
2733 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2735 # Disable runtime cpudetection if we cannot generate AltiVec code or
2736 # AltiVec is disabled by the user.
2737 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2738 && _runtime_cpudetection
=no
2740 # Show that we are optimizing for AltiVec (if enabled and supported).
2741 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2742 && _optimizing
="$_optimizing altivec"
2744 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2745 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2749 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2751 echocheck
"XFORM ASM support"
2753 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2755 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2756 echores
"$xform_asm"
2760 echocheck
"ARM pld instruction"
2762 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2768 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2769 if test $_armv5te = "auto" ; then
2771 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2774 cc_check
&& _armv5te
=yes
2778 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2780 echocheck
"ARMv6 (SIMD instructions)"
2781 if test $_armv6 = "auto" ; then
2783 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2786 cc_check
&& _armv6
=yes
2790 echocheck
"ARMv6t2 (SIMD instructions)"
2791 if test $_armv6t2 = "auto" ; then
2793 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2796 cc_check
&& _armv6t2
=yes
2801 if test $_armvfp = "auto" ; then
2803 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2806 cc_check
&& _armvfp
=yes
2810 echocheck
"ARM NEON"
2811 if test $neon = "auto" ; then
2813 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2816 cc_check
&& neon
=yes
2820 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2821 if test $_iwmmxt = "auto" ; then
2823 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2826 cc_check
&& _iwmmxt
=yes
2831 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'
2832 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2833 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2834 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2835 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2836 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2837 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2838 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2839 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2840 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2841 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2842 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2843 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2844 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2845 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2846 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2847 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2848 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2849 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2850 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2851 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2853 # Checking kernel version...
2854 if x86_32
&& linux
; then
2856 kernel_version
=$
(uname
-r 2>&1)
2857 echocheck
"$system_name kernel version"
2858 case "$kernel_version" in
2859 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2860 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2861 _k_verc_problem
=yes;;
2863 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2866 if test "$_k_verc_fail" ; then
2867 echores
"$kernel_version, fail"
2868 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2869 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2870 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2871 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2872 echo "2.2.x you must upgrade it to get SSE support!"
2873 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2875 echores
"$kernel_version, ok"
2879 ######################
2880 # MAIN TESTS GO HERE #
2881 ######################
2886 int main(void) { return 0; }
2888 if cc_check
-lposix ; then
2889 extra_ldflags
="$extra_ldflags -lposix"
2897 int main(void) { return 0; }
2899 if cc_check
-lm ; then
2908 echocheck
"langinfo"
2909 if test "$_langinfo" = auto
; then
2911 #include <langinfo.h>
2912 int main(void) { nl_langinfo(CODESET); return 0; }
2915 cc_check
&& _langinfo
=yes
2917 if test "$_langinfo" = yes ; then
2918 def_langinfo
='#define HAVE_LANGINFO 1'
2920 def_langinfo
='#undef HAVE_LANGINFO'
2922 echores
"$_langinfo"
2925 echocheck
"language"
2926 # Set preferred languages, "all" uses English as main language.
2927 test -z "$language" && language
=$LINGUAS
2928 test -z "$language_doc" && language_doc
=$language
2929 test -z "$language_man" && language_man
=$language
2930 test -z "$language_msg" && language_msg
=$language
2931 language_doc
=$
(echo $language_doc |
tr , " ")
2932 language_man
=$
(echo $language_man |
tr , " ")
2933 language_msg
=$
(echo $language_msg |
tr , " ")
2935 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2936 test "$language_man" = "all" && language_man
=$man_lang_all
2937 test "$language_msg" = "all" && language_msg
=en
2939 # Prune non-existing translations from language lists.
2940 # Set message translation to the first available language.
2941 # Fall back on English.
2942 for lang
in $language_doc ; do
2943 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2945 language_doc
=$tmp_language_doc
2946 test -z "$language_doc" && language_doc
=en
2948 for lang
in $language_man ; do
2949 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2951 language_man
=$tmp_language_man
2952 test -z "$language_man" && language_man
=en
2954 for lang
in $language_msg ; do
2955 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2957 language_msg
=$tmp_language_msg
2958 test -z "$language_msg" && language_msg
=en
2959 _mp_help
="help/help_mp-${language_msg}.h"
2960 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2963 echocheck
"enable sighandler"
2964 if test "$_sighandler" = yes ; then
2965 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2967 def_sighandler
='#undef CONFIG_SIGHANDLER'
2969 echores
"$_sighandler"
2971 echocheck
"runtime cpudetection"
2972 if test "$_runtime_cpudetection" = yes ; then
2973 _optimizing
="Runtime CPU-Detection enabled"
2974 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2976 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2978 echores
"$_runtime_cpudetection"
2981 echocheck
"restrict keyword"
2982 for restrict_keyword
in restrict __restrict __restrict__
; do
2983 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2985 def_restrict_keyword
=$restrict_keyword
2989 if [ -n "$def_restrict_keyword" ]; then
2990 echores
"$def_restrict_keyword"
2994 # Avoid infinite recursion loop ("#define restrict restrict")
2995 if [ "$def_restrict_keyword" != "restrict" ]; then
2996 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2998 def_restrict_keyword
=""
3002 echocheck
"__builtin_expect"
3003 # GCC branch prediction hint
3006 a = __builtin_expect(a, 10);
3007 return a == 10 ? 0 : 1;
3009 int main(void) { return foo(10) && foo(0); }
3012 cc_check
&& _builtin_expect
=yes
3013 if test "$_builtin_expect" = yes ; then
3014 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
3016 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
3018 echores
"$_builtin_expect"
3024 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
3027 cc_check
-lkstat && _kstat
=yes
3028 if test "$_kstat" = yes ; then
3029 def_kstat
="#define HAVE_LIBKSTAT 1"
3030 extra_ldflags
="$extra_ldflags -lkstat"
3032 def_kstat
="#undef HAVE_LIBKSTAT"
3038 # required for nanosleep on some systems
3041 int main(void) { (void) nanosleep(0, 0); return 0; }
3044 cc_check
-lposix4 && _posix4
=yes
3045 if test "$_posix4" = yes ; then
3046 extra_ldflags
="$extra_ldflags -lposix4"
3050 for func
in exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf truncf
; do
3054 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
3057 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
3058 if eval test "x\$_$func" = "xyes"; then
3059 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3062 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3071 int main(void) { char a; mkstemp(&a); return 0; }
3074 cc_check
&& _mkstemp
=yes
3075 if test "$_mkstemp" = yes ; then
3076 def_mkstemp
='#define HAVE_MKSTEMP 1'
3078 def_mkstemp
='#undef HAVE_MKSTEMP'
3083 echocheck
"nanosleep"
3084 # also check for nanosleep
3087 int main(void) { (void) nanosleep(0, 0); return 0; }
3090 cc_check
&& _nanosleep
=yes
3091 if test "$_nanosleep" = yes ; then
3092 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3094 def_nanosleep
='#undef HAVE_NANOSLEEP'
3096 echores
"$_nanosleep"
3100 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3101 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3104 #include <sys/socket.h>
3105 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3108 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3109 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3111 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3112 if test $_winsock2_h = auto
; then
3115 #include <winsock2.h>
3116 int main(void) { (void) gethostbyname(0); return 0; }
3118 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3120 test "$_ld_sock" && _res_comment
="using $_ld_sock"
3124 if test $_winsock2_h = yes ; then
3126 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3127 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=1'
3129 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3130 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=0'
3134 echocheck
"netdb.h, struct addrinfo"
3135 if test "$_struct_addrinfo" = auto
; then
3139 #include <winsock2.h>
3140 #include <ws2tcpip.h>
3142 #include <sys/types.h>
3143 #include <sys/socket.h>
3146 int main(void) { struct addrinfo ai; return 0; }
3148 cc_check
$cc_check_winsock2_h && _struct_addrinfo
=yes
3150 echores
"$_struct_addrinfo"
3152 if test "$_struct_addrinfo" = yes; then
3153 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 1"
3155 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 0"
3159 echocheck
"netdb.h, getaddrinfo()"
3160 if test "$_getaddrinfo" = auto
; then
3164 #include <winsock2.h>
3166 #include <sys/types.h>
3167 #include <sys/socket.h>
3170 int main(void) { (void) getaddrinfo(0, 0, 0, 0); return 0; }
3172 cc_check
$cc_check_winsock2_h && _getaddrinfo
=yes
3174 echores
"$_getaddrinfo"
3176 if test "$_getaddrinfo" = yes; then
3177 def_getaddrinfo
="#define HAVE_GETADDRINFO 1"
3179 def_getaddrinfo
="#define HAVE_GETADDRINFO 0"
3183 echocheck
"sockaddr_storage"
3184 if test "$_struct_sockaddr_storage" = auto
; then
3185 _struct_sockaddr_storage
=no
3188 #include <winsock2.h>
3190 #include <sys/socket.h>
3192 int main(void) { struct sockaddr_storage sas; return 0; }
3194 cc_check
$cc_check_winsock2_h && _struct_sockaddr_storage
=yes
3196 echores
"$_struct_sockaddr_storage"
3198 if test "$_struct_sockaddr_storage" = yes; then
3199 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
3201 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
3205 echocheck
"struct ipv6_mreq"
3206 _struct_ipv6_mreq
=no
3207 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 0"
3208 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3211 int main(void) { struct ipv6_mreq mreq6; return 0; }
3213 cc_check
&& _struct_ipv6_mreq
=yes && \
3214 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 1" && break
3216 echores
"$_struct_ipv6_mreq"
3219 echocheck
"struct sockaddr_in6"
3220 _struct_sockaddr_in6
=no
3221 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 0"
3222 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3225 int main(void) { struct sockaddr_in6 addr; return 0; }
3227 cc_check
&& _struct_sockaddr_in6
=yes && \
3228 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 1" && break
3230 echores
"$_struct_sockaddr_in6"
3233 echocheck
"struct sockaddr sa_len"
3234 _struct_sockaddr_sa_len
=no
3235 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 0"
3238 #include <winsock2.h>
3240 #include <sys/types.h>
3241 #include <sys/socket.h>
3243 int main(void) { const void *p = &((struct sockaddr *)0)->sa_len; return 0; }
3245 cc_check
$cc_check_winsock2_h && _struct_sockaddr_sa_len
=yes && \
3246 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 1"
3247 echores
"$_struct_sockaddr_sa_len"
3250 echocheck
"arpa/inet.h"
3252 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3254 #include <arpa/inet.h>
3255 int main(void) { return 0; }
3257 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3258 echores
"$arpa_inet_h"
3261 echocheck
"inet_pton()"
3262 def_inet_pton
='#define HAVE_INET_PTON 0'
3265 #include <sys/types.h>
3266 #include <sys/socket.h>
3267 #include <arpa/inet.h>
3268 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3270 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3271 cc_check
$_ld_tmp && inet_pton
=yes && break
3273 if test $inet_pton = yes ; then
3274 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3275 def_inet_pton
='#define HAVE_INET_PTON 1'
3277 echores
"$inet_pton"
3280 echocheck
"inet_aton()"
3281 def_inet_aton
='#define HAVE_INET_ATON 0'
3284 #include <sys/types.h>
3285 #include <sys/socket.h>
3286 #include <arpa/inet.h>
3287 int main(void) { (void) inet_aton(0, 0); return 0; }
3289 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3290 cc_check
$_ld_tmp && inet_aton
=yes && break
3292 if test $inet_aton = yes ; then
3293 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3294 def_inet_aton
='#define HAVE_INET_ATON 1'
3296 echores
"$inet_aton"
3299 echocheck
"socklen_t"
3301 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3304 int main(void) { socklen_t v = 0; return v; }
3306 cc_check
&& _socklen_t
=yes && break
3308 if test "$_socklen_t" = yes ; then
3309 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3311 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3313 echores
"$_socklen_t"
3316 echocheck
"closesocket()"
3319 #include <winsock2.h>
3320 int main(void) { closesocket(~0); return 0; }
3322 cc_check
$_ld_sock && _closesocket
=yes
3323 if test "$_closesocket" = yes ; then
3324 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3326 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3328 echores
"$_closesocket"
3332 test $_winsock2_h = no
&& test $inet_pton = no
&&
3333 test $inet_aton = no
&& _network
=no
3334 if test "$_network" = yes ; then
3335 def_network
='#define CONFIG_NETWORK 1'
3336 extra_ldflags
="$extra_ldflags $_ld_sock"
3337 _inputmodules
="network $_inputmodules"
3339 _noinputmodules
="network $_noinputmodules"
3340 def_network
='#undef CONFIG_NETWORK'
3342 _libavprotocols
=$
(echo $_libavprotocols |
sed -e s
/GOPHER_PROTOCOL
// -e s
/HTTP_PROTOCOL
// -e s
/RTMP_PROTOCOL
// -e s
/RTP_PROTOCOL
// -e s
/TCP_PROTOCOL
// -e s
/UDP_PROTOCOL
//)
3343 _libavdemuxers
=$
(echo $_libavdemuxers |
sed -e s
/RTSP_DEMUXER
// -e s
/SDP_DEMUXER
//)
3349 if test "$_inet6" = auto
; then
3351 #include <sys/types.h>
3352 #if !defined(_WIN32) || defined(__CYGWIN__)
3353 #include <sys/socket.h>
3354 #include <netinet/in.h>
3356 #include <ws2tcpip.h>
3358 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3361 if cc_check
$_ld_sock ; then
3365 if test "$_inet6" = yes ; then
3366 def_inet6
='#define HAVE_AF_INET6 1'
3368 def_inet6
='#undef HAVE_AF_INET6'
3373 echocheck
"gethostbyname2"
3374 if test "$_gethostbyname2" = auto
; then
3376 #include <sys/types.h>
3377 #include <sys/socket.h>
3379 int main(void) { gethostbyname2("", AF_INET); return 0; }
3386 if test "$_gethostbyname2" = yes ; then
3387 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3389 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3391 echores
"$_gethostbyname2"
3394 echocheck
"inttypes.h (required)"
3396 #include <inttypes.h>
3397 int main(void) { return 0; }
3400 cc_check
&& _inttypes
=yes
3401 echores
"$_inttypes"
3403 if test "$_inttypes" = no
; then
3404 echocheck
"bitypes.h (inttypes.h predecessor)"
3406 #include <sys/bitypes.h>
3407 int main(void) { return 0; }
3409 cc_check
&& _inttypes
=yes
3410 if test "$_inttypes" = yes ; then
3411 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."
3413 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3418 echocheck
"int_fastXY_t in inttypes.h"
3420 #include <inttypes.h>
3422 volatile int_fast16_t v= 0;
3426 cc_check
&& _fast_inttypes
=yes
3427 if test "$_fast_inttypes" = no
; then
3429 typedef signed char int_fast8_t;
3430 typedef signed int int_fast16_t;
3431 typedef signed int int_fast32_t;
3432 typedef signed long long int_fast64_t;
3433 typedef unsigned char uint_fast8_t;
3434 typedef unsigned int uint_fast16_t;
3435 typedef unsigned int uint_fast32_t;
3436 typedef unsigned long long uint_fast64_t;'
3438 echores
"$_fast_inttypes"
3441 echocheck
"malloc.h"
3444 int main(void) { (void) malloc(0); return 0; }
3447 cc_check
&& _malloc
=yes
3448 if test "$_malloc" = yes ; then
3449 def_malloc_h
='#define HAVE_MALLOC_H 1'
3451 def_malloc_h
='#define HAVE_MALLOC_H 0'
3456 echocheck
"memalign()"
3457 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3458 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3461 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3464 cc_check
&& _memalign
=yes
3465 if test "$_memalign" = yes ; then
3466 def_memalign
='#define HAVE_MEMALIGN 1'
3468 def_memalign
='#define HAVE_MEMALIGN 0'
3469 def_map_memalign
='#define memalign(a,b) malloc(b)'
3470 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3472 echores
"$_memalign"
3475 echocheck
"posix_memalign()"
3477 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3479 #define _XOPEN_SOURCE 600
3481 int main(void) { posix_memalign(NULL, 0, 0); }
3483 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3484 echores
"$posix_memalign"
3487 echocheck
"alloca.h"
3490 int main(void) { (void) alloca(0); return 0; }
3493 cc_check
&& _alloca
=yes
3495 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3497 def_alloca_h
='#undef HAVE_ALLOCA_H'
3502 echocheck
"fastmemcpy"
3503 if test "$_fastmemcpy" = yes ; then
3504 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3506 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3508 echores
"$_fastmemcpy"
3511 echocheck
"hard-coded tables"
3512 if test "$hardcoded_tables" = yes ; then
3513 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 1'
3514 mak_hardcoded_tables
='CONFIG_HARDCODED_TABLES = yes'
3516 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 0'
3518 echores
"$hardcoded_tables"
3523 #include <sys/types.h>
3524 #include <sys/mman.h>
3525 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3528 cc_check
&& _mman
=yes
3529 if test "$_mman" = yes ; then
3530 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3532 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3533 os2
&& _need_mmap
=yes
3538 #include <sys/types.h>
3539 #include <sys/mman.h>
3540 int main(void) { void *p = MAP_FAILED; return 0; }
3542 _mman_has_map_failed
=no
3543 cc_check
&& _mman_has_map_failed
=yes
3544 if test "$_mman_has_map_failed" = yes ; then
3545 def_mman_has_map_failed
=''
3547 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3550 echocheck
"dynamic loader"
3554 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3557 for _ld_tmp
in "" "-ldl" ; do
3558 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3560 if test "$_dl" = yes ; then
3561 def_dl
='#define HAVE_LIBDL 1'
3563 def_dl
='#undef HAVE_LIBDL'
3568 echocheck
"dynamic a/v plugins support"
3569 if test "$_dl" = no
; then
3572 if test "$_dynamic_plugins" = yes ; then
3573 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3575 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3577 echores
"$_dynamic_plugins"
3580 def_threads
='#define HAVE_THREADS 0'
3584 THREAD_CFLAGS
=-D_REENTRANT
3585 elif freebsd || netbsd || openbsd || bsdos
; then
3586 THREAD_CFLAGS
=-D_THREAD_SAFE
3588 if test "$_pthreads" = auto
; then
3590 #include <pthread.h>
3591 void* func(void *arg) { return arg; }
3592 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3596 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3597 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3598 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3602 if test "$_pthreads" = yes ; then
3603 test $_ld_pthread && _res_comment
="using $_ld_pthread"
3604 def_pthreads
='#define HAVE_PTHREADS 1'
3605 def_threads
='#define HAVE_THREADS 1'
3606 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3608 _res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3609 def_pthreads
='#undef HAVE_PTHREADS'
3610 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3611 mingw32 || _win32dll
=no
3613 echores
"$_pthreads"
3616 if test "$_pthreads" = yes ; then
3617 def_pthread_cache
="#define PTHREAD_CACHE 1"
3620 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3624 echocheck
"w32threads"
3625 if test "$_pthreads" = yes ; then
3626 _res_comment
="using pthread instead"
3629 if test "$_w32threads" = auto
; then
3631 mingw32
&& _w32threads
=yes
3633 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3634 echores
"$_w32threads"
3638 if test "$_rpath" = yes ; then
3639 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3640 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3647 if test "$_iconv" = auto
; then
3652 #define INBUFSIZE 1024
3653 #define OUTBUFSIZE 4096
3655 char inbuffer[INBUFSIZE];
3656 char outbuffer[OUTBUFSIZE];
3661 char *tocode="UTF-8";
3662 char *fromcode="cp1250";
3663 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3664 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3665 char *iptr=inbuffer;
3666 char *optr=outbuffer;
3667 size_t inleft=numread;
3668 size_t outleft=OUTBUFSIZE;
3669 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3671 write(1, outbuffer, OUTBUFSIZE - outleft);
3674 if (iconv_close(icdsc) == -1)
3681 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3682 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3686 if test "$_iconv" = yes ; then
3687 def_iconv
='#define CONFIG_ICONV 1'
3689 def_iconv
='#undef CONFIG_ICONV'
3694 echocheck
"soundcard.h"
3696 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3697 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3698 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3700 #include <$_soundcard_header>
3701 int main(void) { return 0; }
3703 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3706 if test "$_soundcard_h" = yes ; then
3707 if test $_soundcard_header = "sys/soundcard.h"; then
3708 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3710 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3713 echores
"$_soundcard_h"
3716 echocheck
"sys/dvdio.h"
3719 #include <sys/dvdio.h>
3720 int main(void) { return 0; }
3723 cc_check
&& _dvdio
=yes
3724 if test "$_dvdio" = yes ; then
3725 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3727 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3732 echocheck
"sys/cdio.h"
3735 #include <sys/cdio.h>
3736 int main(void) { return 0; }
3739 cc_check
&& _cdio
=yes
3740 if test "$_cdio" = yes ; then
3741 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3743 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3748 echocheck
"linux/cdrom.h"
3750 #include <sys/types.h>
3751 #include <linux/cdrom.h>
3752 int main(void) { return 0; }
3755 cc_check
&& _cdrom
=yes
3756 if test "$_cdrom" = yes ; then
3757 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3759 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3767 int main(void) { return 0; }
3770 cc_check
&& _dvd
=yes
3771 if test "$_dvd" = yes ; then
3772 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3774 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3780 echocheck
"BSDI dvd.h"
3783 int main(void) { return 0; }
3786 cc_check
&& _bsdi_dvd
=yes
3787 if test "$_bsdi_dvd" = yes ; then
3788 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3790 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3792 echores
"$_bsdi_dvd"
3797 # also used by AIX, but AIX does not support VCD and/or libdvdread
3798 echocheck
"HP-UX SCSI header"
3800 #include <sys/scsi.h>
3801 int main(void) { return 0; }
3804 cc_check
&& _hpux_scsi_h
=yes
3805 if test "$_hpux_scsi_h" = yes ; then
3806 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3808 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3810 echores
"$_hpux_scsi_h"
3815 echocheck
"userspace SCSI headers (Solaris)"
3818 #include <stropts.h>
3819 #include <sys/scsi/scsi_types.h>
3820 #include <sys/scsi/impl/uscsi.h>
3821 int main(void) { return 0; }
3824 cc_check
&& _sol_scsi_h
=yes
3825 if test "$_sol_scsi_h" = yes ; then
3826 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3828 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3830 echores
"$_sol_scsi_h"
3835 if test "$_termcap" = auto
; then
3839 int main(void) { tgetent(NULL, NULL); return 0; }
3842 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3843 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3844 && _termcap
=yes && break
3847 if test "$_termcap" = yes ; then
3848 def_termcap
='#define HAVE_TERMCAP 1'
3849 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3851 def_termcap
='#undef HAVE_TERMCAP'
3857 def_termios
='#undef HAVE_TERMIOS'
3858 def_termios_h
='#undef HAVE_TERMIOS_H'
3859 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3860 if test "$_termios" = auto
; then
3862 for _termios_header
in "sys/termios.h" "termios.h"; do
3864 #include <$_termios_header>
3865 int main(void) { return 0; }
3867 cc_check
&& _termios
=yes && _res_comment
="using $_termios_header" && break
3871 if test "$_termios" = yes ; then
3872 def_termios
='#define HAVE_TERMIOS 1'
3873 if test "$_termios_header" = "termios.h" ; then
3874 def_termios_h
='#define HAVE_TERMIOS_H 1'
3876 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3883 if test "$_shm" = auto
; then
3885 #include <sys/types.h>
3886 #include <sys/shm.h>
3887 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3890 cc_check
&& _shm
=yes
3892 if test "$_shm" = yes ; then
3893 def_shm
='#define HAVE_SHM 1'
3895 def_shm
='#undef HAVE_SHM'
3900 echocheck
"strsep()"
3903 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3906 cc_check
&& _strsep
=yes
3907 if test "$_strsep" = yes ; then
3908 def_strsep
='#define HAVE_STRSEP 1'
3911 def_strsep
='#undef HAVE_STRSEP'
3917 echocheck
"vsscanf()"
3919 #define _ISOC99_SOURCE
3922 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3925 cc_check
&& _vsscanf
=yes
3926 if test "$_vsscanf" = yes ; then
3927 def_vsscanf
='#define HAVE_VSSCANF 1'
3930 def_vsscanf
='#undef HAVE_VSSCANF'
3938 #define _XOPEN_SOURCE 600
3940 int main(void) { swab(0, 0, 0); return 0; }
3943 cc_check
&& _swab
=yes
3944 if test "$_swab" = yes ; then
3945 def_swab
='#define HAVE_SWAB 1'
3948 def_swab
='#undef HAVE_SWAB'
3953 echocheck
"POSIX select()"
3957 #include <sys/types.h>
3959 #include <sys/time.h>
3961 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3964 def_posix_select
='#undef HAVE_POSIX_SELECT'
3965 #select() of kLIBC (OS/2) supports socket only
3966 ! os2
&& cc_check
&& _posix_select
=yes \
3967 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3968 echores
"$_posix_select"
3971 echocheck
"audio select()"
3972 if test "$_select" = no
; then
3973 def_select
='#undef HAVE_AUDIO_SELECT'
3974 elif test "$_select" = yes ; then
3975 def_select
='#define HAVE_AUDIO_SELECT 1'
3980 echocheck
"gettimeofday()"
3983 #include <sys/time.h>
3984 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3987 cc_check
&& _gettimeofday
=yes
3988 if test "$_gettimeofday" = yes ; then
3989 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3990 _need_gettimeofday
=no
3992 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3993 _need_gettimeofday
=yes
3995 echores
"$_gettimeofday"
4002 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
4005 cc_check
&& _glob
=yes
4006 if test "$_glob" = yes ; then
4007 def_glob
='#define HAVE_GLOB 1'
4010 def_glob
='#undef HAVE_GLOB'
4016 echocheck
"setenv()"
4019 int main(void) { setenv("","",0); return 0; }
4022 cc_check
&& _setenv
=yes
4023 if test "$_setenv" = yes ; then
4024 def_setenv
='#define HAVE_SETENV 1'
4027 def_setenv
='#undef HAVE_SETENV'
4033 echocheck
"setmode()"
4035 def_setmode
='#define HAVE_SETMODE 0'
4038 int main(void) { setmode(0, 0); return 0; }
4040 cc_check
&& _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
4045 echocheck
"sysi86()"
4047 #include <sys/sysi86.h>
4048 int main(void) { sysi86(0); return 0; }
4051 cc_check
&& _sysi86
=yes
4052 if test "$_sysi86" = yes ; then
4053 def_sysi86
='#define HAVE_SYSI86 1'
4055 #include <sys/sysi86.h>
4056 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
4058 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
4060 def_sysi86
='#undef HAVE_SYSI86'
4066 echocheck
"sys/sysinfo.h"
4068 #include <sys/sysinfo.h>
4070 struct sysinfo s_info;
4076 cc_check
&& _sys_sysinfo
=yes
4077 if test "$_sys_sysinfo" = yes ; then
4078 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
4080 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
4082 echores
"$_sys_sysinfo"
4087 echocheck
"Mac OS X Finder Support"
4088 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
4089 if test "$_macosx_finder" = yes ; then
4090 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
4091 extra_ldflags
="$extra_ldflags -framework Carbon"
4093 echores
"$_macosx_finder"
4095 echocheck
"Mac OS X Bundle file locations"
4096 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
4097 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
4098 if test "$_macosx_bundle" = yes ; then
4099 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
4100 extra_ldflags
="$extra_ldflags -framework Carbon"
4102 echores
"$_macosx_bundle"
4104 echocheck
"Apple Remote"
4105 if test "$_apple_remote" = auto
; then
4109 #include <IOKit/IOCFPlugIn.h>
4111 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
4112 CFMutableDictionaryRef hidMatchDictionary;
4113 IOReturn ioReturnValue;
4115 // Set up a matching dictionary to search the I/O Registry by class.
4116 // name for all HID class devices
4117 hidMatchDictionary = IOServiceMatching("AppleIRController");
4119 // Now search I/O Registry for matching devices.
4120 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
4121 hidMatchDictionary, &hidObjectIterator);
4123 // If search is unsuccessful, return nonzero.
4124 if (ioReturnValue != kIOReturnSuccess ||
4125 !IOIteratorIsValid(hidObjectIterator)) {
4131 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
4133 if test "$_apple_remote" = yes ; then
4134 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
4135 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
4137 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
4139 echores
"$_apple_remote"
4145 echocheck
"Apple IR"
4146 if test "$_apple_ir" = auto
; then
4149 #include <linux/types.h>
4150 #include <linux/input.h>
4152 struct input_event ev;
4157 cc_check
&& _apple_ir
=yes
4159 if test "$_apple_ir" = yes ; then
4160 def_apple_ir
='#define CONFIG_APPLE_IR 1'
4162 def_apple_ir
='#undef CONFIG_APPLE_IR'
4164 echores
"$_apple_ir"
4167 echocheck
"pkg-config"
4168 _pkg_config
=pkg-config
4169 if $
($_pkg_config --version > /dev
/null
2>&1); then
4170 if test "$_ld_static"; then
4171 _pkg_config
="$_pkg_config --static"
4180 echocheck
"Samba support (libsmbclient)"
4181 if test "$_smb" = yes; then
4182 extra_ldflags
="$extra_ldflags -lsmbclient"
4184 if test "$_smb" = auto
; then
4187 #include <libsmbclient.h>
4188 int main(void) { smbc_opendir("smb://"); return 0; }
4190 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
4191 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
4196 if test "$_smb" = yes; then
4197 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
4198 _inputmodules
="smb $_inputmodules"
4200 def_smb
="#undef CONFIG_LIBSMBCLIENT"
4201 _noinputmodules
="smb $_noinputmodules"
4212 if test "$_tdfxfb" = yes ; then
4213 def_tdfxfb
='#define CONFIG_TDFXFB 1'
4214 _vomodules
="tdfxfb $_vomodules"
4216 def_tdfxfb
='#undef CONFIG_TDFXFB'
4217 _novomodules
="tdfxfb $_novomodules"
4222 if test "$_s3fb" = yes ; then
4223 def_s3fb
='#define CONFIG_S3FB 1'
4224 _vomodules
="s3fb $_vomodules"
4226 def_s3fb
='#undef CONFIG_S3FB'
4227 _novomodules
="s3fb $_novomodules"
4232 if test "$_wii" = yes ; then
4233 def_wii
='#define CONFIG_WII 1'
4234 _vomodules
="wii $_vomodules"
4236 def_wii
='#undef CONFIG_WII'
4237 _novomodules
="wii $_novomodules"
4242 if test "$_tdfxvid" = yes ; then
4243 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
4244 _vomodules
="tdfx_vid $_vomodules"
4246 def_tdfxvid
='#undef CONFIG_TDFX_VID'
4247 _novomodules
="tdfx_vid $_novomodules"
4252 if test "$_xvr100" = auto
; then
4255 #include <sys/fbio.h>
4256 #include <sys/visual_io.h>
4258 struct vis_identifier ident;
4259 struct fbgattr attr;
4260 ioctl(0, VIS_GETIDENTIFIER, &ident);
4261 ioctl(0, FBIOGATTR, &attr);
4266 cc_check
&& _xvr100
=yes
4268 if test "$_xvr100" = yes ; then
4269 def_xvr100
='#define CONFIG_XVR100 1'
4270 _vomodules
="xvr100 $_vomodules"
4272 def_tdfxvid
='#undef CONFIG_XVR100'
4273 _novomodules
="xvr100 $_novomodules"
4278 if test "$_tga" = yes ; then
4279 def_tga
='#define CONFIG_TGA 1'
4280 _vomodules
="tga $_vomodules"
4282 def_tga
='#undef CONFIG_TGA'
4283 _novomodules
="tga $_novomodules"
4288 echocheck
"md5sum support"
4289 if test "$_md5sum" = yes; then
4290 def_md5sum
="#define CONFIG_MD5SUM 1"
4291 _vomodules
="md5sum $_vomodules"
4293 def_md5sum
="#undef CONFIG_MD5SUM"
4294 _novomodules
="md5sum $_novomodules"
4299 echocheck
"yuv4mpeg support"
4300 if test "$_yuv4mpeg" = yes; then
4301 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4302 _vomodules
="yuv4mpeg $_vomodules"
4304 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4305 _novomodules
="yuv4mpeg $_novomodules"
4307 echores
"$_yuv4mpeg"
4311 if test "$_bl" = yes ; then
4312 def_bl
='#define CONFIG_BL 1'
4313 _vomodules
="bl $_vomodules"
4315 def_bl
='#undef CONFIG_BL'
4316 _novomodules
="bl $_novomodules"
4321 echocheck
"DirectFB"
4322 if test "$_directfb" = auto
; then
4325 #include <directfb.h>
4326 int main(void) { DirectFBInit(0, 0); return 0; }
4328 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4329 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4330 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4331 extra_cflags
="$extra_cflags $_inc_tmp" && break
4336 expr $1 \
* 65536 + $2 \
* 256 + $3
4339 if test "$_directfb" = yes; then
4341 #include <directfb_version.h>
4343 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4346 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4347 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4348 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4349 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4350 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4351 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4352 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4353 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4354 _res_comment
="$_directfb_version"
4355 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4357 def_directfb_version
='#undef DIRECTFBVERSION'
4359 _res_comment
="version >=0.9.13 required"
4363 _res_comment
="failed to get version"
4366 echores
"$_directfb"
4368 if test "$_directfb" = yes ; then
4369 def_directfb
='#define CONFIG_DIRECTFB 1'
4370 _vomodules
="directfb $_vomodules"
4371 libs_mplayer
="$libs_mplayer -ldirectfb"
4373 def_directfb
='#undef CONFIG_DIRECTFB'
4374 _novomodules
="directfb $_novomodules"
4376 if test "$_dfbmga" = yes; then
4377 _vomodules
="dfbmga $_vomodules"
4378 def_dfbmga
='#define CONFIG_DFBMGA 1'
4380 _novomodules
="dfbmga $_novomodules"
4381 def_dfbmga
='#undef CONFIG_DFBMGA'
4385 echocheck
"X11 headers presence"
4387 _res_comment
="check if the dev(el) packages are installed"
4388 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4389 if test -f "$I/X11/Xlib.h" ; then
4395 if test $_cross_compile = no
; then
4396 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4397 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4398 if test -f "$I/X11/Xlib.h" ; then
4399 extra_cflags
="$extra_cflags -I$I"
4401 _res_comment
="using $I"
4406 echores
"$_x11_headers"
4410 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4412 #include <X11/Xlib.h>
4413 #include <X11/Xutil.h>
4414 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4416 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4417 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4420 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4422 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4424 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4425 && _x11
=yes && break
4428 if test "$_x11" = yes ; then
4429 def_x11
='#define CONFIG_X11 1'
4430 _vomodules
="x11 xover $_vomodules"
4433 def_x11
='#undef CONFIG_X11'
4434 _novomodules
="x11 $_novomodules"
4435 _res_comment
="check if the dev(el) packages are installed"
4436 # disable stuff that depends on X
4437 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4441 echocheck
"Xss screensaver extensions"
4442 if test "$_xss" = auto
; then
4444 #include <X11/Xlib.h>
4445 #include <X11/extensions/scrnsaver.h>
4446 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4449 cc_check
-lXss && _xss
=yes
4451 if test "$_xss" = yes ; then
4452 def_xss
='#define CONFIG_XSS 1'
4453 libs_mplayer
="$libs_mplayer -lXss"
4455 def_xss
='#undef CONFIG_XSS'
4462 if test "$_x11" = yes ; then
4464 #include <X11/Xmd.h>
4465 #include <X11/Xlib.h>
4466 #include <X11/Xutil.h>
4467 #include <X11/Xatom.h>
4468 #include <X11/extensions/dpms.h>
4469 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4471 cc_check
-lXdpms && _xdpms3
=yes
4473 #include <X11/Xlib.h>
4474 #include <X11/extensions/dpms.h>
4475 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4477 cc_check
-lXext && _xdpms4
=yes
4479 if test "$_xdpms4" = yes ; then
4480 def_xdpms
='#define CONFIG_XDPMS 1'
4481 _res_comment
="using Xdpms 4"
4483 elif test "$_xdpms3" = yes ; then
4484 def_xdpms
='#define CONFIG_XDPMS 1'
4485 libs_mplayer
="$libs_mplayer -lXdpms"
4486 _res_comment
="using Xdpms 3"
4489 def_xdpms
='#undef CONFIG_XDPMS'
4495 if test "$_xv" = auto
; then
4497 #include <X11/Xlib.h>
4498 #include <X11/extensions/Xvlib.h>
4500 (void) XvGetPortAttribute(0, 0, 0, 0);
4501 (void) XvQueryPortAttributes(0, 0, 0);
4505 cc_check
-lXv && _xv
=yes
4508 if test "$_xv" = yes ; then
4509 def_xv
='#define CONFIG_XV 1'
4510 libs_mplayer
="$libs_mplayer -lXv"
4511 _vomodules
="xv $_vomodules"
4513 def_xv
='#undef CONFIG_XV'
4514 _novomodules
="xv $_novomodules"
4520 if test "$_xv" = yes && test "$_xvmc" != no
; then
4523 #include <X11/Xlib.h>
4524 #include <X11/extensions/Xvlib.h>
4525 #include <X11/extensions/XvMClib.h>
4527 (void) XvMCQueryExtension(0,0,0);
4528 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4531 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4532 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4535 if test "$_xvmc" = yes ; then
4536 def_xvmc
='#define CONFIG_XVMC 1'
4537 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4538 _vomodules
="xvmc $_vomodules"
4539 _res_comment
="using $_xvmclib"
4541 def_xvmc
='#define CONFIG_XVMC 0'
4542 _novomodules
="xvmc $_novomodules"
4543 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_XVMC_DECODER
//)
4549 if test "$_vdpau" = auto
; then
4551 if test "$_dl" = yes ; then
4553 #include <vdpau/vdpau_x11.h>
4555 (void) vdp_device_create_x11(0, 0, 0, 0);
4556 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4558 cc_check
-lvdpau && _vdpau
=yes
4561 if test "$_vdpau" = yes ; then
4562 def_vdpau
='#define CONFIG_VDPAU 1'
4563 libs_mplayer
="$libs_mplayer -lvdpau"
4564 _vomodules
="vdpau $_vomodules"
4566 def_vdpau
='#define CONFIG_VDPAU 0'
4567 _novomodules
="vdpau $_novomodules"
4568 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_VDPAU_DECODER
// -e s
/MPEG1_VDPAU_DECODER
// -e s
/H264_VDPAU_DECODER
// -e s
/WMV3_VDPAU_DECODER
// -e s
/VC1_VDPAU_DECODER
// -e s
/MPEG4_VDPAU_DECODER
//)
4573 echocheck
"Xinerama"
4574 if test "$_xinerama" = auto
; then
4576 #include <X11/Xlib.h>
4577 #include <X11/extensions/Xinerama.h>
4578 int main(void) { (void) XineramaIsActive(0); return 0; }
4581 cc_check
-lXinerama && _xinerama
=yes
4584 if test "$_xinerama" = yes ; then
4585 def_xinerama
='#define CONFIG_XINERAMA 1'
4586 libs_mplayer
="$libs_mplayer -lXinerama"
4588 def_xinerama
='#undef CONFIG_XINERAMA'
4590 echores
"$_xinerama"
4593 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4594 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4595 # named 'X extensions' or something similar.
4596 # This check may be useful for future mplayer versions (to change resolution)
4597 # If you run into problems, remove '-lXxf86vm'.
4599 if test "$_vm" = auto
; then
4601 #include <X11/Xlib.h>
4602 #include <X11/extensions/xf86vmode.h>
4603 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4606 cc_check
-lXxf86vm && _vm
=yes
4608 if test "$_vm" = yes ; then
4609 def_vm
='#define CONFIG_XF86VM 1'
4610 libs_mplayer
="$libs_mplayer -lXxf86vm"
4612 def_vm
='#undef CONFIG_XF86VM'
4616 # Check for the presence of special keycodes, like audio control buttons
4617 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4618 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4619 # have these new keycodes.
4620 echocheck
"XF86keysym"
4621 if test "$_xf86keysym" = auto
; then
4624 #include <X11/Xlib.h>
4625 #include <X11/XF86keysym.h>
4626 int main(void) { return XF86XK_AudioPause; }
4628 cc_check
&& _xf86keysym
=yes
4630 if test "$_xf86keysym" = yes ; then
4631 def_xf86keysym
='#define CONFIG_XF86XK 1'
4633 def_xf86keysym
='#undef CONFIG_XF86XK'
4635 echores
"$_xf86keysym"
4638 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4640 #include <X11/Xlib.h>
4641 #include <X11/extensions/xf86dga.h>
4642 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4645 cc_check
-lXxf86dga && _dga2
=yes
4647 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4649 #include <X11/Xlib.h>
4650 #include <X11/extensions/xf86dga.h>
4651 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4654 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4658 def_dga
='#undef CONFIG_DGA'
4659 def_dga1
='#undef CONFIG_DGA1'
4660 def_dga2
='#undef CONFIG_DGA2'
4661 if test "$_dga1" = yes ; then
4663 def_dga1
='#define CONFIG_DGA1 1'
4664 _res_comment
="using DGA 1.0"
4665 elif test "$_dga2" = yes ; then
4667 def_dga2
='#define CONFIG_DGA2 1'
4668 _res_comment
="using DGA 2.0"
4670 if test "$_dga" = yes ; then
4671 def_dga
='#define CONFIG_DGA 1'
4672 libs_mplayer
="$libs_mplayer -lXxf86dga"
4673 _vomodules
="dga $_vomodules"
4675 _novomodules
="dga $_novomodules"
4681 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4682 def_3dfx
='#define CONFIG_3DFX 1'
4683 _vomodules
="3dfx $_vomodules"
4685 def_3dfx
='#undef CONFIG_3DFX'
4686 _novomodules
="3dfx $_novomodules"
4692 def_vidix
='#undef CONFIG_VIDIX'
4693 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4694 _vidix_drv_cyberblade
=no
4695 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4697 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4698 _vidix_drv_mach64
=no
4699 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4701 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4702 _vidix_drv_mga_crtc2
=no
4703 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4704 _vidix_drv_nvidia
=no
4705 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4707 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4709 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4710 _vidix_drv_radeon
=no
4711 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4712 _vidix_drv_rage128
=no
4713 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4715 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4716 _vidix_drv_sh_veu
=no
4717 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4719 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4720 _vidix_drv_unichrome
=no
4721 if test "$_vidix" = auto
; then
4723 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4725 x86_64
&& ! linux
&& _vidix
=no
4726 (ppc || alpha
) && linux
&& _vidix
=yes
4730 if test "$_vidix" = yes ; then
4731 def_vidix
='#define CONFIG_VIDIX 1'
4732 _vomodules
="cvidix $_vomodules"
4733 # FIXME: ivtv driver temporarily disabled until we have a proper test
4734 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4735 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4737 # some vidix drivers are architecture and os specific, discard them elsewhere
4738 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4739 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4741 for driver
in $_vidix_drivers ; do
4742 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4743 eval _vidix_drv_
${driver}=yes
4744 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4747 echocheck
"VIDIX PCI device name database"
4748 echores
"$_vidix_pcidb"
4749 if test "$_vidix_pcidb" = yes ; then
4755 echocheck
"VIDIX dhahelper support"
4756 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4757 echores
"$_dhahelper"
4759 echocheck
"VIDIX svgalib_helper support"
4760 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4761 echores
"$_svgalib_helper"
4764 _novomodules
="cvidix $_novomodules"
4767 if test "$_vidix" = yes && win32
; then
4769 _vomodules
="winvidix $_vomodules"
4770 libs_mplayer
="$libs_mplayer -lgdi32"
4772 _novomodules
="winvidix $_novomodules"
4774 if test "$_vidix" = yes && test "$_x11" = yes; then
4776 _vomodules
="xvidix $_vomodules"
4778 _novomodules
="xvidix $_novomodules"
4781 echocheck
"/dev/mga_vid"
4782 if test "$_mga" = auto
; then
4784 test -c /dev
/mga_vid
&& _mga
=yes
4786 if test "$_mga" = yes ; then
4787 def_mga
='#define CONFIG_MGA 1'
4788 _vomodules
="mga $_vomodules"
4790 def_mga
='#undef CONFIG_MGA'
4791 _novomodules
="mga $_novomodules"
4796 if test "$_xmga" = auto
; then
4798 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4800 if test "$_xmga" = yes ; then
4801 def_xmga
='#define CONFIG_XMGA 1'
4802 _vomodules
="xmga $_vomodules"
4804 def_xmga
='#undef CONFIG_XMGA'
4805 _novomodules
="xmga $_novomodules"
4811 if test "$_ggi" = auto
; then
4813 #include <ggi/ggi.h>
4814 int main(void) { ggiInit(); return 0; }
4817 cc_check
-lggi && _ggi
=yes
4819 if test "$_ggi" = yes ; then
4820 def_ggi
='#define CONFIG_GGI 1'
4821 libs_mplayer
="$libs_mplayer -lggi"
4822 _vomodules
="ggi $_vomodules"
4824 def_ggi
='#undef CONFIG_GGI'
4825 _novomodules
="ggi $_novomodules"
4829 echocheck
"GGI extension: libggiwmh"
4830 if test "$_ggiwmh" = auto
; then
4833 #include <ggi/ggi.h>
4834 #include <ggi/wmh.h>
4835 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4837 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4839 # needed to get right output on obscure combination
4840 # like --disable-ggi --enable-ggiwmh
4841 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4842 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4843 libs_mplayer
="$libs_mplayer -lggiwmh"
4846 def_ggiwmh
='#undef CONFIG_GGIWMH'
4852 if test "$_aa" = auto
; then
4855 extern struct aa_hardware_params aa_defparams;
4856 extern struct aa_renderparams aa_defrenderparams;
4860 (void) aa_init(0, 0, 0);
4861 c = aa_autoinit(&aa_defparams);
4862 p = aa_getrenderparams();
4863 aa_autoinitkbd(c,0);
4867 for _ld_tmp
in "-laa" ; do
4868 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4871 if test "$_aa" = yes ; then
4872 def_aa
='#define CONFIG_AA 1'
4874 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4876 _vomodules
="aa $_vomodules"
4878 def_aa
='#undef CONFIG_AA'
4879 _novomodules
="aa $_novomodules"
4885 if test "$_caca" = auto
; then
4887 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4890 #ifdef CACA_API_VERSION_1
4893 int main(void) { (void) caca_init(); return 0; }
4895 cc_check $
(caca-config
--libs) && _caca
=yes
4898 if test "$_caca" = yes ; then
4899 def_caca
='#define CONFIG_CACA 1'
4900 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4901 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4902 _vomodules
="caca $_vomodules"
4904 def_caca
='#undef CONFIG_CACA'
4905 _novomodules
="caca $_novomodules"
4911 if test "$_svga" = auto
; then
4914 int main(void) { return 0; }
4917 cc_check
-lvga $_ld_lm && _svga
=yes
4919 if test "$_svga" = yes ; then
4920 def_svga
='#define CONFIG_SVGALIB 1'
4921 libs_mplayer
="$libs_mplayer -lvga"
4922 _vomodules
="svga $_vomodules"
4924 def_svga
='#undef CONFIG_SVGALIB'
4925 _novomodules
="svga $_novomodules"
4931 if test "$_fbdev" = auto
; then
4935 if test "$_fbdev" = yes ; then
4936 def_fbdev
='#define CONFIG_FBDEV 1'
4937 _vomodules
="fbdev $_vomodules"
4939 def_fbdev
='#undef CONFIG_FBDEV'
4940 _novomodules
="fbdev $_novomodules"
4947 if test "$_dvb" = auto
; then
4951 #include <sys/ioctl.h>
4955 #include <linux/dvb/dmx.h>
4956 #include <linux/dvb/frontend.h>
4957 #include <linux/dvb/video.h>
4958 #include <linux/dvb/audio.h>
4959 int main(void) {return 0;}
4961 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4962 cc_check
$_inc_tmp && _dvb
=yes && \
4963 extra_cflags
="$extra_cflags $_inc_tmp" && break
4967 if test "$_dvb" = yes ; then
4969 _inputmodules
="dvb $_inputmodules"
4970 def_dvb
='#define CONFIG_DVB 1'
4971 def_dvbin
='#define CONFIG_DVBIN 1'
4972 _aomodules
="mpegpes(dvb) $_aomodules"
4973 _vomodules
="mpegpes(dvb) $_vomodules"
4976 _noinputmodules
="dvb $_noinputmodules"
4977 def_dvb
='#undef CONFIG_DVB'
4978 def_dvbin
='#undef CONFIG_DVBIN '
4979 _aomodules
="mpegpes(file) $_aomodules"
4980 _vomodules
="mpegpes(file) $_vomodules"
4986 echocheck
"QuickTime"
4987 if test "$quicktime" = auto
; then
4989 #include <QuickTime/QuickTime.h>
4991 ImageDescription *desc;
4998 cc_check
-framework QuickTime
&& quicktime
=yes
5000 if test "$quicktime" = yes ; then
5001 extra_ldflags
="$extra_ldflags -framework QuickTime"
5002 def_quicktime
='#define CONFIG_QUICKTIME 1'
5004 def_quicktime
='#undef CONFIG_QUICKTIME'
5010 if test "$_quartz" = auto
; then
5012 #include <Carbon/Carbon.h>
5014 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
5019 cc_check
-framework Carbon
&& _quartz
=yes
5021 if test "$_quartz" = yes ; then
5022 libs_mplayer
="$libs_mplayer -framework Carbon"
5023 def_quartz
='#define CONFIG_QUARTZ 1'
5024 _vomodules
="quartz $_vomodules"
5026 def_quartz
='#undef CONFIG_QUARTZ'
5027 _novomodules
="quartz $_novomodules"
5031 echocheck
"CoreVideo"
5032 if test "$_corevideo" = auto
; then
5034 #include <Carbon/Carbon.h>
5035 #include <CoreServices/CoreServices.h>
5036 #include <OpenGL/OpenGL.h>
5037 #include <QuartzCore/CoreVideo.h>
5038 int main(void) { return 0; }
5041 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
5043 if test "$_corevideo" = yes ; then
5044 _vomodules
="corevideo $_vomodules"
5045 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
5046 def_corevideo
='#define CONFIG_COREVIDEO 1'
5048 _novomodules
="corevideo $_novomodules"
5049 def_corevideo
='#undef CONFIG_COREVIDEO'
5051 echores
"$_corevideo"
5056 echocheck
"PNG support"
5057 if test "$_png" = auto
; then
5060 # Don't check for -lpng on irix since it has its own libpng
5061 # incompatible with the GNU libpng
5062 _res_comment
="disabled on irix (not GNU libpng)"
5068 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
5069 printf("libpng: %s\n", png_libpng_ver);
5070 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
5073 cc_check
-lpng -lz $_ld_lm && _png
=yes
5077 if test "$_png" = yes ; then
5078 def_png
='#define CONFIG_PNG 1'
5079 extra_ldflags
="$extra_ldflags -lpng -lz"
5081 def_png
='#undef CONFIG_PNG'
5084 echocheck
"MNG support"
5085 if test "$_mng" = auto
; then
5090 const char * p_ver = mng_version_text();
5091 return !p_ver || p_ver[0] == 0;
5094 if cc_check
-lmng -lz $_ld_lm ; then
5099 if test "$_mng" = yes ; then
5100 def_mng
='#define CONFIG_MNG 1'
5101 extra_ldflags
="$extra_ldflags -lmng -lz"
5103 def_mng
='#undef CONFIG_MNG'
5106 echocheck
"JPEG support"
5107 if test "$_jpeg" = auto
; then
5114 #include <jpeglib.h>
5115 int main(void) { return 0; }
5117 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
5121 if test "$_jpeg" = yes ; then
5122 def_jpeg
='#define CONFIG_JPEG 1'
5123 _vomodules
="jpeg $_vomodules"
5124 extra_ldflags
="$extra_ldflags -ljpeg"
5126 def_jpeg
='#undef CONFIG_JPEG'
5127 _novomodules
="jpeg $_novomodules"
5131 echocheck
"OpenJPEG (JPEG2000) support"
5132 if test "$libopenjpeg" = auto
; then
5136 #include <openjpeg.h>
5137 int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
5139 cc_check
-lopenjpeg $_ld_lm && libopenjpeg
=yes
5141 echores
"$libopenjpeg"
5142 if test "$libopenjpeg" = yes ; then
5143 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 1'
5144 extra_ldflags
="$extra_ldflags -lopenjpeg"
5145 _libavdecoders
="$_libavdecoders LIBOPENJPEG_DECODER"
5146 _libavencoders
="$_libavencoders LIBOPENJPEG_ENCODER"
5147 _codecmodules
="OpenJPEG $_codecmodules"
5149 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 0'
5150 _nocodecmodules
="OpenJPEG $_nocodecmodules"
5154 echocheck
"PNM support"
5155 if test "$_pnm" = yes; then
5156 def_pnm
="#define CONFIG_PNM 1"
5157 _vomodules
="pnm $_vomodules"
5159 def_pnm
="#undef CONFIG_PNM"
5160 _novomodules
="pnm $_novomodules"
5166 echocheck
"GIF support"
5167 # This is to appease people who want to force gif support.
5168 # If it is forced to yes, then we still do checks to determine
5169 # which gif library to use.
5170 if test "$_gif" = yes ; then
5175 if test "$_gif" = auto
; then
5178 #include <gif_lib.h>
5179 int main(void) { return 0; }
5181 for _ld_gif
in "-lungif" "-lgif" ; do
5182 cc_check
$_ld_gif && _gif
=yes && break
5186 # If no library was found, and the user wants support forced,
5187 # then we force it on with libgif, as this is the safest
5188 # assumption IMHO. (libungif & libregif both create symbolic
5189 # links to libgif. We also assume that no x11 support is needed,
5190 # because if you are forcing this, then you _should_ know what
5191 # you are doing. [ Besides, package maintainers should never
5192 # have compiled x11 deps into libungif in the first place. ] )
5195 if test "$_force_gif" = yes && test "$_gif" = no
; then
5200 if test "$_gif" = yes ; then
5201 def_gif
='#define CONFIG_GIF 1'
5202 _codecmodules
="gif $_codecmodules"
5203 _vomodules
="gif89a $_vomodules"
5204 _res_comment
="old version, some encoding functions disabled"
5205 def_gif_4
='#undef CONFIG_GIF_4'
5206 extra_ldflags
="$extra_ldflags $_ld_gif"
5210 #include <gif_lib.h>
5211 void catch() { exit(1); }
5213 signal(SIGSEGV, catch); // catch segfault
5214 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5215 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5219 if cc_check
"$_ld_gif" ; then
5220 def_gif_4
='#define CONFIG_GIF_4 1'
5224 def_gif
='#undef CONFIG_GIF'
5225 def_gif_4
='#undef CONFIG_GIF_4'
5226 _novomodules
="gif89a $_novomodules"
5227 _nocodecmodules
="gif $_nocodecmodules"
5232 case "$_gif" in yes*)
5233 echocheck
"broken giflib workaround"
5234 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5237 #include <gif_lib.h>
5240 printf("UserData is at address %p\n", gif.UserData);
5244 if cc_check
"$_ld_gif" ; then
5245 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5254 echocheck
"VESA support"
5255 if test "$_vesa" = auto
; then
5258 int main(void) { vbeVersion(); return 0; }
5261 cc_check
-lvbe -llrmi && _vesa
=yes
5263 if test "$_vesa" = yes ; then
5264 def_vesa
='#define CONFIG_VESA 1'
5265 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5266 _vomodules
="vesa $_vomodules"
5268 def_vesa
='#undef CONFIG_VESA'
5269 _novomodules
="vesa $_novomodules"
5281 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5282 if test -z "$_sdlconfig" ; then
5283 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5284 _sdlconfig
="sdl-config"
5285 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5286 _sdlconfig
="sdl11-config"
5291 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5293 #ifdef CONFIG_SDL_SDL_H
5294 #include <SDL/SDL.h>
5299 // we allow SDL hacking our main() only on OSX
5302 int main(int argc, char *argv[]) {
5303 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5308 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
5309 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5311 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5315 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5316 _res_comment
="using $_sdlconfig"
5318 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5319 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5321 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5322 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5324 _inc_tmp
="$($_sdlconfig --cflags)"
5325 _ld_tmp
="$($_sdlconfig --libs)"
5327 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5332 if test "$_sdl" = yes ; then
5333 def_sdl
='#define CONFIG_SDL 1'
5334 extra_cflags
="$extra_cflags $_inc_tmp"
5335 libs_mplayer
="$libs_mplayer $_ld_tmp"
5336 _vomodules
="sdl $_vomodules"
5337 _aomodules
="sdl $_aomodules"
5339 def_sdl
='#undef CONFIG_SDL'
5340 _novomodules
="sdl $_novomodules"
5341 _noaomodules
="sdl $_noaomodules"
5346 # make sure this stays below CoreVideo to avoid issues due to namespace
5347 # conflicts between -lGL and -framework OpenGL
5349 #Note: this test is run even with --enable-gl since we autodetect linker flags
5350 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
5353 #include <windows.h>
5355 #elif defined(GL_SDL)
5357 #ifdef CONFIG_SDL_SDL_H
5358 #include <SDL/SDL.h>
5363 // we allow SDL hacking our main() only on OSX
5368 #include <X11/Xlib.h>
5374 wglCreateContext(dc);
5375 #elif defined(GL_SDL)
5376 SDL_GL_SwapBuffers();
5378 glXCreateContext(NULL, NULL, NULL, True);
5385 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5386 if cc_check
$_ld_tmp $_ld_lm ; then
5389 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
5393 if cc_check
-DGL_WIN32 -lopengl32 ; then
5396 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
5398 # last so it can reuse any linker etc. flags detected before
5399 if test "$_sdl" = yes ; then
5400 if cc_check
-DGL_SDL ||
5401 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
5404 elif cc_check
-DGL_SDL -lGL ||
5405 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
5408 libs_mplayer
="$libs_mplayer -lGL"
5414 if test "$_gl" = yes ; then
5415 def_gl
='#define CONFIG_GL 1'
5416 _res_comment
="backends:"
5417 if test "$_gl_win32" = yes ; then
5418 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5419 _res_comment
="$_res_comment win32"
5421 if test "$_gl_x11" = yes ; then
5422 def_gl_x11
='#define CONFIG_GL_X11 1'
5423 _res_comment
="$_res_comment x11"
5425 if test "$_gl_sdl" = yes ; then
5426 def_gl_sdl
='#define CONFIG_GL_SDL 1'
5427 _res_comment
="$_res_comment sdl"
5429 _vomodules
="opengl $_vomodules"
5431 def_gl
='#undef CONFIG_GL'
5432 def_gl_win32
='#undef CONFIG_GL_WIN32'
5433 def_gl_x11
='#undef CONFIG_GL_X11'
5434 def_gl_sdl
='#undef CONFIG_GL_SDL'
5435 _novomodules
="opengl $_novomodules"
5440 echocheck
"MatrixView"
5441 if test "$_gl" = no
; then
5444 if test "$matrixview" = yes ; then
5445 _vomodules
="matrixview $_vomodules"
5446 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5448 _novomodules
="matrixview $_novomodules"
5449 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5451 echores
"$matrixview"
5455 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5456 if test "$_kva" = auto
; then
5460 int main( void ) { return 0; }
5463 cc_check
-lkva && _kva
=yes
5465 if test "$_kva" = yes ; then
5466 def_kva
='#define CONFIG_KVA 1'
5467 libs_mplayer
="$libs_mplayer -lkva"
5468 _vomodules
="kva $_vomodules"
5470 def_kva
='#undef CONFIG_KVA'
5471 _novomodules
="kva $_novomodules"
5479 echocheck
"Windows waveout"
5480 if test "$_win32waveout" = auto
; then
5482 #include <windows.h>
5483 #include <mmsystem.h>
5484 int main(void) { return 0; }
5487 cc_check
-lwinmm && _win32waveout
=yes
5489 if test "$_win32waveout" = yes ; then
5490 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5491 libs_mplayer
="$libs_mplayer -lwinmm"
5492 _aomodules
="win32 $_aomodules"
5494 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5495 _noaomodules
="win32 $_noaomodules"
5497 echores
"$_win32waveout"
5499 echocheck
"Direct3D"
5500 if test "$_direct3d" = auto
; then
5502 #include <windows.h>
5504 int main(void) { return 0; }
5507 cc_check
&& _direct3d
=yes
5509 if test "$_direct3d" = yes ; then
5510 def_direct3d
='#define CONFIG_DIRECT3D 1'
5511 _vomodules
="direct3d $_vomodules"
5513 def_direct3d
='#undef CONFIG_DIRECT3D'
5514 _novomodules
="direct3d $_novomodules"
5516 echores
"$_direct3d"
5519 if test "$_directx" = auto
; then
5521 #include <windows.h>
5524 int main(void) { return 0; }
5527 cc_check
-lgdi32 && _directx
=yes
5529 if test "$_directx" = yes ; then
5530 def_directx
='#define CONFIG_DIRECTX 1'
5531 libs_mplayer
="$libs_mplayer -lgdi32"
5532 _vomodules
="directx $_vomodules"
5533 _aomodules
="dsound $_aomodules"
5535 def_directx
='#undef CONFIG_DIRECTX'
5536 _novomodules
="directx $_novomodules"
5537 _noaomodules
="dsound $_noaomodules"
5545 if test "$_dxr2" = auto
; then
5548 #include <dxr2ioctl.h>
5549 int main(void) { return 0; }
5551 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5552 cc_check
$_inc_tmp && _dxr2
=yes && \
5553 extra_cflags
="$extra_cflags $_inc_tmp" && break
5556 if test "$_dxr2" = yes; then
5557 def_dxr2
='#define CONFIG_DXR2 1'
5558 _aomodules
="dxr2 $_aomodules"
5559 _vomodules
="dxr2 $_vomodules"
5561 def_dxr2
='#undef CONFIG_DXR2'
5562 _noaomodules
="dxr2 $_noaomodules"
5563 _novomodules
="dxr2 $_novomodules"
5568 if test "$_dxr3" = auto
; then
5570 #include <linux/em8300.h>
5571 int main(void) { return 0; }
5574 cc_check
&& _dxr3
=yes
5576 if test "$_dxr3" = yes ; then
5577 def_dxr3
='#define CONFIG_DXR3 1'
5578 _vomodules
="dxr3 $_vomodules"
5580 def_dxr3
='#undef CONFIG_DXR3'
5581 _novomodules
="dxr3 $_novomodules"
5586 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5587 if test "$_ivtv" = auto
; then
5590 #include <inttypes.h>
5591 #include <linux/types.h>
5592 #include <linux/videodev2.h>
5593 #include <linux/ivtv.h>
5594 #include <sys/ioctl.h>
5596 struct ivtv_cfg_stop_decode sd;
5597 struct ivtv_cfg_start_decode sd1;
5598 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5599 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5603 cc_check
&& _ivtv
=yes
5605 if test "$_ivtv" = yes ; then
5606 def_ivtv
='#define CONFIG_IVTV 1'
5607 _vomodules
="ivtv $_vomodules"
5608 _aomodules
="ivtv $_aomodules"
5610 def_ivtv
='#undef CONFIG_IVTV'
5611 _novomodules
="ivtv $_novomodules"
5612 _noaomodules
="ivtv $_noaomodules"
5617 echocheck
"V4L2 MPEG Decoder"
5618 if test "$_v4l2" = auto
; then
5621 #include <inttypes.h>
5622 #include <linux/types.h>
5623 #include <linux/videodev2.h>
5624 #include <linux/version.h>
5626 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5627 #error kernel headers too old, need 2.6.22
5629 struct v4l2_ext_controls ctrls;
5630 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5635 cc_check
&& _v4l2
=yes
5637 if test "$_v4l2" = yes ; then
5638 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5639 _vomodules
="v4l2 $_vomodules"
5640 _aomodules
="v4l2 $_aomodules"
5642 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5643 _novomodules
="v4l2 $_novomodules"
5644 _noaomodules
="v4l2 $_noaomodules"
5655 echocheck
"OSS Audio"
5656 if test "$_ossaudio" = auto
; then
5658 #include <sys/ioctl.h>
5659 #include <$_soundcard_header>
5660 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5663 cc_check
&& _ossaudio
=yes
5665 if test "$_ossaudio" = yes ; then
5666 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5667 _aomodules
="oss $_aomodules"
5668 if test "$_linux_devfs" = yes; then
5669 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5670 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5673 #include <sys/ioctl.h>
5674 #include <$_soundcard_header>
5675 #ifdef OPEN_SOUND_SYSTEM
5676 int main(void) { return 0; }
5678 #error Not the real thing
5682 cc_check
&& _real_ossaudio
=yes
5683 if test "$_real_ossaudio" = yes; then
5684 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5685 elif netbsd || openbsd
; then
5686 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5687 extra_ldflags
="$extra_ldflags -lossaudio"
5689 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5691 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5694 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5695 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5696 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5697 _noaomodules
="oss $_noaomodules"
5699 echores
"$_ossaudio"
5703 if test "$_arts" = auto
; then
5705 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5709 int main(void) { return 0; }
5711 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5716 if test "$_arts" = yes ; then
5717 def_arts
='#define CONFIG_ARTS 1'
5718 _aomodules
="arts $_aomodules"
5719 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5720 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5722 _noaomodules
="arts $_noaomodules"
5728 if test "$_esd" = auto
; then
5730 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5734 int main(void) { int fd = esd_open_sound("test"); return fd; }
5736 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5742 if test "$_esd" = yes ; then
5743 def_esd
='#define CONFIG_ESD 1'
5744 _aomodules
="esd $_aomodules"
5745 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5746 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5748 echocheck
"esd_get_latency()"
5751 int main(void) { return esd_get_latency(0); }
5753 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5754 echores
"$_esd_latency"
5756 def_esd
='#undef CONFIG_ESD'
5757 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5758 _noaomodules
="esd $_noaomodules"
5763 if test "$_nas" = auto
; then
5765 #include <audio/audiolib.h>
5766 int main(void) { return 0; }
5769 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5771 if test "$_nas" = yes ; then
5772 def_nas
='#define CONFIG_NAS 1'
5773 libs_mplayer
="$libs_mplayer -laudio -lXt"
5774 _aomodules
="nas $_aomodules"
5776 _noaomodules
="nas $_noaomodules"
5777 def_nas
='#undef CONFIG_NAS'
5783 if test "$_pulse" = auto
; then
5785 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5788 #include <pulse/pulseaudio.h>
5789 int main(void) { return 0; }
5791 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5797 if test "$_pulse" = yes ; then
5798 def_pulse
='#define CONFIG_PULSE 1'
5799 _aomodules
="pulse $_aomodules"
5800 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5801 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5803 def_pulse
='#undef CONFIG_PULSE'
5804 _noaomodules
="pulse $_noaomodules"
5809 if test "$_jack" = auto
; then
5813 #include <jack/jack.h>
5814 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5816 if cc_check
-ljack ; then
5817 libs_mplayer
="$libs_mplayer -ljack"
5818 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5819 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5820 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5826 if test "$_jack" = yes ; then
5827 def_jack
='#define CONFIG_JACK 1'
5828 _aomodules
="jack $_aomodules"
5830 _noaomodules
="jack $_noaomodules"
5835 if test "$_openal" = auto
; then
5839 #include <OpenAL/al.h>
5844 alSourceQueueBuffers(0, 0, 0);
5845 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5849 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5850 cc_check
$I && _openal
=yes && break
5851 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5853 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5855 if test "$_openal" = yes ; then
5856 def_openal
='#define CONFIG_OPENAL 1'
5857 _aomodules
="openal $_aomodules"
5859 _noaomodules
="openal $_noaomodules"
5863 echocheck
"ALSA audio"
5864 if test "$_alloca" != yes ; then
5866 _res_comment
="alloca missing"
5868 if test "$_alsa" != no
; then
5871 #include <sys/time.h>
5872 #include <sys/asoundlib.h>
5873 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5874 #error "alsa version != 0.5.x"
5876 int main(void) { return 0; }
5878 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5881 #include <sys/time.h>
5882 #include <sys/asoundlib.h>
5883 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5884 #error "alsa version != 0.9.x"
5886 int main(void) { return 0; }
5888 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5890 #include <sys/time.h>
5891 #include <alsa/asoundlib.h>
5892 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5893 #error "alsa version != 0.9.x"
5895 int main(void) { return 0; }
5897 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5900 #include <sys/time.h>
5901 #include <sys/asoundlib.h>
5902 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5903 #error "alsa version != 1.0.x"
5905 int main(void) { return 0; }
5907 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5909 #include <sys/time.h>
5910 #include <alsa/asoundlib.h>
5911 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5912 #error "alsa version != 1.0.x"
5914 int main(void) { return 0; }
5916 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5918 def_alsa
='#undef CONFIG_ALSA'
5919 def_alsa5
='#undef CONFIG_ALSA5'
5920 def_alsa9
='#undef CONFIG_ALSA9'
5921 def_alsa1x
='#undef CONFIG_ALSA1X'
5922 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5923 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5924 if test "$_alsaver" ; then
5926 if test "$_alsaver" = '0.5.x' ; then
5928 _aomodules
="alsa5 $_aomodules"
5929 def_alsa5
='#define CONFIG_ALSA5 1'
5930 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5931 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5932 elif test "$_alsaver" = '0.9.x-sys' ; then
5934 _aomodules
="alsa $_aomodules"
5935 def_alsa
='#define CONFIG_ALSA 1'
5936 def_alsa9
='#define CONFIG_ALSA9 1'
5937 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5938 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5939 elif test "$_alsaver" = '0.9.x-alsa' ; then
5941 _aomodules
="alsa $_aomodules"
5942 def_alsa
='#define CONFIG_ALSA 1'
5943 def_alsa9
='#define CONFIG_ALSA9 1'
5944 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5945 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5946 elif test "$_alsaver" = '1.0.x-sys' ; then
5948 _aomodules
="alsa $_aomodules"
5949 def_alsa
='#define CONFIG_ALSA 1'
5950 def_alsa1x
="#define CONFIG_ALSA1X 1"
5951 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5952 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5953 elif test "$_alsaver" = '1.0.x-alsa' ; then
5955 _aomodules
="alsa $_aomodules"
5956 def_alsa
='#define CONFIG_ALSA 1'
5957 def_alsa1x
="#define CONFIG_ALSA1X 1"
5958 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5959 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5962 _res_comment
="unknown version"
5964 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5966 _noaomodules
="alsa $_noaomodules"
5971 echocheck
"Sun audio"
5972 if test "$_sunaudio" = auto
; then
5974 #include <sys/types.h>
5975 #include <sys/audioio.h>
5976 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5979 cc_check
&& _sunaudio
=yes
5981 if test "$_sunaudio" = yes ; then
5982 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5983 _aomodules
="sun $_aomodules"
5985 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5986 _noaomodules
="sun $_noaomodules"
5988 echores
"$_sunaudio"
5991 def_mlib
='#define CONFIG_MLIB 0'
5993 echocheck
"Sun mediaLib"
5994 if test "$_mlib" = auto
; then
5998 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
6000 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
6007 echocheck
"CoreAudio"
6008 if test "$_coreaudio" = auto
; then
6010 #include <CoreAudio/CoreAudio.h>
6011 #include <AudioToolbox/AudioToolbox.h>
6012 #include <AudioUnit/AudioUnit.h>
6013 int main(void) { return 0; }
6016 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
6018 if test "$_coreaudio" = yes ; then
6019 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
6020 def_coreaudio
='#define CONFIG_COREAUDIO 1'
6021 _aomodules
="coreaudio $_aomodules"
6023 def_coreaudio
='#undef CONFIG_COREAUDIO'
6024 _noaomodules
="coreaudio $_noaomodules"
6031 echocheck
"SGI audio"
6032 if test "$_sgiaudio" = auto
; then
6033 # check for SGI audio
6035 #include <dmedia/audio.h>
6036 int main(void) { return 0; }
6039 cc_check
&& _sgiaudio
=yes
6041 if test "$_sgiaudio" = "yes" ; then
6042 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
6043 libs_mplayer
="$libs_mplayer -laudio"
6044 _aomodules
="sgi $_aomodules"
6046 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
6047 _noaomodules
="sgi $_noaomodules"
6049 echores
"$_sgiaudio"
6054 echocheck
"KAI (UNIAUD/DART)"
6055 if test "$_kai" = auto
; then
6059 int main(void) { return 0; }
6062 cc_check
-lkai && _kai
=yes
6064 if test "$_kai" = yes ; then
6065 def_kai
='#define CONFIG_KAI 1'
6066 libs_mplayer
="$libs_mplayer -lkai"
6067 _aomodules
="kai $_aomodules"
6069 def_kai
='#undef CONFIG_KAI'
6070 _noaomodules
="kai $_noaomodules"
6075 if test "$_dart" = auto
; then
6079 int main( void ) { return 0; }
6082 cc_check
-ldart && _dart
=yes
6084 if test "$_dart" = yes ; then
6085 def_dart
='#define CONFIG_DART 1'
6086 libs_mplayer
="$libs_mplayer -ldart"
6087 _aomodules
="dart $_aomodules"
6089 def_dart
='#undef CONFIG_DART'
6090 _noaomodules
="dart $_noaomodules"
6096 # set default CD/DVD devices
6097 if win32 || os2
; then
6098 default_cdrom_device
="D:"
6100 default_cdrom_device
="/dev/disk1"
6101 elif dragonfly
; then
6102 default_cdrom_device
="/dev/cd0"
6104 default_cdrom_device
="/dev/acd0"
6106 default_cdrom_device
="/dev/rcd0a"
6108 default_cdrom_device
="/vol/dev/aliases/cdrom0"
6109 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
6110 # file system and the volfs service.
6111 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
6113 default_cdrom_device
="a1ide.device:2"
6115 default_cdrom_device
="/dev/cdrom"
6118 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
6119 default_dvd_device
=$default_cdrom_device
6121 default_dvd_device
="/dev/rdiskN"
6123 default_dvd_device
="/dev/dvd"
6127 echocheck
"VCD support"
6128 if test "$_vcd" = auto
; then
6130 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
6134 #include <ddk/ntddcdrm.h>
6135 int main(void) { return 0; }
6137 cc_check
&& _vcd
=yes
6140 if test "$_vcd" = yes; then
6141 _inputmodules
="vcd $_inputmodules"
6142 def_vcd
='#define CONFIG_VCD 1'
6144 def_vcd
='#undef CONFIG_VCD'
6145 _noinputmodules
="vcd $_noinputmodules"
6146 _res_comment
="not supported on this OS"
6153 if test "$_dvdread_internal" = auto
; then
6154 _dvdread_internal
=no
6156 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
6157 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
6158 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
6159 || darwin || win32 || os2
; then
6160 _dvdread_internal
=yes
6162 extra_cflags
="-Ilibdvdread4 $extra_cflags"
6164 elif test "$_dvdread" = auto
; then
6166 if test "$_dl" = yes; then
6168 #include <inttypes.h>
6169 #include <dvdread/dvd_reader.h>
6170 #include <dvdread/ifo_types.h>
6171 #include <dvdread/ifo_read.h>
6172 #include <dvdread/nav_read.h>
6173 int main(void) { return 0; }
6175 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
6176 _dvdreadlibs
=$
($_dvdreadconfig --libs)
6177 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
6178 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
6180 extra_cflags
="$extra_cflags $_dvdreadcflags"
6181 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
6182 _res_comment
="external"
6187 if test "$_dvdread_internal" = yes; then
6188 def_dvdread
='#define CONFIG_DVDREAD 1'
6189 _inputmodules
="dvdread(internal) $_inputmodules"
6191 _res_comment
="internal"
6192 elif test "$_dvdread" = yes; then
6193 def_dvdread
='#define CONFIG_DVDREAD 1'
6195 extra_ldflags
="$extra_ldflags -ldvdread"
6196 _inputmodules
="dvdread(external) $_inputmodules"
6197 _res_comment
="external"
6199 def_dvdread
='#undef CONFIG_DVDREAD'
6200 _noinputmodules
="dvdread $_noinputmodules"
6205 echocheck
"internal libdvdcss"
6206 if test "$_libdvdcss_internal" = auto
; then
6207 _libdvdcss_internal
=no
6208 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
6209 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
6211 if test "$_libdvdcss_internal" = yes ; then
6212 if linux || netbsd || openbsd || bsdos
; then
6213 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
6214 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
6215 elif freebsd || dragonfly
; then
6216 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
6218 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
6219 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
6221 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
6223 cflags_libdvdcss
="-DSYS_BEOS"
6225 cflags_libdvdcss
="-DSYS_OS2"
6227 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
6228 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
6229 _inputmodules
="libdvdcss(internal) $_inputmodules"
6232 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
6234 echores
"$_libdvdcss_internal"
6237 echocheck
"cdparanoia"
6238 if test "$_cdparanoia" = auto
; then
6240 #include <cdda_interface.h>
6241 #include <cdda_paranoia.h>
6242 // This need a better test. How ?
6243 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
6246 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
6247 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
6248 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
6251 if test "$_cdparanoia" = yes ; then
6253 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
6254 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
6256 echores
"$_cdparanoia"
6260 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
6263 #include <cdio/version.h>
6264 #include <cdio/cdda.h>
6265 #include <cdio/paranoia.h>
6267 void *test = cdda_verbose_set;
6268 printf("%s\n", CDIO_VERSION);
6269 return test == (void *)1;
6273 for _ld_tmp
in "" "-lwinmm" ; do
6274 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
6275 cc_check
$_ld_tmp $_ld_lm \
6276 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6278 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
6279 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
6280 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
6281 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
6282 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6285 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
6287 def_libcdio
='#define CONFIG_LIBCDIO 1'
6288 def_havelibcdio
='yes'
6290 if test "$_cdparanoia" = yes ; then
6291 _res_comment
="using cdparanoia"
6293 def_libcdio
='#undef CONFIG_LIBCDIO'
6294 def_havelibcdio
='no'
6298 if test "$_cdda" = yes ; then
6299 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
6300 def_cdparanoia
='#define CONFIG_CDDA 1'
6301 _inputmodules
="cdda $_inputmodules"
6303 def_cdparanoia
='#undef CONFIG_CDDA'
6304 _noinputmodules
="cdda $_noinputmodules"
6307 if test "$_cddb" = yes ; then
6308 def_cddb
='#define CONFIG_CDDB 1'
6309 _inputmodules
="cddb $_inputmodules"
6312 def_cddb
='#undef CONFIG_CDDB'
6313 _noinputmodules
="cddb $_noinputmodules"
6316 echocheck
"bitmap font support"
6317 if test "$_bitmap_font" = yes ; then
6318 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6320 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6322 echores
"$_bitmap_font"
6325 echocheck
"freetype >= 2.0.9"
6327 # freetype depends on iconv
6328 if test "$_iconv" = no
; then
6330 _res_comment
="iconv support needed"
6333 if test "$_freetype" = auto
; then
6334 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6337 #include <ft2build.h>
6338 #include FT_FREETYPE_H
6339 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6340 #error "Need FreeType 2.0.9 or newer"
6344 FT_Int major=-1,minor=-1,patch=-1;
6345 int err=FT_Init_FreeType(&library);
6350 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6355 if test "$_freetype" = yes ; then
6356 def_freetype
='#define CONFIG_FREETYPE 1'
6357 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6358 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6360 def_freetype
='#undef CONFIG_FREETYPE'
6362 echores
"$_freetype"
6364 if test "$_freetype" = no
; then
6366 _res_comment
="FreeType support needed"
6368 echocheck
"fontconfig"
6369 if test "$_fontconfig" = auto
; then
6373 #include <fontconfig/fontconfig.h>
6374 #if FC_VERSION < 20402
6375 #error At least version 2.4.2 of fontconfig required
6379 if (err == FcFalse) {
6380 printf("Couldn't initialize fontconfig lib\n");
6387 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6388 _ld_tmp
="-lfontconfig $_ld_tmp"
6389 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6391 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6392 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6393 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6394 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6395 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6398 if test "$_fontconfig" = yes ; then
6399 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6401 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6403 echores
"$_fontconfig"
6406 echocheck
"SSA/ASS support"
6407 # libass depends on FreeType
6408 if test "$_freetype" = no
; then
6411 _res_comment
="FreeType support needed"
6414 if test "$_ass" = auto
; then
6416 #include <ft2build.h>
6417 #include FT_FREETYPE_H
6418 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 2) || ((FREETYPE_MINOR == 2) && (FREETYPE_PATCH < 1)))
6419 #error "Need FreeType 2.2.1 or newer"
6421 int main(void) { return 0; }
6424 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _ass
=yes
6425 if test "$_ass" = no
; then
6427 _res_comment
="FreeType >= 2.2.1 needed"
6428 elif test "$ass_internal" = no
; then
6429 _res_comment
="external"
6430 extra_ldflags
="$extra_ldflags -lass"
6433 if test "$_ass" = yes ; then
6434 def_ass
='#define CONFIG_ASS 1'
6436 def_ass
='#undef CONFIG_ASS'
6438 if test "$ass_internal" = yes ; then
6439 def_ass_internal
='#define CONFIG_ASS_INTERNAL 1'
6441 def_ass_internal
='#undef CONFIG_ASS_INTERNAL'
6446 echocheck
"fribidi with charsets"
6449 if test "$_fribidi" = auto
; then
6453 /* workaround for fribidi 0.10.4 and below */
6454 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6455 #include <fribidi/fribidi.h>
6457 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6458 printf("Fribidi headers are not consistents with the library!\n");
6467 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6468 if $_fribidiconfig --version > /dev
/null
2>&1 &&
6469 test "$_fribidi" = no
; then
6470 _inc_tmp
="$($_fribidiconfig --cflags)"
6471 _ld_tmp
="$($_fribidiconfig --libs)"
6472 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6475 if test "$_fribidi" = yes ; then
6476 def_fribidi
='#define CONFIG_FRIBIDI 1'
6477 extra_cflags
="$extra_cflags $_inc_tmp"
6478 extra_ldflags
="$extra_ldflags $_ld_tmp"
6480 def_fribidi
='#undef CONFIG_FRIBIDI'
6486 if test "$_enca" = auto
; then
6488 #include <sys/types.h>
6493 langs = enca_get_languages(&langcnt);
6498 cc_check
-lenca $_ld_lm && _enca
=yes
6500 if test "$_enca" = yes ; then
6501 def_enca
='#define CONFIG_ENCA 1'
6502 extra_ldflags
="$extra_ldflags -lenca"
6504 def_enca
='#undef CONFIG_ENCA'
6512 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6515 cc_check
-lz && _zlib
=yes
6516 if test "$_zlib" = yes ; then
6517 def_zlib
='#define CONFIG_ZLIB 1'
6518 extra_ldflags
="$extra_ldflags -lz"
6520 def_zlib
='#define CONFIG_ZLIB 0'
6521 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/FLASHSV_DECODER
// -e s
/PNG_DECODER
// -e s
/ZMBV_DECODER
// -e s
/ZLIB_DECODER
// -e s
/DXA_DECODER
// -e s
/TSCC_DECODER
//)
6522 _libavencoders
=$
(echo $_libavencoders |
sed -e s
/FLASHSV_ENCODER
// -e s
/PNG_ENCODER
// -e s
/ZMBV_ENCODER
// -e s
/ZLIB_ENCODER
//)
6529 def_bzlib
='#define CONFIG_BZLIB 0'
6532 int main(void) { BZ2_bzlibVersion(); return 0; }
6534 cc_check
-lbz2 && bzlib
=yes
6535 if test "$bzlib" = yes ; then
6536 def_bzlib
='#define CONFIG_BZLIB 1'
6537 extra_ldflags
="$extra_ldflags -lbz2"
6543 if test "$_rtc" = auto
; then
6545 #include <sys/ioctl.h>
6547 #include <linux/rtc.h>
6550 #define RTC_PIE_ON RTCIO_PIE_ON
6552 int main(void) { return RTC_PIE_ON; }
6555 cc_check
&& _rtc
=yes
6558 if test "$_rtc" = yes ; then
6559 def_rtc
='#define HAVE_RTC 1'
6561 def_rtc
='#undef HAVE_RTC'
6566 echocheck
"liblzo2 support"
6567 if test "$_liblzo" = auto
; then
6570 #include <lzo/lzo1x.h>
6571 int main(void) { lzo_init();return 0; }
6573 cc_check
-llzo2 && _liblzo
=yes
6575 if test "$_liblzo" = yes ; then
6576 def_liblzo
='#define CONFIG_LIBLZO 1'
6577 extra_ldflags
="$extra_ldflags -llzo2"
6578 _codecmodules
="liblzo $_codecmodules"
6580 def_liblzo
='#undef CONFIG_LIBLZO'
6581 _nocodecmodules
="liblzo $_nocodecmodules"
6586 echocheck
"mad support"
6587 if test "$_mad" = auto
; then
6591 int main(void) { return 0; }
6593 cc_check
-lmad && _mad
=yes
6595 if test "$_mad" = yes ; then
6596 def_mad
='#define CONFIG_LIBMAD 1'
6597 extra_ldflags
="$extra_ldflags -lmad"
6598 _codecmodules
="libmad $_codecmodules"
6600 def_mad
='#undef CONFIG_LIBMAD'
6601 _nocodecmodules
="libmad $_nocodecmodules"
6606 if test "$_twolame" = auto
; then
6608 #include <twolame.h>
6609 int main(void) { twolame_init(); return 0; }
6612 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6614 if test "$_twolame" = yes ; then
6615 def_twolame
='#define CONFIG_TWOLAME 1'
6616 libs_mencoder
="$libs_mencoder -ltwolame"
6617 _codecmodules
="twolame $_codecmodules"
6619 def_twolame
='#undef CONFIG_TWOLAME'
6620 _nocodecmodules
="twolame $_nocodecmodules"
6625 if test "$_toolame" = auto
; then
6627 if test "$_twolame" = yes ; then
6628 _res_comment
="disabled by twolame"
6631 #include <toolame.h>
6632 int main(void) { toolame_init(); return 0; }
6634 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6637 if test "$_toolame" = yes ; then
6638 def_toolame
='#define CONFIG_TOOLAME 1'
6639 libs_mencoder
="$libs_mencoder -ltoolame"
6640 _codecmodules
="toolame $_codecmodules"
6642 def_toolame
='#undef CONFIG_TOOLAME'
6643 _nocodecmodules
="toolame $_nocodecmodules"
6645 if test "$_toolamedir" ; then
6646 _res_comment
="using $_toolamedir"
6650 echocheck
"OggVorbis support"
6651 if test "$_tremor_internal" = yes; then
6653 elif test "$_tremor" = auto
; then
6656 #include <tremor/ivorbiscodec.h>
6657 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6659 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6661 if test "$_libvorbis" = auto
; then
6664 #include <vorbis/codec.h>
6665 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6667 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6669 if test "$_tremor_internal" = yes ; then
6671 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6672 def_tremor
='#define CONFIG_TREMOR 1'
6673 _codecmodules
="tremor(internal) $_codecmodules"
6674 _res_comment
="internal Tremor"
6675 if test "$_tremor_low" = yes ; then
6676 cflags_tremor_low
="-D_LOW_ACCURACY_"
6677 _res_comment
="internal low accuracy Tremor"
6679 elif test "$_tremor" = yes ; then
6681 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6682 def_tremor
='#define CONFIG_TREMOR 1'
6683 _codecmodules
="tremor(external) $_codecmodules"
6684 _res_comment
="external Tremor"
6685 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6686 elif test "$_libvorbis" = yes ; then
6688 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6689 _codecmodules
="libvorbis $_codecmodules"
6690 _res_comment
="libvorbis"
6691 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6694 _nocodecmodules
="libvorbis $_nocodecmodules"
6698 echocheck
"libspeex (version >= 1.1 required)"
6699 if test "$_speex" = auto
; then
6702 #include <speex/speex.h>
6703 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6705 cc_check
-lspeex $_ld_lm && _speex
=yes
6707 if test "$_speex" = yes ; then
6708 def_speex
='#define CONFIG_SPEEX 1'
6709 extra_ldflags
="$extra_ldflags -lspeex"
6710 _codecmodules
="speex $_codecmodules"
6712 def_speex
='#undef CONFIG_SPEEX'
6713 _nocodecmodules
="speex $_nocodecmodules"
6717 echocheck
"OggTheora support"
6718 if test "$_theora" = auto
; then
6721 #include <theora/theora.h>
6724 /* Theora is in flux, make sure that all interface routines and datatypes
6725 * exist and work the way we expect it, so we don't break MPlayer. */
6734 theora_info_init(&inf);
6735 theora_comment_init(&tc);
6739 /* we don't want to execute this kind of nonsense; just for making sure
6740 * that compilation works... */
6741 memset(&op, 0, sizeof(op));
6742 r = theora_decode_header(&inf, &tc, &op);
6743 r = theora_decode_init(&st, &inf);
6744 t = theora_granule_time(&st, op.granulepos);
6745 r = theora_decode_packetin(&st, &op);
6746 r = theora_decode_YUVout(&st, &yuv);
6752 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6753 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6754 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6755 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6756 if test _theora
= no
; then
6757 _ld_theora
="-ltheora -logg"
6758 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6760 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6761 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6762 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6763 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6764 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6765 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6766 if test _theora
= no
; then
6767 _ld_theora
="-ltheora -logg"
6768 cc_check tremor
/bitwise.c
$_ld_theora &&
6769 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6773 if test "$_theora" = yes ; then
6774 def_theora
='#define CONFIG_OGGTHEORA 1'
6775 _codecmodules
="libtheora $_codecmodules"
6776 # when --enable-theora is forced, we'd better provide a probably sane
6777 # $_ld_theora than nothing
6778 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6780 def_theora
='#undef CONFIG_OGGTHEORA'
6781 _nocodecmodules
="libtheora $_nocodecmodules"
6785 echocheck
"internal mp3lib support"
6786 if test "$_mp3lib" = auto
; then
6787 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6789 if test "$_mp3lib" = yes ; then
6790 def_mp3lib
='#define CONFIG_MP3LIB 1'
6791 _codecmodules
="mp3lib(internal) $_codecmodules"
6793 def_mp3lib
='#undef CONFIG_MP3LIB'
6794 _nocodecmodules
="mp3lib(internal) $_nocodecmodules"
6798 echocheck
"liba52 support"
6799 if test "$_liba52_internal" = auto
; then
6800 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _liba52_internal
=no || _liba52_internal
=yes
6802 def_liba52
='#undef CONFIG_LIBA52'
6803 def_liba52_internal
="#undef CONFIG_LIBA52_INTERNAL"
6804 if test "$_liba52_internal" = yes ; then
6806 def_liba52_internal
="#define CONFIG_LIBA52_INTERNAL 1"
6807 _res_comment
="internal"
6808 elif test "$_liba52_internal" = no
&& test "$_liba52" = auto
; then
6811 #include <inttypes.h>
6812 #include <a52dec/a52.h>
6813 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6815 cc_check
-la52 && _liba52
=yes && _res_comment
="external" && extra_ldflags
="$extra_ldflags -la52"
6817 if test "$_liba52" = yes ; then
6818 def_liba52
='#define CONFIG_LIBA52 1'
6819 _codecmodules
="liba52($_res_comment) $_codecmodules"
6821 _nocodecmodules
="liba52 $_nocodecmodules"
6825 echocheck
"internal libmpeg2 support"
6826 if test "$_libmpeg2" = auto
; then
6828 if alpha
&& test cc_vendor
=gnu
; then
6830 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6832 _res_comment
="broken gcc"
6837 if test "$_libmpeg2" = yes ; then
6838 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6839 _codecmodules
="libmpeg2(internal) $_codecmodules"
6841 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6842 _nocodecmodules
="libmpeg2(internal) $_nocodecmodules"
6844 echores
"$_libmpeg2"
6846 echocheck
"libdca support"
6847 if test "$_libdca" = auto
; then
6850 #include <inttypes.h>
6852 int main(void) { dts_init(0); return 0; }
6854 for _ld_dca
in -ldca -ldts ; do
6855 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6856 && _libdca
=yes && break
6859 if test "$_libdca" = yes ; then
6860 def_libdca
='#define CONFIG_LIBDCA 1'
6861 _codecmodules
="libdca $_codecmodules"
6863 def_libdca
='#undef CONFIG_LIBDCA'
6864 _nocodecmodules
="libdca $_nocodecmodules"
6868 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6869 if test "$_musepack" = auto
; then
6873 #include <mpcdec/mpcdec.h>
6875 mpc_streaminfo info;
6876 mpc_decoder decoder;
6877 mpc_decoder_set_streaminfo(&decoder, &info);
6878 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6882 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6884 if test "$_musepack" = yes ; then
6885 def_musepack
='#define CONFIG_MUSEPACK 1'
6886 extra_ldflags
="$extra_ldflags -lmpcdec"
6887 _codecmodules
="musepack $_codecmodules"
6889 def_musepack
='#undef CONFIG_MUSEPACK'
6890 _nocodecmodules
="musepack $_nocodecmodules"
6892 echores
"$_musepack"
6895 echocheck
"FAAC support"
6896 if test "$_faac" = auto
; then
6898 #include <inttypes.h>
6900 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6903 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6904 cc_check
$_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6907 if test "$_faac" = yes ; then
6908 def_faac
="#define CONFIG_FAAC 1"
6909 test "$_faac_lavc" = auto
&& _faac_lavc
=yes
6910 if test "$_faac_lavc" = yes ; then
6911 def_faac_lavc
="#define CONFIG_LIBFAAC 1"
6912 libs_mplayer
="$libs_mplayer $_ld_faac"
6913 _libavencoders
="$_libavencoders LIBFAAC_ENCODER"
6915 _codecmodules
="faac $_codecmodules"
6918 def_faac
="#undef CONFIG_FAAC"
6919 def_faac_lavc
="#define CONFIG_LIBFAAC 0"
6920 _nocodecmodules
="faac $_nocodecmodules"
6922 _res_comment
="in libavcodec: $_faac_lavc"
6926 echocheck
"FAAD2 support"
6927 if test "$_faad_internal" = auto
; then
6928 if x86_32
&& test cc_vendor
=gnu
; then
6930 3.1*|
3.2) # ICE/insn with these versions
6932 _res_comment
="broken gcc"
6944 if test "$_faad" = auto
; then
6947 #ifndef FAAD_MIN_STREAMSIZE
6948 #error Too old version
6950 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6951 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6953 cc_check
-lfaad $_ld_lm && _faad
=yes
6956 def_faad
='#undef CONFIG_FAAD'
6957 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6958 if test "$_faad_internal" = yes ; then
6959 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6960 _res_comment
="internal floating-point"
6961 if test "$_faad_fixed" = yes ; then
6962 # The FIXED_POINT implementation of FAAD2 improves performance
6963 # on some platforms, especially for SBR files.
6964 cflags_faad_fixed
="-DFIXED_POINT"
6965 _res_comment
="internal fixed-point"
6967 elif test "$_faad" = yes ; then
6968 extra_ldflags
="$extra_ldflags -lfaad"
6971 if test "$_faad" = yes ; then
6972 def_faad
='#define CONFIG_FAAD 1'
6973 if test "$_faad_internal" = yes ; then
6974 _codecmodules
="faad2(internal) $_codecmodules"
6976 _codecmodules
="faad2 $_codecmodules"
6980 _nocodecmodules
="faad2 $_nocodecmodules"
6985 echocheck
"LADSPA plugin support"
6986 if test "$_ladspa" = auto
; then
6991 const LADSPA_Descriptor *ld = NULL;
6996 cc_check
&& _ladspa
=yes
6998 if test "$_ladspa" = yes; then
6999 def_ladspa
="#define CONFIG_LADSPA 1"
7001 def_ladspa
="#undef CONFIG_LADSPA"
7006 echocheck
"libbs2b audio filter support"
7007 if test "$_libbs2b" = auto
; then
7010 #if BS2B_VERSION_MAJOR < 3
7011 #error Please use libbs2b >= 3.0.0, older versions are not supported.
7021 if $_pkg_config --exists libbs2b
; then
7022 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
7023 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
7024 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
7025 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
7027 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
7028 -I/usr
/local
/include
/bs2b
; do
7029 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
7030 extra_ldflags
="$extra_ldflags -lbs2b"
7031 extra_cflags
="$extra_cflags $_inc_tmp"
7038 def_libbs2b
="#undef CONFIG_LIBBS2B"
7039 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
7043 if test -z "$_codecsdir" ; then
7044 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
7045 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
7046 if test -d "$dir" ; then
7052 # Fall back on default directory.
7053 if test -z "$_codecsdir" ; then
7054 _codecsdir
="$_libdir/codecs"
7055 mingw32 || os2
&& _codecsdir
="codecs"
7059 echocheck
"Win32 codecs"
7060 if test "$_win32dll" = auto
; then
7062 if x86_32
&& ! qnx
; then
7066 if test "$_win32dll" = yes ; then
7067 def_win32dll
='#define CONFIG_WIN32DLL 1'
7069 def_win32_loader
='#define WIN32_LOADER 1'
7070 _win32_emulation
=yes
7072 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
7073 _res_comment
="using native windows"
7075 _codecmodules
="win32 $_codecmodules"
7077 def_win32dll
='#undef CONFIG_WIN32DLL'
7078 def_win32_loader
='#undef WIN32_LOADER'
7079 _nocodecmodules
="win32 $_nocodecmodules"
7081 echores
"$_win32dll"
7084 echocheck
"XAnim codecs"
7085 if test "$_xanim" = auto
; then
7087 _res_comment
="dynamic loader support needed"
7088 if test "$_dl" = yes ; then
7092 if test "$_xanim" = yes ; then
7093 def_xanim
='#define CONFIG_XANIM 1'
7094 _codecmodules
="xanim $_codecmodules"
7096 def_xanim
='#undef CONFIG_XANIM'
7097 _nocodecmodules
="xanim $_nocodecmodules"
7102 echocheck
"RealPlayer codecs"
7103 if test "$_real" = auto
; then
7105 _res_comment
="dynamic loader support needed"
7106 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
7107 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
7111 if test "$_real" = yes ; then
7112 def_real
='#define CONFIG_REALCODECS 1'
7113 _codecmodules
="real $_codecmodules"
7115 def_real
='#undef CONFIG_REALCODECS'
7116 _nocodecmodules
="real $_nocodecmodules"
7121 echocheck
"QuickTime codecs"
7123 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
7124 if test "$_qtx" = auto
; then
7125 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
7127 if test "$_qtx" = yes ; then
7128 def_qtx
='#define CONFIG_QTX_CODECS 1'
7129 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
7130 _codecmodules
="qtx $_codecmodules"
7131 darwin || win32 || _qtx_emulation
=yes
7133 def_qtx
='#undef CONFIG_QTX_CODECS'
7134 _nocodecmodules
="qtx $_nocodecmodules"
7138 echocheck
"Nemesi Streaming Media libraries"
7139 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
7141 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
7142 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
7143 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
7147 if test "$_nemesi" = yes; then
7149 def_nemesi
='#define CONFIG_LIBNEMESI 1'
7150 _inputmodules
="nemesi $_inputmodules"
7152 _native_rtsp
="$_network"
7154 def_nemesi
='#undef CONFIG_LIBNEMESI'
7155 _noinputmodules
="nemesi $_noinputmodules"
7159 echocheck
"LIVE555 Streaming Media libraries"
7160 if test "$_live" = auto
&& test "$_network" = yes ; then
7161 cat > $TMPCPP << EOF
7162 #include <liveMedia.hh>
7163 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
7164 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
7166 int main(void) { return 0; }
7170 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
7171 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
7172 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
7173 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
7174 $_livelibdir/groupsock/libgroupsock.a \
7175 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
7176 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
7177 $extra_ldflags -lstdc++" \
7178 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
7179 -I$_livelibdir/UsageEnvironment/include \
7180 -I$_livelibdir/BasicUsageEnvironment/include \
7181 -I$_livelibdir/groupsock/include" && \
7184 if test "$_live" != yes ; then
7185 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
7186 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
7191 if test "$_live" = yes && test "$_network" = yes; then
7192 test $_livelibdir && _res_comment
="using $_livelibdir"
7193 def_live
='#define CONFIG_LIVE555 1'
7194 _inputmodules
="live555 $_inputmodules"
7195 elif test "$_live_dist" = yes && test "$_network" = yes; then
7196 _res_comment
="using distribution version"
7198 def_live
='#define CONFIG_LIVE555 1'
7199 extra_ldflags
="$extra_ldflags $ld_tmp"
7200 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
7201 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
7202 _inputmodules
="live555 $_inputmodules"
7205 def_live
='#undef CONFIG_LIVE555'
7206 _noinputmodules
="live555 $_noinputmodules"
7211 echocheck
"FFmpeg libavutil"
7212 if test "$_libavutil_a" = auto
; then
7213 if test -d libavutil
; then
7215 _res_comment
="static"
7217 die
"MPlayer will not compile without libavutil in the source tree."
7219 elif test "$_libavutil_so" = auto
; then
7222 #include <libavutil/common.h>
7223 int main(void) { av_clip(1, 1, 1); return 0; }
7225 if $_pkg_config --exists libavutil
; then
7226 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
7227 _ld_tmp
=$
($_pkg_config --libs libavutil
)
7228 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7229 && _libavutil_so
=yes
7230 elif cc_check
-lavutil $_ld_lm ; then
7231 extra_ldflags
="$extra_ldflags -lavutil"
7233 _res_comment
="using libavutil.so, but static libavutil is recommended"
7237 def_libavutil
='#undef CONFIG_LIBAVUTIL'
7238 def_libavutil_a
='#undef CONFIG_LIBAVUTIL_A'
7239 def_libavutil_so
='#undef CONFIG_LIBAVUTIL_SO'
7240 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
7241 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
7242 test "$_libavutil_a" = yes && def_libavutil_a
='#define CONFIG_LIBAVUTIL_A 1'
7243 test "$_libavutil_so" = yes && def_libavutil_so
='#define CONFIG_LIBAVUTIL_SO 1'
7244 # neither static nor shared libavutil is available, but it is mandatory ...
7245 if test "$_libavutil" = no
; then
7246 die
"You need static or shared libavutil, MPlayer will not compile without!"
7248 echores
"$_libavutil"
7250 echocheck
"FFmpeg libavcodec"
7251 if test "$_libavcodec_a" = auto
; then
7253 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
7255 _res_comment
="static"
7257 elif test "$_libavcodec_so" = auto
; then
7259 _res_comment
="libavcodec.so is discouraged over static libavcodec"
7261 #include <libavcodec/avcodec.h>
7262 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
7264 if $_pkg_config --exists libavcodec
; then
7265 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
7266 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
7267 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7268 && _libavcodec_so
=yes
7269 elif cc_check
-lavcodec $_ld_lm ; then
7270 extra_ldflags
="$extra_ldflags -lavcodec"
7272 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
7276 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
7277 def_libavcodec_a
='#undef CONFIG_LIBAVCODEC_A'
7278 def_libavcodec_so
='#undef CONFIG_LIBAVCODEC_SO'
7279 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
7280 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
7281 test "$_libavcodec_a" = yes && def_libavcodec_a
='#define CONFIG_LIBAVCODEC_A 1'
7282 test "$_libavcodec_so" = yes && def_libavcodec_so
='#define CONFIG_LIBAVCODEC_SO 1'
7283 test "$_libavcodec_mpegaudio_hp" = yes \
7284 && def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1' \
7285 && mak_libavcodec_mpegaudio_hp
='CONFIG_MPEGAUDIO_HP = yes'
7286 if test "$_libavcodec_a" = yes ; then
7287 _codecmodules
="libavcodec(internal) $_codecmodules"
7288 elif test "$_libavcodec_so" = yes ; then
7289 _codecmodules
="libavcodec.so $_codecmodules"
7291 _nocodecmodules
="libavcodec $_nocodecmodules"
7293 echores
"$_libavcodec"
7295 echocheck
"FFmpeg libavformat"
7296 if test "$_libavformat_a" = auto
; then
7298 if test -d libavformat
&& test -f libavformat
/utils.c
; then
7300 _res_comment
="static"
7302 elif test "$_libavformat_so" = auto
; then
7305 #include <libavformat/avformat.h>
7306 #include <libavcodec/opt.h>
7307 int main(void) { av_alloc_format_context(); return 0; }
7309 if $_pkg_config --exists libavformat
; then
7310 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
7311 _ld_tmp
=$
($_pkg_config --libs libavformat
)
7312 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7313 && _libavformat_so
=yes
7314 elif cc_check
$_ld_lm -lavformat ; then
7315 extra_ldflags
="$extra_ldflags -lavformat"
7317 _res_comment
="using libavformat.so, but static libavformat is recommended"
7321 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
7322 def_libavformat_a
='#undef CONFIG_LIBAVFORMAT_A'
7323 def_libavformat_so
='#undef CONFIG_LIBAVFORMAT_SO'
7324 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
7325 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
7326 test "$_libavformat_a" = yes && def_libavformat_a
='#define CONFIG_LIBAVFORMAT_A 1'
7327 test "$_libavformat_so" = yes \
7328 && def_libavformat_so
='#define CONFIG_LIBAVFORMAT_SO 1'
7329 echores
"$_libavformat"
7331 echocheck
"FFmpeg libpostproc"
7332 if test "$_libpostproc_a" = auto
; then
7334 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
7335 _libpostproc_a
='yes'
7336 _res_comment
="static"
7338 elif test "$_libpostproc_so" = auto
; then
7341 #include <inttypes.h>
7342 #include <libpostproc/postprocess.h>
7343 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
7345 if cc_check
-lpostproc $_ld_lm ; then
7346 extra_ldflags
="$extra_ldflags -lpostproc"
7348 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
7352 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
7353 def_libpostproc_a
='#undef CONFIG_LIBPOSTPROC_A'
7354 def_libpostproc_so
='#undef CONFIG_LIBPOSTPROC_SO'
7355 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
7356 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
7357 test "$_libpostproc_a" = yes && def_libpostproc_a
='#define CONFIG_LIBPOSTPROC_A 1'
7358 test "$_libpostproc_so" = yes \
7359 && def_libpostproc_so
='#define CONFIG_LIBPOSTPROC_SO 1'
7360 echores
"$_libpostproc"
7362 echocheck
"FFmpeg libswscale"
7363 if test "$_libswscale_a" = auto
; then
7365 if test -d libswscale
&& test -f libswscale
/swscale.h
; then
7367 _res_comment
="static"
7369 elif test "$_libswscale_so" = auto
; then
7371 _res_comment
="using libswscale.so, but static libswscale is recommended"
7373 #include <libswscale/swscale.h>
7374 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
7376 if $_pkg_config --exists libswscale
; then
7377 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
7378 _ld_tmp
=$
($_pkg_config --libs libswscale
)
7379 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7380 && _libswscale_so
=yes
7381 elif cc_check
-lswscale ; then
7382 extra_ldflags
="$extra_ldflags -lswscale"
7387 def_libswscale
='#undef CONFIG_LIBSWSCALE'
7388 def_libswscale_a
='#undef CONFIG_LIBSWSCALE_A'
7389 def_libswscale_so
='#undef CONFIG_LIBSWSCALE_SO'
7390 test "$_libswscale_a" = yes ||
test "$_libswscale_so" = yes && _libswscale
=yes
7391 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
7392 test "$_libswscale_a" = yes && def_libswscale_a
='#define CONFIG_LIBSWSCALE_A 1'
7393 test "$_libswscale_so" = yes \
7394 && def_libswscale_so
='#define CONFIG_LIBSWSCALE_SO 1'
7395 echores
"$_libswscale"
7397 echocheck
"libopencore_amr narrowband"
7398 if test "$_libopencore_amrnb" = auto
; then
7399 _libopencore_amrnb
=no
7401 #include <opencore-amrnb/interf_dec.h>
7402 int main(void) { Decoder_Interface_init(); return 0; }
7404 cc_check
-lopencore-amrnb && _libopencore_amrnb
=yes
7405 if test "$_libavcodec_a" != yes ; then
7406 _libopencore_amrnb
=no
7407 _res_comment
="libavcodec (static) is required by libopencore_amrnb, sorry"
7410 if test "$_libopencore_amrnb" = yes ; then
7411 _libopencore_amr
=yes
7412 extra_ldflags
="$extra_ldflags -lopencore-amrnb"
7413 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 1'
7414 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
7415 _libavencoders
="$_libavencoders LIBOPENCORE_AMRNB_ENCODER"
7416 _codecmodules
="libopencore_amrnb $_codecmodules"
7418 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 0'
7419 _nocodecmodules
="libopencore_amrnb $_nocodecmodules"
7421 echores
"$_libopencore_amrnb"
7424 echocheck
"libopencore_amr wideband"
7425 if test "$_libopencore_amrwb" = auto
; then
7426 _libopencore_amrwb
=no
7428 #include <opencore-amrwb/dec_if.h>
7429 int main(void) { D_IF_init(); return 0; }
7431 cc_check
-lopencore-amrwb && _libopencore_amrwb
=yes
7432 if test "$_libavcodec_a" != yes ; then
7433 _libopencore_amrwb
=no
7434 _res_comment
="libavcodec (static) is required by libopencore_amrwb, sorry"
7437 if test "$_libopencore_amrwb" = yes ; then
7438 _libopencore_amr
=yes
7439 extra_ldflags
="$extra_ldflags -lopencore-amrwb"
7440 def_libopencore_amrwb
='#define CONFIG_LIBOPENCORE_AMRWB 1'
7441 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
7442 _libavencoders
="$_libavencoders LIBOPENCORE_AMRWB_DECODER"
7443 _codecmodules
="libopencore_amrwb $_codecmodules"
7445 def_libopencore_amrwb
='#define LIBOPENCORE_AMRWB 0'
7446 _nocodecmodules
="libopencore_amrwb $_nocodecmodules"
7448 echores
"$_libopencore_amrwb"
7450 echocheck
"libdv-0.9.5+"
7451 if test "$_libdv" = auto
; then
7454 #include <libdv/dv.h>
7455 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7457 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7459 if test "$_libdv" = yes ; then
7460 def_libdv
='#define CONFIG_LIBDV095 1'
7461 extra_ldflags
="$extra_ldflags -ldv"
7462 _codecmodules
="libdv $_codecmodules"
7464 def_libdv
='#undef CONFIG_LIBDV095'
7465 _nocodecmodules
="libdv $_nocodecmodules"
7471 if test "$_xvid" = auto
; then
7475 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7477 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7478 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7482 if test "$_xvid" = yes ; then
7483 def_xvid
='#define CONFIG_XVID4 1'
7484 _codecmodules
="xvid $_codecmodules"
7486 def_xvid
='#undef CONFIG_XVID4'
7487 _nocodecmodules
="xvid $_nocodecmodules"
7491 echocheck
"Xvid two pass plugin"
7492 if test "$_xvid" = yes && test "$_xvid_lavc" = auto
; then
7495 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
7497 cc_check
&& _xvid_lavc
=yes
7499 if test "$_xvid_lavc" = yes ; then
7500 def_xvid_lavc
='#define CONFIG_LIBXVID 1'
7501 _libavencoders
="$_libavencoders LIBXVID_ENCODER"
7504 def_xvid_lavc
='#define CONFIG_LIBXVID 0'
7506 echores
"$_xvid_lavc"
7510 if test "$_x264" = auto
; then
7512 #include <inttypes.h>
7515 #error We do not support old versions of x264. Get the latest from git.
7517 int main(void) { x264_encoder_open((void*)0); return 0; }
7520 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7521 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7525 if test "$_x264" = yes ; then
7526 def_x264
='#define CONFIG_X264 1'
7527 _codecmodules
="x264 $_codecmodules"
7528 test "$_x264_lavc" = auto
&& _x264_lavc
=yes
7529 if test "$_x264_lavc" = yes ; then
7530 def_x264_lavc
='#define CONFIG_LIBX264 1'
7531 libs_mplayer
="$libs_mplayer $_ld_x264"
7532 _libavencoders
="$_libavencoders LIBX264_ENCODER"
7536 def_x264
='#undef CONFIG_X264'
7537 def_x264_lavc
='#define CONFIG_LIBX264 0'
7538 _nocodecmodules
="x264 $_nocodecmodules"
7540 _res_comment
="in libavcodec: $_x264_lavc"
7544 echocheck
"libdirac"
7545 if test "$_libdirac_lavc" = auto
; then
7547 if test "$_libavcodec_a" != yes; then
7548 _res_comment
="libavcodec (static) is required by libdirac, sorry"
7551 #include <libdirac_encoder/dirac_encoder.h>
7552 #include <libdirac_decoder/dirac_parser.h>
7555 dirac_encoder_context_t enc_ctx;
7556 dirac_decoder_t *dec_handle;
7557 dirac_encoder_context_init(&enc_ctx, VIDEO_FORMAT_SD_576I50);
7558 dec_handle = dirac_decoder_init(0);
7560 dirac_decoder_close(dec_handle);
7564 if $_pkg_config --exists dirac
; then
7565 _inc_dirac
=$
($_pkg_config --silence-errors --cflags dirac
)
7566 _ld_dirac
=$
($_pkg_config --silence-errors --libs dirac
)
7567 cc_check
$_inc_dirac $_ld_dirac &&
7568 _libdirac_lavc
=yes &&
7569 extra_cflags
="$extra_cflags $_inc_dirac" &&
7570 extra_ldflags
="$extra_ldflags $_ld_dirac"
7574 if test "$_libdirac_lavc" = yes ; then
7575 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 1'
7576 _libavencoders
="$_libavencoders LIBDIRAC_ENCODER"
7577 _libavdecoders
="$_libavdecoders LIBDIRAC_DECODER"
7578 _codecmodules
="libdirac $_codecmodules"
7580 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 0'
7581 _nocodecmodules
="libdirac $_nocodecmodules"
7583 echores
"$_libdirac_lavc"
7586 echocheck
"libschroedinger"
7587 if test "$_libschroedinger_lavc" = auto
; then
7588 _libschroedinger_lavc
=no
7589 if test "$_libavcodec_a" != yes; then
7590 _res_comment
="libavcodec (static) is required by libschroedinger, sorry"
7593 #include <schroedinger/schro.h>
7594 int main(void) { schro_init(); return 0; }
7596 if $_pkg_config --exists schroedinger-1.0
; then
7597 _inc_schroedinger
=$
($_pkg_config --silence-errors --cflags schroedinger-1.0
)
7598 _ld_schroedinger
=$
($_pkg_config --silence-errors --libs schroedinger-1.0
)
7599 cc_check
$_inc_schroedinger $_ld_schroedinger &&
7600 _libschroedinger_lavc
=yes &&
7601 extra_cflags
="$extra_cflags $_inc_schroedinger" &&
7602 extra_ldflags
="$extra_ldflags $_ld_schroedinger"
7606 if test "$_libschroedinger_lavc" = yes ; then
7607 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 1'
7608 _libavencoders
="$_libavencoders LIBSCHROEDINGER_ENCODER"
7609 _libavdecoders
="$_libavdecoders LIBSCHROEDINGER_DECODER"
7610 _codecmodules
="libschroedinger $_codecmodules"
7612 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 0'
7613 _nocodecmodules
="libschroedinger $_nocodecmodules"
7615 echores
"$_libschroedinger_lavc"
7618 if test "$_libnut" = auto
; then
7622 #include <inttypes.h>
7624 nut_context_tt * nut;
7625 int main(void) { (void)nut_error(0); return 0; }
7628 cc_check
-lnut && _libnut
=yes
7631 if test "$_libnut" = yes ; then
7632 def_libnut
='#define CONFIG_LIBNUT 1'
7633 extra_ldflags
="$extra_ldflags -lnut"
7635 def_libnut
='#undef CONFIG_LIBNUT'
7639 #check must be done after libavcodec one
7641 if test "$_zr" = auto
; then
7642 #36067's seem to identify themselves as 36057PQC's, so the line
7643 #below should work for 36067's and 36057's.
7644 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7650 if test "$_zr" = yes ; then
7651 if test "$_libavcodec_a" = yes ; then
7652 def_zr
='#define CONFIG_ZR 1'
7653 _vomodules
="zr zr2 $_vomodules"
7655 _res_comment
="libavcodec (static) is required by zr, sorry"
7656 _novomodules
="zr $_novomodules"
7657 def_zr
='#undef CONFIG_ZR'
7660 def_zr
='#undef CONFIG_ZR'
7661 _novomodules
="zr zr2 $_novomodules"
7665 # mencoder requires (optional) those libs: libmp3lame
7666 if test "$_mencoder" != no
; then
7668 echocheck
"libmp3lame"
7669 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7670 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7671 if test "$_mp3lame" = auto
; then
7674 #include <lame/lame.h>
7675 int main(void) { lame_version_t lv; (void) lame_init();
7676 get_lame_version_numerical(&lv);
7679 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7681 if test "$_mp3lame" = yes ; then
7682 def_mp3lame
="#define CONFIG_MP3LAME 1"
7683 _ld_mp3lame
=-lmp3lame
7684 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7686 #include <lame/lame.h>
7687 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7689 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7691 #include <lame/lame.h>
7692 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7694 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7695 test "$_mp3lame_lavc" = auto
&& _mp3lame_lavc
=yes
7696 if test "$_mp3lame_lavc" = yes ; then
7697 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 1"
7698 _libavencoders
="$_libavencoders LIBMP3LAME_ENCODER"
7699 libs_mplayer
="$libs_mplayer $_ld_mp3lame"
7703 def_mp3lame
='#undef CONFIG_MP3LAME'
7704 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 0"
7706 _res_comment
="in libavcodec: $_mp3lame_lavc"
7709 fi # test "$_mencoder" != no
7711 echocheck
"mencoder"
7712 if test "$_mencoder" = yes ; then
7713 def_muxers
='#define CONFIG_MUXERS 1'
7715 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint, png for vf_screenshot
7716 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
7717 test "$_zlib" = yes && _libavencoders
="$_libavencoders PNG_ENCODER"
7719 def_muxers
='#define CONFIG_MUXERS 0'
7721 echores
"$_mencoder"
7724 echocheck
"UnRAR executable"
7725 if test "$_unrar_exec" = auto
; then
7727 mingw32
&& _unrar_exec
="no"
7729 if test "$_unrar_exec" = yes ; then
7730 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7732 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7734 echores
"$_unrar_exec"
7736 echocheck
"TV interface"
7737 if test "$_tv" = yes ; then
7738 def_tv
='#define CONFIG_TV 1'
7739 _inputmodules
="tv $_inputmodules"
7741 _noinputmodules
="tv $_noinputmodules"
7742 def_tv
='#undef CONFIG_TV'
7747 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7748 echocheck
"*BSD BT848 bt8xx header"
7750 for file in "machine/ioctl_bt848.h" \
7751 "dev/bktr/ioctl_bt848.h" \
7752 "dev/video/bktr/ioctl_bt848.h" \
7753 "dev/ic/bt8xx.h" ; do
7755 #include <sys/types.h>
7756 #include <sys/ioctl.h>
7758 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7762 _ioctl_bt848_h_name
="$file"
7766 if test "$_ioctl_bt848_h" = yes ; then
7767 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7768 _res_comment
="using $_ioctl_bt848_h_name"
7770 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7772 echores
"$_ioctl_bt848_h"
7774 echocheck
"*BSD ioctl_meteor.h"
7776 for file in "machine/ioctl_meteor.h" \
7777 "dev/bktr/ioctl_meteor.h" \
7778 "dev/video/bktr/ioctl_meteor.h" ; do
7780 #include <sys/types.h>
7782 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7786 _ioctl_meteor_h_name
="$file"
7790 if test "$_ioctl_meteor_h" = yes ; then
7791 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7792 _res_comment
="using $_ioctl_meteor_h_name"
7794 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7796 echores
"$_ioctl_meteor_h"
7798 echocheck
"*BSD BrookTree 848 TV interface"
7799 if test "$_tv_bsdbt848" = auto
; then
7801 if test "$_tv" = yes ; then
7803 #include <sys/types.h>
7804 $def_ioctl_meteor_h_name
7805 $def_ioctl_bt848_h_name
7806 #ifdef IOCTL_METEOR_H_NAME
7807 #include IOCTL_METEOR_H_NAME
7809 #ifdef IOCTL_BT848_H_NAME
7810 #include IOCTL_BT848_H_NAME
7813 ioctl(0, METEORSINPUT, 0);
7814 ioctl(0, TVTUNER_GETFREQ, 0);
7818 cc_check
&& _tv_bsdbt848
=yes
7821 if test "$_tv_bsdbt848" = yes ; then
7822 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7823 _inputmodules
="tv-bsdbt848 $_inputmodules"
7825 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7826 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7828 echores
"$_tv_bsdbt848"
7829 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7832 echocheck
"DirectShow TV interface"
7833 if test "$_tv_dshow" = auto
; then
7835 if test "$_tv" = yes && win32
; then
7840 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7844 cc_check
-lole32 -luuid && _tv_dshow
=yes
7847 if test "$_tv_dshow" = yes ; then
7848 _inputmodules
="tv-dshow $_inputmodules"
7849 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7850 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7852 _noinputmodules
="tv-dshow $_noinputmodules"
7853 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7855 echores
"$_tv_dshow"
7858 echocheck
"Video 4 Linux TV interface"
7859 if test "$_tv_v4l1" = auto
; then
7861 if test "$_tv" = yes && linux
; then
7864 #include <linux/videodev.h>
7865 int main(void) { return 0; }
7867 cc_check
&& _tv_v4l1
=yes
7870 if test "$_tv_v4l1" = yes ; then
7873 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7874 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7875 _inputmodules
="tv-v4l $_inputmodules"
7877 _noinputmodules
="tv-v4l1 $_noinputmodules"
7878 def_tv_v4l
='#undef CONFIG_TV_V4L'
7883 echocheck
"Video 4 Linux 2 TV interface"
7884 if test "$_tv_v4l2" = auto
; then
7886 if test "$_tv" = yes && linux
; then
7889 #include <linux/types.h>
7890 #include <linux/videodev2.h>
7891 int main(void) { return 0; }
7893 cc_check
&& _tv_v4l2
=yes
7896 if test "$_tv_v4l2" = yes ; then
7899 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7900 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7901 _inputmodules
="tv-v4l2 $_inputmodules"
7903 _noinputmodules
="tv-v4l2 $_noinputmodules"
7904 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7909 echocheck
"Radio interface"
7910 if test "$_radio" = yes ; then
7911 def_radio
='#define CONFIG_RADIO 1'
7912 _inputmodules
="radio $_inputmodules"
7913 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7916 if test "$_radio_capture" = yes ; then
7918 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7920 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7923 _noinputmodules
="radio $_noinputmodules"
7924 def_radio
='#undef CONFIG_RADIO'
7925 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7929 echocheck
"Capture for Radio interface"
7930 echores
"$_radio_capture"
7932 echocheck
"Video 4 Linux 2 Radio interface"
7933 if test "$_radio_v4l2" = auto
; then
7935 if test "$_radio" = yes && linux
; then
7938 #include <linux/types.h>
7939 #include <linux/videodev2.h>
7940 int main(void) { return 0; }
7942 cc_check
&& _radio_v4l2
=yes
7945 if test "$_radio_v4l2" = yes ; then
7946 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7948 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7950 echores
"$_radio_v4l2"
7952 echocheck
"Video 4 Linux Radio interface"
7953 if test "$_radio_v4l" = auto
; then
7955 if test "$_radio" = yes && linux
; then
7958 #include <linux/videodev.h>
7959 int main(void) { return 0; }
7961 cc_check
&& _radio_v4l
=yes
7964 if test "$_radio_v4l" = yes ; then
7965 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7967 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7969 echores
"$_radio_v4l"
7971 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7972 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7973 echocheck
"*BSD BrookTree 848 Radio interface"
7976 #include <sys/types.h>
7977 $def_ioctl_bt848_h_name
7978 #ifdef IOCTL_BT848_H_NAME
7979 #include IOCTL_BT848_H_NAME
7981 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7983 cc_check
&& _radio_bsdbt848
=yes
7984 echores
"$_radio_bsdbt848"
7985 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7987 if test "$_radio_bsdbt848" = yes ; then
7988 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7990 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7993 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7994 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7995 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7998 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7999 if test "$_pvr" = auto
; then
8001 if test "$_tv_v4l2" = yes && linux
; then
8004 #include <inttypes.h>
8005 #include <linux/types.h>
8006 #include <linux/videodev2.h>
8007 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
8009 cc_check
&& _pvr
=yes
8012 if test "$_pvr" = yes ; then
8013 def_pvr
='#define CONFIG_PVR 1'
8014 _inputmodules
="pvr $_inputmodules"
8016 _noinputmodules
="pvr $_noinputmodules"
8017 def_pvr
='#undef CONFIG_PVR'
8023 if ! beos
&& test "$_ftp" = yes ; then
8024 def_ftp
='#define CONFIG_FTP 1'
8025 _inputmodules
="ftp $_inputmodules"
8027 _noinputmodules
="ftp $_noinputmodules"
8028 def_ftp
='#undef CONFIG_FTP'
8032 echocheck
"vstream client"
8033 if test "$_vstream" = auto
; then
8036 #include <vstream-client.h>
8037 void vstream_error(const char *format, ... ) {}
8038 int main(void) { vstream_start(); return 0; }
8040 cc_check
-lvstream-client && _vstream
=yes
8042 if test "$_vstream" = yes ; then
8043 def_vstream
='#define CONFIG_VSTREAM 1'
8044 _inputmodules
="vstream $_inputmodules"
8045 extra_ldflags
="$extra_ldflags -lvstream-client"
8047 _noinputmodules
="vstream $_noinputmodules"
8048 def_vstream
='#undef CONFIG_VSTREAM'
8053 echocheck
"OSD menu"
8054 if test "$_menu" = yes ; then
8055 def_menu
='#define CONFIG_MENU 1'
8056 test $_dvbin = "yes" && _menu_dvbin
=yes
8058 def_menu
='#undef CONFIG_MENU'
8064 echocheck
"Subtitles sorting"
8065 if test "$_sortsub" = yes ; then
8066 def_sortsub
='#define CONFIG_SORTSUB 1'
8068 def_sortsub
='#undef CONFIG_SORTSUB'
8073 echocheck
"XMMS inputplugin support"
8074 if test "$_xmms" = yes ; then
8075 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
8076 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
8077 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
8079 _xmmsplugindir
=/usr
/lib
/xmms
/Input
8080 _xmmslibdir
=/usr
/lib
8083 def_xmms
='#define CONFIG_XMMS 1'
8085 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
8087 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
8090 def_xmms
='#undef CONFIG_XMMS'
8095 # --------------- GUI specific tests begin -------------------
8098 if test "$_gui" = yes ; then
8100 # Required libraries
8101 if test "$_libavcodec" != yes ||
8102 ! echo $_libavdecoders |
grep -q PNG_DECODER
; then
8103 die
"The GUI requires libavcodec with PNG support (needs zlib)."
8105 test "$_freetype" = no
&& test "$_bitmap_font" = no
&& \
8106 die
"The GUI requires either FreeType or bitmap font support."
8109 test "$_x11" != yes && die
"X11 support required for GUI compilation."
8111 echocheck
"XShape extension"
8112 if test "$_xshape" = auto
; then
8115 #include <X11/Xlib.h>
8116 #include <X11/Xproto.h>
8117 #include <X11/Xutil.h>
8118 #include <X11/extensions/shape.h>
8121 char *name = ":0.0";
8124 int eventbase, errorbase;
8125 if (getenv("DISPLAY"))
8126 name=getenv("DISPLAY");
8127 wsDisplay=XOpenDisplay(name);
8128 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
8130 XCloseDisplay(wsDisplay);
8134 cc_check
-lXext && _xshape
=yes
8136 if test "$_xshape" = yes ; then
8137 def_xshape
='#define CONFIG_XSHAPE 1'
8139 die
"The GUI requires the X11 extension XShape (which was not found)."
8144 if test "$_gtk1" = no
; then
8146 echocheck
"GTK+ version"
8148 if $_pkg_config gtk
+-2.0
--exists ; then
8149 _gtk
=$
($_pkg_config gtk
+-2.0
--modversion 2>/dev
/null
)
8150 extra_cflags
="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)"
8151 libs_mplayer
="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)"
8155 if $_pkg_config glib-2.0
--exists ; then
8156 echocheck
"glib version"
8157 _glib
=$
($_pkg_config glib-2.0
--modversion 2>/dev
/null
)
8158 libs_mplayer
="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)"
8161 def_gui
='#define CONFIG_GUI 1'
8162 def_gtk2
='#define CONFIG_GTK2 1'
8165 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
8168 echo "GTK-2 devel packages were not found, trying GTK 1.2"
8173 if test "$_gtk1" = yes ; then
8174 # Check for old GTK (1.2.x)
8175 echocheck
"GTK version"
8176 if test -z "$_gtkconfig" ; then
8177 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
8178 _gtkconfig
="gtk-config"
8179 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
8180 _gtkconfig
="gtk12-config"
8182 die
"The GUI requires GTK devel packages (which were not found)."
8185 _gtk
=$
($_gtkconfig --version 2>&1)
8186 extra_cflags
="$extra_cflags $($_gtkconfig --cflags 2>&1)"
8187 libs_mplayer
="$libs_mplayer $($_gtkconfig --libs 2>&1)"
8188 echores
"$_gtk (using $_gtkconfig)"
8191 echocheck
"glib version"
8192 if test -z "$_glibconfig" ; then
8193 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
8194 _glibconfig
="glib-config"
8195 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
8196 _glibconfig
="glib12-config"
8198 die
"The GUI requires GLIB devel packages (which were not found)"
8201 _glib
=$
($_glibconfig --version 2>&1)
8202 libs_mplayer
="$libs_mplayer $($_glibconfig --libs 2>&1)"
8203 echores
"$_glib (using $_glibconfig)"
8205 def_gui
='#define CONFIG_GUI 1'
8206 def_gtk2
='#undef CONFIG_GTK2'
8211 libs_mplayer
="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
8212 def_gui
='#define CONFIG_GUI 1'
8213 def_gtk2
='#undef CONFIG_GTK2'
8216 else #if test "$_gui"
8217 def_gui
='#undef CONFIG_GUI'
8218 def_gtk2
='#undef CONFIG_GTK2'
8220 # --------------- GUI specific tests end -------------------
8223 if test "$_charset" != "noconv" ; then
8224 def_charset
="#define MSG_CHARSET \"$_charset\""
8226 def_charset
="#undef MSG_CHARSET"
8230 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
8231 echocheck
"iconv program"
8232 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
8233 if test "$?" -ne 0 ; then
8235 echo "No working iconv program found, use "
8236 echo "--charset=UTF-8 to continue anyway."
8237 echo "If you also have problems with iconv library functions use --charset=noconv."
8238 echo "Messages in the GTK-2 interface will be broken then."
8245 #############################################################################
8247 echocheck
"automatic gdb attach"
8248 if test "$_crash_debug" = yes ; then
8249 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
8251 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
8254 echores
"$_crash_debug"
8256 echocheck
"compiler support for noexecstack"
8258 int main(void) { return 0; }
8260 if cc_check
-Wl,-z,noexecstack
; then
8261 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
8267 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
8268 if cc_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
8269 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
8276 # Dynamic linking flags
8277 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
8279 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
8280 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
8281 _ld_dl_dynamic
='-rdynamic'
8284 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
8285 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
8286 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
8288 def_debug
='#undef MP_DEBUG'
8289 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
8292 echocheck
"joystick"
8293 def_joystick
='#undef CONFIG_JOYSTICK'
8294 if test "$_joystick" = yes ; then
8296 # TODO add some check
8297 def_joystick
='#define CONFIG_JOYSTICK 1'
8300 _res_comment
="unsupported under $system_name"
8303 echores
"$_joystick"
8306 if test "$_lirc" = auto
; then
8309 #include <lirc/lirc_client.h>
8310 int main(void) { return 0; }
8312 cc_check
-llirc_client && _lirc
=yes
8314 if test "$_lirc" = yes ; then
8315 def_lirc
='#define CONFIG_LIRC 1'
8316 libs_mplayer
="$libs_mplayer -llirc_client"
8318 def_lirc
='#undef CONFIG_LIRC'
8323 if test "$_lircc" = auto
; then
8326 #include <lirc/lircc.h>
8327 int main(void) { return 0; }
8329 cc_check
-llircc && _lircc
=yes
8331 if test "$_lircc" = yes ; then
8332 def_lircc
='#define CONFIG_LIRCC 1'
8333 libs_mplayer
="$libs_mplayer -llircc"
8335 def_lircc
='#undef CONFIG_LIRCC'
8340 # Detect maemo development platform libraries availability (http://www.maemo.org),
8341 # they are used when run on Nokia 770|8x0
8342 echocheck
"maemo (Nokia 770|8x0)"
8343 if test "$_maemo" = auto
; then
8346 #include <libosso.h>
8347 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
8349 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
8351 if test "$_maemo" = yes ; then
8352 def_maemo
='#define CONFIG_MAEMO 1'
8353 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
8354 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
8356 def_maemo
='#undef CONFIG_MAEMO'
8361 #############################################################################
8363 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
8364 # the OMF format needs to come after the 'extern symbol prefix' check, which
8367 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
8370 # linker paths should be the same for mencoder and mplayer
8372 for I
in $libs_mplayer ; do
8373 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
8374 if test -z "$_tmp" ; then
8375 extra_ldflags
="$extra_ldflags $I"
8377 _ld_tmp
="$_ld_tmp $I"
8380 libs_mplayer
=$_ld_tmp
8383 #############################################################################
8384 # 64 bit file offsets?
8385 if test "$_largefiles" = yes || freebsd
; then
8386 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8387 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
8388 # dvdread support requires this (for off64_t)
8389 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
8393 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
8395 # This must be the last test to be performed. Any other tests following it
8396 # could fail due to linker errors. libdvdnavmini is intentionally not linked
8397 # against libdvdread (to permit MPlayer to use its own copy of the library).
8398 # So any compilation using the flags added here but not linking against
8399 # libdvdread can fail.
8400 echocheck
"DVD support (libdvdnav)"
8402 if test "$_dvdnav" = auto
; then
8403 if test "$_dvdread_internal" = yes ; then
8406 _res_comment
="internal"
8408 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
8411 if test "$_dvdnav" = auto
; then
8413 #include <inttypes.h>
8414 #include <dvdnav/dvdnav.h>
8415 int main(void) { dvdnav_t *dvd=0; return 0; }
8418 _dvdnavdir
=$
($_dvdnavconfig --cflags)
8419 _dvdnavlibs
=$
($_dvdnavconfig --libs)
8420 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
8422 if test "$_dvdnav" = yes ; then
8424 def_dvdnav
='#define CONFIG_DVDNAV 1'
8425 if test "$dvdnav_internal" = yes ; then
8426 cflags_libdvdnav
="-Ilibdvdnav"
8427 _inputmodules
="dvdnav(internal) $_inputmodules"
8429 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
8430 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
8431 _inputmodules
="dvdnav $_inputmodules"
8434 def_dvdnav
='#undef CONFIG_DVDNAV'
8435 _noinputmodules
="dvdnav $_noinputmodules"
8439 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
8440 # Read dvdnav comment above.
8443 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8444 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8446 for part
in $list; do
8447 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8448 echo "${nprefix}_$part = yes"
8453 #############################################################################
8454 echo "Creating config.mak"
8455 cat > config.mak
<< EOF
8456 # -------- Generated by configure -----------
8458 # Ensure that locale settings do not interfere with shell commands.
8461 CONFIGURATION = $_configuration
8464 DOC_LANGS = $language_doc
8465 DOC_LANG_ALL = $doc_lang_all
8466 MAN_LANGS = $language_man
8467 MAN_LANG_ALL = $man_lang_all
8469 prefix = \$(DESTDIR)$_prefix
8470 BINDIR = \$(DESTDIR)$_bindir
8471 DATADIR = \$(DESTDIR)$_datadir
8472 LIBDIR = \$(DESTDIR)$_libdir
8473 MANDIR = \$(DESTDIR)$_mandir
8474 CONFDIR = \$(DESTDIR)$_confdir
8482 INSTALLSTRIP = $_install_strip
8485 CFLAGS = $CFLAGS $extra_cflags
8486 ASFLAGS = \$(CFLAGS)
8487 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
8489 CFLAGS_DHAHELPER = $cflags_dhahelper
8490 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
8491 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
8492 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
8493 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
8494 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
8495 CFLAGS_STACKREALIGN = $cflags_stackrealign
8496 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
8497 CFLAGS_TREMOR_LOW = $cflags_tremor_low
8499 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
8500 EXTRALIBS_MPLAYER = $libs_mplayer
8501 EXTRALIBS_MENCODER = $libs_mencoder
8504 HELP_FILE = $_mp_help
8511 $(mak_enable "$arch_all" "$arch" ARCH)
8512 $(mak_enable "$subarch_all" "$subarch" ARCH)
8513 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
8515 MENCODER = $_mencoder
8518 NEED_GETTIMEOFDAY = $_need_gettimeofday
8519 NEED_GLOB = $_need_glob
8520 NEED_MMAP = $_need_mmap
8521 NEED_SETENV = $_need_setenv
8522 NEED_SHMEM = $_need_shmem
8523 NEED_STRSEP = $_need_strsep
8524 NEED_SWAB = $_need_swab
8525 NEED_VSSCANF = $_need_vsscanf
8533 APPLE_IR = $_apple_ir
8534 APPLE_REMOTE = $_apple_remote
8536 AUDIO_INPUT = $_audio_input
8537 BITMAP_FONT = $_bitmap_font
8542 COREAUDIO = $_coreaudio
8543 COREVIDEO = $_corevideo
8547 DIRECT3D = $_direct3d
8548 DIRECTFB = $_directfb
8552 DVDNAV_INTERNAL = $dvdnav_internal
8554 DVDREAD_INTERNAL = $_dvdread_internal
8560 FAAD_INTERNAL = $_faad_internal
8561 FASTMEMCPY = $_fastmemcpy
8563 FREETYPE = $_freetype
8568 GL_WIN32 = $_gl_win32
8571 MATRIXVIEW = $matrixview
8574 GUI_WIN32 = $_gui_win32
8575 HAVE_POSIX_SELECT = $_posix_select
8576 HAVE_SYS_MMAN_H = $_mman
8579 JOYSTICK = $_joystick
8585 LIBA52_INTERNAL = $_liba52_internal
8587 LIBASS_INTERNAL = $ass_internal
8591 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
8595 LIBMENU_DVBIN = $_menu_dvbin
8596 LIBMPEG2 = $_libmpeg2
8597 LIBNEMESI = $_nemesi
8599 LIBSMBCLIENT = $_smb
8600 LIBTHEORA = $_theora
8603 MACOSX_FINDER = $_macosx_finder
8609 MUSEPACK = $_musepack
8611 NATIVE_RTSP = $_native_rtsp
8615 PE_EXECUTABLE = $_pe_executable
8618 PRIORITY = $_priority
8622 QTX_CODECS_WIN32 = $_qtx_codecs_win32
8623 QTX_EMULATION = $_qtx_emulation
8626 RADIO_CAPTURE=$_radio_capture
8627 REAL_CODECS = $_real
8631 STREAM_CACHE = $_stream_cache
8632 SGIAUDIO = $_sgiaudio
8633 SUNAUDIO = $_sunaudio
8639 TREMOR_INTERNAL = $_tremor_internal
8641 TV_BSDBT848 = $_tv_bsdbt848
8642 TV_DSHOW = $_tv_dshow
8647 UNRAR_EXEC = $_unrar_exec
8653 VIDIX_PCIDB = $_vidix_pcidb_val
8654 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
8655 VIDIX_IVTV=$_vidix_drv_ivtv
8656 VIDIX_MACH64=$_vidix_drv_mach64
8657 VIDIX_MGA=$_vidix_drv_mga
8658 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
8659 VIDIX_NVIDIA=$_vidix_drv_nvidia
8660 VIDIX_PM2=$_vidix_drv_pm2
8661 VIDIX_PM3=$_vidix_drv_pm3
8662 VIDIX_RADEON=$_vidix_drv_radeon
8663 VIDIX_RAGE128=$_vidix_drv_rage128
8664 VIDIX_S3=$_vidix_drv_s3
8665 VIDIX_SH_VEU=$_vidix_drv_sh_veu
8666 VIDIX_SIS=$_vidix_drv_sis
8667 VIDIX_UNICHROME=$_vidix_drv_unichrome
8671 WIN32DLL = $_win32dll
8672 WIN32WAVEOUT = $_win32waveout
8673 WIN32_EMULATION = $_win32_emulation
8674 WINVIDIX = $winvidix
8677 XANIM_CODECS = $_xanim
8679 XMMS_PLUGINS = $_xmms
8685 YUV4MPEG = $_yuv4mpeg
8689 LIBAVUTIL = $_libavutil
8690 LIBAVUTIL_A = $_libavutil_a
8691 LIBAVUTIL_SO = $_libavutil_so
8692 LIBAVCODEC = $_libavcodec
8693 LIBAVCODEC_A = $_libavcodec_a
8694 LIBAVCODEC_SO = $_libavcodec_so
8695 LIBAVFORMAT = $_libavformat
8696 LIBAVFORMAT_A = $_libavformat_a
8697 LIBAVFORMAT_SO = $_libavformat_so
8698 LIBPOSTPROC = $_libpostproc
8699 LIBPOSTPROC_A = $_libpostproc_a
8700 LIBPOSTPROC_SO = $_libpostproc_so
8701 LIBSWSCALE = $_libswscale
8702 LIBSWSCALE_A = $_libswscale_a
8703 LIBSWSCALE_SO = $_libswscale_so
8705 HOSTCC = \$(HOST_CC)
8706 HOSTCFLAGS = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3
8712 YASMFLAGS = $YASMFLAGS
8719 LIBNAME = \$(LIBPREF)\$(NAME)\$(LIBSUF)
8720 FULLNAME = \$(NAME)\$(BUILDSUF)
8722 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8728 CONFIG_H264DSP = yes
8734 $mak_hardcoded_tables
8735 $mak_libavcodec_mpegaudio_hp
8736 !CONFIG_LIBRTMP = yes
8738 CONFIG_BZLIB = $bzlib
8739 CONFIG_ENCODERS = yes
8741 CONFIG_LIBDIRAC_DECODER = $_libdirac_lavc
8742 CONFIG_LIBDIRAC_ENCODER = $_libdirac_lavc
8743 CONFIG_LIBFAAC_ENCODER = $_faac_lavc
8744 CONFIG_LIBMP3LAME_ENCODER = $_mp3lame_lavc
8745 CONFIG_LIBOPENCORE_AMRNB_DECODER = $_libopencore_amrnb
8746 CONFIG_LIBOPENCORE_AMRNB_ENCODER = $_libopencore_amrnb
8747 CONFIG_LIBOPENCORE_AMRWB_DECODER = $_libopencore_amrwb
8748 OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
8749 OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
8750 CONFIG_LIBSCHROEDINGER_DECODER = $_libschroedinger_lavc
8751 CONFIG_LIBSCHROEDINGER_ENCODER = $_libschroedinger_lavc
8752 CONFIG_LIBVORBIS_ENCODER = $_libvorbis
8753 CONFIG_LIBX264_ENCODER = $_x264_lavc
8754 CONFIG_LIBXVID_ENCODER = $_xvid_lavc
8755 CONFIG_MLIB = $_mlib
8756 CONFIG_MUXERS = $_mencoder
8757 CONFIG_POSTPROC = yes
8758 CONFIG_VDPAU = $_vdpau
8759 CONFIG_XVMC = $_xvmc
8760 CONFIG_ZLIB = $_zlib
8762 HAVE_PTHREADS = $_pthreads
8764 HAVE_W32THREADS = $_w32threads
8765 HAVE_YASM = $have_yasm
8767 $(echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8768 $(echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8769 $(echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8770 $(echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8771 $(echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8772 $(echo $_libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8773 $(echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8774 $(echo $_libavhwaccels | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8777 #############################################################################
8779 ff_config_enable
() {
8780 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8781 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8783 test -z "$_nprefix" && _nprefix
='CONFIG'
8784 for part
in $list; do
8785 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8786 echo "#define ${_nprefix}_$part 1"
8788 echo "#define ${_nprefix}_$part 0"
8793 echo "Creating config.h"
8795 /*----------------------------------------------------------------------------
8796 ** This file has been automatically generated by configure any changes in it
8797 ** will be lost when you run configure again.
8798 ** Instead of modifying definitions here, use the --enable/--disable options
8799 ** of the configure script! See ./configure --help for details.
8800 *---------------------------------------------------------------------------*/
8802 #ifndef MPLAYER_CONFIG_H
8803 #define MPLAYER_CONFIG_H
8805 /* Undefine this if you do not want to select mono audio (left or right)
8806 with a stereo MPEG layer 2/3 audio stream. The command line option
8807 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8808 right-only), with 0 being the default.
8810 #define CONFIG_FAKE_MONO 1
8812 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
8813 #define MAX_OUTBURST 65536
8815 /* set up audio OUTBURST. Do not change this! */
8816 #define OUTBURST 512
8818 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8820 #undef FAST_OSD_TABLE
8822 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8823 #define MPEG12_POSTPROC 1
8824 #define ATTRIBUTE_ALIGNED_MAX 16
8828 #define CONFIGURATION "$_configuration"
8830 #define MPLAYER_DATADIR "$_datadir"
8831 #define MPLAYER_CONFDIR "$_confdir"
8832 #define MPLAYER_LIBDIR "$_libdir"
8834 /* definitions needed by included libraries */
8835 #define HAVE_INTTYPES_H 1
8836 /* libmpeg2 + FFmpeg */
8839 #define HAVE_ERRNO_H 1
8840 /* libdvdcss + libdvdread */
8841 #define HAVE_LIMITS_H 1
8842 /* libdvdcss + libfaad2 */
8843 #define HAVE_UNISTD_H 1
8844 /* libfaad2 + libdvdread */
8845 #define STDC_HEADERS 1
8846 #define HAVE_MEMCPY 1
8848 #define HAVE_STRING_H 1
8849 #define HAVE_STRINGS_H 1
8850 #define HAVE_SYS_STAT_H 1
8851 #define HAVE_SYS_TYPES_H 1
8853 #define READ_CACHE_TRACE 0
8855 #define HAVE_DLFCN_H 1
8859 /* system headers */
8861 $def_alsa_asoundlib_h
8865 $def_mman_has_map_failed
8867 $def_sys_asoundlib_h
8868 $def_sys_soundcard_h
8875 /* system functions */
8898 /* system-specific features */
8913 $def_restrict_keyword
8918 /* configurable options */
8922 $def_dynamic_plugins
8925 $def_runtime_cpudetection
8933 #define __CPU__ $iproc
8936 $(ff_config_enable "$arch_all" "$arch" "ARCH")
8937 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
8938 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
8942 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8943 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8963 /* codec libraries */
8968 $def_liba52_internal
8976 $def_mp3lame_preset_medium
9000 #define BINARY_CODECS_PATH "$_codecsdir"
9001 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
9010 /* Audio output drivers */
9026 $def_ossaudio_devdsp
9027 $def_ossaudio_devmixer
9040 $def_ioctl_bt848_h_name
9041 $def_ioctl_meteor_h_name
9080 $def_struct_ipv6_mreq
9081 $def_struct_sockaddr_in6
9082 $def_struct_sockaddr_sa_len
9086 $def_sockaddr_storage
9101 $def_directfb_version
9138 $def_vidix_drv_cyberblade
9140 $def_vidix_drv_mach64
9142 $def_vidix_drv_mga_crtc2
9143 $def_vidix_drv_nvidia
9145 $def_vidix_drv_radeon
9146 $def_vidix_drv_rage128
9148 $def_vidix_drv_sh_veu
9150 $def_vidix_drv_unichrome
9184 #define CONFIG_DECODERS 1
9185 #define CONFIG_ENCODERS 1
9186 #define CONFIG_DEMUXERS 1
9197 $def_hardcoded_tables
9198 $def_libavcodec_mpegaudio_hp
9201 $def_local_aligned_8
9202 $def_local_aligned_16
9219 #define CONFIG_FASTDIV 0
9220 #define CONFIG_FFSERVER 0
9221 #define CONFIG_GPL 1
9222 #define CONFIG_GRAY 0
9223 #define CONFIG_LIBRTMP 0
9224 #define CONFIG_LIBVORBIS 0
9225 #define CONFIG_POWERPC_PERF 0
9226 #define CONFIG_SMALL 0
9227 #define CONFIG_SWSCALE_ALPHA 1
9229 #if defined(HAVE_AF_INET6) && (!defined(_WIN32) || defined(__CYGWIN__))
9230 #define CONFIG_IPV6 1
9232 #define CONFIG_IPV6 0
9235 #define HAVE_ATTRIBUTE_MAY_ALIAS 1
9236 #define av_alias __attribute__((may_alias))
9237 #define HAVE_ATTRIBUTE_PACKED 1
9238 #define HAVE_GETHRTIME 0
9239 #define HAVE_INLINE_ASM 1
9240 #define HAVE_LDBRX 0
9241 #define HAVE_POLL_H 1
9242 #define HAVE_PPC4XX 0
9243 #define HAVE_STRERROR_R 0
9244 #define HAVE_SYS_SELECT_H 0
9245 #define HAVE_VFP_ARGS 1
9246 #define HAVE_VIRTUALALLOC 0
9248 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
9249 #define CONFIG_AANDCT 1
9250 #define CONFIG_DCT 1
9251 #define CONFIG_DWT 1
9252 #define CONFIG_FFT 1
9253 #define CONFIG_GOLOMB 1
9254 #define CONFIG_H264DSP 1
9255 #define CONFIG_LPC 1
9256 #define CONFIG_MDCT 1
9257 #define CONFIG_RDFT 1
9259 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
9262 #define HAVE_EBP_AVAILABLE 1
9264 #define HAVE_EBP_AVAILABLE 0
9267 #define FFMPEG_CONFIGURATION "--enable-gpl --enable-postproc"
9268 #define FFMPEG_LICENSE "GPL version 2 or later"
9270 /* External libraries used through libavcodec. */
9273 $def_libopencore_amrnb
9274 $def_libopencore_amrwb
9276 $def_libschroedinger_lavc
9281 $(ff_config_enable "$_libavdecoders_all" "$_libavdecoders")
9282 $(ff_config_enable "$_libavencoders_all" "$_libavencoders")
9283 $(ff_config_enable "$_libavparsers_all" "$_libavparsers")
9284 $(ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers")
9285 $(ff_config_enable "$_libavmuxers_all" "$_libavmuxers")
9286 $(ff_config_enable "$_libavprotocols_all" "$_libavprotocols")
9287 $(ff_config_enable "$_libavbsfs_all" "$_libavbsfs")
9288 $(ff_config_enable "$_libavhwaccels_all" "$_libavhwaccels")
9290 #endif /* MPLAYER_CONFIG_H */
9293 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
9294 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
9296 ############################################################################
9298 # Create avconfig.h for FFmpeg.
9299 cat > "$TMPH" << EOF
9300 /* Generated by mpconfigure */
9301 #ifndef AVUTIL_AVCONFIG_H
9302 #define AVUTIL_AVCONFIG_H
9304 #endif /* AVUTIL_AVCONFIG_H */
9307 # Do not overwrite an unchanged avconfig.h to avoid superfluous rebuilds.
9308 cmp -s "$TMPH" libavutil
/avconfig.h ||
mv -f "$TMPH" libavutil
/avconfig.h
9310 #############################################################################
9314 Config files successfully generated by ./configure $_configuration !
9316 Install prefix: $_prefix
9317 Data directory: $_datadir
9318 Config direct.: $_confdir
9320 Byte order: $_byte_order
9321 Optimizing for: $_optimizing
9324 Messages/GUI: $language_msg
9325 Manual pages: $language_man
9326 Documentation: $language_doc
9328 Enabled optional drivers:
9329 Input: $_inputmodules
9330 Codecs: $_codecmodules
9331 Audio output: $_aomodules
9332 Video output: $_vomodules
9334 Disabled optional drivers:
9335 Input: $_noinputmodules
9336 Codecs: $_nocodecmodules
9337 Audio output: $_noaomodules
9338 Video output: $_novomodules
9340 'config.h' and 'config.mak' contain your configuration options.
9341 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
9342 compile *** DO NOT REPORT BUGS if you tweak these files ***
9344 'make' will now compile MPlayer and 'make install' will install it.
9345 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
9350 if test "$_mtrr" = yes ; then
9351 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
9357 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
9358 operating system ($system_name). You may encounter a few files that cannot
9359 be played due to missing open source video/audio codec support.
9366 Check $TMPLOG if you wonder why an autodetection failed (make sure
9367 development headers/packages are installed).
9369 NOTE: The --enable-* parameters unconditionally force options on, completely
9370 skipping autodetection. This behavior is unlike what you may be used to from
9371 autoconf-based configure scripts that can decide to override you. This greater
9372 level of control comes at a price. You may have to provide the correct compiler
9373 and linker flags yourself.
9374 If you used one of these options (except --enable-menu and similar ones that
9375 turn on internal features) and experience a compilation or linking failure,
9376 make sure you have passed the necessary compiler/linker flags to configure.
9378 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
9382 if test "$_warn_CFLAGS" = yes; then
9385 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
9388 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
9390 It is strongly recommended to let MPlayer choose the correct CFLAGS!
9391 To do so, execute 'CFLAGS= ./configure <options>'
9397 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"