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]
221 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
222 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
223 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
226 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
227 --disable-mplayer disable MPlayer compilation [enable]
228 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
229 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
230 --disable-largefiles disable support for files > 2GB [enable]
231 --enable-linux-devfs set default devices to devfs [disable]
232 --enable-termcap use termcap database for key codes [autodetect]
233 --enable-termios use termios database for key codes [autodetect]
234 --disable-iconv disable iconv for encoding conversion [autodetect]
235 --disable-langinfo do not use langinfo [autodetect]
236 --enable-lirc enable LIRC (remote control) support [autodetect]
237 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
238 --enable-joystick enable joystick support [disable]
239 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
240 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
241 --disable-vm disable X video mode extensions [autodetect]
242 --disable-xf86keysym disable support for multimedia keys [autodetect]
243 --enable-radio enable radio interface [disable]
244 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
245 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
246 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
247 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
248 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
249 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
250 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
251 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
252 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
253 --disable-network disable networking [enable]
254 --enable-winsock2_h enable winsock2_h [autodetect]
255 --enable-smb enable Samba (SMB) input [autodetect]
256 --enable-live enable LIVE555 Streaming Media [autodetect]
257 --enable-nemesi enable Nemesi Streaming Media [autodetect]
258 --disable-vcd disable VCD support [autodetect]
259 --disable-dvdnav disable libdvdnav [autodetect]
260 --disable-dvdread disable libdvdread [autodetect]
261 --disable-dvdread-internal disable internal libdvdread [autodetect]
262 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
263 --disable-cdparanoia disable cdparanoia [autodetect]
264 --disable-cddb disable cddb [autodetect]
265 --disable-bitmap-font disable bitmap font support [enable]
266 --disable-freetype disable FreeType 2 font rendering [autodetect]
267 --disable-fontconfig disable fontconfig font lookup [autodetect]
268 --disable-unrarexec disable using of UnRAR executable [enabled]
269 --enable-menu enable OSD menu (not DVD menu) [disabled]
270 --disable-sortsub disable subtitle sorting [enabled]
271 --enable-fribidi enable the FriBiDi libs [autodetect]
272 --disable-enca disable ENCA charset oracle library [autodetect]
273 --disable-maemo disable maemo specific features [autodetect]
274 --enable-macosx-finder enable Mac OS X Finder invocation parameter
276 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
277 --disable-inet6 disable IPv6 support [autodetect]
278 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
279 --disable-ftp disable FTP support [enabled]
280 --disable-vstream disable TiVo vstream client support [autodetect]
281 --disable-pthreads disable Posix threads support [autodetect]
282 --disable-w32threads disable Win32 threads support [autodetect]
283 --disable-ass-internal disable internal SSA/ASS subtitle support [autodetect]
284 --disable-ass disable SSA/ASS subtitle support [autodetect]
285 --enable-rpath enable runtime linker path for extra libs [disabled]
288 --enable-gif enable GIF support [autodetect]
289 --enable-png enable PNG input/output support [autodetect]
290 --enable-mng enable MNG input support [autodetect]
291 --enable-jpeg enable JPEG input/output support [autodetect]
292 --enable-libcdio enable libcdio support [autodetect]
293 --enable-liblzo enable liblzo support [autodetect]
294 --disable-win32dll disable Win32 DLL support [enabled]
295 --disable-qtx disable QuickTime codecs support [enabled]
296 --disable-xanim disable XAnim codecs support [enabled]
297 --disable-real disable RealPlayer codecs support [enabled]
298 --disable-xvid disable Xvid [autodetect]
299 --disable-xvid-lavc disable Xvid in libavcodec [autodetect]
300 --disable-x264 disable x264 [autodetect]
301 --disable-x264-lavc disable x264 in libavcodec [autodetect]
302 --disable-libdirac-lavc disable Dirac in libavcodec [autodetect]
303 --disable-libschroedinger-lavc disable Dirac in libavcodec (Schroedinger
304 decoder) [autodetect]
305 --disable-libnut disable libnut [autodetect]
306 --disable-libavutil_a disable static libavutil [autodetect]
307 --disable-libavcodec_a disable static libavcodec [autodetect]
308 --disable-libavformat_a disable static libavformat [autodetect]
309 --disable-libpostproc_a disable static libpostproc [autodetect]
310 --disable-libswscale_a disable static libswscale [autodetect]
311 --disable-libavutil_so disable shared libavutil [autodetect]
312 --disable-libavcodec_so disable shared libavcodec [autodetect]
313 --disable-libavformat_so disable shared libavformat [autodetect]
314 --disable-libpostproc_so disable shared libpostproc [autodetect]
315 --disable-libswscale_so disable shared libswscale [autodetect]
316 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
317 in libavcodec [enabled]
318 --disable-tremor-internal disable internal Tremor [enabled]
319 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
320 --enable-tremor enable external Tremor [autodetect]
321 --disable-libvorbis disable libvorbis support [autodetect]
322 --disable-speex disable Speex support [autodetect]
323 --enable-theora enable OggTheora libraries [autodetect]
324 --enable-faad enable external FAAD2 (AAC) [autodetect]
325 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
326 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
327 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
328 --disable-faac-lavc disable support for FAAC in libavcodec [autodetect]
329 --disable-ladspa disable LADSPA plugin support [autodetect]
330 --disable-libbs2b disable libbs2b audio filter support [autodetect]
331 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
332 --disable-mad disable libmad (MPEG audio) support [autodetect]
333 --disable-mp3lame disable LAME MP3 encoding support [autodetect]
334 --disable-mp3lame-lavc disable LAME in libavcodec [autodetect]
335 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
336 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
337 --enable-xmms enable XMMS input plugin support [disabled]
338 --enable-libdca enable libdca support [autodetect]
339 --disable-mp3lib disable builtin mp3lib [autodetect]
340 --disable-liba52 disable liba52 [autodetect]
341 --enable-liba52-internal enable builtin liba52 [disabled]
342 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
343 --disable-musepack disable musepack support [autodetect]
344 --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect]
345 --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect]
346 --disable-libopenjpeg disable OpenJPEG (JPEG2000) input/output support [autodetect]
347 --disable-decoder=DECODER disable specified FFmpeg decoder
348 --enable-decoder=DECODER enable specified FFmpeg decoder
349 --disable-encoder=ENCODER disable specified FFmpeg encoder
350 --enable-encoder=ENCODER enable specified FFmpeg encoder
351 --disable-parser=PARSER disable specified FFmpeg parser
352 --enable-parser=PARSER enable specified FFmpeg parser
353 --disable-protocol=PROTO disable specified FFmpeg protocol
354 --enable-protocol=PROTO enable specified FFmpeg protocol
355 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
356 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
357 --disable-muxer=MUXER disable specified FFmpeg muxer
358 --enable-muxer=MUXER enable specified FFmpeg muxer
361 --disable-vidix disable VIDIX [for x86 *nix]
362 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
363 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
364 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
365 --disable-vidix-pcidb disable VIDIX PCI device name database
366 --enable-dhahelper enable VIDIX dhahelper support
367 --enable-svgalib_helper enable VIDIX svgalib_helper support
368 --enable-gl enable OpenGL video output [autodetect]
369 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
370 --enable-dga2 enable DGA 2 support [autodetect]
371 --enable-dga1 enable DGA 1 support [autodetect]
372 --enable-vesa enable VESA video output [autodetect]
373 --enable-svga enable SVGAlib video output [autodetect]
374 --enable-sdl enable SDL video output [autodetect]
375 --enable-kva enable KVA video output [autodetect]
376 --enable-aa enable AAlib video output [autodetect]
377 --enable-caca enable CACA video output [autodetect]
378 --enable-ggi enable GGI video output [autodetect]
379 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
380 --enable-direct3d enable Direct3D video output [autodetect]
381 --enable-directx enable DirectX video output [autodetect]
382 --enable-dxr2 enable DXR2 video output [autodetect]
383 --enable-dxr3 enable DXR3/H+ video output [autodetect]
384 --enable-ivtv enable IVTV TV-Out video output [autodetect]
385 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
386 --enable-dvb enable DVB video output [autodetect]
387 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
388 --enable-mga enable mga_vid video output [autodetect]
389 --enable-xmga enable mga_vid X11 video output [autodetect]
390 --enable-xv enable Xv video output [autodetect]
391 --enable-xvmc enable XvMC acceleration [disable]
392 --enable-vdpau enable VDPAU acceleration [autodetect]
393 --enable-vm enable XF86VidMode support [autodetect]
394 --enable-xinerama enable Xinerama support [autodetect]
395 --enable-x11 enable X11 video output [autodetect]
396 --enable-xshape enable XShape support [autodetect]
397 --disable-xss disable screensaver support via xss [autodetect]
398 --enable-fbdev enable FBDev video output [autodetect]
399 --enable-mlib enable mediaLib video output (Solaris) [disable]
400 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
401 --enable-tdfxfb enable tdfxfb video output [disable]
402 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
403 --enable-wii enable Nintendo Wii/GameCube video output [disable]
404 --enable-directfb enable DirectFB video output [autodetect]
405 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
406 --enable-bl enable Blinkenlights video output [disable]
407 --enable-tdfxvid enable tdfx_vid video output [disable]
408 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
409 --disable-tga disable Targa video output [enable]
410 --disable-pnm disable PNM video output [enable]
411 --disable-md5sum disable md5sum video output [enable]
412 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
413 --disable-corevideo disable CoreVideo video output [autodetect]
414 --disable-quartz disable Quartz video output [autodetect]
417 --disable-alsa disable ALSA audio output [autodetect]
418 --disable-ossaudio disable OSS audio output [autodetect]
419 --disable-arts disable aRts audio output [autodetect]
420 --disable-esd disable esd audio output [autodetect]
421 --disable-pulse disable Pulseaudio audio output [autodetect]
422 --disable-jack disable JACK audio output [autodetect]
423 --disable-openal disable OpenAL audio output [autodetect]
424 --disable-nas disable NAS audio output [autodetect]
425 --disable-sgiaudio disable SGI audio output [autodetect]
426 --disable-sunaudio disable Sun audio output [autodetect]
427 --disable-dart disable DART audio output [autodetect]
428 --disable-win32waveout disable Windows waveout audio output [autodetect]
429 --disable-coreaudio disable CoreAudio audio output [autodetect]
430 --disable-select disable using select() on the audio device [enable]
433 --charset=charset convert the console messages to this character set
434 --language-doc=lang language to use for the documentation [en]
435 --language-man=lang language to use for the man pages [en]
436 --language-msg=lang language to use for the messages and the GUI [en]
437 --language=lang default language to use [en]
438 Specific options override --language. You can pass a list of languages separated
439 by whitespace or commas instead of a single language. Nonexisting translations
440 will be dropped from each list. All documentation and man page translations
441 available in the list will be installed, for the messages the first available
442 translation will be used. The value "all" will activate all translations. The
443 LINGUAS environment variable is honored. In all cases the fallback is English.
444 Available values are: all $msg_lang_all
446 Miscellaneous options:
447 --enable-runtime-cpudetection enable runtime CPU detection [disable]
448 --enable-cross-compile enable cross-compilation [autodetect]
449 --cc=COMPILER C compiler to build MPlayer [gcc]
450 --host-cc=COMPILER C compiler for tools needed while building [gcc]
451 --as=ASSEMBLER assembler to build MPlayer [as]
452 --nm=NM nm tool to build MPlayer [nm]
453 --yasm=YASM Yasm assembler to build MPlayer [yasm]
454 --ar=AR librarian to build MPlayer [ar]
455 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
456 --windres=WINDRES windres to build MPlayer [windres]
457 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
458 --enable-static build a statically linked binary
459 --with-install=PATH path to a custom install program
462 --enable-mmx enable MMX [autodetect]
463 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
464 --enable-3dnow enable 3DNow! [autodetect]
465 --enable-3dnowext enable extended 3DNow! [autodetect]
466 --enable-sse enable SSE [autodetect]
467 --enable-sse2 enable SSE2 [autodetect]
468 --enable-ssse3 enable SSSE3 [autodetect]
469 --enable-shm enable shm [autodetect]
470 --enable-altivec enable AltiVec (PowerPC) [autodetect]
471 --enable-armv5te enable DSP extensions (ARM) [autodetect]
472 --enable-armv6 enable ARMv6 (ARM) [autodetect]
473 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
474 --enable-armvfp enable ARM VFP (ARM) [autodetect]
475 --enable-neon enable NEON (ARM) [autodetect]
476 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
477 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
478 --enable-hardcoded-tables put tables in binary instead of calculating them at startup [disable]
479 --enable-big-endian force byte order to big-endian [autodetect]
480 --enable-debug[=1-3] compile-in debugging information [disable]
481 --enable-profile compile-in profiling information [disable]
482 --disable-sighandler disable sighandler for crashes [enable]
483 --enable-crash-debug enable automatic gdb attach on crash [disable]
484 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
486 Use these options if autodetection fails:
487 --extra-cflags=FLAGS extra CFLAGS
488 --extra-ldflags=FLAGS extra LDFLAGS
489 --extra-libs=FLAGS extra linker flags
490 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
491 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
492 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
494 --with-freetype-config=PATH path to freetype-config
495 --with-fribidi-config=PATH path to fribidi-config
496 --with-glib-config=PATH path to glib*-config
497 --with-gtk-config=PATH path to gtk*-config
498 --with-sdl-config=PATH path to sdl*-config
499 --with-dvdnav-config=PATH path to dvdnav-config
500 --with-dvdread-config=PATH path to dvdread-config
502 This configure script is NOT autoconf-based, even though its output is similar.
503 It will try to autodetect all configuration options. If you --enable an option
504 it will be forcefully turned on, skipping autodetection. This can break
505 compilation, so you need to know what you are doing.
510 # GOTCHA: the variables below defines the default behavior for autodetection
511 # and have - unless stated otherwise - at least 2 states : yes no
512 # If autodetection is available then the third state is: auto
535 test "$CC" && _cc
="$CC"
539 _runtime_cpudetection
=no
545 _libopencore_amrnb
=auto
546 _libopencore_amrwb
=auto
548 _libavdecoders_all
=$
(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
549 _libavdecoders
=$
(echo $_libavdecoders_all |
sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s
/MPEG4AAC_DECODER
//)
550 _libavencoders_all
=$
(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
551 _libavencoders
=$
(echo $_libavencoders_all |
sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s
/AAC_ENCODER
//)
552 _libavparsers_all
=$
(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
553 _libavparsers
=$_libavparsers_all
554 _libavbsfs_all
=$
(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
555 _libavbsfs
=$_libavbsfs_all
556 _libavdemuxers_all
=$
(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
557 _libavdemuxers
=$
(echo $_libavdemuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s
/REDIR_DEMUXER
// -e s
/RTSP_DEMUXER
// -e s
/SDP_DEMUXER
// -e s
/AVISYNTH_DEMUXER
//)
558 _libavmuxers_all
=$
(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
559 _libavmuxers
=$
(echo $_libavmuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s
/RTP_MUXER
//)
560 _libavprotocols_all
=$
(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
561 _libavprotocols
=$_libavprotocols_all
569 _libavcodec_mpegaudio_hp
=yes
578 _xvmc
=no
#auto when complete
646 _dvdnavconfig
=dvdnav-config
647 _dvdreadconfig
=dvdread-config
649 _dvdread_internal
=auto
650 _libdvdcss_internal
=auto
661 _mlib
=no
#broken, thus disabled
683 _struct_addrinfo
=auto
685 _struct_sockaddr_storage
=auto
697 _libschroedinger_lavc
=auto
742 _freetypeconfig
='freetype-config'
744 _fribidiconfig
='fribidi-config'
759 def_dos_paths
="#define HAVE_DOS_PATHS 0"
760 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
761 def_priority
="#undef CONFIG_PRIORITY"
762 def_pthread_cache
="#undef PTHREAD_CACHE"
770 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
773 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
776 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
779 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
782 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
785 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
788 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
791 _win32codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
794 _xanimcodecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
797 _realcodecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
801 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
804 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
808 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
810 --with-freetype-config=*)
811 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
813 --with-fribidi-config=*)
814 _fribidiconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
817 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
819 --with-glib-config=*)
820 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
822 --with-dvdnav-config=*)
823 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
825 --with-dvdread-config=*)
826 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
830 extra_cflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
833 extra_ldflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
836 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
838 --extra-libs-mplayer=*)
839 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
841 --extra-libs-mencoder=*)
842 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
846 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
849 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
852 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
855 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
858 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
861 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
864 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
867 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
870 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
873 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
876 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
879 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
882 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
885 language
=$
(echo $ac_option | cut
-d '=' -f 2)
904 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
909 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
910 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
911 --enable-cross-compile) _cross_compile
=yes ;;
912 --disable-cross-compile) _cross_compile
=no
;;
913 --enable-mencoder) _mencoder
=yes ;;
914 --disable-mencoder) _mencoder
=no
;;
915 --enable-mplayer) _mplayer
=yes ;;
916 --disable-mplayer) _mplayer
=no
;;
917 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
918 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
919 --enable-x11) _x11
=yes ;;
920 --disable-x11) _x11
=no
;;
921 --enable-xshape) _xshape
=yes ;;
922 --disable-xshape) _xshape
=no
;;
923 --enable-xss) _xss
=yes ;;
924 --disable-xss) _xss
=no
;;
925 --enable-xv) _xv
=yes ;;
926 --disable-xv) _xv
=no
;;
927 --enable-xvmc) _xvmc
=yes ;;
928 --disable-xvmc) _xvmc
=no
;;
929 --enable-vdpau) _vdpau
=yes ;;
930 --disable-vdpau) _vdpau
=no
;;
931 --enable-sdl) _sdl
=yes ;;
932 --disable-sdl) _sdl
=no
;;
933 --enable-kva) _kva
=yes ;;
934 --disable-kva) _kva
=no
;;
935 --enable-direct3d) _direct3d
=yes ;;
936 --disable-direct3d) _direct3d
=no
;;
937 --enable-directx) _directx
=yes ;;
938 --disable-directx) _directx
=no
;;
939 --enable-win32waveout) _win32waveout
=yes ;;
940 --disable-win32waveout) _win32waveout
=no
;;
941 --enable-nas) _nas
=yes ;;
942 --disable-nas) _nas
=no
;;
943 --enable-png) _png
=yes ;;
944 --disable-png) _png
=no
;;
945 --enable-mng) _mng
=yes ;;
946 --disable-mng) _mng
=no
;;
947 --enable-jpeg) _jpeg
=yes ;;
948 --disable-jpeg) _jpeg
=no
;;
949 --enable-libopenjpeg) libopenjpeg
=yes ;;
950 --disable-libopenjpeg)libopenjpeg
=no
;;
951 --enable-pnm) _pnm
=yes ;;
952 --disable-pnm) _pnm
=no
;;
953 --enable-md5sum) _md5sum
=yes ;;
954 --disable-md5sum) _md5sum
=no
;;
955 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
956 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
957 --enable-gif) _gif
=yes ;;
958 --disable-gif) _gif
=no
;;
959 --enable-gl) _gl
=yes ;;
960 --disable-gl) _gl
=no
;;
961 --enable-matrixview) matrixview
=yes ;;
962 --disable-matrixview) matrixview
=no
;;
963 --enable-ggi) _ggi
=yes ;;
964 --disable-ggi) _ggi
=no
;;
965 --enable-ggiwmh) _ggiwmh
=yes ;;
966 --disable-ggiwmh) _ggiwmh
=no
;;
967 --enable-aa) _aa
=yes ;;
968 --disable-aa) _aa
=no
;;
969 --enable-caca) _caca
=yes ;;
970 --disable-caca) _caca
=no
;;
971 --enable-svga) _svga
=yes ;;
972 --disable-svga) _svga
=no
;;
973 --enable-vesa) _vesa
=yes ;;
974 --disable-vesa) _vesa
=no
;;
975 --enable-fbdev) _fbdev
=yes ;;
976 --disable-fbdev) _fbdev
=no
;;
977 --enable-dvb) _dvb
=yes ;;
978 --disable-dvb) _dvb
=no
;;
979 --enable-dvbhead) _dvbhead
=yes ;;
980 --disable-dvbhead) _dvbhead
=no
;;
981 --enable-dxr2) _dxr2
=yes ;;
982 --disable-dxr2) _dxr2
=no
;;
983 --enable-dxr3) _dxr3
=yes ;;
984 --disable-dxr3) _dxr3
=no
;;
985 --enable-ivtv) _ivtv
=yes ;;
986 --disable-ivtv) _ivtv
=no
;;
987 --enable-v4l2) _v4l2
=yes ;;
988 --disable-v4l2) _v4l2
=no
;;
989 --enable-iconv) _iconv
=yes ;;
990 --disable-iconv) _iconv
=no
;;
991 --enable-langinfo) _langinfo
=yes ;;
992 --disable-langinfo) _langinfo
=no
;;
993 --enable-rtc) _rtc
=yes ;;
994 --disable-rtc) _rtc
=no
;;
995 --enable-libdv) _libdv
=yes ;;
996 --disable-libdv) _libdv
=no
;;
997 --enable-ossaudio) _ossaudio
=yes ;;
998 --disable-ossaudio) _ossaudio
=no
;;
999 --enable-arts) _arts
=yes ;;
1000 --disable-arts) _arts
=no
;;
1001 --enable-esd) _esd
=yes ;;
1002 --disable-esd) _esd
=no
;;
1003 --enable-pulse) _pulse
=yes ;;
1004 --disable-pulse) _pulse
=no
;;
1005 --enable-jack) _jack
=yes ;;
1006 --disable-jack) _jack
=no
;;
1007 --enable-openal) _openal
=yes ;;
1008 --disable-openal) _openal
=no
;;
1009 --enable-dart) _dart
=yes ;;
1010 --disable-dart) _dart
=no
;;
1011 --enable-mad) _mad
=yes ;;
1012 --disable-mad) _mad
=no
;;
1013 --enable-mp3lame) _mp3lame
=yes ;;
1014 --disable-mp3lame) _mp3lame
=no
;;
1015 --enable-mp3lame-lavc) _mp3lame_lavc
=yes ;;
1016 --disable-mp3lame-lavc) _mp3lame_lavc
=no
;;
1017 --enable-toolame) _toolame
=yes ;;
1018 --disable-toolame) _toolame
=no
;;
1019 --enable-twolame) _twolame
=yes ;;
1020 --disable-twolame) _twolame
=no
;;
1021 --enable-libcdio) _libcdio
=yes ;;
1022 --disable-libcdio) _libcdio
=no
;;
1023 --enable-liblzo) _liblzo
=yes ;;
1024 --disable-liblzo) _liblzo
=no
;;
1025 --enable-libvorbis) _libvorbis
=yes ;;
1026 --disable-libvorbis) _libvorbis
=no
;;
1027 --enable-speex) _speex
=yes ;;
1028 --disable-speex) _speex
=no
;;
1029 --enable-tremor) _tremor
=yes ;;
1030 --disable-tremor) _tremor
=no
;;
1031 --enable-tremor-internal) _tremor_internal
=yes ;;
1032 --disable-tremor-internal) _tremor_internal
=no
;;
1033 --enable-tremor-low) _tremor_low
=yes ;;
1034 --disable-tremor-low) _tremor_low
=no
;;
1035 --enable-theora) _theora
=yes ;;
1036 --disable-theora) _theora
=no
;;
1037 --enable-mp3lib) _mp3lib
=yes ;;
1038 --disable-mp3lib) _mp3lib
=no
;;
1039 --enable-liba52-internal) _liba52_internal
=yes ;;
1040 --disable-liba52-internal) _liba52_internal
=no
;;
1041 --enable-liba52) _liba52
=yes ;;
1042 --disable-liba52) _liba52
=no
;;
1043 --enable-libdca) _libdca
=yes ;;
1044 --disable-libdca) _libdca
=no
;;
1045 --enable-libmpeg2) _libmpeg2
=yes ;;
1046 --disable-libmpeg2) _libmpeg2
=no
;;
1047 --enable-musepack) _musepack
=yes ;;
1048 --disable-musepack) _musepack
=no
;;
1049 --enable-faad) _faad
=yes ;;
1050 --disable-faad) _faad
=no
;;
1051 --enable-faad-internal) _faad_internal
=yes ;;
1052 --disable-faad-internal) _faad_internal
=no
;;
1053 --enable-faad-fixed) _faad_fixed
=yes ;;
1054 --disable-faad-fixed) _faad_fixed
=no
;;
1055 --enable-faac) _faac
=yes ;;
1056 --disable-faac) _faac
=no
;;
1057 --enable-faac-lavc) _faac_lavc
=yes ;;
1058 --disable-faac-lavc) _faac_lavc
=no
;;
1059 --enable-ladspa) _ladspa
=yes ;;
1060 --disable-ladspa) _ladspa
=no
;;
1061 --enable-libbs2b) _libbs2b
=yes ;;
1062 --disable-libbs2b) _libbs2b
=no
;;
1063 --enable-xmms) _xmms
=yes ;;
1064 --disable-xmms) _xmms
=no
;;
1065 --enable-vcd) _vcd
=yes ;;
1066 --disable-vcd) _vcd
=no
;;
1067 --enable-dvdread) _dvdread
=yes ;;
1068 --disable-dvdread) _dvdread
=no
;;
1069 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1070 --disable-dvdread-internal) _dvdread_internal
=no
;;
1071 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1072 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1073 --enable-dvdnav) _dvdnav
=yes ;;
1074 --disable-dvdnav) _dvdnav
=no
;;
1075 --enable-xanim) _xanim
=yes ;;
1076 --disable-xanim) _xanim
=no
;;
1077 --enable-real) _real
=yes ;;
1078 --disable-real) _real
=no
;;
1079 --enable-live) _live
=yes ;;
1080 --disable-live) _live
=no
;;
1081 --enable-nemesi) _nemesi
=yes ;;
1082 --disable-nemesi) _nemesi
=no
;;
1083 --enable-xinerama) _xinerama
=yes ;;
1084 --disable-xinerama) _xinerama
=no
;;
1085 --enable-mga) _mga
=yes ;;
1086 --disable-mga) _mga
=no
;;
1087 --enable-xmga) _xmga
=yes ;;
1088 --disable-xmga) _xmga
=no
;;
1089 --enable-vm) _vm
=yes ;;
1090 --disable-vm) _vm
=no
;;
1091 --enable-xf86keysym) _xf86keysym
=yes ;;
1092 --disable-xf86keysym) _xf86keysym
=no
;;
1093 --enable-mlib) _mlib
=yes ;;
1094 --disable-mlib) _mlib
=no
;;
1095 --enable-sunaudio) _sunaudio
=yes ;;
1096 --disable-sunaudio) _sunaudio
=no
;;
1097 --enable-sgiaudio) _sgiaudio
=yes ;;
1098 --disable-sgiaudio) _sgiaudio
=no
;;
1099 --enable-alsa) _alsa
=yes ;;
1100 --disable-alsa) _alsa
=no
;;
1101 --enable-tv) _tv
=yes ;;
1102 --disable-tv) _tv
=no
;;
1103 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1104 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1105 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1106 --disable-tv-v4l1) _tv_v4l1
=no
;;
1107 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1108 --disable-tv-v4l2) _tv_v4l2
=no
;;
1109 --enable-tv-dshow) _tv_dshow
=yes ;;
1110 --disable-tv-dshow) _tv_dshow
=no
;;
1111 --enable-radio) _radio
=yes ;;
1112 --enable-radio-capture) _radio_capture
=yes ;;
1113 --disable-radio-capture) _radio_capture
=no
;;
1114 --disable-radio) _radio
=no
;;
1115 --enable-radio-v4l) _radio_v4l
=yes ;;
1116 --disable-radio-v4l) _radio_v4l
=no
;;
1117 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1118 --disable-radio-v4l2) _radio_v4l2
=no
;;
1119 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1120 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1121 --enable-pvr) _pvr
=yes ;;
1122 --disable-pvr) _pvr
=no
;;
1123 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1124 --disable-fastmemcpy) _fastmemcpy
=no
;;
1125 --enable-hardcoded-tables) hardcoded_tables
=yes ;;
1126 --disable-hardcoded-tables) hardcoded_tables
=no
;;
1127 --enable-network) _network
=yes ;;
1128 --disable-network) _network
=no
;;
1129 --enable-winsock2_h) _winsock2_h
=yes ;;
1130 --disable-winsock2_h) _winsock2_h
=no
;;
1131 --enable-smb) _smb
=yes ;;
1132 --disable-smb) _smb
=no
;;
1133 --enable-vidix) _vidix
=yes ;;
1134 --disable-vidix) _vidix
=no
;;
1135 --with-vidix-drivers=*)
1136 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1138 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1139 --enable-dhahelper) _dhahelper
=yes ;;
1140 --disable-dhahelper) _dhahelper
=no
;;
1141 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1142 --disable-svgalib_helper) _svgalib_helper
=no
;;
1143 --enable-joystick) _joystick
=yes ;;
1144 --disable-joystick) _joystick
=no
;;
1145 --enable-xvid) _xvid
=yes ;;
1146 --disable-xvid) _xvid
=no
;;
1147 --enable-xvid-lavc) _xvid_lavc
=yes ;;
1148 --disable-xvid-lavc) _xvid_lavc
=no
;;
1149 --enable-x264) _x264
=yes ;;
1150 --disable-x264) _x264
=no
;;
1151 --enable-x264-lavc) _x264_lavc
=yes ;;
1152 --disable-x264-lavc) _x264_lavc
=no
;;
1153 --enable-libdirac-lavc) _libdirac_lavc
=yes ;;
1154 --disable-libdirac-lavc) _libdirac_lavc
=no
;;
1155 --enable-libschroedinger-lavc) _libschroedinger_lavc
=yes ;;
1156 --disable-libschroedinger-lavc) _libschroedinger_lavc
=no
;;
1157 --enable-libnut) _libnut
=yes ;;
1158 --disable-libnut) _libnut
=no
;;
1159 --enable-libavutil_a) _libavutil_a
=yes ;;
1160 --disable-libavutil_a) _libavutil_a
=no
;;
1161 --enable-libavutil_so) _libavutil_so
=yes ;;
1162 --disable-libavutil_so) _libavutil_so
=no
;;
1163 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1164 --disable-libavcodec_a) _libavcodec_a
=no
;;
1165 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1166 --disable-libavcodec_so) _libavcodec_so
=no
;;
1167 --enable-libopencore_amrnb) _libopencore_amrnb
=yes ;;
1168 --disable-libopencore_amrnb) _libopencore_amrnb
=no
;;
1169 --enable-libopencore_amrwb) _libopencore_amrwb
=yes ;;
1170 --disable-libopencore_amrwb) _libopencore_amrwb
=no
;;
1171 --enable-decoder=*) _libavdecoders
="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1172 --disable-decoder=*) _libavdecoders
=$
(echo $_libavdecoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1173 --enable-encoder=*) _libavencoders
="$_libavencoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1174 --disable-encoder=*) _libavencoders
=$
(echo $_libavencoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1175 --enable-parser=*) _libavparsers
="$_libavparsers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1176 --disable-parser=*) _libavparsers
=$
(echo $_libavparsers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1177 --enable-protocol=*) _libavprotocols
="$_libavprotocols $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1178 --disable-protocol=*) _libavprotocols
=$
(echo $_libavprotocols |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1179 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1180 --disable-demuxer=*) _libavdemuxers
=$
(echo $_libavdemuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1181 --enable-muxer=*) _libavmuxers
="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1182 --disable-muxer=*) _libavmuxers
=$
(echo $_libavmuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1183 --enable-libavformat_a) _libavformat_a
=yes ;;
1184 --disable-libavformat_a) _libavformat_a
=no
;;
1185 --enable-libavformat_so) _libavformat_so
=yes ;;
1186 --disable-libavformat_so) _libavformat_so
=no
;;
1187 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1188 --disable-libpostproc_a) _libpostproc_a
=no
;;
1189 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1190 --disable-libpostproc_so) _libpostproc_so
=no
;;
1191 --enable-libswscale_a) _libswscale_a
=yes ;;
1192 --disable-libswscale_a) _libswscale_a
=no
;;
1193 --enable-libswscale_so) _libswscale_so
=yes ;;
1194 --disable-libswscale_so) _libswscale_so
=no
;;
1195 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1196 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1198 --enable-lirc) _lirc
=yes ;;
1199 --disable-lirc) _lirc
=no
;;
1200 --enable-lircc) _lircc
=yes ;;
1201 --disable-lircc) _lircc
=no
;;
1202 --enable-apple-remote) _apple_remote
=yes ;;
1203 --disable-apple-remote) _apple_remote
=no
;;
1204 --enable-apple-ir) _apple_ir
=yes ;;
1205 --disable-apple-ir) _apple_ir
=no
;;
1206 --enable-gui) _gui
=yes ;;
1207 --disable-gui) _gui
=no
;;
1208 --enable-gtk1) _gtk1
=yes ;;
1209 --disable-gtk1) _gtk1
=no
;;
1210 --enable-termcap) _termcap
=yes ;;
1211 --disable-termcap) _termcap
=no
;;
1212 --enable-termios) _termios
=yes ;;
1213 --disable-termios) _termios
=no
;;
1214 --enable-3dfx) _3dfx
=yes ;;
1215 --disable-3dfx) _3dfx
=no
;;
1216 --enable-s3fb) _s3fb
=yes ;;
1217 --disable-s3fb) _s3fb
=no
;;
1218 --enable-wii) _wii
=yes ;;
1219 --disable-wii) _wii
=no
;;
1220 --enable-tdfxfb) _tdfxfb
=yes ;;
1221 --disable-tdfxfb) _tdfxfb
=no
;;
1222 --disable-tdfxvid) _tdfxvid
=no
;;
1223 --enable-tdfxvid) _tdfxvid
=yes ;;
1224 --disable-xvr100) _xvr100
=no
;;
1225 --enable-xvr100) _xvr100
=yes ;;
1226 --disable-tga) _tga
=no
;;
1227 --enable-tga) _tga
=yes ;;
1228 --enable-directfb) _directfb
=yes ;;
1229 --disable-directfb) _directfb
=no
;;
1230 --enable-zr) _zr
=yes ;;
1231 --disable-zr) _zr
=no
;;
1232 --enable-bl) _bl
=yes ;;
1233 --disable-bl) _bl
=no
;;
1234 --enable-mtrr) _mtrr
=yes ;;
1235 --disable-mtrr) _mtrr
=no
;;
1236 --enable-largefiles) _largefiles
=yes ;;
1237 --disable-largefiles) _largefiles
=no
;;
1238 --enable-shm) _shm
=yes ;;
1239 --disable-shm) _shm
=no
;;
1240 --enable-select) _select
=yes ;;
1241 --disable-select) _select
=no
;;
1242 --enable-linux-devfs) _linux_devfs
=yes ;;
1243 --disable-linux-devfs) _linux_devfs
=no
;;
1244 --enable-cdparanoia) _cdparanoia
=yes ;;
1245 --disable-cdparanoia) _cdparanoia
=no
;;
1246 --enable-cddb) _cddb
=yes ;;
1247 --disable-cddb) _cddb
=no
;;
1248 --enable-big-endian) _big_endian
=yes ;;
1249 --disable-big-endian) _big_endian
=no
;;
1250 --enable-bitmap-font) _bitmap_font
=yes ;;
1251 --disable-bitmap-font) _bitmap_font
=no
;;
1252 --enable-freetype) _freetype
=yes ;;
1253 --disable-freetype) _freetype
=no
;;
1254 --enable-fontconfig) _fontconfig
=yes ;;
1255 --disable-fontconfig) _fontconfig
=no
;;
1256 --enable-unrarexec) _unrar_exec
=yes ;;
1257 --disable-unrarexec) _unrar_exec
=no
;;
1258 --enable-ftp) _ftp
=yes ;;
1259 --disable-ftp) _ftp
=no
;;
1260 --enable-vstream) _vstream
=yes ;;
1261 --disable-vstream) _vstream
=no
;;
1262 --enable-pthreads) _pthreads
=yes ;;
1263 --disable-pthreads) _pthreads
=no
;;
1264 --enable-w32threads) _w32threads
=yes ;;
1265 --disable-w32threads) _w32threads
=no
;;
1266 --enable-ass) _ass
=yes ;;
1267 --disable-ass) _ass
=no
;;
1268 --enable-ass-internal) ass_internal
=yes ;;
1269 --disable-ass-internal) ass_internal
=no
;;
1270 --enable-rpath) _rpath
=yes ;;
1271 --disable-rpath) _rpath
=no
;;
1273 --enable-fribidi) _fribidi
=yes ;;
1274 --disable-fribidi) _fribidi
=no
;;
1276 --enable-enca) _enca
=yes ;;
1277 --disable-enca) _enca
=no
;;
1279 --enable-inet6) _inet6
=yes ;;
1280 --disable-inet6) _inet6
=no
;;
1282 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1283 --disable-gethostbyname2) _gethostbyname2
=no
;;
1285 --enable-dga1) _dga1
=yes ;;
1286 --disable-dga1) _dga1
=no
;;
1287 --enable-dga2) _dga2
=yes ;;
1288 --disable-dga2) _dga2
=no
;;
1290 --enable-menu) _menu
=yes ;;
1291 --disable-menu) _menu
=no
;;
1293 --enable-qtx) _qtx
=yes ;;
1294 --disable-qtx) _qtx
=no
;;
1296 --enable-coreaudio) _coreaudio
=yes ;;
1297 --disable-coreaudio) _coreaudio
=no
;;
1298 --enable-corevideo) _corevideo
=yes ;;
1299 --disable-corevideo) _corevideo
=no
;;
1300 --enable-quartz) _quartz
=yes ;;
1301 --disable-quartz) _quartz
=no
;;
1302 --enable-macosx-finder) _macosx_finder
=yes ;;
1303 --disable-macosx-finder) _macosx_finder
=no
;;
1304 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1305 --disable-macosx-bundle) _macosx_bundle
=no
;;
1307 --enable-maemo) _maemo
=yes ;;
1308 --disable-maemo) _maemo
=no
;;
1310 --enable-sortsub) _sortsub
=yes ;;
1311 --disable-sortsub) _sortsub
=no
;;
1313 --enable-crash-debug) _crash_debug
=yes ;;
1314 --disable-crash-debug) _crash_debug
=no
;;
1315 --enable-sighandler) _sighandler
=yes ;;
1316 --disable-sighandler) _sighandler
=no
;;
1317 --enable-win32dll) _win32dll
=yes ;;
1318 --disable-win32dll) _win32dll
=no
;;
1320 --enable-sse) _sse
=yes ;;
1321 --disable-sse) _sse
=no
;;
1322 --enable-sse2) _sse2
=yes ;;
1323 --disable-sse2) _sse2
=no
;;
1324 --enable-ssse3) _ssse3
=yes ;;
1325 --disable-ssse3) _ssse3
=no
;;
1326 --enable-mmxext) _mmxext
=yes ;;
1327 --disable-mmxext) _mmxext
=no
;;
1328 --enable-3dnow) _3dnow
=yes ;;
1329 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1330 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1331 --disable-3dnowext) _3dnowext
=no
;;
1332 --enable-cmov) _cmov
=yes ;;
1333 --disable-cmov) _cmov
=no
;;
1334 --enable-fast-cmov) _fast_cmov
=yes ;;
1335 --disable-fast-cmov) _fast_cmov
=no
;;
1336 --enable-altivec) _altivec
=yes ;;
1337 --disable-altivec) _altivec
=no
;;
1338 --enable-armv5te) _armv5te
=yes ;;
1339 --disable-armv5te) _armv5te
=no
;;
1340 --enable-armv6) _armv6
=yes ;;
1341 --disable-armv6) _armv6
=no
;;
1342 --enable-armv6t2) _armv6t2
=yes ;;
1343 --disable-armv6t2) _armv6t2
=no
;;
1344 --enable-armvfp) _armvfp
=yes ;;
1345 --disable-armvfp) _armvfp
=no
;;
1346 --enable-neon) neon
=yes ;;
1347 --disable-neon) neon
=no
;;
1348 --enable-iwmmxt) _iwmmxt
=yes ;;
1349 --disable-iwmmxt) _iwmmxt
=no
;;
1350 --enable-mmx) _mmx
=yes ;;
1351 --disable-mmx) # 3Dnow! and MMX2 require MMX
1352 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1355 echo "Unknown parameter: $ac_option"
1362 # Atmos: moved this here, to be correct, if --prefix is specified
1363 test -z "$_bindir" && _bindir
="$_prefix/bin"
1364 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1365 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1366 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1367 test -z "$_libdir" && _libdir
="$_prefix/lib"
1369 # Determine our OS name and CPU architecture
1370 if test -z "$_target" ; then
1372 system_name
=$
(uname
-s 2>&1)
1373 case "$system_name" in
1374 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1388 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1398 system_name
="$system_name-UNKNOWN"
1403 # host's CPU/instruction set
1404 host_arch
=$
(uname
-p 2>&1)
1405 case "$host_arch" in
1406 i386|sparc|ppc|alpha|arm|mips|vax
)
1408 powerpc
) # Darwin returns 'powerpc'
1411 *) # uname -p on Linux returns 'unknown' for the processor type,
1412 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1414 # Maybe uname -m (machine hardware name) returns something we
1417 # x86/x86pc is used by QNX
1418 case "$(uname -m 2>&1)" in
1419 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
;;
1420 ia64
) host_arch
=ia64
;;
1421 macppc|ppc
) host_arch
=ppc
;;
1422 ppc64
) host_arch
=ppc64
;;
1423 alpha
) host_arch
=alpha
;;
1424 sparc
) host_arch
=sparc
;;
1425 sparc64
) host_arch
=sparc64
;;
1426 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1427 arm
*|zaurus|cats
) host_arch
=arm
;;
1428 sh3|sh4|sh4a
) host_arch
=sh
;;
1429 s390
) host_arch
=s390
;;
1430 s390x
) host_arch
=s390x
;;
1431 *mips
*) host_arch
=mips
;;
1432 vax
) host_arch
=vax
;;
1433 xtensa
*) host_arch
=xtensa
;;
1434 *) host_arch
=UNKNOWN
;;
1438 else # if test -z "$_target"
1439 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1440 case "$(echo $system_name | tr A-Z a-z)" in
1441 linux
) system_name
=Linux
;;
1442 freebsd
) system_name
=FreeBSD
;;
1443 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1444 netbsd
) system_name
=NetBSD
;;
1445 bsd
/os
) system_name
=BSD
/OS
;;
1446 openbsd
) system_name
=OpenBSD
;;
1447 dragonfly
) system_name
=DragonFly
;;
1448 sunos
) system_name
=SunOS
;;
1449 qnx
) system_name
=QNX
;;
1450 morphos
) system_name
=MorphOS
;;
1451 amigaos
) system_name
=AmigaOS
;;
1452 mingw32
*) system_name
=MINGW32
;;
1454 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1455 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1456 if test $
(echo $host_arch) != "x86_64" ; then
1457 host_arch
=$
(echo $host_arch |
tr '_' '-')
1461 extra_cflags
="-I. $extra_cflags"
1462 _timer
=timer-linux.c
1465 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1466 extra_cflags
="$extra_cflags -I/usr/local/include"
1469 if netbsd || dragonfly
; then
1470 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1471 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1475 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1476 _timer
=timer-darwin.c
1480 extra_ldflags
="$extra_ldflags -lC"
1491 extra_cflags
="$extra_cflags -fno-common"
1492 # -lwinmm is always needed for osdep/timer-win2.c
1493 extra_ldflags
="$extra_ldflags -lwinmm"
1497 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1498 def_priority
="#define CONFIG_PRIORITY 1"
1510 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1511 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1515 extra_ldflags
="$extra_ldflags -lph"
1523 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1524 def_priority
="#define CONFIG_PRIORITY 1"
1527 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1532 TMPLOG
="configure.log"
1533 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1534 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1535 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1536 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1537 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1540 echo configuration
: $_configuration > "$TMPLOG"
1544 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1545 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1549 # Checking CC version...
1550 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1551 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1552 echocheck
"$_cc version"
1554 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1555 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1556 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1557 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1558 # TODO verify older icc/ecc compatibility
1561 cc_version
="v. ?.??, bad"
1565 cc_version
="$cc_version, ok"
1568 cc_version
="$cc_version, bad"
1572 echores
"$cc_version"
1574 for _cc
in "$_cc" gcc cc
; do
1575 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1576 if test "$cc_name_tmp" = "gcc"; then
1577 cc_name
=$cc_name_tmp
1578 echocheck
"$_cc version"
1580 cc_version
=$
($_cc -dumpversion 2>&1)
1586 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1587 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1588 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1591 echores
"$cc_version"
1594 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1595 if test "$cc_name_tmp" = "Sun C"; then
1596 echocheck
"$_cc version"
1598 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1599 _res_comment
="experimental support only"
1600 echores
"Sun C $cc_version"
1605 test "$cc_fail" = yes && die
"unsupported compiler version"
1607 if test -z "$_target" && x86
; then
1610 int test[(int)sizeof(char *)-7];
1614 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1617 echo "Detected operating system: $system_name"
1618 echo "Detected host architecture: $host_arch"
1621 test "$_host_cc" || _host_cc
=$_cc
1624 echocheck
"cross compilation"
1625 if test $_cross_compile = auto
; then
1627 int main(void) { return 0; }
1630 cc_check
&& "$TMPEXE" && _cross_compile
=no
1632 echores
$_cross_compile
1634 if test $_cross_compile = yes; then
1642 # now that we know what compiler should be used for compilation, try to find
1643 # out which assembler is used by the $_cc compiler
1644 if test "$_as" = auto
; then
1645 _as
=$
($_cc -print-prog-name=as
)
1646 test -z "$_as" && _as
=as
1649 if test "$_nm" = auto
; then
1650 _nm
=$
($_cc -print-prog-name=nm
)
1651 test -z "$_nm" && _nm
=nm
1654 # XXX: this should be ok..
1657 if test "$_runtime_cpudetection" = no
; then
1659 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1660 # FIXME: Remove the cygwin check once AMD CPUs are supported
1661 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1662 # Linux with /proc mounted, extract CPU information from it
1663 _cpuinfo
="cat /proc/cpuinfo"
1664 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1665 # FreeBSD with Linux emulation /proc mounted,
1666 # extract CPU information from it
1667 # Don't use it on x86 though, it never reports 3Dnow
1668 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1669 elif darwin
&& ! x86
; then
1670 # use hostinfo on Darwin
1673 # use 'lsattr' on AIX
1674 _cpuinfo
="lsattr -E -l proc0 -a type"
1676 # all other OSes try to extract CPU information from a small helper
1677 # program cpuinfo instead
1678 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1679 _cpuinfo
="./cpuinfo$_exesuf"
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 _arch_all
='X86 X86_32 X86_64 IA64 SPARC ARM AVR32 SH4 PPC PPC64 ALPHA MIPS SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
1773 case "$host_arch" in
1774 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1776 _target_arch
="ARCH_X86 = yes"
1777 _target_subarch
="ARCH_X86_32 = yes"
1778 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1783 if test "$_runtime_cpudetection" = no
; then
1787 3) proc
=i386 iproc
=386 ;;
1788 4) proc
=i486 iproc
=486 ;;
1789 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1790 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1791 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1793 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1795 elif test "$pmodel" -ge 8; then
1797 elif test "$pmodel" -ge 6; then
1804 # It's a bit difficult to determine the correct type of Family 6
1805 # AMD CPUs just from their signature. Instead, we check directly
1806 # whether it supports SSE.
1807 if test "$_sse" = yes; then
1808 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1811 # Again, gcc treats athlon and athlon-tbird similarly.
1816 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1817 # caught and remedied in the optimization tests below.
1821 *) proc
=k8 iproc
=686 ;;
1826 3) proc
=i386 iproc
=386 ;;
1827 4) proc
=i486 iproc
=486 ;;
1829 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1830 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1836 if test "$pmodel" -ge 15; then
1838 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1840 elif test "$pmodel" -ge 7; then
1842 elif test "$pmodel" -ge 3; then
1849 # A nocona in 32-bit mode has no more capabilities than a prescott.
1850 if test "$pmodel" -ge 3; then
1855 test $_fast_cmov = "auto" && _fast_cmov
=no
1857 *) proc
=prescott iproc
=686 ;;
1863 if test "$pmodel" -ge 8; then
1865 elif test "$pmodel" -ge 4; then
1872 if test "$pmodel" -ge 9; then
1879 *) proc
=i686 iproc
=i686
;;
1884 3) proc
=i386 iproc
=386 ;;
1885 4) proc
=i486 iproc
=486 ;;
1886 *) proc
=i586 iproc
=586 ;;
1890 proc
=i586 iproc
=586 ;;
1892 fi # test "$_runtime_cpudetection" = no
1895 # check that gcc supports our CPU, if not, fall back to earlier ones
1896 # LGB: check -mcpu and -march swithing step by step with enabling
1897 # to fall back till 386.
1899 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1901 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1907 echocheck
"GCC & CPU optimization abilities"
1909 int main(void) { return 0; }
1911 if test "$_runtime_cpudetection" = no
; then
1912 cc_check
-march=native
&& proc
=native
1913 if test "$proc" = "k8"; then
1914 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1916 if test "$proc" = "athlon-xp"; then
1917 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1919 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1920 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1922 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1923 if ! cc_check
-march=$proc $cpuopt=$proc; then
1924 if cc_check
-march=i586
$cpuopt=i686
; then
1931 if test "$proc" = "prescott" ; then
1932 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1934 if test "$proc" = "core2" ; then
1935 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1937 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
1938 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1940 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1941 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1943 if test "$proc" = "i586"; then
1944 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1946 if test "$proc" = "i486" ; then
1947 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1949 if test "$proc" = "i386" ; then
1950 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1952 if test "$proc" = "error" ; then
1953 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1957 elif test "$proc" = "i586-i686"; then
1958 _march
="-march=i586"
1959 _mcpu
="$cpuopt=i686"
1962 _march
="-march=$proc"
1963 _mcpu
="$cpuopt=$proc"
1966 else # if test "$_runtime_cpudetection" = no
1967 _mcpu
="$cpuopt=generic"
1968 # at least i486 required, for bswap instruction
1969 _march
="-march=i486"
1970 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1971 cc_check
$_mcpu || _mcpu
=""
1972 cc_check
$_march $_mcpu || _march
=""
1975 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1976 ## autodetected mcpu/march parameters
1977 if test "$_target" ; then
1978 # TODO: it may be a good idea to check GCC and fall back in all cases
1979 if test "$host_arch" = "i586-i686"; then
1980 _march
="-march=i586"
1981 _mcpu
="$cpuopt=i686"
1983 _march
="-march=$host_arch"
1984 _mcpu
="$cpuopt=$host_arch"
1992 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1993 i686|athlon
*|pentium
*) iproc
=686 ;;
1998 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
2009 _target_arch
='ARCH_IA64 = yes'
2010 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2016 _target_subarch
='ARCH_X86_64 = yes'
2017 _target_arch
="ARCH_X86 = yes"
2018 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2019 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2022 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
2023 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
2028 if test "$_runtime_cpudetection" = no
; then
2036 # 64-bit prescotts exist, but as far as GCC is concerned they
2037 # have the same capabilities as a nocona.
2039 test $_fast_cmov = "auto" && _fast_cmov
=no
2046 fi # test "$_runtime_cpudetection" = no
2048 echocheck
"GCC & CPU optimization abilities"
2050 int main(void) { return 0; }
2052 # This is a stripped-down version of the i386 fallback.
2053 if test "$_runtime_cpudetection" = no
; then
2054 cc_check
-march=native
&& proc
=native
2055 # --- AMD processors ---
2056 if test "$proc" = "k8"; then
2057 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2059 # This will fail if gcc version < 3.3, which is ok because earlier
2060 # versions don't really support 64-bit on amd64.
2061 # Is this a valid assumption? -Corey
2062 if test "$proc" = "athlon-xp"; then
2063 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2065 # --- Intel processors ---
2066 if test "$proc" = "core2"; then
2067 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2069 if test "$proc" = "x86-64"; then
2070 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2072 if test "$proc" = "nocona"; then
2073 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2075 if test "$proc" = "pentium4"; then
2076 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2079 _march
="-march=$proc"
2080 _mcpu
="$cpuopt=$proc"
2081 if test "$proc" = "error" ; then
2082 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2086 else # if test "$_runtime_cpudetection" = no
2087 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2088 _march
="-march=x86-64"
2089 _mcpu
="$cpuopt=generic"
2090 cc_check
$_mcpu || _mcpu
="x86-64"
2091 cc_check
$_mcpu || _mcpu
=""
2092 cc_check
$_march $_mcpu || _march
=""
2096 test $_fast_cmov = "auto" && _fast_cmov
=yes
2103 _target_arch
='ARCH_SPARC = yes'
2105 if test "$host_arch" = "sparc64" ; then
2108 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2110 echocheck
"CPU type"
2112 case "$(echo $karch)" in
2117 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2129 arm|armv4l|armv5tel
)
2131 _target_arch
='ARCH_ARM = yes'
2137 _target_arch
='ARCH_AVR32 = yes'
2138 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2144 _target_arch
='ARCH_SH4 = yes'
2148 ppc|ppc64|powerpc|powerpc64
)
2150 def_dcbzl
='#define HAVE_DCBZL 0'
2151 _target_arch
='ARCH_PPC = yes'
2152 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2155 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2157 _target_subarch
='ARCH_PPC64 = yes'
2158 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2160 echocheck
"CPU type"
2161 case $system_name in
2163 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2164 if test -n "$($_cpuinfo | grep altivec)"; then
2165 test $_altivec = auto
&& _altivec
=yes
2169 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2170 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2171 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2172 test $_altivec = auto
&& _altivec
=yes
2176 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2178 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2181 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2182 test $_altivec = auto
&& _altivec
=yes
2188 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2191 if test "$_altivec" = yes; then
2192 echores
"$proc altivec"
2198 echocheck
"GCC & CPU optimization abilities"
2200 if test -n "$proc"; then
2202 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2203 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2204 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2205 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2206 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2207 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2208 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2209 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2210 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2213 # gcc 3.1(.1) and up supports 7400 and 7450
2214 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2216 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2217 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2221 # gcc 3.2 and up supports 970
2222 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2224 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2225 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2229 # gcc 3.3 and up supports POWER4
2230 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2232 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2236 # gcc 3.4 and up supports 440*
2237 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2239 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2240 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2244 # gcc 4.0 and up supports POWER5
2245 if test "$_cc_major" -ge "4"; then
2247 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2253 if test -n "$_mcpu"; then
2254 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2255 echores
"$_optimizing"
2264 _target_arch
='ARCH_ALPHA = yes'
2267 echocheck
"CPU type"
2270 unsigned long ver, mask;
2271 __asm__ ("implver %0" : "=r" (ver));
2272 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2273 printf("%ld-%x\n", ver, ~mask);
2277 $_cc -o "$TMPEXE" "$TMPC"
2278 case $
("$TMPEXE") in
2280 0-0) proc
="ev4"; _mvi
="0";;
2281 1-0) proc
="ev5"; _mvi
="0";;
2282 1-1) proc
="ev56"; _mvi
="0";;
2283 1-101) proc
="pca56"; _mvi
="1";;
2284 2-303) proc
="ev6"; _mvi
="1";;
2285 2-307) proc
="ev67"; _mvi
="1";;
2286 2-1307) proc
="ev68"; _mvi
="1";;
2290 echocheck
"GCC & CPU optimization abilities"
2291 if test "$proc" = "ev68" ; then
2292 cc_check
-mcpu=$proc || proc
=ev67
2294 if test "$proc" = "ev67" ; then
2295 cc_check
-mcpu=$proc || proc
=ev6
2305 _target_arch
='ARCH_SGI_MIPS = yes'
2309 echocheck
"CPU type"
2310 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2311 case "$(echo $proc)" in
2312 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2313 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2314 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2315 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2316 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2317 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2319 # gcc < 3.x does not support -mtune.
2320 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2330 _target_arch
='ARCH_PA_RISC = yes'
2336 _target_arch
='ARCH_S390 = yes'
2342 _target_arch
='ARCH_S390X = yes'
2348 _target_arch
='ARCH_VAX = yes'
2354 _target_arch
='ARCH_XTENSA = yes'
2360 _target_arch
='ARCH_GENERIC = yes'
2364 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2365 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2366 die
"unsupported architecture $host_arch"
2368 esac # case "$host_arch" in
2370 if test "$_runtime_cpudetection" = yes ; then
2372 test "$_cmov" != no
&& _cmov
=yes
2374 test "$_mmx" != no
&& _mmx
=yes
2375 test "$_3dnow" != no
&& _3dnow
=yes
2376 test "$_3dnowext" != no
&& _3dnowext
=yes
2377 test "$_mmxext" != no
&& _mmxext
=yes
2378 test "$_sse" != no
&& _sse
=yes
2379 test "$_sse2" != no
&& _sse2
=yes
2380 test "$_ssse3" != no
&& _ssse3
=yes
2381 test "$_mtrr" != no
&& _mtrr
=yes
2390 echocheck
"byte order"
2391 if test "$_big_endian" = auto
; then
2393 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2394 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2395 int main(void) { return (int)ascii_name; }
2398 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2404 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2407 if test "$_big_endian" = yes ; then
2408 _byte_order
='big-endian'
2409 def_words_endian
='#define WORDS_BIGENDIAN 1'
2410 def_bigendian
='#define HAVE_BIGENDIAN 1'
2412 _byte_order
='little-endian'
2413 def_words_endian
='#undef WORDS_BIGENDIAN'
2414 def_bigendian
='#define HAVE_BIGENDIAN 0'
2416 echores
"$_byte_order"
2419 echocheck
"extern symbol prefix"
2423 cc_check
-c || die
"Symbol mangling check failed."
2424 sym
=$
($_nm -P -g $TMPEXE)
2425 extern_prefix
=${sym%%ff_extern*}
2426 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2427 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2428 echores
$extern_prefix
2431 echocheck
"assembler support of -pipe option"
2433 int main(void) { return 0; }
2435 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2436 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2439 echocheck
"compiler support of named assembler arguments"
2441 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2442 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2443 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2445 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2447 echores
$_named_asm_args
2450 if darwin
&& test "$cc_vendor" = "gnu" ; then
2451 echocheck
"GCC support of -mstackrealign"
2452 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2453 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2454 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2455 # wrong code with this flag, but this can be worked around by adding
2456 # -fno-unit-at-a-time as described in the blog post at
2457 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2459 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2460 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2462 cc_check
-O4 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2463 test -z "$cflags_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2464 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2465 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2466 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2469 # Checking for CFLAGS
2471 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2472 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2474 elif test -z "$CFLAGS" ; then
2475 if test "$cc_vendor" = "intel" ; then
2476 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2477 elif test "$cc_vendor" = "sun" ; then
2478 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2479 elif test "$cc_vendor" != "gnu" ; then
2480 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2482 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2483 extra_ldflags
="$extra_ldflags -ffast-math"
2490 int main(void) { return 0; }
2492 if test "$cc_vendor" = "gnu" ; then
2493 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2494 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
2495 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2496 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2497 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2499 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2502 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2505 if test -n "$LDFLAGS" ; then
2506 extra_ldflags
="$extra_ldflags $LDFLAGS"
2508 elif test "$cc_vendor" = "intel" ; then
2509 extra_ldflags
="$extra_ldflags -i-static"
2511 if test -n "$CPPFLAGS" ; then
2512 extra_cflags
="$extra_cflags $CPPFLAGS"
2519 # Checking assembler (_as) compatibility...
2520 # Added workaround for older as that reads from stdin by default - atmos
2521 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2522 echocheck
"assembler ($_as $as_version)"
2524 _pref_as_version
='2.9.1'
2526 if test "$_mmx" = yes ; then
2527 echo 'emms' >> $TMPS
2529 if test "$_3dnow" = yes ; then
2530 _pref_as_version
='2.10.1'
2531 echo 'femms' >> $TMPS
2533 if test "$_3dnowext" = yes ; then
2534 _pref_as_version
='2.10.1'
2535 echo 'pswapd %mm0, %mm0' >> $TMPS
2537 if test "$_mmxext" = yes ; then
2538 _pref_as_version
='2.10.1'
2539 echo 'movntq %mm0, (%eax)' >> $TMPS
2541 if test "$_sse" = yes ; then
2542 _pref_as_version
='2.10.1'
2543 echo 'xorps %xmm0, %xmm0' >> $TMPS
2545 #if test "$_sse2" = yes ; then
2546 # _pref_as_version='2.11'
2547 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2549 if test "$_cmov" = yes ; then
2550 _pref_as_version
='2.10.1'
2551 echo 'cmovb %eax, %ebx' >> $TMPS
2553 if test "$_ssse3" = yes ; then
2554 _pref_as_version
='2.16.92'
2555 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2557 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2559 if test "$as_verc_fail" != yes ; then
2562 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2564 die
"obsolete binutils version"
2569 echocheck
".align is a power of two"
2570 if test "$_asmalign_pot" = auto
; then
2573 int main(void) { __asm__ (".align 3"); return 0; }
2575 cc_check
&& _asmalign_pot
=yes
2577 if test "$_asmalign_pot" = "yes" ; then
2578 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2580 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2582 echores
$_asmalign_pot
2585 echocheck
"10 assembler operands"
2587 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2593 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2598 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2599 echores
$ten_operands
2601 echocheck
"ebx availability"
2603 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2610 // just adding ebx to clobber list seems unreliable with some
2611 // compilers, e.g. Haiku's gcc 2.95
2613 // and the above check does not work for OSX 64 bit...
2614 __asm__ volatile("":::"%ebx");
2618 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2619 echores
$ebx_available
2625 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2626 #error PIC not enabled
2631 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2635 if test -z "$YASMFLAGS" ; then
2637 x86_64
&& objformat
="macho64" || objformat
="macho"
2643 # currently tested for Linux x86, x86_64
2644 YASMFLAGS
="-f $objformat"
2645 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2646 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2647 case "$objformat" in
2648 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2649 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2655 echo "pabsw xmm0, xmm0" > $TMPS
2656 yasm_check || _yasm
=""
2657 if test $_yasm ; then
2658 test "$_mmx" = "yes" && fft_mmx
="yes"
2659 def_yasm
='#define HAVE_YASM 1'
2663 def_yasm
='#define HAVE_YASM 0'
2670 def_bswap
='#define HAVE_BSWAP 0'
2671 echo 'bswap %eax' > $TMPS
2672 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2677 #FIXME: This should happen before the check for CFLAGS..
2678 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2679 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2681 # check if AltiVec is supported by the compiler, and how to enable it
2682 echocheck
"GCC AltiVec flags"
2684 int main(void) { return 0; }
2686 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2687 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2688 # check if <altivec.h> should be included
2690 #include <altivec.h>
2691 int main(void) { return 0; }
2693 if $
(cc_check
$_altivec_gcc_flags) ; then
2694 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2695 inc_altivec_h
='#include <altivec.h>'
2698 int main(void) { return 0; }
2700 if $
(cc_check
-faltivec) ; then
2701 _altivec_gcc_flags
="-faltivec"
2704 _altivec_gcc_flags
="none, AltiVec disabled"
2708 echores
"$_altivec_gcc_flags"
2710 # check if the compiler supports braces for vector declarations
2713 int main(void) { (vector int) {1}; return 0; }
2715 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2717 # Disable runtime cpudetection if we cannot generate AltiVec code or
2718 # AltiVec is disabled by the user.
2719 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2720 && _runtime_cpudetection
=no
2722 # Show that we are optimizing for AltiVec (if enabled and supported).
2723 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2724 && _optimizing
="$_optimizing altivec"
2726 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2727 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2731 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2733 echocheck
"XFORM ASM support"
2735 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2737 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2738 echores
"$xform_asm"
2742 echocheck
"ARM pld instruction"
2744 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2750 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2751 if test $_armv5te = "auto" ; then
2753 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2756 cc_check
&& _armv5te
=yes
2760 echocheck
"ARMv6 (SIMD instructions)"
2761 if test $_armv6 = "auto" ; then
2763 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2766 cc_check
&& _armv6
=yes
2770 echocheck
"ARMv6t2 (SIMD instructions)"
2771 if test $_armv6t2 = "auto" ; then
2773 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2776 cc_check
&& _armv6t2
=yes
2781 if test $_armvfp = "auto" ; then
2783 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2786 cc_check
&& _armvfp
=yes
2790 echocheck
"ARM NEON"
2791 if test $neon = "auto" ; then
2793 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2796 cc_check
&& neon
=yes
2800 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2801 if test $_iwmmxt = "auto" ; then
2803 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2806 cc_check
&& _iwmmxt
=yes
2811 _cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2812 test "$_altivec" = yes && _cpuexts
="ALTIVEC $_cpuexts"
2813 test "$_mmx" = yes && _cpuexts
="MMX $_cpuexts"
2814 test "$_mmxext" = yes && _cpuexts
="MMX2 $_cpuexts"
2815 test "$_3dnow" = yes && _cpuexts
="AMD3DNOW $_cpuexts"
2816 test "$_3dnowext" = yes && _cpuexts
="AMD3DNOWEXT $_cpuexts"
2817 test "$_sse" = yes && _cpuexts
="SSE $_cpuexts"
2818 test "$_sse2" = yes && _cpuexts
="SSE2 $_cpuexts"
2819 test "$_ssse3" = yes && _cpuexts
="SSSE3 $_cpuexts"
2820 test "$_cmov" = yes && _cpuexts
="CMOV $_cpuexts"
2821 test "$_fast_cmov" = yes && _cpuexts
="FAST_CMOV $_cpuexts"
2822 test "$pld" = yes && _cpuexts
="PLD $_cpuexts"
2823 test "$_armv5te" = yes && _cpuexts
="ARMV5TE $_cpuexts"
2824 test "$_armv6" = yes && _cpuexts
="ARMV6 $_cpuexts"
2825 test "$_armv6t2" = yes && _cpuexts
="ARMV6T2 $_cpuexts"
2826 test "$_armvfp" = yes && _cpuexts
="ARMVFP $_cpuexts"
2827 test "$neon" = yes && _cpuexts
="NEON $_cpuexts"
2828 test "$_iwmmxt" = yes && _cpuexts
="IWMMXT $_cpuexts"
2829 test "$_vis" = yes && _cpuexts
="VIS $_cpuexts"
2830 test "$_mvi" = yes && _cpuexts
="MVI $_cpuexts"
2832 # Checking kernel version...
2833 if x86_32
&& linux
; then
2835 kernel_version
=$
(uname
-r 2>&1)
2836 echocheck
"$system_name kernel version"
2837 case "$kernel_version" in
2838 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2839 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2840 _k_verc_problem
=yes;;
2842 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2845 if test "$_k_verc_fail" ; then
2846 echores
"$kernel_version, fail"
2847 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2848 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2849 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2850 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2851 echo "2.2.x you must upgrade it to get SSE support!"
2852 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2854 echores
"$kernel_version, ok"
2858 ######################
2859 # MAIN TESTS GO HERE #
2860 ######################
2865 int main(void) { return 0; }
2867 if cc_check
-lposix ; then
2868 extra_ldflags
="$extra_ldflags -lposix"
2876 int main(void) { return 0; }
2878 if cc_check
-lm ; then
2887 echocheck
"langinfo"
2888 if test "$_langinfo" = auto
; then
2890 #include <langinfo.h>
2891 int main(void) { nl_langinfo(CODESET); return 0; }
2894 cc_check
&& _langinfo
=yes
2896 if test "$_langinfo" = yes ; then
2897 def_langinfo
='#define HAVE_LANGINFO 1'
2899 def_langinfo
='#undef HAVE_LANGINFO'
2901 echores
"$_langinfo"
2904 echocheck
"language"
2905 # Set preferred languages, "all" uses English as main language.
2906 test -z "$language" && language
=$LINGUAS
2907 test -z "$language_doc" && language_doc
=$language
2908 test -z "$language_man" && language_man
=$language
2909 test -z "$language_msg" && language_msg
=$language
2910 language_doc
=$
(echo $language_doc |
tr , " ")
2911 language_man
=$
(echo $language_man |
tr , " ")
2912 language_msg
=$
(echo $language_msg |
tr , " ")
2914 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2915 test "$language_man" = "all" && language_man
=$man_lang_all
2916 test "$language_msg" = "all" && language_msg
=en
2918 # Prune non-existing translations from language lists.
2919 # Set message translation to the first available language.
2920 # Fall back on English.
2921 for lang
in $language_doc ; do
2922 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2924 language_doc
=$tmp_language_doc
2925 test -z "$language_doc" && language_doc
=en
2927 for lang
in $language_man ; do
2928 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2930 language_man
=$tmp_language_man
2931 test -z "$language_man" && language_man
=en
2933 for lang
in $language_msg ; do
2934 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2936 language_msg
=$tmp_language_msg
2937 test -z "$language_msg" && language_msg
=en
2938 _mp_help
="help/help_mp-${language_msg}.h"
2939 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2942 echocheck
"enable sighandler"
2943 if test "$_sighandler" = yes ; then
2944 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2946 def_sighandler
='#undef CONFIG_SIGHANDLER'
2948 echores
"$_sighandler"
2950 echocheck
"runtime cpudetection"
2951 if test "$_runtime_cpudetection" = yes ; then
2952 _optimizing
="Runtime CPU-Detection enabled"
2953 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2955 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2957 echores
"$_runtime_cpudetection"
2960 echocheck
"restrict keyword"
2961 for restrict_keyword
in restrict __restrict __restrict__
; do
2962 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2964 def_restrict_keyword
=$restrict_keyword
2968 if [ -n "$def_restrict_keyword" ]; then
2969 echores
"$def_restrict_keyword"
2973 # Avoid infinite recursion loop ("#define restrict restrict")
2974 if [ "$def_restrict_keyword" != "restrict" ]; then
2975 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2977 def_restrict_keyword
=""
2981 echocheck
"__builtin_expect"
2982 # GCC branch prediction hint
2985 a = __builtin_expect(a, 10);
2986 return a == 10 ? 0 : 1;
2988 int main(void) { return foo(10) && foo(0); }
2991 cc_check
&& _builtin_expect
=yes
2992 if test "$_builtin_expect" = yes ; then
2993 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2995 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2997 echores
"$_builtin_expect"
3003 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
3006 cc_check
-lkstat && _kstat
=yes
3007 if test "$_kstat" = yes ; then
3008 def_kstat
="#define HAVE_LIBKSTAT 1"
3009 extra_ldflags
="$extra_ldflags -lkstat"
3011 def_kstat
="#undef HAVE_LIBKSTAT"
3017 # required for nanosleep on some systems
3020 int main(void) { (void) nanosleep(0, 0); return 0; }
3023 cc_check
-lposix4 && _posix4
=yes
3024 if test "$_posix4" = yes ; then
3025 extra_ldflags
="$extra_ldflags -lposix4"
3029 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
3033 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
3036 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
3037 if eval test "x\$_$func" = "xyes"; then
3038 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3041 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3050 int main(void) { char a; mkstemp(&a); return 0; }
3053 cc_check
&& _mkstemp
=yes
3054 if test "$_mkstemp" = yes ; then
3055 def_mkstemp
='#define HAVE_MKSTEMP 1'
3057 def_mkstemp
='#undef HAVE_MKSTEMP'
3062 echocheck
"nanosleep"
3063 # also check for nanosleep
3066 int main(void) { (void) nanosleep(0, 0); return 0; }
3069 cc_check
&& _nanosleep
=yes
3070 if test "$_nanosleep" = yes ; then
3071 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3073 def_nanosleep
='#undef HAVE_NANOSLEEP'
3075 echores
"$_nanosleep"
3079 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3080 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3083 #include <sys/socket.h>
3084 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3087 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3088 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3090 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3091 if test $_winsock2_h = auto
; then
3094 #include <winsock2.h>
3095 int main(void) { (void) gethostbyname(0); return 0; }
3097 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3099 test "$_ld_sock" && _res_comment
="using $_ld_sock"
3103 if test $_winsock2_h = yes ; then
3105 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3107 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3111 echocheck
"netdb.h, struct addrinfo"
3112 if test "$_struct_addrinfo" = auto
; then
3115 #include <sys/types.h>
3116 #include <sys/socket.h>
3118 int main(void) { struct addrinfo ai; return 0; }
3120 cc_check
&& _struct_addrinfo
=yes
3122 echores
"$_struct_addrinfo"
3124 if test "$_struct_addrinfo" = yes; then
3125 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 1"
3127 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 0"
3131 echocheck
"netdb.h, getaddrinfo()"
3132 if test "$_getaddrinfo" = auto
; then
3135 #include <sys/types.h>
3136 #include <sys/socket.h>
3138 int main(void) { (void) getaddrinfo(0, 0, 0, 0); return 0; }
3140 cc_check
&& _getaddrinfo
=yes
3142 echores
"$_getaddrinfo"
3144 if test "$_getaddrinfo" = yes; then
3145 def_getaddrinfo
="#define HAVE_GETADDRINFO 1"
3147 def_getaddrinfo
="#define HAVE_GETADDRINFO 0"
3151 echocheck
"sockaddr_storage"
3152 if test "$_struct_sockaddr_storage" = auto
; then
3153 _struct_sockaddr_storage
=no
3155 #include <sys/socket.h>
3156 int main(void) { struct sockaddr_storage sas; return 0; }
3158 cc_check
&& _struct_sockaddr_storage
=yes
3160 echores
"$_struct_sockaddr_storage"
3162 if test "$_struct_sockaddr_storage" = yes; then
3163 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
3165 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
3169 echocheck
"arpa/inet.h"
3171 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3173 #include <arpa/inet.h>
3174 int main(void) { return 0; }
3176 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3177 echores
"$arpa_inet_h"
3180 echocheck
"inet_pton()"
3181 def_inet_pton
='#define HAVE_INET_PTON 0'
3184 #include <sys/types.h>
3185 #include <sys/socket.h>
3186 #include <arpa/inet.h>
3187 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3189 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3190 cc_check
$_ld_tmp && inet_pton
=yes && break
3192 if test $inet_pton = yes ; then
3193 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3194 def_inet_pton
='#define HAVE_INET_PTON 1'
3196 echores
"$inet_pton"
3199 echocheck
"inet_aton()"
3200 def_inet_aton
='#define HAVE_INET_ATON 0'
3203 #include <sys/types.h>
3204 #include <sys/socket.h>
3205 #include <arpa/inet.h>
3206 int main(void) { (void) inet_aton(0, 0); return 0; }
3208 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3209 cc_check
$_ld_tmp && inet_aton
=yes && break
3211 if test $inet_aton = yes ; then
3212 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3213 def_inet_aton
='#define HAVE_INET_ATON 1'
3215 echores
"$inet_aton"
3218 echocheck
"socklen_t"
3220 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3223 int main(void) { socklen_t v = 0; return v; }
3225 cc_check
&& _socklen_t
=yes && break
3227 if test "$_socklen_t" = yes ; then
3228 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3230 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3232 echores
"$_socklen_t"
3235 echocheck
"closesocket()"
3238 #include <winsock2.h>
3239 int main(void) { closesocket(~0); return 0; }
3241 cc_check
$_ld_sock && _closesocket
=yes
3242 if test "$_closesocket" = yes ; then
3243 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3245 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3247 echores
"$_closesocket"
3251 test $_winsock2_h = no
&& test $inet_pton = no
&&
3252 test $inet_aton = no
&& _network
=no
3253 if test "$_network" = yes ; then
3254 def_network
='#define CONFIG_NETWORK 1'
3255 extra_ldflags
="$extra_ldflags $_ld_sock"
3256 _inputmodules
="network $_inputmodules"
3258 _noinputmodules
="network $_noinputmodules"
3259 def_network
='#undef CONFIG_NETWORK'
3266 if test "$_inet6" = auto
; then
3268 #include <sys/types.h>
3269 #if !defined(_WIN32) || defined(__CYGWIN__)
3270 #include <sys/socket.h>
3271 #include <netinet/in.h>
3273 #include <ws2tcpip.h>
3275 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3278 if cc_check
$_ld_sock ; then
3282 if test "$_inet6" = yes ; then
3283 def_inet6
='#define HAVE_AF_INET6 1'
3285 def_inet6
='#undef HAVE_AF_INET6'
3290 echocheck
"gethostbyname2"
3291 if test "$_gethostbyname2" = auto
; then
3293 #include <sys/types.h>
3294 #include <sys/socket.h>
3296 int main(void) { gethostbyname2("", AF_INET); return 0; }
3303 if test "$_gethostbyname2" = yes ; then
3304 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3306 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3308 echores
"$_gethostbyname2"
3311 echocheck
"inttypes.h (required)"
3313 #include <inttypes.h>
3314 int main(void) { return 0; }
3317 cc_check
&& _inttypes
=yes
3318 echores
"$_inttypes"
3320 if test "$_inttypes" = no
; then
3321 echocheck
"bitypes.h (inttypes.h predecessor)"
3323 #include <sys/bitypes.h>
3324 int main(void) { return 0; }
3326 cc_check
&& _inttypes
=yes
3327 if test "$_inttypes" = yes ; then
3328 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."
3330 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3335 echocheck
"int_fastXY_t in inttypes.h"
3337 #include <inttypes.h>
3339 volatile int_fast16_t v= 0;
3343 cc_check
&& _fast_inttypes
=yes
3344 if test "$_fast_inttypes" = no
; then
3346 typedef signed char int_fast8_t;
3347 typedef signed int int_fast16_t;
3348 typedef signed int int_fast32_t;
3349 typedef signed long long int_fast64_t;
3350 typedef unsigned char uint_fast8_t;
3351 typedef unsigned int uint_fast16_t;
3352 typedef unsigned int uint_fast32_t;
3353 typedef unsigned long long uint_fast64_t;'
3355 echores
"$_fast_inttypes"
3358 echocheck
"malloc.h"
3361 int main(void) { (void) malloc(0); return 0; }
3364 cc_check
&& _malloc
=yes
3365 if test "$_malloc" = yes ; then
3366 def_malloc_h
='#define HAVE_MALLOC_H 1'
3368 def_malloc_h
='#define HAVE_MALLOC_H 0'
3370 # malloc.h emits a warning in FreeBSD and OpenBSD
3371 freebsd || openbsd || dragonfly
&& def_malloc_h
='#define HAVE_MALLOC_H 0'
3375 echocheck
"memalign()"
3376 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3377 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3380 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3383 cc_check
&& _memalign
=yes
3384 if test "$_memalign" = yes ; then
3385 def_memalign
='#define HAVE_MEMALIGN 1'
3387 def_memalign
='#define HAVE_MEMALIGN 0'
3388 def_map_memalign
='#define memalign(a,b) malloc(b)'
3389 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3391 echores
"$_memalign"
3394 echocheck
"posix_memalign()"
3396 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3398 #define _XOPEN_SOURCE 600
3400 int main(void) { posix_memalign(NULL, 0, 0); }
3402 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3403 echores
"$posix_memalign"
3406 echocheck
"alloca.h"
3409 int main(void) { (void) alloca(0); return 0; }
3412 cc_check
&& _alloca
=yes
3414 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3416 def_alloca_h
='#undef HAVE_ALLOCA_H'
3421 echocheck
"fastmemcpy"
3422 if test "$_fastmemcpy" = yes ; then
3423 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3425 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3427 echores
"$_fastmemcpy"
3430 echocheck
"hard-coded tables"
3431 if test "$hardcoded_tables" = yes ; then
3432 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 1'
3433 mak_hardcoded_tables
='CONFIG_HARDCODED_TABLES = yes'
3435 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 0'
3437 echores
"$hardcoded_tables"
3442 #include <sys/types.h>
3443 #include <sys/mman.h>
3444 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3447 cc_check
&& _mman
=yes
3448 if test "$_mman" = yes ; then
3449 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3451 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3452 os2
&& _need_mmap
=yes
3457 #include <sys/types.h>
3458 #include <sys/mman.h>
3459 int main(void) { void *p = MAP_FAILED; return 0; }
3461 _mman_has_map_failed
=no
3462 cc_check
&& _mman_has_map_failed
=yes
3463 if test "$_mman_has_map_failed" = yes ; then
3464 def_mman_has_map_failed
=''
3466 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3469 echocheck
"dynamic loader"
3473 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3476 for _ld_tmp
in "" "-ldl" ; do
3477 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3479 if test "$_dl" = yes ; then
3480 def_dl
='#define HAVE_LIBDL 1'
3482 def_dl
='#undef HAVE_LIBDL'
3487 echocheck
"dynamic a/v plugins support"
3488 if test "$_dl" = no
; then
3491 if test "$_dynamic_plugins" = yes ; then
3492 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3494 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3496 echores
"$_dynamic_plugins"
3499 def_threads
='#define HAVE_THREADS 0'
3503 THREAD_CFLAGS
=-D_REENTRANT
3504 elif freebsd || netbsd || openbsd || bsdos
; then
3505 THREAD_CFLAGS
=-D_THREAD_SAFE
3507 if test "$_pthreads" = auto
; then
3509 #include <pthread.h>
3510 void* func(void *arg) { return arg; }
3511 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3515 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3516 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3517 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3521 if test "$_pthreads" = yes ; then
3522 test $_ld_pthread && _res_comment
="using $_ld_pthread"
3523 def_pthreads
='#define HAVE_PTHREADS 1'
3524 def_threads
='#define HAVE_THREADS 1'
3525 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3527 _res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3528 def_pthreads
='#undef HAVE_PTHREADS'
3529 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3530 mingw32 || _win32dll
=no
3532 echores
"$_pthreads"
3535 if test "$_pthreads" = yes ; then
3536 def_pthread_cache
="#define PTHREAD_CACHE 1"
3539 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3543 echocheck
"w32threads"
3544 if test "$_pthreads" = yes ; then
3545 _res_comment
="using pthread instead"
3548 if test "$_w32threads" = auto
; then
3550 mingw32
&& _w32threads
=yes
3552 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3553 echores
"$_w32threads"
3557 if test "$_rpath" = yes ; then
3558 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3559 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3566 if test "$_iconv" = auto
; then
3571 #define INBUFSIZE 1024
3572 #define OUTBUFSIZE 4096
3574 char inbuffer[INBUFSIZE];
3575 char outbuffer[OUTBUFSIZE];
3580 char *tocode="UTF-8";
3581 char *fromcode="cp1250";
3582 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3583 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3584 char *iptr=inbuffer;
3585 char *optr=outbuffer;
3586 size_t inleft=numread;
3587 size_t outleft=OUTBUFSIZE;
3588 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3590 write(1, outbuffer, OUTBUFSIZE - outleft);
3593 if (iconv_close(icdsc) == -1)
3600 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3601 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3605 if test "$_iconv" = yes ; then
3606 def_iconv
='#define CONFIG_ICONV 1'
3608 def_iconv
='#undef CONFIG_ICONV'
3613 echocheck
"soundcard.h"
3615 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3616 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3617 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3619 #include <$_soundcard_header>
3620 int main(void) { return 0; }
3622 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3625 if test "$_soundcard_h" = yes ; then
3626 if test $_soundcard_header = "sys/soundcard.h"; then
3627 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3629 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3632 echores
"$_soundcard_h"
3635 echocheck
"sys/dvdio.h"
3638 #include <sys/dvdio.h>
3639 int main(void) { return 0; }
3642 cc_check
&& _dvdio
=yes
3643 if test "$_dvdio" = yes ; then
3644 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3646 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3651 echocheck
"sys/cdio.h"
3654 #include <sys/cdio.h>
3655 int main(void) { return 0; }
3658 cc_check
&& _cdio
=yes
3659 if test "$_cdio" = yes ; then
3660 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3662 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3667 echocheck
"linux/cdrom.h"
3669 #include <sys/types.h>
3670 #include <linux/cdrom.h>
3671 int main(void) { return 0; }
3674 cc_check
&& _cdrom
=yes
3675 if test "$_cdrom" = yes ; then
3676 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3678 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3686 int main(void) { return 0; }
3689 cc_check
&& _dvd
=yes
3690 if test "$_dvd" = yes ; then
3691 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3693 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3699 echocheck
"BSDI dvd.h"
3702 int main(void) { return 0; }
3705 cc_check
&& _bsdi_dvd
=yes
3706 if test "$_bsdi_dvd" = yes ; then
3707 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3709 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3711 echores
"$_bsdi_dvd"
3716 # also used by AIX, but AIX does not support VCD and/or libdvdread
3717 echocheck
"HP-UX SCSI header"
3719 #include <sys/scsi.h>
3720 int main(void) { return 0; }
3723 cc_check
&& _hpux_scsi_h
=yes
3724 if test "$_hpux_scsi_h" = yes ; then
3725 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3727 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3729 echores
"$_hpux_scsi_h"
3734 echocheck
"userspace SCSI headers (Solaris)"
3737 #include <stropts.h>
3738 #include <sys/scsi/scsi_types.h>
3739 #include <sys/scsi/impl/uscsi.h>
3740 int main(void) { return 0; }
3743 cc_check
&& _sol_scsi_h
=yes
3744 if test "$_sol_scsi_h" = yes ; then
3745 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3747 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3749 echores
"$_sol_scsi_h"
3754 if test "$_termcap" = auto
; then
3758 int main(void) { tgetent(NULL, NULL); return 0; }
3761 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3762 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3763 && _termcap
=yes && break
3766 if test "$_termcap" = yes ; then
3767 def_termcap
='#define HAVE_TERMCAP 1'
3768 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3770 def_termcap
='#undef HAVE_TERMCAP'
3776 def_termios
='#undef HAVE_TERMIOS'
3777 def_termios_h
='#undef HAVE_TERMIOS_H'
3778 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3779 if test "$_termios" = auto
; then
3781 for _termios_header
in "sys/termios.h" "termios.h"; do
3783 #include <$_termios_header>
3784 int main(void) { return 0; }
3786 cc_check
&& _termios
=yes && _res_comment
="using $_termios_header" && break
3790 if test "$_termios" = yes ; then
3791 def_termios
='#define HAVE_TERMIOS 1'
3792 if test "$_termios_header" = "termios.h" ; then
3793 def_termios_h
='#define HAVE_TERMIOS_H 1'
3795 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3802 if test "$_shm" = auto
; then
3804 #include <sys/types.h>
3805 #include <sys/shm.h>
3806 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3809 cc_check
&& _shm
=yes
3811 if test "$_shm" = yes ; then
3812 def_shm
='#define HAVE_SHM 1'
3814 def_shm
='#undef HAVE_SHM'
3819 echocheck
"strsep()"
3822 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3825 cc_check
&& _strsep
=yes
3826 if test "$_strsep" = yes ; then
3827 def_strsep
='#define HAVE_STRSEP 1'
3830 def_strsep
='#undef HAVE_STRSEP'
3836 echocheck
"vsscanf()"
3838 #define _ISOC99_SOURCE
3841 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3844 cc_check
&& _vsscanf
=yes
3845 if test "$_vsscanf" = yes ; then
3846 def_vsscanf
='#define HAVE_VSSCANF 1'
3849 def_vsscanf
='#undef HAVE_VSSCANF'
3857 #define _XOPEN_SOURCE 600
3859 int main(void) { swab(0, 0, 0); return 0; }
3862 cc_check
&& _swab
=yes
3863 if test "$_swab" = yes ; then
3864 def_swab
='#define HAVE_SWAB 1'
3867 def_swab
='#undef HAVE_SWAB'
3872 echocheck
"POSIX select()"
3876 #include <sys/types.h>
3878 #include <sys/time.h>
3880 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3883 def_posix_select
='#undef HAVE_POSIX_SELECT'
3884 #select() of kLIBC (OS/2) supports socket only
3885 ! os2
&& cc_check
&& _posix_select
=yes \
3886 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3887 echores
"$_posix_select"
3890 echocheck
"audio select()"
3891 if test "$_select" = no
; then
3892 def_select
='#undef HAVE_AUDIO_SELECT'
3893 elif test "$_select" = yes ; then
3894 def_select
='#define HAVE_AUDIO_SELECT 1'
3899 echocheck
"gettimeofday()"
3902 #include <sys/time.h>
3903 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3906 cc_check
&& _gettimeofday
=yes
3907 if test "$_gettimeofday" = yes ; then
3908 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3909 _need_gettimeofday
=no
3911 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3912 _need_gettimeofday
=yes
3914 echores
"$_gettimeofday"
3921 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3924 cc_check
&& _glob
=yes
3925 if test "$_glob" = yes ; then
3926 def_glob
='#define HAVE_GLOB 1'
3929 def_glob
='#undef HAVE_GLOB'
3935 echocheck
"setenv()"
3938 int main(void) { setenv("","",0); return 0; }
3941 cc_check
&& _setenv
=yes
3942 if test "$_setenv" = yes ; then
3943 def_setenv
='#define HAVE_SETENV 1'
3946 def_setenv
='#undef HAVE_SETENV'
3953 echocheck
"sysi86()"
3955 #include <sys/sysi86.h>
3956 int main(void) { sysi86(0); return 0; }
3959 cc_check
&& _sysi86
=yes
3960 if test "$_sysi86" = yes ; then
3961 def_sysi86
='#define HAVE_SYSI86 1'
3963 #include <sys/sysi86.h>
3964 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3966 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3968 def_sysi86
='#undef HAVE_SYSI86'
3974 echocheck
"sys/sysinfo.h"
3976 #include <sys/sysinfo.h>
3978 struct sysinfo s_info;
3984 cc_check
&& _sys_sysinfo
=yes
3985 if test "$_sys_sysinfo" = yes ; then
3986 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3988 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3990 echores
"$_sys_sysinfo"
3995 echocheck
"Mac OS X Finder Support"
3996 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3997 if test "$_macosx_finder" = yes ; then
3998 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3999 extra_ldflags
="$extra_ldflags -framework Carbon"
4001 echores
"$_macosx_finder"
4003 echocheck
"Mac OS X Bundle file locations"
4004 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
4005 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
4006 if test "$_macosx_bundle" = yes ; then
4007 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
4008 extra_ldflags
="$extra_ldflags -framework Carbon"
4010 echores
"$_macosx_bundle"
4012 echocheck
"Apple Remote"
4013 if test "$_apple_remote" = auto
; then
4017 #include <IOKit/IOCFPlugIn.h>
4019 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
4020 CFMutableDictionaryRef hidMatchDictionary;
4021 IOReturn ioReturnValue;
4023 // Set up a matching dictionary to search the I/O Registry by class.
4024 // name for all HID class devices
4025 hidMatchDictionary = IOServiceMatching("AppleIRController");
4027 // Now search I/O Registry for matching devices.
4028 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
4029 hidMatchDictionary, &hidObjectIterator);
4031 // If search is unsuccessful, return nonzero.
4032 if (ioReturnValue != kIOReturnSuccess ||
4033 !IOIteratorIsValid(hidObjectIterator)) {
4039 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
4041 if test "$_apple_remote" = yes ; then
4042 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
4043 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
4045 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
4047 echores
"$_apple_remote"
4053 echocheck
"Apple IR"
4054 if test "$_apple_ir" = auto
; then
4057 #include <linux/types.h>
4058 #include <linux/input.h>
4060 struct input_event ev;
4065 cc_check
&& _apple_ir
=yes
4067 if test "$_apple_ir" = yes ; then
4068 def_apple_ir
='#define CONFIG_APPLE_IR 1'
4070 def_apple_ir
='#undef CONFIG_APPLE_IR'
4072 echores
"$_apple_ir"
4075 echocheck
"pkg-config"
4076 _pkg_config
=pkg-config
4077 if $
($_pkg_config --version > /dev
/null
2>&1); then
4078 if test "$_ld_static"; then
4079 _pkg_config
="$_pkg_config --static"
4088 echocheck
"Samba support (libsmbclient)"
4089 if test "$_smb" = yes; then
4090 extra_ldflags
="$extra_ldflags -lsmbclient"
4092 if test "$_smb" = auto
; then
4095 #include <libsmbclient.h>
4096 int main(void) { smbc_opendir("smb://"); return 0; }
4098 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
4099 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
4104 if test "$_smb" = yes; then
4105 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
4106 _inputmodules
="smb $_inputmodules"
4108 def_smb
="#undef CONFIG_LIBSMBCLIENT"
4109 _noinputmodules
="smb $_noinputmodules"
4120 if test "$_tdfxfb" = yes ; then
4121 def_tdfxfb
='#define CONFIG_TDFXFB 1'
4122 _vomodules
="tdfxfb $_vomodules"
4124 def_tdfxfb
='#undef CONFIG_TDFXFB'
4125 _novomodules
="tdfxfb $_novomodules"
4130 if test "$_s3fb" = yes ; then
4131 def_s3fb
='#define CONFIG_S3FB 1'
4132 _vomodules
="s3fb $_vomodules"
4134 def_s3fb
='#undef CONFIG_S3FB'
4135 _novomodules
="s3fb $_novomodules"
4140 if test "$_wii" = yes ; then
4141 def_wii
='#define CONFIG_WII 1'
4142 _vomodules
="wii $_vomodules"
4144 def_wii
='#undef CONFIG_WII'
4145 _novomodules
="wii $_novomodules"
4150 if test "$_tdfxvid" = yes ; then
4151 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
4152 _vomodules
="tdfx_vid $_vomodules"
4154 def_tdfxvid
='#undef CONFIG_TDFX_VID'
4155 _novomodules
="tdfx_vid $_novomodules"
4160 if test "$_xvr100" = auto
; then
4163 #include <sys/fbio.h>
4164 #include <sys/visual_io.h>
4166 struct vis_identifier ident;
4167 struct fbgattr attr;
4168 ioctl(0, VIS_GETIDENTIFIER, &ident);
4169 ioctl(0, FBIOGATTR, &attr);
4174 cc_check
&& _xvr100
=yes
4176 if test "$_xvr100" = yes ; then
4177 def_xvr100
='#define CONFIG_XVR100 1'
4178 _vomodules
="xvr100 $_vomodules"
4180 def_tdfxvid
='#undef CONFIG_XVR100'
4181 _novomodules
="xvr100 $_novomodules"
4186 if test "$_tga" = yes ; then
4187 def_tga
='#define CONFIG_TGA 1'
4188 _vomodules
="tga $_vomodules"
4190 def_tga
='#undef CONFIG_TGA'
4191 _novomodules
="tga $_novomodules"
4196 echocheck
"md5sum support"
4197 if test "$_md5sum" = yes; then
4198 def_md5sum
="#define CONFIG_MD5SUM 1"
4199 _vomodules
="md5sum $_vomodules"
4201 def_md5sum
="#undef CONFIG_MD5SUM"
4202 _novomodules
="md5sum $_novomodules"
4207 echocheck
"yuv4mpeg support"
4208 if test "$_yuv4mpeg" = yes; then
4209 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4210 _vomodules
="yuv4mpeg $_vomodules"
4212 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4213 _novomodules
="yuv4mpeg $_novomodules"
4215 echores
"$_yuv4mpeg"
4219 if test "$_bl" = yes ; then
4220 def_bl
='#define CONFIG_BL 1'
4221 _vomodules
="bl $_vomodules"
4223 def_bl
='#undef CONFIG_BL'
4224 _novomodules
="bl $_novomodules"
4229 echocheck
"DirectFB"
4230 if test "$_directfb" = auto
; then
4233 #include <directfb.h>
4234 int main(void) { DirectFBInit(0, 0); return 0; }
4236 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4237 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4238 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4239 extra_cflags
="$extra_cflags $_inc_tmp" && break
4244 expr $1 \
* 65536 + $2 \
* 256 + $3
4247 if test "$_directfb" = yes; then
4249 #include <directfb_version.h>
4251 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4254 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4255 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4256 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4257 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4258 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4259 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4260 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4261 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4262 _res_comment
="$_directfb_version"
4263 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4265 def_directfb_version
='#undef DIRECTFBVERSION'
4267 _res_comment
="version >=0.9.13 required"
4271 _res_comment
="failed to get version"
4274 echores
"$_directfb"
4276 if test "$_directfb" = yes ; then
4277 def_directfb
='#define CONFIG_DIRECTFB 1'
4278 _vomodules
="directfb $_vomodules"
4279 libs_mplayer
="$libs_mplayer -ldirectfb"
4281 def_directfb
='#undef CONFIG_DIRECTFB'
4282 _novomodules
="directfb $_novomodules"
4284 if test "$_dfbmga" = yes; then
4285 _vomodules
="dfbmga $_vomodules"
4286 def_dfbmga
='#define CONFIG_DFBMGA 1'
4288 _novomodules
="dfbmga $_novomodules"
4289 def_dfbmga
='#undef CONFIG_DFBMGA'
4293 echocheck
"X11 headers presence"
4295 _res_comment
="check if the dev(el) packages are installed"
4296 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4297 if test -f "$I/X11/Xlib.h" ; then
4303 if test $_cross_compile = no
; then
4304 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4305 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4306 if test -f "$I/X11/Xlib.h" ; then
4307 extra_cflags
="$extra_cflags -I$I"
4309 _res_comment
="using $I"
4314 echores
"$_x11_headers"
4318 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4320 #include <X11/Xlib.h>
4321 #include <X11/Xutil.h>
4322 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4324 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4325 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4328 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4330 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4332 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4333 && _x11
=yes && break
4336 if test "$_x11" = yes ; then
4337 def_x11
='#define CONFIG_X11 1'
4338 _vomodules
="x11 xover $_vomodules"
4341 def_x11
='#undef CONFIG_X11'
4342 _novomodules
="x11 $_novomodules"
4343 _res_comment
="check if the dev(el) packages are installed"
4344 # disable stuff that depends on X
4345 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4349 echocheck
"Xss screensaver extensions"
4350 if test "$_xss" = auto
; then
4352 #include <X11/Xlib.h>
4353 #include <X11/extensions/scrnsaver.h>
4354 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4357 cc_check
-lXss && _xss
=yes
4359 if test "$_xss" = yes ; then
4360 def_xss
='#define CONFIG_XSS 1'
4361 libs_mplayer
="$libs_mplayer -lXss"
4363 def_xss
='#undef CONFIG_XSS'
4370 if test "$_x11" = yes ; then
4372 #include <X11/Xmd.h>
4373 #include <X11/Xlib.h>
4374 #include <X11/Xutil.h>
4375 #include <X11/Xatom.h>
4376 #include <X11/extensions/dpms.h>
4377 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4379 cc_check
-lXdpms && _xdpms3
=yes
4381 #include <X11/Xlib.h>
4382 #include <X11/extensions/dpms.h>
4383 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4385 cc_check
-lXext && _xdpms4
=yes
4387 if test "$_xdpms4" = yes ; then
4388 def_xdpms
='#define CONFIG_XDPMS 1'
4389 _res_comment
="using Xdpms 4"
4391 elif test "$_xdpms3" = yes ; then
4392 def_xdpms
='#define CONFIG_XDPMS 1'
4393 libs_mplayer
="$libs_mplayer -lXdpms"
4394 _res_comment
="using Xdpms 3"
4397 def_xdpms
='#undef CONFIG_XDPMS'
4403 if test "$_xv" = auto
; then
4405 #include <X11/Xlib.h>
4406 #include <X11/extensions/Xvlib.h>
4408 (void) XvGetPortAttribute(0, 0, 0, 0);
4409 (void) XvQueryPortAttributes(0, 0, 0);
4413 cc_check
-lXv && _xv
=yes
4416 if test "$_xv" = yes ; then
4417 def_xv
='#define CONFIG_XV 1'
4418 libs_mplayer
="$libs_mplayer -lXv"
4419 _vomodules
="xv $_vomodules"
4421 def_xv
='#undef CONFIG_XV'
4422 _novomodules
="xv $_novomodules"
4428 if test "$_xv" = yes && test "$_xvmc" != no
; then
4431 #include <X11/Xlib.h>
4432 #include <X11/extensions/Xvlib.h>
4433 #include <X11/extensions/XvMClib.h>
4435 (void) XvMCQueryExtension(0,0,0);
4436 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4439 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4440 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4443 if test "$_xvmc" = yes ; then
4444 def_xvmc
='#define CONFIG_XVMC 1'
4445 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4446 _vomodules
="xvmc $_vomodules"
4447 _res_comment
="using $_xvmclib"
4449 def_xvmc
='#define CONFIG_XVMC 0'
4450 _novomodules
="xvmc $_novomodules"
4451 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_XVMC_DECODER
//)
4457 if test "$_vdpau" = auto
; then
4459 if test "$_dl" = yes ; then
4461 #include <vdpau/vdpau_x11.h>
4463 (void) vdp_device_create_x11(0, 0, 0, 0);
4464 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4466 cc_check
-lvdpau && _vdpau
=yes
4469 if test "$_vdpau" = yes ; then
4470 def_vdpau
='#define CONFIG_VDPAU 1'
4471 libs_mplayer
="$libs_mplayer -lvdpau"
4472 _vomodules
="vdpau $_vomodules"
4474 def_vdpau
='#define CONFIG_VDPAU 0'
4475 _novomodules
="vdpau $_novomodules"
4476 _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
//)
4481 echocheck
"Xinerama"
4482 if test "$_xinerama" = auto
; then
4484 #include <X11/Xlib.h>
4485 #include <X11/extensions/Xinerama.h>
4486 int main(void) { (void) XineramaIsActive(0); return 0; }
4489 cc_check
-lXinerama && _xinerama
=yes
4492 if test "$_xinerama" = yes ; then
4493 def_xinerama
='#define CONFIG_XINERAMA 1'
4494 libs_mplayer
="$libs_mplayer -lXinerama"
4496 def_xinerama
='#undef CONFIG_XINERAMA'
4498 echores
"$_xinerama"
4501 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4502 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4503 # named 'X extensions' or something similar.
4504 # This check may be useful for future mplayer versions (to change resolution)
4505 # If you run into problems, remove '-lXxf86vm'.
4507 if test "$_vm" = auto
; then
4509 #include <X11/Xlib.h>
4510 #include <X11/extensions/xf86vmode.h>
4511 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4514 cc_check
-lXxf86vm && _vm
=yes
4516 if test "$_vm" = yes ; then
4517 def_vm
='#define CONFIG_XF86VM 1'
4518 libs_mplayer
="$libs_mplayer -lXxf86vm"
4520 def_vm
='#undef CONFIG_XF86VM'
4524 # Check for the presence of special keycodes, like audio control buttons
4525 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4526 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4527 # have these new keycodes.
4528 echocheck
"XF86keysym"
4529 if test "$_xf86keysym" = auto
; then
4532 #include <X11/Xlib.h>
4533 #include <X11/XF86keysym.h>
4534 int main(void) { return XF86XK_AudioPause; }
4536 cc_check
&& _xf86keysym
=yes
4538 if test "$_xf86keysym" = yes ; then
4539 def_xf86keysym
='#define CONFIG_XF86XK 1'
4541 def_xf86keysym
='#undef CONFIG_XF86XK'
4543 echores
"$_xf86keysym"
4546 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4548 #include <X11/Xlib.h>
4549 #include <X11/extensions/xf86dga.h>
4550 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4553 cc_check
-lXxf86dga && _dga2
=yes
4555 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4557 #include <X11/Xlib.h>
4558 #include <X11/extensions/xf86dga.h>
4559 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4562 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4566 def_dga
='#undef CONFIG_DGA'
4567 def_dga1
='#undef CONFIG_DGA1'
4568 def_dga2
='#undef CONFIG_DGA2'
4569 if test "$_dga1" = yes ; then
4571 def_dga1
='#define CONFIG_DGA1 1'
4572 _res_comment
="using DGA 1.0"
4573 elif test "$_dga2" = yes ; then
4575 def_dga2
='#define CONFIG_DGA2 1'
4576 _res_comment
="using DGA 2.0"
4578 if test "$_dga" = yes ; then
4579 def_dga
='#define CONFIG_DGA 1'
4580 libs_mplayer
="$libs_mplayer -lXxf86dga"
4581 _vomodules
="dga $_vomodules"
4583 _novomodules
="dga $_novomodules"
4589 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4590 def_3dfx
='#define CONFIG_3DFX 1'
4591 _vomodules
="3dfx $_vomodules"
4593 def_3dfx
='#undef CONFIG_3DFX'
4594 _novomodules
="3dfx $_novomodules"
4600 def_vidix
='#undef CONFIG_VIDIX'
4601 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4602 _vidix_drv_cyberblade
=no
4603 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4605 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4606 _vidix_drv_mach64
=no
4607 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4609 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4610 _vidix_drv_mga_crtc2
=no
4611 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4612 _vidix_drv_nvidia
=no
4613 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4615 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4617 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4618 _vidix_drv_radeon
=no
4619 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4620 _vidix_drv_rage128
=no
4621 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4623 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4624 _vidix_drv_sh_veu
=no
4625 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4627 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4628 _vidix_drv_unichrome
=no
4629 if test "$_vidix" = auto
; then
4631 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4633 x86_64
&& win32
&& _vidix
=no
4634 (ppc || alpha
) && linux
&& _vidix
=yes
4638 if test "$_vidix" = yes ; then
4639 def_vidix
='#define CONFIG_VIDIX 1'
4640 _vomodules
="cvidix $_vomodules"
4641 # FIXME: ivtv driver temporarily disabled until we have a proper test
4642 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4643 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4645 # some vidix drivers are architecture and os specific, discard them elsewhere
4646 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4647 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4649 for driver
in $_vidix_drivers ; do
4650 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4651 eval _vidix_drv_
${driver}=yes
4652 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4655 echocheck
"VIDIX PCI device name database"
4656 echores
"$_vidix_pcidb"
4657 if test "$_vidix_pcidb" = yes ; then
4663 echocheck
"VIDIX dhahelper support"
4664 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4665 echores
"$_dhahelper"
4667 echocheck
"VIDIX svgalib_helper support"
4668 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4669 echores
"$_svgalib_helper"
4672 _novomodules
="cvidix $_novomodules"
4675 if test "$_vidix" = yes && win32
; then
4677 _vomodules
="winvidix $_vomodules"
4678 libs_mplayer
="$libs_mplayer -lgdi32"
4680 _novomodules
="winvidix $_novomodules"
4682 if test "$_vidix" = yes && test "$_x11" = yes; then
4684 _vomodules
="xvidix $_vomodules"
4686 _novomodules
="xvidix $_novomodules"
4689 echocheck
"/dev/mga_vid"
4690 if test "$_mga" = auto
; then
4692 test -c /dev
/mga_vid
&& _mga
=yes
4694 if test "$_mga" = yes ; then
4695 def_mga
='#define CONFIG_MGA 1'
4696 _vomodules
="mga $_vomodules"
4698 def_mga
='#undef CONFIG_MGA'
4699 _novomodules
="mga $_novomodules"
4704 if test "$_xmga" = auto
; then
4706 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4708 if test "$_xmga" = yes ; then
4709 def_xmga
='#define CONFIG_XMGA 1'
4710 _vomodules
="xmga $_vomodules"
4712 def_xmga
='#undef CONFIG_XMGA'
4713 _novomodules
="xmga $_novomodules"
4719 if test "$_ggi" = auto
; then
4721 #include <ggi/ggi.h>
4722 int main(void) { ggiInit(); return 0; }
4725 cc_check
-lggi && _ggi
=yes
4727 if test "$_ggi" = yes ; then
4728 def_ggi
='#define CONFIG_GGI 1'
4729 libs_mplayer
="$libs_mplayer -lggi"
4730 _vomodules
="ggi $_vomodules"
4732 def_ggi
='#undef CONFIG_GGI'
4733 _novomodules
="ggi $_novomodules"
4737 echocheck
"GGI extension: libggiwmh"
4738 if test "$_ggiwmh" = auto
; then
4741 #include <ggi/ggi.h>
4742 #include <ggi/wmh.h>
4743 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4745 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4747 # needed to get right output on obscure combination
4748 # like --disable-ggi --enable-ggiwmh
4749 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4750 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4751 libs_mplayer
="$libs_mplayer -lggiwmh"
4754 def_ggiwmh
='#undef CONFIG_GGIWMH'
4760 if test "$_aa" = auto
; then
4763 extern struct aa_hardware_params aa_defparams;
4764 extern struct aa_renderparams aa_defrenderparams;
4768 (void) aa_init(0, 0, 0);
4769 c = aa_autoinit(&aa_defparams);
4770 p = aa_getrenderparams();
4771 aa_autoinitkbd(c,0);
4775 for _ld_tmp
in "-laa" ; do
4776 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4779 if test "$_aa" = yes ; then
4780 def_aa
='#define CONFIG_AA 1'
4782 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4784 _vomodules
="aa $_vomodules"
4786 def_aa
='#undef CONFIG_AA'
4787 _novomodules
="aa $_novomodules"
4793 if test "$_caca" = auto
; then
4795 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4798 #ifdef CACA_API_VERSION_1
4801 int main(void) { (void) caca_init(); return 0; }
4803 cc_check $
(caca-config
--libs) && _caca
=yes
4806 if test "$_caca" = yes ; then
4807 def_caca
='#define CONFIG_CACA 1'
4808 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4809 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4810 _vomodules
="caca $_vomodules"
4812 def_caca
='#undef CONFIG_CACA'
4813 _novomodules
="caca $_novomodules"
4819 if test "$_svga" = auto
; then
4822 int main(void) { return 0; }
4825 cc_check
-lvga $_ld_lm && _svga
=yes
4827 if test "$_svga" = yes ; then
4828 def_svga
='#define CONFIG_SVGALIB 1'
4829 libs_mplayer
="$libs_mplayer -lvga"
4830 _vomodules
="svga $_vomodules"
4832 def_svga
='#undef CONFIG_SVGALIB'
4833 _novomodules
="svga $_novomodules"
4839 if test "$_fbdev" = auto
; then
4843 if test "$_fbdev" = yes ; then
4844 def_fbdev
='#define CONFIG_FBDEV 1'
4845 _vomodules
="fbdev $_vomodules"
4847 def_fbdev
='#undef CONFIG_FBDEV'
4848 _novomodules
="fbdev $_novomodules"
4855 if test "$_dvb" = auto
; then
4859 #include <sys/ioctl.h>
4863 #include <ost/dmx.h>
4864 #include <ost/frontend.h>
4865 #include <ost/sec.h>
4866 #include <ost/video.h>
4867 #include <ost/audio.h>
4868 int main(void) {return 0;}
4870 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4871 cc_check
$_inc_tmp && _dvb
=yes && \
4872 extra_cflags
="$extra_cflags $_inc_tmp" && break
4876 if test "$_dvb" = yes ; then
4877 def_dvb
='#define CONFIG_DVB 1'
4878 def_dvbin
='#define CONFIG_DVBIN 1'
4879 _aomodules
="mpegpes(dvb) $_aomodules"
4880 _vomodules
="mpegpes(dvb) $_vomodules"
4883 echocheck
"DVB HEAD"
4884 if test "$_dvbhead" = auto
; then
4889 #include <sys/ioctl.h>
4893 #include <linux/dvb/dmx.h>
4894 #include <linux/dvb/frontend.h>
4895 #include <linux/dvb/video.h>
4896 #include <linux/dvb/audio.h>
4897 int main(void) {return 0;}
4899 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4900 cc_check
$_inc_tmp && _dvbhead
=yes && \
4901 extra_cflags
="$extra_cflags $_inc_tmp" && break
4905 if test "$_dvbhead" = yes ; then
4906 def_dvb
='#define CONFIG_DVB 1'
4907 def_dvb_head
='#define CONFIG_DVB_HEAD 1'
4908 def_dvbin
='#define CONFIG_DVBIN 1'
4909 _aomodules
="mpegpes(dvb) $_aomodules"
4910 _vomodules
="mpegpes(dvb) $_vomodules"
4913 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4914 def_dvb
='#undef CONFIG_DVB'
4915 def_dvb_head
='#undef CONFIG_DVB_HEAD'
4916 def_dvbin
='#undef CONFIG_DVBIN '
4917 _aomodules
="mpegpes(file) $_aomodules"
4918 _vomodules
="mpegpes(file) $_vomodules"
4921 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4923 _inputmodules
="dvb $_inputmodules"
4926 _noinputmodules
="dvb $_noinputmodules"
4932 echocheck
"QuickTime"
4933 if test "$quicktime" = auto
; then
4935 #include <QuickTime/QuickTime.h>
4937 ImageDescription *desc;
4944 cc_check
-framework QuickTime
&& quicktime
=yes
4946 if test "$quicktime" = yes ; then
4947 extra_ldflags
="$extra_ldflags -framework QuickTime"
4948 def_quicktime
='#define CONFIG_QUICKTIME 1'
4950 def_quicktime
='#undef CONFIG_QUICKTIME'
4956 if test "$_quartz" = auto
; then
4958 #include <Carbon/Carbon.h>
4960 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
4965 cc_check
-framework Carbon
&& _quartz
=yes
4967 if test "$_quartz" = yes ; then
4968 libs_mplayer
="$libs_mplayer -framework Carbon"
4969 def_quartz
='#define CONFIG_QUARTZ 1'
4970 _vomodules
="quartz $_vomodules"
4972 def_quartz
='#undef CONFIG_QUARTZ'
4973 _novomodules
="quartz $_novomodules"
4977 echocheck
"CoreVideo"
4978 if test "$_corevideo" = auto
; then
4980 #include <Carbon/Carbon.h>
4981 #include <CoreServices/CoreServices.h>
4982 #include <OpenGL/OpenGL.h>
4983 #include <QuartzCore/CoreVideo.h>
4984 int main(void) { return 0; }
4987 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4989 if test "$_corevideo" = yes ; then
4990 _vomodules
="corevideo $_vomodules"
4991 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4992 def_corevideo
='#define CONFIG_COREVIDEO 1'
4994 _novomodules
="corevideo $_novomodules"
4995 def_corevideo
='#undef CONFIG_COREVIDEO'
4997 echores
"$_corevideo"
5002 # make sure this stays below CoreVideo to avoid issues due to namespace
5003 # conflicts between -lGL and -framework OpenGL
5005 #Note: this test is run even with --enable-gl since we autodetect linker flags
5006 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
5009 #include <windows.h>
5013 #include <X11/Xlib.h>
5019 wglCreateContext(dc);
5021 glXCreateContext(NULL, NULL, NULL, True);
5028 for _ld_tmp
in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5029 if cc_check
$_ld_tmp $_ld_lm ; then
5032 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
5036 if cc_check
-DGL_WIN32 -lopengl32 ; then
5039 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
5044 if test "$_gl" = yes ; then
5045 def_gl
='#define CONFIG_GL 1'
5046 _res_comment
="backends:"
5047 if test "$_gl_win32" = yes ; then
5048 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5049 _res_comment
="$_res_comment win32"
5051 if test "$_gl_x11" = yes ; then
5052 def_gl_x11
='#define CONFIG_GL_X11 1'
5053 _res_comment
="$_res_comment x11"
5055 _vomodules
="opengl $_vomodules"
5057 def_gl
='#undef CONFIG_GL'
5058 def_gl_win32
='#undef CONFIG_GL_WIN32'
5059 def_gl_x11
='#undef CONFIG_GL_X11'
5060 _novomodules
="opengl $_novomodules"
5065 echocheck
"MatrixView"
5066 if test "$_gl" = no
; then
5069 if test "$matrixview" = yes ; then
5070 _vomodules
="matrixview $_vomodules"
5071 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5073 _novomodules
="matrixview $_novomodules"
5074 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5076 echores
"$matrixview"
5079 echocheck
"PNG support"
5080 if test "$_png" = auto
; then
5083 # Don't check for -lpng on irix since it has its own libpng
5084 # incompatible with the GNU libpng
5085 _res_comment
="disabled on irix (not GNU libpng)"
5091 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
5092 printf("libpng: %s\n", png_libpng_ver);
5093 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
5096 cc_check
-lpng -lz $_ld_lm && _png
=yes
5100 if test "$_png" = yes ; then
5101 def_png
='#define CONFIG_PNG 1'
5102 extra_ldflags
="$extra_ldflags -lpng -lz"
5104 def_png
='#undef CONFIG_PNG'
5107 echocheck
"MNG support"
5108 if test "$_mng" = auto
; then
5113 const char * p_ver = mng_version_text();
5114 return !p_ver || p_ver[0] == 0;
5117 if cc_check
-lmng -lz $_ld_lm ; then
5122 if test "$_mng" = yes ; then
5123 def_mng
='#define CONFIG_MNG 1'
5124 extra_ldflags
="$extra_ldflags -lmng -lz"
5126 def_mng
='#undef CONFIG_MNG'
5129 echocheck
"JPEG support"
5130 if test "$_jpeg" = auto
; then
5137 #include <jpeglib.h>
5138 int main(void) { return 0; }
5140 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
5144 if test "$_jpeg" = yes ; then
5145 def_jpeg
='#define CONFIG_JPEG 1'
5146 _vomodules
="jpeg $_vomodules"
5147 extra_ldflags
="$extra_ldflags -ljpeg"
5149 def_jpeg
='#undef CONFIG_JPEG'
5150 _novomodules
="jpeg $_novomodules"
5154 echocheck
"OpenJPEG (JPEG2000) support"
5155 if test "$libopenjpeg" = auto
; then
5159 #include <openjpeg.h>
5160 int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
5162 cc_check
-lopenjpeg $_ld_lm && libopenjpeg
=yes
5164 echores
"$libopenjpeg"
5165 if test "$libopenjpeg" = yes ; then
5166 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 1'
5167 extra_ldflags
="$extra_ldflags -lopenjpeg"
5168 _libavdecoders
="$_libavdecoders LIBOPENJPEG_DECODER"
5169 _libavencoders
="$_libavencoders LIBOPENJPEG_ENCODER"
5170 _codecmodules
="OpenJPEG $_codecmodules"
5172 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 0'
5173 _nocodecmodules
="OpenJPEG $_nocodecmodules"
5177 echocheck
"PNM support"
5178 if test "$_pnm" = yes; then
5179 def_pnm
="#define CONFIG_PNM 1"
5180 _vomodules
="pnm $_vomodules"
5182 def_pnm
="#undef CONFIG_PNM"
5183 _novomodules
="pnm $_novomodules"
5189 echocheck
"GIF support"
5190 # This is to appease people who want to force gif support.
5191 # If it is forced to yes, then we still do checks to determine
5192 # which gif library to use.
5193 if test "$_gif" = yes ; then
5198 if test "$_gif" = auto
; then
5201 #include <gif_lib.h>
5202 int main(void) { return 0; }
5204 for _ld_gif
in "-lungif" "-lgif" ; do
5205 cc_check
$_ld_gif && _gif
=yes && break
5209 # If no library was found, and the user wants support forced,
5210 # then we force it on with libgif, as this is the safest
5211 # assumption IMHO. (libungif & libregif both create symbolic
5212 # links to libgif. We also assume that no x11 support is needed,
5213 # because if you are forcing this, then you _should_ know what
5214 # you are doing. [ Besides, package maintainers should never
5215 # have compiled x11 deps into libungif in the first place. ] )
5218 if test "$_force_gif" = yes && test "$_gif" = no
; then
5223 if test "$_gif" = yes ; then
5224 def_gif
='#define CONFIG_GIF 1'
5225 _codecmodules
="gif $_codecmodules"
5226 _vomodules
="gif89a $_vomodules"
5227 _res_comment
="old version, some encoding functions disabled"
5228 def_gif_4
='#undef CONFIG_GIF_4'
5229 extra_ldflags
="$extra_ldflags $_ld_gif"
5233 #include <gif_lib.h>
5234 void catch() { exit(1); }
5236 signal(SIGSEGV, catch); // catch segfault
5237 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5238 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5242 if cc_check
"$_ld_gif" ; then
5243 def_gif_4
='#define CONFIG_GIF_4 1'
5247 def_gif
='#undef CONFIG_GIF'
5248 def_gif_4
='#undef CONFIG_GIF_4'
5249 _novomodules
="gif89a $_novomodules"
5250 _nocodecmodules
="gif $_nocodecmodules"
5255 case "$_gif" in yes*)
5256 echocheck
"broken giflib workaround"
5257 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5260 #include <gif_lib.h>
5263 printf("UserData is at address %p\n", gif.UserData);
5267 if cc_check
"$_ld_gif" ; then
5268 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5277 echocheck
"VESA support"
5278 if test "$_vesa" = auto
; then
5281 int main(void) { vbeVersion(); return 0; }
5284 cc_check
-lvbe -llrmi && _vesa
=yes
5286 if test "$_vesa" = yes ; then
5287 def_vesa
='#define CONFIG_VESA 1'
5288 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5289 _vomodules
="vesa $_vomodules"
5291 def_vesa
='#undef CONFIG_VESA'
5292 _novomodules
="vesa $_novomodules"
5304 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5305 if test -z "$_sdlconfig" ; then
5306 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5307 _sdlconfig
="sdl-config"
5308 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5309 _sdlconfig
="sdl11-config"
5314 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5316 #ifdef CONFIG_SDL_SDL_H
5317 #include <SDL/SDL.h>
5322 // we allow SDL hacking our main() only on OSX
5325 int main(int argc, char *argv[]) {
5326 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5331 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" ; do
5332 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5334 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5338 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5339 _res_comment
="using $_sdlconfig"
5341 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5342 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5344 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5345 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5347 _inc_tmp
="$($_sdlconfig --cflags)"
5348 _ld_tmp
="$($_sdlconfig --libs)"
5350 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5351 _sdlversion
=$
($_sdlconfig --version |
sed 's/[^0-9]//g')
5352 if test "$_sdlversion" -gt 116 ; then
5353 if test "$_sdlversion" -lt 121 ; then
5354 def_sdlbuggy
='#define BUGGY_SDL'
5356 def_sdlbuggy
='#undef BUGGY_SDL'
5363 if test "$_sdl" = yes ; then
5364 def_sdl
='#define CONFIG_SDL 1'
5365 extra_cflags
="$extra_cflags $_inc_tmp"
5366 libs_mplayer
="$libs_mplayer $_ld_tmp"
5367 _vomodules
="sdl $_vomodules"
5368 _aomodules
="sdl $_aomodules"
5370 def_sdl
='#undef CONFIG_SDL'
5371 _novomodules
="sdl $_novomodules"
5372 _noaomodules
="sdl $_noaomodules"
5378 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5379 if test "$_kva" = auto
; then
5383 int main( void ) { return 0; }
5386 cc_check
-lkva && _kva
=yes
5388 if test "$_kva" = yes ; then
5389 def_kva
='#define CONFIG_KVA 1'
5390 libs_mplayer
="$libs_mplayer -lkva"
5391 _vomodules
="kva $_vomodules"
5393 def_kva
='#undef CONFIG_KVA'
5394 _novomodules
="kva $_novomodules"
5402 echocheck
"Windows waveout"
5403 if test "$_win32waveout" = auto
; then
5405 #include <windows.h>
5406 #include <mmsystem.h>
5407 int main(void) { return 0; }
5410 cc_check
-lwinmm && _win32waveout
=yes
5412 if test "$_win32waveout" = yes ; then
5413 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5414 libs_mplayer
="$libs_mplayer -lwinmm"
5415 _aomodules
="win32 $_aomodules"
5417 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5418 _noaomodules
="win32 $_noaomodules"
5420 echores
"$_win32waveout"
5422 echocheck
"Direct3D"
5423 if test "$_direct3d" = auto
; then
5425 #include <windows.h>
5427 int main(void) { return 0; }
5430 cc_check
&& _direct3d
=yes
5432 if test "$_direct3d" = yes ; then
5433 def_direct3d
='#define CONFIG_DIRECT3D 1'
5434 _vomodules
="direct3d $_vomodules"
5436 def_direct3d
='#undef CONFIG_DIRECT3D'
5437 _novomodules
="direct3d $_novomodules"
5439 echores
"$_direct3d"
5442 if test "$_directx" = auto
; then
5444 #include <windows.h>
5447 int main(void) { return 0; }
5450 cc_check
-lgdi32 && _directx
=yes
5452 if test "$_directx" = yes ; then
5453 def_directx
='#define CONFIG_DIRECTX 1'
5454 libs_mplayer
="$libs_mplayer -lgdi32"
5455 _vomodules
="directx $_vomodules"
5456 _aomodules
="dsound $_aomodules"
5458 def_directx
='#undef CONFIG_DIRECTX'
5459 _novomodules
="directx $_novomodules"
5460 _noaomodules
="dsound $_noaomodules"
5468 if test "$_dxr2" = auto
; then
5471 #include <dxr2ioctl.h>
5472 int main(void) { return 0; }
5474 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5475 cc_check
$_inc_tmp && _dxr2
=yes && \
5476 extra_cflags
="$extra_cflags $_inc_tmp" && break
5479 if test "$_dxr2" = yes; then
5480 def_dxr2
='#define CONFIG_DXR2 1'
5481 _aomodules
="dxr2 $_aomodules"
5482 _vomodules
="dxr2 $_vomodules"
5484 def_dxr2
='#undef CONFIG_DXR2'
5485 _noaomodules
="dxr2 $_noaomodules"
5486 _novomodules
="dxr2 $_novomodules"
5491 if test "$_dxr3" = auto
; then
5493 #include <linux/em8300.h>
5494 int main(void) { return 0; }
5497 cc_check
&& _dxr3
=yes
5499 if test "$_dxr3" = yes ; then
5500 def_dxr3
='#define CONFIG_DXR3 1'
5501 _vomodules
="dxr3 $_vomodules"
5503 def_dxr3
='#undef CONFIG_DXR3'
5504 _novomodules
="dxr3 $_novomodules"
5509 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5510 if test "$_ivtv" = auto
; then
5513 #include <inttypes.h>
5514 #include <linux/types.h>
5515 #include <linux/videodev2.h>
5516 #include <linux/ivtv.h>
5517 #include <sys/ioctl.h>
5519 struct ivtv_cfg_stop_decode sd;
5520 struct ivtv_cfg_start_decode sd1;
5521 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5522 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5526 cc_check
&& _ivtv
=yes
5528 if test "$_ivtv" = yes ; then
5529 def_ivtv
='#define CONFIG_IVTV 1'
5530 _vomodules
="ivtv $_vomodules"
5531 _aomodules
="ivtv $_aomodules"
5533 def_ivtv
='#undef CONFIG_IVTV'
5534 _novomodules
="ivtv $_novomodules"
5535 _noaomodules
="ivtv $_noaomodules"
5540 echocheck
"V4L2 MPEG Decoder"
5541 if test "$_v4l2" = auto
; then
5544 #include <inttypes.h>
5545 #include <linux/types.h>
5546 #include <linux/videodev2.h>
5547 #include <linux/version.h>
5549 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5550 #error kernel headers too old, need 2.6.22
5552 struct v4l2_ext_controls ctrls;
5553 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5558 cc_check
&& _v4l2
=yes
5560 if test "$_v4l2" = yes ; then
5561 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5562 _vomodules
="v4l2 $_vomodules"
5563 _aomodules
="v4l2 $_aomodules"
5565 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5566 _novomodules
="v4l2 $_novomodules"
5567 _noaomodules
="v4l2 $_noaomodules"
5578 echocheck
"OSS Audio"
5579 if test "$_ossaudio" = auto
; then
5581 #include <sys/ioctl.h>
5582 #include <$_soundcard_header>
5583 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5586 cc_check
&& _ossaudio
=yes
5588 if test "$_ossaudio" = yes ; then
5589 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5590 _aomodules
="oss $_aomodules"
5591 if test "$_linux_devfs" = yes; then
5592 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5593 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5596 #include <sys/ioctl.h>
5597 #include <$_soundcard_header>
5598 #ifdef OPEN_SOUND_SYSTEM
5599 int main(void) { return 0; }
5601 #error Not the real thing
5605 cc_check
&& _real_ossaudio
=yes
5606 if test "$_real_ossaudio" = yes; then
5607 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5608 elif netbsd || openbsd
; then
5609 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5610 extra_ldflags
="$extra_ldflags -lossaudio"
5612 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5614 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5617 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5618 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5619 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5620 _noaomodules
="oss $_noaomodules"
5622 echores
"$_ossaudio"
5626 if test "$_arts" = auto
; then
5628 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5632 int main(void) { return 0; }
5634 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5639 if test "$_arts" = yes ; then
5640 def_arts
='#define CONFIG_ARTS 1'
5641 _aomodules
="arts $_aomodules"
5642 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5643 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5645 _noaomodules
="arts $_noaomodules"
5651 if test "$_esd" = auto
; then
5653 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5657 int main(void) { int fd = esd_open_sound("test"); return fd; }
5659 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5665 if test "$_esd" = yes ; then
5666 def_esd
='#define CONFIG_ESD 1'
5667 _aomodules
="esd $_aomodules"
5668 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5669 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5671 echocheck
"esd_get_latency()"
5674 int main(void) { return esd_get_latency(0); }
5676 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5677 echores
"$_esd_latency"
5679 def_esd
='#undef CONFIG_ESD'
5680 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5681 _noaomodules
="esd $_noaomodules"
5686 if test "$_nas" = auto
; then
5688 #include <audio/audiolib.h>
5689 int main(void) { return 0; }
5692 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5694 if test "$_nas" = yes ; then
5695 def_nas
='#define CONFIG_NAS 1'
5696 libs_mplayer
="$libs_mplayer -laudio -lXt"
5697 _aomodules
="nas $_aomodules"
5699 _noaomodules
="nas $_noaomodules"
5700 def_nas
='#undef CONFIG_NAS'
5706 if test "$_pulse" = auto
; then
5708 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5711 #include <pulse/pulseaudio.h>
5712 int main(void) { return 0; }
5714 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5720 if test "$_pulse" = yes ; then
5721 def_pulse
='#define CONFIG_PULSE 1'
5722 _aomodules
="pulse $_aomodules"
5723 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5724 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5726 def_pulse
='#undef CONFIG_PULSE'
5727 _noaomodules
="pulse $_noaomodules"
5732 if test "$_jack" = auto
; then
5736 #include <jack/jack.h>
5737 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5739 if cc_check
-ljack ; then
5740 libs_mplayer
="$libs_mplayer -ljack"
5741 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5742 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5743 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5749 if test "$_jack" = yes ; then
5750 def_jack
='#define CONFIG_JACK 1'
5751 _aomodules
="jack $_aomodules"
5753 _noaomodules
="jack $_noaomodules"
5758 if test "$_openal" = auto
; then
5762 #include <OpenAL/al.h>
5767 alSourceQueueBuffers(0, 0, 0);
5768 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5772 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5773 cc_check
$I && _openal
=yes && break
5774 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5776 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5778 if test "$_openal" = yes ; then
5779 def_openal
='#define CONFIG_OPENAL 1'
5780 _aomodules
="openal $_aomodules"
5782 _noaomodules
="openal $_noaomodules"
5786 echocheck
"ALSA audio"
5787 if test "$_alloca" != yes ; then
5789 _res_comment
="alloca missing"
5791 if test "$_alsa" != no
; then
5794 #include <sys/time.h>
5795 #include <sys/asoundlib.h>
5796 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5797 #error "alsa version != 0.5.x"
5799 int main(void) { return 0; }
5801 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5804 #include <sys/time.h>
5805 #include <sys/asoundlib.h>
5806 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5807 #error "alsa version != 0.9.x"
5809 int main(void) { return 0; }
5811 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5813 #include <sys/time.h>
5814 #include <alsa/asoundlib.h>
5815 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5816 #error "alsa version != 0.9.x"
5818 int main(void) { return 0; }
5820 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5823 #include <sys/time.h>
5824 #include <sys/asoundlib.h>
5825 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5826 #error "alsa version != 1.0.x"
5828 int main(void) { return 0; }
5830 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5832 #include <sys/time.h>
5833 #include <alsa/asoundlib.h>
5834 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5835 #error "alsa version != 1.0.x"
5837 int main(void) { return 0; }
5839 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5841 def_alsa
='#undef CONFIG_ALSA'
5842 def_alsa5
='#undef CONFIG_ALSA5'
5843 def_alsa9
='#undef CONFIG_ALSA9'
5844 def_alsa1x
='#undef CONFIG_ALSA1X'
5845 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5846 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5847 if test "$_alsaver" ; then
5849 if test "$_alsaver" = '0.5.x' ; then
5851 _aomodules
="alsa5 $_aomodules"
5852 def_alsa5
='#define CONFIG_ALSA5 1'
5853 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5854 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5855 elif test "$_alsaver" = '0.9.x-sys' ; then
5857 _aomodules
="alsa $_aomodules"
5858 def_alsa
='#define CONFIG_ALSA 1'
5859 def_alsa9
='#define CONFIG_ALSA9 1'
5860 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5861 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5862 elif test "$_alsaver" = '0.9.x-alsa' ; then
5864 _aomodules
="alsa $_aomodules"
5865 def_alsa
='#define CONFIG_ALSA 1'
5866 def_alsa9
='#define CONFIG_ALSA9 1'
5867 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5868 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5869 elif test "$_alsaver" = '1.0.x-sys' ; then
5871 _aomodules
="alsa $_aomodules"
5872 def_alsa
='#define CONFIG_ALSA 1'
5873 def_alsa1x
="#define CONFIG_ALSA1X 1"
5874 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5875 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5876 elif test "$_alsaver" = '1.0.x-alsa' ; then
5878 _aomodules
="alsa $_aomodules"
5879 def_alsa
='#define CONFIG_ALSA 1'
5880 def_alsa1x
="#define CONFIG_ALSA1X 1"
5881 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5882 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5885 _res_comment
="unknown version"
5887 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5889 _noaomodules
="alsa $_noaomodules"
5894 echocheck
"Sun audio"
5895 if test "$_sunaudio" = auto
; then
5897 #include <sys/types.h>
5898 #include <sys/audioio.h>
5899 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5902 cc_check
&& _sunaudio
=yes
5904 if test "$_sunaudio" = yes ; then
5905 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5906 _aomodules
="sun $_aomodules"
5908 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5909 _noaomodules
="sun $_noaomodules"
5911 echores
"$_sunaudio"
5914 def_mlib
='#define CONFIG_MLIB 0'
5916 echocheck
"Sun mediaLib"
5917 if test "$_mlib" = auto
; then
5921 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5923 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5930 echocheck
"CoreAudio"
5931 if test "$_coreaudio" = auto
; then
5933 #include <CoreAudio/CoreAudio.h>
5934 #include <AudioToolbox/AudioToolbox.h>
5935 #include <AudioUnit/AudioUnit.h>
5936 int main(void) { return 0; }
5939 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5941 if test "$_coreaudio" = yes ; then
5942 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5943 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5944 _aomodules
="coreaudio $_aomodules"
5946 def_coreaudio
='#undef CONFIG_COREAUDIO'
5947 _noaomodules
="coreaudio $_noaomodules"
5954 echocheck
"SGI audio"
5955 if test "$_sgiaudio" = auto
; then
5956 # check for SGI audio
5958 #include <dmedia/audio.h>
5959 int main(void) { return 0; }
5962 cc_check
&& _sgiaudio
=yes
5964 if test "$_sgiaudio" = "yes" ; then
5965 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5966 libs_mplayer
="$libs_mplayer -laudio"
5967 _aomodules
="sgi $_aomodules"
5969 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5970 _noaomodules
="sgi $_noaomodules"
5972 echores
"$_sgiaudio"
5978 if test "$_dart" = auto
; then
5982 int main( void ) { return 0; }
5985 cc_check
-ldart && _dart
=yes
5987 if test "$_dart" = yes ; then
5988 def_dart
='#define CONFIG_DART 1'
5989 libs_mplayer
="$libs_mplayer -ldart"
5990 _aomodules
="dart $_aomodules"
5992 def_dart
='#undef CONFIG_DART'
5993 _noaomodules
="dart $_noaomodules"
5999 # set default CD/DVD devices
6000 if win32 || os2
; then
6001 default_cdrom_device
="D:"
6003 default_cdrom_device
="/dev/disk1"
6004 elif dragonfly
; then
6005 default_cdrom_device
="/dev/cd0"
6007 default_cdrom_device
="/dev/acd0"
6009 default_cdrom_device
="/dev/rcd0a"
6011 default_cdrom_device
="/vol/dev/aliases/cdrom0"
6012 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
6013 # file system and the volfs service.
6014 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
6016 default_cdrom_device
="a1ide.device:2"
6018 default_cdrom_device
="/dev/cdrom"
6021 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
6022 default_dvd_device
=$default_cdrom_device
6024 default_dvd_device
="/dev/rdiskN"
6026 default_dvd_device
="/dev/dvd"
6030 echocheck
"VCD support"
6031 if test "$_vcd" = auto
; then
6033 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos
; then
6037 #include <ddk/ntddcdrm.h>
6038 int main(void) { return 0; }
6040 cc_check
&& _vcd
=yes
6043 if test "$_vcd" = yes; then
6044 _inputmodules
="vcd $_inputmodules"
6045 def_vcd
='#define CONFIG_VCD 1'
6047 def_vcd
='#undef CONFIG_VCD'
6048 _noinputmodules
="vcd $_noinputmodules"
6049 _res_comment
="not supported on this OS"
6056 if test "$_dvdread_internal" = auto
; then
6057 _dvdread_internal
=no
6059 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
6060 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
6061 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
6062 || darwin || win32 || os2
; then
6063 _dvdread_internal
=yes
6065 extra_cflags
="-Ilibdvdread4 $extra_cflags"
6067 elif test "$_dvdread" = auto
; then
6069 if test "$_dl" = yes; then
6071 #include <inttypes.h>
6072 #include <dvdread/dvd_reader.h>
6073 #include <dvdread/ifo_types.h>
6074 #include <dvdread/ifo_read.h>
6075 #include <dvdread/nav_read.h>
6076 int main(void) { return 0; }
6078 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
6079 _dvdreadlibs
=$
($_dvdreadconfig --libs)
6080 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
6081 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
6083 extra_cflags
="$extra_cflags $_dvdreadcflags"
6084 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
6085 _res_comment
="external"
6090 if test "$_dvdread_internal" = yes; then
6091 def_dvdread
='#define CONFIG_DVDREAD 1'
6092 _inputmodules
="dvdread(internal) $_inputmodules"
6094 _res_comment
="internal"
6095 elif test "$_dvdread" = yes; then
6096 def_dvdread
='#define CONFIG_DVDREAD 1'
6098 extra_ldflags
="$extra_ldflags -ldvdread"
6099 _inputmodules
="dvdread(external) $_inputmodules"
6100 _res_comment
="external"
6102 def_dvdread
='#undef CONFIG_DVDREAD'
6103 _noinputmodules
="dvdread $_noinputmodules"
6108 echocheck
"internal libdvdcss"
6109 if test "$_libdvdcss_internal" = auto
; then
6110 _libdvdcss_internal
=no
6111 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
6112 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
6114 if test "$_libdvdcss_internal" = yes ; then
6115 if linux || netbsd || openbsd || bsdos
; then
6116 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
6117 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
6118 elif freebsd || dragonfly
; then
6119 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
6121 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
6122 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
6124 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
6126 cflags_libdvdcss
="-DSYS_BEOS"
6128 cflags_libdvdcss
="-DSYS_OS2"
6130 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
6131 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
6132 _inputmodules
="libdvdcss(internal) $_inputmodules"
6135 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
6137 echores
"$_libdvdcss_internal"
6140 echocheck
"cdparanoia"
6141 if test "$_cdparanoia" = auto
; then
6143 #include <cdda_interface.h>
6144 #include <cdda_paranoia.h>
6145 // This need a better test. How ?
6146 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
6149 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
6150 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
6151 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
6154 if test "$_cdparanoia" = yes ; then
6156 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
6157 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
6159 echores
"$_cdparanoia"
6163 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
6166 #include <cdio/version.h>
6167 #include <cdio/cdda.h>
6168 #include <cdio/paranoia.h>
6170 void *test = cdda_verbose_set;
6171 printf("%s\n", CDIO_VERSION);
6172 return test == (void *)1;
6176 for _ld_tmp
in "" "-lwinmm" ; do
6177 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
6178 cc_check
$_ld_tmp $_ld_lm \
6179 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6181 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
6182 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
6183 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
6184 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
6185 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6188 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
6190 def_libcdio
='#define CONFIG_LIBCDIO 1'
6191 def_havelibcdio
='yes'
6193 if test "$_cdparanoia" = yes ; then
6194 _res_comment
="using cdparanoia"
6196 def_libcdio
='#undef CONFIG_LIBCDIO'
6197 def_havelibcdio
='no'
6201 if test "$_cdda" = yes ; then
6202 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
6203 def_cdparanoia
='#define CONFIG_CDDA 1'
6204 _inputmodules
="cdda $_inputmodules"
6206 def_cdparanoia
='#undef CONFIG_CDDA'
6207 _noinputmodules
="cdda $_noinputmodules"
6210 if test "$_cddb" = yes ; then
6211 def_cddb
='#define CONFIG_CDDB 1'
6212 _inputmodules
="cddb $_inputmodules"
6215 def_cddb
='#undef CONFIG_CDDB'
6216 _noinputmodules
="cddb $_noinputmodules"
6219 echocheck
"bitmap font support"
6220 if test "$_bitmap_font" = yes ; then
6221 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6223 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6225 echores
"$_bitmap_font"
6228 echocheck
"freetype >= 2.0.9"
6230 # freetype depends on iconv
6231 if test "$_iconv" = no
; then
6233 _res_comment
="iconv support needed"
6236 if test "$_freetype" = auto
; then
6237 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6240 #include <ft2build.h>
6241 #include FT_FREETYPE_H
6242 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6243 #error "Need FreeType 2.0.9 or newer"
6247 FT_Int major=-1,minor=-1,patch=-1;
6248 int err=FT_Init_FreeType(&library);
6253 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6258 if test "$_freetype" = yes ; then
6259 def_freetype
='#define CONFIG_FREETYPE 1'
6260 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6261 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6263 def_freetype
='#undef CONFIG_FREETYPE'
6265 echores
"$_freetype"
6267 if test "$_freetype" = no
; then
6269 _res_comment
="FreeType support needed"
6271 echocheck
"fontconfig"
6272 if test "$_fontconfig" = auto
; then
6276 #include <fontconfig/fontconfig.h>
6279 if (err == FcFalse) {
6280 printf("Couldn't initialize fontconfig lib\n");
6287 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6288 _ld_tmp
="-lfontconfig $_ld_tmp"
6289 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6291 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6292 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6293 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6294 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6295 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6298 if test "$_fontconfig" = yes ; then
6299 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6301 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6303 echores
"$_fontconfig"
6306 echocheck
"SSA/ASS support"
6307 # libass depends on FreeType
6308 if test "$_freetype" = no
; then
6311 _res_comment
="FreeType support needed"
6314 if test "$_ass" = auto
; then
6316 #include <ft2build.h>
6317 #include FT_FREETYPE_H
6318 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 2) || ((FREETYPE_MINOR == 2) && (FREETYPE_PATCH < 1)))
6319 #error "Need FreeType 2.2.1 or newer"
6321 int main(void) { return 0; }
6324 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _ass
=yes
6325 if test "$_ass" = no
; then
6327 _res_comment
="FreeType >= 2.2.1 needed"
6328 elif test "$ass_internal" = no
; then
6329 _res_comment
="external"
6330 extra_ldflags
="$extra_ldflags -lass"
6333 if test "$_ass" = yes ; then
6334 def_ass
='#define CONFIG_ASS 1'
6336 def_ass
='#undef CONFIG_ASS'
6338 if test "$ass_internal" = yes ; then
6339 def_ass_internal
='#define CONFIG_ASS_INTERNAL 1'
6341 def_ass_internal
='#undef CONFIG_ASS_INTERNAL'
6346 echocheck
"fribidi with charsets"
6349 if test "$_fribidi" = auto
; then
6353 /* workaround for fribidi 0.10.4 and below */
6354 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6355 #include <fribidi/fribidi.h>
6357 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6358 printf("Fribidi headers are not consistents with the library!\n");
6367 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6368 if $_fribidiconfig --version > /dev
/null
2>&1 &&
6369 test "$_fribidi" = no
; then
6370 _inc_tmp
="$($_fribidiconfig --cflags)"
6371 _ld_tmp
="$($_fribidiconfig --libs)"
6372 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6375 if test "$_fribidi" = yes ; then
6376 def_fribidi
='#define CONFIG_FRIBIDI 1'
6377 extra_cflags
="$extra_cflags $_inc_tmp"
6378 extra_ldflags
="$extra_ldflags $_ld_tmp"
6380 def_fribidi
='#undef CONFIG_FRIBIDI'
6386 if test "$_enca" = auto
; then
6388 #include <sys/types.h>
6393 langs = enca_get_languages(&langcnt);
6398 cc_check
-lenca $_ld_lm && _enca
=yes
6400 if test "$_enca" = yes ; then
6401 def_enca
='#define CONFIG_ENCA 1'
6402 extra_ldflags
="$extra_ldflags -lenca"
6404 def_enca
='#undef CONFIG_ENCA'
6412 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6415 cc_check
-lz && _zlib
=yes
6416 if test "$_zlib" = yes ; then
6417 def_zlib
='#define CONFIG_ZLIB 1'
6418 extra_ldflags
="$extra_ldflags -lz"
6420 def_zlib
='#define CONFIG_ZLIB 0'
6421 _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
//)
6422 _libavencoders
=$
(echo $_libavencoders |
sed -e s
/FLASHSV_ENCODER
// -e s
/PNG_ENCODER
// -e s
/ZMBV_ENCODER
// -e s
/ZLIB_ENCODER
//)
6429 def_bzlib
='#define CONFIG_BZLIB 0'
6432 int main(void) { BZ2_bzlibVersion(); return 0; }
6434 cc_check
-lbz2 && bzlib
=yes
6435 if test "$bzlib" = yes ; then
6436 def_bzlib
='#define CONFIG_BZLIB 1'
6437 extra_ldflags
="$extra_ldflags -lbz2"
6443 if test "$_rtc" = auto
; then
6445 #include <sys/ioctl.h>
6447 #include <linux/rtc.h>
6450 #define RTC_PIE_ON RTCIO_PIE_ON
6452 int main(void) { return RTC_PIE_ON; }
6455 cc_check
&& _rtc
=yes
6458 if test "$_rtc" = yes ; then
6459 def_rtc
='#define HAVE_RTC 1'
6461 def_rtc
='#undef HAVE_RTC'
6466 echocheck
"liblzo2 support"
6467 if test "$_liblzo" = auto
; then
6470 #include <lzo/lzo1x.h>
6471 int main(void) { lzo_init();return 0; }
6473 cc_check
-llzo2 && _liblzo
=yes
6475 if test "$_liblzo" = yes ; then
6476 def_liblzo
='#define CONFIG_LIBLZO 1'
6477 extra_ldflags
="$extra_ldflags -llzo2"
6478 _codecmodules
="liblzo $_codecmodules"
6480 def_liblzo
='#undef CONFIG_LIBLZO'
6481 _nocodecmodules
="liblzo $_nocodecmodules"
6486 echocheck
"mad support"
6487 if test "$_mad" = auto
; then
6491 int main(void) { return 0; }
6493 cc_check
-lmad && _mad
=yes
6495 if test "$_mad" = yes ; then
6496 def_mad
='#define CONFIG_LIBMAD 1'
6497 extra_ldflags
="$extra_ldflags -lmad"
6498 _codecmodules
="libmad $_codecmodules"
6500 def_mad
='#undef CONFIG_LIBMAD'
6501 _nocodecmodules
="libmad $_nocodecmodules"
6506 if test "$_twolame" = auto
; then
6508 #include <twolame.h>
6509 int main(void) { twolame_init(); return 0; }
6512 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6514 if test "$_twolame" = yes ; then
6515 def_twolame
='#define CONFIG_TWOLAME 1'
6516 libs_mencoder
="$libs_mencoder -ltwolame"
6517 _codecmodules
="twolame $_codecmodules"
6519 def_twolame
='#undef CONFIG_TWOLAME'
6520 _nocodecmodules
="twolame $_nocodecmodules"
6525 if test "$_toolame" = auto
; then
6527 if test "$_twolame" = yes ; then
6528 _res_comment
="disabled by twolame"
6531 #include <toolame.h>
6532 int main(void) { toolame_init(); return 0; }
6534 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6537 if test "$_toolame" = yes ; then
6538 def_toolame
='#define CONFIG_TOOLAME 1'
6539 libs_mencoder
="$libs_mencoder -ltoolame"
6540 _codecmodules
="toolame $_codecmodules"
6542 def_toolame
='#undef CONFIG_TOOLAME'
6543 _nocodecmodules
="toolame $_nocodecmodules"
6545 if test "$_toolamedir" ; then
6546 _res_comment
="using $_toolamedir"
6550 echocheck
"OggVorbis support"
6551 if test "$_tremor_internal" = yes; then
6553 elif test "$_tremor" = auto
; then
6556 #include <tremor/ivorbiscodec.h>
6557 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6559 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6561 if test "$_libvorbis" = auto
; then
6564 #include <vorbis/codec.h>
6565 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6567 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6569 if test "$_tremor_internal" = yes ; then
6571 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6572 def_tremor
='#define CONFIG_TREMOR 1'
6573 _codecmodules
="tremor(internal) $_codecmodules"
6574 _res_comment
="internal Tremor"
6575 if test "$_tremor_low" = yes ; then
6576 cflags_tremor_low
="-D_LOW_ACCURACY_"
6577 _res_comment
="internal low accuracy Tremor"
6579 elif test "$_tremor" = yes ; then
6581 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6582 def_tremor
='#define CONFIG_TREMOR 1'
6583 _codecmodules
="tremor(external) $_codecmodules"
6584 _res_comment
="external Tremor"
6585 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6586 elif test "$_libvorbis" = yes ; then
6588 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6589 _codecmodules
="libvorbis $_codecmodules"
6590 _res_comment
="libvorbis"
6591 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6594 _nocodecmodules
="libvorbis $_nocodecmodules"
6598 echocheck
"libspeex (version >= 1.1 required)"
6599 if test "$_speex" = auto
; then
6602 #include <speex/speex.h>
6603 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6605 cc_check
-lspeex $_ld_lm && _speex
=yes
6607 if test "$_speex" = yes ; then
6608 def_speex
='#define CONFIG_SPEEX 1'
6609 extra_ldflags
="$extra_ldflags -lspeex"
6610 _codecmodules
="speex $_codecmodules"
6612 def_speex
='#undef CONFIG_SPEEX'
6613 _nocodecmodules
="speex $_nocodecmodules"
6617 echocheck
"OggTheora support"
6618 if test "$_theora" = auto
; then
6621 #include <theora/theora.h>
6624 /* Theora is in flux, make sure that all interface routines and datatypes
6625 * exist and work the way we expect it, so we don't break MPlayer. */
6634 theora_info_init(&inf);
6635 theora_comment_init(&tc);
6639 /* we don't want to execute this kind of nonsense; just for making sure
6640 * that compilation works... */
6641 memset(&op, 0, sizeof(op));
6642 r = theora_decode_header(&inf, &tc, &op);
6643 r = theora_decode_init(&st, &inf);
6644 t = theora_granule_time(&st, op.granulepos);
6645 r = theora_decode_packetin(&st, &op);
6646 r = theora_decode_YUVout(&st, &yuv);
6652 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6653 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6654 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6655 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6656 if test _theora
= no
; then
6657 _ld_theora
="-ltheora -logg"
6658 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6660 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6661 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6662 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6663 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6664 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6665 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6666 if test _theora
= no
; then
6667 _ld_theora
="-ltheora -logg"
6668 cc_check tremor
/bitwise.c
$_ld_theora &&
6669 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6673 if test "$_theora" = yes ; then
6674 def_theora
='#define CONFIG_OGGTHEORA 1'
6675 _codecmodules
="libtheora $_codecmodules"
6676 # when --enable-theora is forced, we'd better provide a probably sane
6677 # $_ld_theora than nothing
6678 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6680 def_theora
='#undef CONFIG_OGGTHEORA'
6681 _nocodecmodules
="libtheora $_nocodecmodules"
6685 echocheck
"internal mp3lib support"
6686 if test "$_mp3lib" = auto
; then
6687 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6689 if test "$_mp3lib" = yes ; then
6690 def_mp3lib
='#define CONFIG_MP3LIB 1'
6691 _codecmodules
="mp3lib(internal) $_codecmodules"
6693 def_mp3lib
='#undef CONFIG_MP3LIB'
6694 _nocodecmodules
="mp3lib(internal) $_nocodecmodules"
6698 echocheck
"liba52 support"
6699 if test "$_liba52_internal" = auto
; then
6700 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
6702 def_liba52
='#undef CONFIG_LIBA52'
6703 def_liba52_internal
="#undef CONFIG_LIBA52_INTERNAL"
6704 if test "$_liba52_internal" = yes ; then
6706 def_liba52_internal
="#define CONFIG_LIBA52_INTERNAL 1"
6707 _res_comment
="internal"
6708 elif test "$_liba52_internal" = no
&& test "$_liba52" = auto
; then
6711 #include <inttypes.h>
6712 #include <a52dec/a52.h>
6713 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6715 cc_check
-la52 && _liba52
=yes && _res_comment
="external" && extra_ldflags
="$extra_ldflags -la52"
6717 if test "$_liba52" = yes ; then
6718 def_liba52
='#define CONFIG_LIBA52 1'
6719 _codecmodules
="liba52($_res_comment) $_codecmodules"
6721 _nocodecmodules
="liba52 $_nocodecmodules"
6725 echocheck
"internal libmpeg2 support"
6726 if test "$_libmpeg2" = auto
; then
6728 if alpha
&& test cc_vendor
=gnu
; then
6730 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6732 _res_comment
="broken gcc"
6737 if test "$_libmpeg2" = yes ; then
6738 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6739 _codecmodules
="libmpeg2(internal) $_codecmodules"
6741 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6742 _nocodecmodules
="libmpeg2(internal) $_nocodecmodules"
6744 echores
"$_libmpeg2"
6746 echocheck
"libdca support"
6747 if test "$_libdca" = auto
; then
6750 #include <inttypes.h>
6752 int main(void) { dts_init(0); return 0; }
6754 for _ld_dca
in -ldca -ldts ; do
6755 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6756 && _libdca
=yes && break
6759 if test "$_libdca" = yes ; then
6760 def_libdca
='#define CONFIG_LIBDCA 1'
6761 _codecmodules
="libdca $_codecmodules"
6763 def_libdca
='#undef CONFIG_LIBDCA'
6764 _nocodecmodules
="libdca $_nocodecmodules"
6768 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6769 if test "$_musepack" = auto
; then
6773 #include <mpcdec/mpcdec.h>
6775 mpc_streaminfo info;
6776 mpc_decoder decoder;
6777 mpc_decoder_set_streaminfo(&decoder, &info);
6778 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6782 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6784 if test "$_musepack" = yes ; then
6785 def_musepack
='#define CONFIG_MUSEPACK 1'
6786 extra_ldflags
="$extra_ldflags -lmpcdec"
6787 _codecmodules
="musepack $_codecmodules"
6789 def_musepack
='#undef CONFIG_MUSEPACK'
6790 _nocodecmodules
="musepack $_nocodecmodules"
6792 echores
"$_musepack"
6795 echocheck
"FAAC support"
6796 if test "$_faac" = auto
; then
6798 #include <inttypes.h>
6800 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6803 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6804 cc_check
-O4 $_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6807 if test "$_faac" = yes ; then
6808 def_faac
="#define CONFIG_FAAC 1"
6809 test "$_faac_lavc" = auto
&& _faac_lavc
=yes
6810 if test "$_faac_lavc" = yes ; then
6811 def_faac_lavc
="#define CONFIG_LIBFAAC 1"
6812 libs_mplayer
="$libs_mplayer $_ld_faac"
6813 _libavencoders
="$_libavencoders LIBFAAC_ENCODER"
6815 _codecmodules
="faac $_codecmodules"
6818 def_faac
="#undef CONFIG_FAAC"
6819 def_faac_lavc
="#define CONFIG_LIBFAAC 0"
6820 _nocodecmodules
="faac $_nocodecmodules"
6822 _res_comment
="in libavcodec: $_faac_lavc"
6826 echocheck
"FAAD2 support"
6827 if test "$_faad_internal" = auto
; then
6828 if x86_32
&& test cc_vendor
=gnu
; then
6830 3.1*|
3.2) # ICE/insn with these versions
6832 _res_comment
="broken gcc"
6844 if test "$_faad" = auto
; then
6847 #ifndef FAAD_MIN_STREAMSIZE
6848 #error Too old version
6850 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6851 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6853 cc_check
-lfaad $_ld_lm && _faad
=yes
6856 def_faad
='#undef CONFIG_FAAD'
6857 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6858 if test "$_faad_internal" = yes ; then
6859 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6860 _res_comment
="internal floating-point"
6861 if test "$_faad_fixed" = yes ; then
6862 # The FIXED_POINT implementation of FAAD2 improves performance
6863 # on some platforms, especially for SBR files.
6864 cflags_faad_fixed
="-DFIXED_POINT"
6865 _res_comment
="internal fixed-point"
6867 elif test "$_faad" = yes ; then
6868 extra_ldflags
="$extra_ldflags -lfaad"
6871 if test "$_faad" = yes ; then
6872 def_faad
='#define CONFIG_FAAD 1'
6873 if test "$_faad_internal" = yes ; then
6874 _codecmodules
="faad2(internal) $_codecmodules"
6876 _codecmodules
="faad2 $_codecmodules"
6880 _nocodecmodules
="faad2 $_nocodecmodules"
6885 echocheck
"LADSPA plugin support"
6886 if test "$_ladspa" = auto
; then
6891 const LADSPA_Descriptor *ld = NULL;
6896 cc_check
&& _ladspa
=yes
6898 if test "$_ladspa" = yes; then
6899 def_ladspa
="#define CONFIG_LADSPA 1"
6901 def_ladspa
="#undef CONFIG_LADSPA"
6906 echocheck
"libbs2b audio filter support"
6907 if test "$_libbs2b" = auto
; then
6910 #if BS2B_VERSION_MAJOR < 3
6911 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6921 if $_pkg_config --exists libbs2b
; then
6922 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6923 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6924 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6925 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6927 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6928 -I/usr
/local
/include
/bs2b
; do
6929 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6930 extra_ldflags
="$extra_ldflags -lbs2b"
6931 extra_cflags
="$extra_cflags $_inc_tmp"
6938 def_libbs2b
="#undef CONFIG_LIBBS2B"
6939 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6943 if test -z "$_codecsdir" ; then
6944 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6945 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6946 if test -d "$dir" ; then
6952 # Fall back on default directory.
6953 if test -z "$_codecsdir" ; then
6954 _codecsdir
="$_libdir/codecs"
6955 mingw32
&& _codecsdir
="codecs"
6956 os2
&& _codecsdir
="codecs"
6960 echocheck
"Win32 codecs"
6961 if test "$_win32dll" = auto
; then
6963 if x86_32
&& ! qnx
; then
6967 if test "$_win32dll" = yes ; then
6968 def_win32dll
='#define CONFIG_WIN32DLL 1'
6969 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6970 _res_comment
="using $_win32codecsdir"
6972 def_win32_loader
='#define WIN32_LOADER 1'
6973 _win32_emulation
=yes
6975 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6976 _res_comment
="using native windows"
6978 _codecmodules
="win32 $_codecmodules"
6980 def_win32dll
='#undef CONFIG_WIN32DLL'
6981 def_win32_loader
='#undef WIN32_LOADER'
6982 _nocodecmodules
="win32 $_nocodecmodules"
6984 echores
"$_win32dll"
6987 echocheck
"XAnim codecs"
6988 if test "$_xanim" = auto
; then
6990 _res_comment
="dynamic loader support needed"
6991 if test "$_dl" = yes ; then
6995 if test "$_xanim" = yes ; then
6996 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6997 def_xanim
='#define CONFIG_XANIM 1'
6998 def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6999 _codecmodules
="xanim $_codecmodules"
7000 _res_comment
="using $_xanimcodecsdir"
7002 def_xanim
='#undef CONFIG_XANIM'
7003 def_xanim_path
='#undef XACODEC_PATH'
7004 _nocodecmodules
="xanim $_nocodecmodules"
7009 echocheck
"RealPlayer codecs"
7010 if test "$_real" = auto
; then
7012 _res_comment
="dynamic loader support needed"
7013 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
7014 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32
) ; then
7018 if test "$_real" = yes ; then
7019 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
7020 def_real
='#define CONFIG_REALCODECS 1'
7021 def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
7022 _codecmodules
="real $_codecmodules"
7023 _res_comment
="using $_realcodecsdir"
7025 def_real
='#undef CONFIG_REALCODECS'
7026 def_real_path
="#undef REALCODEC_PATH"
7027 _nocodecmodules
="real $_nocodecmodules"
7032 echocheck
"QuickTime codecs"
7034 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
7035 if test "$_qtx" = auto
; then
7036 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
7038 if test "$_qtx" = yes ; then
7039 def_qtx
='#define CONFIG_QTX_CODECS 1'
7040 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
7041 _codecmodules
="qtx $_codecmodules"
7042 darwin || win32 || _qtx_emulation
=yes
7044 def_qtx
='#undef CONFIG_QTX_CODECS'
7045 _nocodecmodules
="qtx $_nocodecmodules"
7049 echocheck
"Nemesi Streaming Media libraries"
7050 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
7052 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
7053 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
7054 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
7058 if test "$_nemesi" = yes; then
7060 def_nemesi
='#define CONFIG_LIBNEMESI 1'
7061 _inputmodules
="nemesi $_inputmodules"
7063 _native_rtsp
="$_network"
7065 def_nemesi
='#undef CONFIG_LIBNEMESI'
7066 _noinputmodules
="nemesi $_noinputmodules"
7070 echocheck
"LIVE555 Streaming Media libraries"
7071 if test "$_live" = auto
&& test "$_network" = yes ; then
7072 cat > $TMPCPP << EOF
7073 #include <liveMedia.hh>
7074 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
7075 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
7077 int main(void) { return 0; }
7081 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
7082 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
7083 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
7084 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
7085 $_livelibdir/groupsock/libgroupsock.a \
7086 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
7087 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
7088 $extra_ldflags -lstdc++" \
7089 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
7090 -I$_livelibdir/UsageEnvironment/include \
7091 -I$_livelibdir/BasicUsageEnvironment/include \
7092 -I$_livelibdir/groupsock/include" && \
7095 if test "$_live" != yes ; then
7096 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
7097 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
7102 if test "$_live" = yes && test "$_network" = yes; then
7103 test $_livelibdir && _res_comment
="using $_livelibdir"
7104 def_live
='#define CONFIG_LIVE555 1'
7105 _inputmodules
="live555 $_inputmodules"
7106 elif test "$_live_dist" = yes && test "$_network" = yes; then
7107 _res_comment
="using distribution version"
7109 def_live
='#define CONFIG_LIVE555 1'
7110 extra_ldflags
="$extra_ldflags $ld_tmp"
7111 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
7112 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
7113 _inputmodules
="live555 $_inputmodules"
7116 def_live
='#undef CONFIG_LIVE555'
7117 _noinputmodules
="live555 $_noinputmodules"
7122 echocheck
"FFmpeg libavutil"
7123 if test "$_libavutil_a" = auto
; then
7124 if test -d libavutil
; then
7126 _res_comment
="static"
7128 die
"MPlayer will not compile without libavutil in the source tree."
7130 elif test "$_libavutil_so" = auto
; then
7133 #include <libavutil/common.h>
7134 int main(void) { av_gcd(1,1); return 0; }
7136 if $_pkg_config --exists libavutil
; then
7137 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
7138 _ld_tmp
=$
($_pkg_config --libs libavutil
)
7139 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7140 && _libavutil_so
=yes
7141 elif cc_check
-lavutil $_ld_lm ; then
7142 extra_ldflags
="$extra_ldflags -lavutil"
7144 _res_comment
="using libavutil.so, but static libavutil is recommended"
7148 def_libavutil
='#undef CONFIG_LIBAVUTIL'
7149 def_libavutil_a
='#undef CONFIG_LIBAVUTIL_A'
7150 def_libavutil_so
='#undef CONFIG_LIBAVUTIL_SO'
7151 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
7152 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
7153 test "$_libavutil_a" = yes && def_libavutil_a
='#define CONFIG_LIBAVUTIL_A 1'
7154 test "$_libavutil_so" = yes && def_libavutil_so
='#define CONFIG_LIBAVUTIL_SO 1'
7155 # neither static nor shared libavutil is available, but it is mandatory ...
7156 if test "$_libavutil" = no
; then
7157 die
"You need static or shared libavutil, MPlayer will not compile without!"
7159 echores
"$_libavutil"
7161 echocheck
"FFmpeg libavcodec"
7162 if test "$_libavcodec_a" = auto
; then
7164 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
7166 _res_comment
="static"
7168 elif test "$_libavcodec_so" = auto
; then
7170 _res_comment
="libavcodec.so is discouraged over static libavcodec"
7172 #include <libavcodec/avcodec.h>
7173 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
7175 if $_pkg_config --exists libavcodec
; then
7176 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
7177 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
7178 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7179 && _libavcodec_so
=yes
7180 elif cc_check
-lavcodec $_ld_lm ; then
7181 extra_ldflags
="$extra_ldflags -lavcodec"
7183 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
7187 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
7188 def_libavcodec_a
='#undef CONFIG_LIBAVCODEC_A'
7189 def_libavcodec_so
='#undef CONFIG_LIBAVCODEC_SO'
7190 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
7191 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
7192 test "$_libavcodec_a" = yes && def_libavcodec_a
='#define CONFIG_LIBAVCODEC_A 1'
7193 test "$_libavcodec_so" = yes && def_libavcodec_so
='#define CONFIG_LIBAVCODEC_SO 1'
7194 test "$_libavcodec_mpegaudio_hp" = yes \
7195 && def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1' \
7196 && mak_libavcodec_mpegaudio_hp
='CONFIG_MPEGAUDIO_HP = yes'
7197 if test "$_libavcodec_a" = yes ; then
7198 _codecmodules
="libavcodec(internal) $_codecmodules"
7199 elif test "$_libavcodec_so" = yes ; then
7200 _codecmodules
="libavcodec.so $_codecmodules"
7202 _nocodecmodules
="libavcodec $_nocodecmodules"
7204 echores
"$_libavcodec"
7206 echocheck
"FFmpeg libavformat"
7207 if test "$_libavformat_a" = auto
; then
7209 if test -d libavformat
&& test -f libavformat
/utils.c
; then
7211 _res_comment
="static"
7213 elif test "$_libavformat_so" = auto
; then
7216 #include <libavformat/avformat.h>
7217 #include <libavcodec/opt.h>
7218 int main(void) { av_alloc_format_context(); return 0; }
7220 if $_pkg_config --exists libavformat
; then
7221 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
7222 _ld_tmp
=$
($_pkg_config --libs libavformat
)
7223 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7224 && _libavformat_so
=yes
7225 elif cc_check
$_ld_lm -lavformat ; then
7226 extra_ldflags
="$extra_ldflags -lavformat"
7228 _res_comment
="using libavformat.so, but static libavformat is recommended"
7232 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
7233 def_libavformat_a
='#undef CONFIG_LIBAVFORMAT_A'
7234 def_libavformat_so
='#undef CONFIG_LIBAVFORMAT_SO'
7235 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
7236 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
7237 test "$_libavformat_a" = yes && def_libavformat_a
='#define CONFIG_LIBAVFORMAT_A 1'
7238 test "$_libavformat_so" = yes \
7239 && def_libavformat_so
='#define CONFIG_LIBAVFORMAT_SO 1'
7240 echores
"$_libavformat"
7242 echocheck
"FFmpeg libpostproc"
7243 if test "$_libpostproc_a" = auto
; then
7245 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
7246 _libpostproc_a
='yes'
7247 _res_comment
="static"
7249 elif test "$_libpostproc_so" = auto
; then
7252 #include <inttypes.h>
7253 #include <libpostproc/postprocess.h>
7254 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
7256 if cc_check
-lpostproc $_ld_lm ; then
7257 extra_ldflags
="$extra_ldflags -lpostproc"
7259 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
7263 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
7264 def_libpostproc_a
='#undef CONFIG_LIBPOSTPROC_A'
7265 def_libpostproc_so
='#undef CONFIG_LIBPOSTPROC_SO'
7266 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
7267 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
7268 test "$_libpostproc_a" = yes && def_libpostproc_a
='#define CONFIG_LIBPOSTPROC_A 1'
7269 test "$_libpostproc_so" = yes \
7270 && def_libpostproc_so
='#define CONFIG_LIBPOSTPROC_SO 1'
7271 echores
"$_libpostproc"
7273 echocheck
"FFmpeg libswscale"
7274 if test "$_libswscale_a" = auto
; then
7276 if test -d libswscale
&& test -f libswscale
/swscale.h
; then
7278 _res_comment
="static"
7280 elif test "$_libswscale_so" = auto
; then
7282 _res_comment
="using libswscale.so, but static libswscale is recommended"
7284 #include <libswscale/swscale.h>
7285 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
7287 if $_pkg_config --exists libswscale
; then
7288 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
7289 _ld_tmp
=$
($_pkg_config --libs libswscale
)
7290 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7291 && _libswscale_so
=yes
7292 elif cc_check
-lswscale ; then
7293 extra_ldflags
="$extra_ldflags -lswscale"
7298 def_libswscale
='#undef CONFIG_LIBSWSCALE'
7299 def_libswscale_a
='#undef CONFIG_LIBSWSCALE_A'
7300 def_libswscale_so
='#undef CONFIG_LIBSWSCALE_SO'
7301 test "$_libswscale_a" = yes ||
test "$_libswscale_so" = yes && _libswscale
=yes
7302 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
7303 test "$_libswscale_a" = yes && def_libswscale_a
='#define CONFIG_LIBSWSCALE_A 1'
7304 test "$_libswscale_so" = yes \
7305 && def_libswscale_so
='#define CONFIG_LIBSWSCALE_SO 1'
7306 echores
"$_libswscale"
7308 echocheck
"libopencore_amr narrowband"
7309 if test "$_libopencore_amrnb" = auto
; then
7310 _libopencore_amrnb
=no
7312 #include <opencore-amrnb/interf_dec.h>
7313 int main(void) { Decoder_Interface_init(); return 0; }
7315 cc_check
-lopencore-amrnb && _libopencore_amrnb
=yes
7316 if test "$_libavcodec_a" != yes ; then
7317 _libopencore_amrnb
=no
7318 _res_comment
="libavcodec (static) is required by libopencore_amrnb, sorry"
7321 if test "$_libopencore_amrnb" = yes ; then
7322 _libopencore_amr
=yes
7323 extra_ldflags
="$extra_ldflags -lopencore-amrnb"
7324 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 1'
7325 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
7326 _libavencoders
="$_libavencoders LIBOPENCORE_AMRNB_ENCODER"
7327 _codecmodules
="libopencore_amrnb $_codecmodules"
7329 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 0'
7330 _nocodecmodules
="libopencore_amrnb $_nocodecmodules"
7332 echores
"$_libopencore_amrnb"
7335 echocheck
"libopencore_amr wideband"
7336 if test "$_libopencore_amrwb" = auto
; then
7337 _libopencore_amrwb
=no
7339 #include <opencore-amrwb/dec_if.h>
7340 int main(void) { D_IF_init(); return 0; }
7342 cc_check
-lopencore-amrwb && _libopencore_amrwb
=yes
7343 if test "$_libavcodec_a" != yes ; then
7344 _libopencore_amrwb
=no
7345 _res_comment
="libavcodec (static) is required by libopencore_amrwb, sorry"
7348 if test "$_libopencore_amrwb" = yes ; then
7349 _libopencore_amr
=yes
7350 extra_ldflags
="$extra_ldflags -lopencore-amrwb"
7351 def_libopencore_amrwb
='#define CONFIG_LIBOPENCORE_AMRWB 1'
7352 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
7353 _libavencoders
="$_libavencoders LIBOPENCORE_AMRWB_DECODER"
7354 _codecmodules
="libopencore_amrwb $_codecmodules"
7356 def_libopencore_amrwb
='#define LIBOPENCORE_AMRWB 0'
7357 _nocodecmodules
="libopencore_amrwb $_nocodecmodules"
7359 echores
"$_libopencore_amrwb"
7361 echocheck
"libdv-0.9.5+"
7362 if test "$_libdv" = auto
; then
7365 #include <libdv/dv.h>
7366 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7368 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7370 if test "$_libdv" = yes ; then
7371 def_libdv
='#define CONFIG_LIBDV095 1'
7372 extra_ldflags
="$extra_ldflags -ldv"
7373 _codecmodules
="libdv $_codecmodules"
7375 def_libdv
='#undef CONFIG_LIBDV095'
7376 _nocodecmodules
="libdv $_nocodecmodules"
7382 if test "$_xvid" = auto
; then
7386 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7388 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7389 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7393 if test "$_xvid" = yes ; then
7394 def_xvid
='#define CONFIG_XVID4 1'
7395 _codecmodules
="xvid $_codecmodules"
7397 def_xvid
='#undef CONFIG_XVID4'
7398 _nocodecmodules
="xvid $_nocodecmodules"
7402 echocheck
"Xvid two pass plugin"
7403 if test "$_xvid" = yes && test "$_xvid_lavc" = auto
; then
7406 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
7408 cc_check
&& _xvid_lavc
=yes
7410 if test "$_xvid_lavc" = yes ; then
7411 def_xvid_lavc
='#define CONFIG_LIBXVID 1'
7412 _libavencoders
="$_libavencoders LIBXVID_ENCODER"
7415 def_xvid_lavc
='#define CONFIG_LIBXVID 0'
7417 echores
"$_xvid_lavc"
7421 if test "$_x264" = auto
; then
7423 #include <inttypes.h>
7426 #error We do not support old versions of x264. Get the latest from git.
7428 int main(void) { x264_encoder_open((void*)0); return 0; }
7431 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7432 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7436 if test "$_x264" = yes ; then
7437 def_x264
='#define CONFIG_X264 1'
7438 _codecmodules
="x264 $_codecmodules"
7439 test "$_x264_lavc" = auto
&& _x264_lavc
=yes
7440 if test "$_x264_lavc" = yes ; then
7441 def_x264_lavc
='#define CONFIG_LIBX264 1'
7442 libs_mplayer
="$libs_mplayer $_ld_x264"
7443 _libavencoders
="$_libavencoders LIBX264_ENCODER"
7447 def_x264
='#undef CONFIG_X264'
7448 def_x264_lavc
='#define CONFIG_LIBX264 0'
7449 _nocodecmodules
="x264 $_nocodecmodules"
7451 _res_comment
="in libavcodec: $_x264_lavc"
7455 echocheck
"libdirac"
7456 if test "$_libdirac_lavc" = auto
; then
7458 if test "$_libavcodec_a" != yes; then
7459 _res_comment
="libavcodec (static) is required by libdirac, sorry"
7462 #include <libdirac_encoder/dirac_encoder.h>
7463 #include <libdirac_decoder/dirac_parser.h>
7466 dirac_encoder_context_t enc_ctx;
7467 dirac_decoder_t *dec_handle;
7468 dirac_encoder_context_init(&enc_ctx, VIDEO_FORMAT_SD_576I50);
7469 dec_handle = dirac_decoder_init(0);
7471 dirac_decoder_close(dec_handle);
7475 if $_pkg_config --exists dirac
; then
7476 _inc_dirac
=$
($_pkg_config --silence-errors --cflags dirac
)
7477 _ld_dirac
=$
($_pkg_config --silence-errors --libs dirac
)
7478 cc_check
$_inc_dirac $_ld_dirac &&
7479 _libdirac_lavc
=yes &&
7480 extra_cflags
="$extra_cflags $_inc_dirac" &&
7481 extra_ldflags
="$extra_ldflags $_ld_dirac"
7485 if test "$_libdirac_lavc" = yes ; then
7486 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 1'
7487 _libavencoders
="$_libavencoders LIBDIRAC_ENCODER"
7488 _libavdecoders
="$_libavdecoders LIBDIRAC_DECODER"
7489 _codecmodules
="libdirac $_codecmodules"
7491 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 0'
7492 _nocodecmodules
="libdirac $_nocodecmodules"
7494 echores
"$_libdirac_lavc"
7497 echocheck
"libschroedinger"
7498 if test "$_libschroedinger_lavc" = auto
; then
7499 _libschroedinger_lavc
=no
7500 if test "$_libavcodec_a" != yes; then
7501 _res_comment
="libavcodec (static) is required by libschroedinger, sorry"
7504 #include <schroedinger/schro.h>
7505 int main(void) { schro_init(); return 0; }
7507 if $_pkg_config --exists schroedinger-1.0
; then
7508 _inc_schroedinger
=$
($_pkg_config --silence-errors --cflags schroedinger-1.0
)
7509 _ld_schroedinger
=$
($_pkg_config --silence-errors --libs schroedinger-1.0
)
7510 cc_check
$_inc_schroedinger $_ld_schroedinger &&
7511 _libschroedinger_lavc
=yes &&
7512 extra_cflags
="$extra_cflags $_inc_schroedinger" &&
7513 extra_ldflags
="$extra_ldflags $_ld_schroedinger"
7517 if test "$_libschroedinger_lavc" = yes ; then
7518 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 1'
7519 _libavencoders
="$_libavencoders LIBSCHROEDINGER_ENCODER"
7520 _libavdecoders
="$_libavdecoders LIBSCHROEDINGER_DECODER"
7521 _codecmodules
="libschroedinger $_codecmodules"
7523 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 0'
7524 _nocodecmodules
="libschroedinger $_nocodecmodules"
7526 echores
"$_libschroedinger_lavc"
7529 if test "$_libnut" = auto
; then
7533 #include <inttypes.h>
7535 nut_context_tt * nut;
7536 int main(void) { (void)nut_error(0); return 0; }
7539 cc_check
-lnut && _libnut
=yes
7542 if test "$_libnut" = yes ; then
7543 def_libnut
='#define CONFIG_LIBNUT 1'
7544 extra_ldflags
="$extra_ldflags -lnut"
7546 def_libnut
='#undef CONFIG_LIBNUT'
7550 #check must be done after libavcodec one
7552 if test "$_zr" = auto
; then
7553 #36067's seem to identify themselves as 36057PQC's, so the line
7554 #below should work for 36067's and 36057's.
7555 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7561 if test "$_zr" = yes ; then
7562 if test "$_libavcodec_a" = yes ; then
7563 def_zr
='#define CONFIG_ZR 1'
7564 _vomodules
="zr zr2 $_vomodules"
7566 _res_comment
="libavcodec (static) is required by zr, sorry"
7567 _novomodules
="zr $_novomodules"
7568 def_zr
='#undef CONFIG_ZR'
7571 def_zr
='#undef CONFIG_ZR'
7572 _novomodules
="zr zr2 $_novomodules"
7576 # mencoder requires (optional) those libs: libmp3lame
7577 if test "$_mencoder" != no
; then
7579 echocheck
"libmp3lame"
7580 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7581 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7582 if test "$_mp3lame" = auto
; then
7585 #include <lame/lame.h>
7586 int main(void) { lame_version_t lv; (void) lame_init();
7587 get_lame_version_numerical(&lv);
7590 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7592 if test "$_mp3lame" = yes ; then
7593 def_mp3lame
="#define CONFIG_MP3LAME 1"
7594 _ld_mp3lame
=-lmp3lame
7595 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7597 #include <lame/lame.h>
7598 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7600 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7602 #include <lame/lame.h>
7603 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7605 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7606 test "$_mp3lame_lavc" = auto
&& _mp3lame_lavc
=yes
7607 if test "$_mp3lame_lavc" = yes ; then
7608 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 1"
7609 _libavencoders
="$_libavencoders LIBMP3LAME_ENCODER"
7610 libs_mplayer
="$libs_mplayer $_ld_mp3lame"
7614 def_mp3lame
='#undef CONFIG_MP3LAME'
7615 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 0"
7617 _res_comment
="in libavcodec: $_mp3lame_lavc"
7620 fi # test "$_mencoder" != no
7622 echocheck
"mencoder"
7623 if test "$_mencoder" = yes ; then
7624 def_muxers
='#define CONFIG_MUXERS 1'
7626 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint, png for vf_screenshot
7627 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
7628 test "$_zlib" = yes && _libavencoders
="$_libavencoders PNG_ENCODER"
7630 def_muxers
='#define CONFIG_MUXERS 0'
7632 echores
"$_mencoder"
7635 echocheck
"UnRAR executable"
7636 if test "$_unrar_exec" = auto
; then
7638 mingw32
&& _unrar_exec
="no"
7640 if test "$_unrar_exec" = yes ; then
7641 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7643 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7645 echores
"$_unrar_exec"
7647 echocheck
"TV interface"
7648 if test "$_tv" = yes ; then
7649 def_tv
='#define CONFIG_TV 1'
7650 _inputmodules
="tv $_inputmodules"
7652 _noinputmodules
="tv $_noinputmodules"
7653 def_tv
='#undef CONFIG_TV'
7658 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7659 echocheck
"*BSD BT848 bt8xx header"
7661 for file in "machine/ioctl_bt848.h" \
7662 "dev/bktr/ioctl_bt848.h" \
7663 "dev/video/bktr/ioctl_bt848.h" \
7664 "dev/ic/bt8xx.h" ; do
7666 #include <sys/types.h>
7667 #include <sys/ioctl.h>
7669 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7673 _ioctl_bt848_h_name
="$file"
7677 if test "$_ioctl_bt848_h" = yes ; then
7678 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7679 _res_comment
="using $_ioctl_bt848_h_name"
7681 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7683 echores
"$_ioctl_bt848_h"
7685 echocheck
"*BSD ioctl_meteor.h"
7687 for file in "machine/ioctl_meteor.h" \
7688 "dev/bktr/ioctl_meteor.h" \
7689 "dev/video/bktr/ioctl_meteor.h" ; do
7691 #include <sys/types.h>
7693 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7697 _ioctl_meteor_h_name
="$file"
7701 if test "$_ioctl_meteor_h" = yes ; then
7702 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7703 _res_comment
="using $_ioctl_meteor_h_name"
7705 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7707 echores
"$_ioctl_meteor_h"
7709 echocheck
"*BSD BrookTree 848 TV interface"
7710 if test "$_tv_bsdbt848" = auto
; then
7712 if test "$_tv" = yes ; then
7714 #include <sys/types.h>
7715 $def_ioctl_meteor_h_name
7716 $def_ioctl_bt848_h_name
7717 #ifdef IOCTL_METEOR_H_NAME
7718 #include IOCTL_METEOR_H_NAME
7720 #ifdef IOCTL_BT848_H_NAME
7721 #include IOCTL_BT848_H_NAME
7724 ioctl(0, METEORSINPUT, 0);
7725 ioctl(0, TVTUNER_GETFREQ, 0);
7729 cc_check
&& _tv_bsdbt848
=yes
7732 if test "$_tv_bsdbt848" = yes ; then
7733 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7734 _inputmodules
="tv-bsdbt848 $_inputmodules"
7736 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7737 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7739 echores
"$_tv_bsdbt848"
7740 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7743 echocheck
"DirectShow TV interface"
7744 if test "$_tv_dshow" = auto
; then
7746 if test "$_tv" = yes && win32
; then
7751 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7755 cc_check
-lole32 -luuid && _tv_dshow
=yes
7758 if test "$_tv_dshow" = yes ; then
7759 _inputmodules
="tv-dshow $_inputmodules"
7760 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7761 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7763 _noinputmodules
="tv-dshow $_noinputmodules"
7764 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7766 echores
"$_tv_dshow"
7769 echocheck
"Video 4 Linux TV interface"
7770 if test "$_tv_v4l1" = auto
; then
7772 if test "$_tv" = yes && linux
; then
7775 #include <linux/videodev.h>
7776 int main(void) { return 0; }
7778 cc_check
&& _tv_v4l1
=yes
7781 if test "$_tv_v4l1" = yes ; then
7784 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7785 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7786 _inputmodules
="tv-v4l $_inputmodules"
7788 _noinputmodules
="tv-v4l1 $_noinputmodules"
7789 def_tv_v4l
='#undef CONFIG_TV_V4L'
7794 echocheck
"Video 4 Linux 2 TV interface"
7795 if test "$_tv_v4l2" = auto
; then
7797 if test "$_tv" = yes && linux
; then
7800 #include <linux/types.h>
7801 #include <linux/videodev2.h>
7802 int main(void) { return 0; }
7804 cc_check
&& _tv_v4l2
=yes
7807 if test "$_tv_v4l2" = yes ; then
7810 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7811 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7812 _inputmodules
="tv-v4l2 $_inputmodules"
7814 _noinputmodules
="tv-v4l2 $_noinputmodules"
7815 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7820 echocheck
"Radio interface"
7821 if test "$_radio" = yes ; then
7822 def_radio
='#define CONFIG_RADIO 1'
7823 _inputmodules
="radio $_inputmodules"
7824 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7827 if test "$_radio_capture" = yes ; then
7829 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7831 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7834 _noinputmodules
="radio $_noinputmodules"
7835 def_radio
='#undef CONFIG_RADIO'
7836 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7840 echocheck
"Capture for Radio interface"
7841 echores
"$_radio_capture"
7843 echocheck
"Video 4 Linux 2 Radio interface"
7844 if test "$_radio_v4l2" = auto
; then
7846 if test "$_radio" = yes && linux
; then
7849 #include <linux/types.h>
7850 #include <linux/videodev2.h>
7851 int main(void) { return 0; }
7853 cc_check
&& _radio_v4l2
=yes
7856 if test "$_radio_v4l2" = yes ; then
7857 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7859 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7861 echores
"$_radio_v4l2"
7863 echocheck
"Video 4 Linux Radio interface"
7864 if test "$_radio_v4l" = auto
; then
7866 if test "$_radio" = yes && linux
; then
7869 #include <linux/videodev.h>
7870 int main(void) { return 0; }
7872 cc_check
&& _radio_v4l
=yes
7875 if test "$_radio_v4l" = yes ; then
7876 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7878 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7880 echores
"$_radio_v4l"
7882 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7883 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7884 echocheck
"*BSD BrookTree 848 Radio interface"
7887 #include <sys/types.h>
7888 $def_ioctl_bt848_h_name
7889 #ifdef IOCTL_BT848_H_NAME
7890 #include IOCTL_BT848_H_NAME
7892 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7894 cc_check
&& _radio_bsdbt848
=yes
7895 echores
"$_radio_bsdbt848"
7896 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7898 if test "$_radio_bsdbt848" = yes ; then
7899 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7901 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7904 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7905 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7906 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7909 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7910 if test "$_pvr" = auto
; then
7912 if test "$_tv_v4l2" = yes && linux
; then
7915 #include <inttypes.h>
7916 #include <linux/types.h>
7917 #include <linux/videodev2.h>
7918 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7920 cc_check
&& _pvr
=yes
7923 if test "$_pvr" = yes ; then
7924 def_pvr
='#define CONFIG_PVR 1'
7925 _inputmodules
="pvr $_inputmodules"
7927 _noinputmodules
="pvr $_noinputmodules"
7928 def_pvr
='#undef CONFIG_PVR'
7934 if ! beos
&& test "$_ftp" = yes ; then
7935 def_ftp
='#define CONFIG_FTP 1'
7936 _inputmodules
="ftp $_inputmodules"
7938 _noinputmodules
="ftp $_noinputmodules"
7939 def_ftp
='#undef CONFIG_FTP'
7943 echocheck
"vstream client"
7944 if test "$_vstream" = auto
; then
7947 #include <vstream-client.h>
7948 void vstream_error(const char *format, ... ) {}
7949 int main(void) { vstream_start(); return 0; }
7951 cc_check
-lvstream-client && _vstream
=yes
7953 if test "$_vstream" = yes ; then
7954 def_vstream
='#define CONFIG_VSTREAM 1'
7955 _inputmodules
="vstream $_inputmodules"
7956 extra_ldflags
="$extra_ldflags -lvstream-client"
7958 _noinputmodules
="vstream $_noinputmodules"
7959 def_vstream
='#undef CONFIG_VSTREAM'
7964 echocheck
"OSD menu"
7965 if test "$_menu" = yes ; then
7966 def_menu
='#define CONFIG_MENU 1'
7967 test $_dvbin = "yes" && _menu_dvbin
=yes
7969 def_menu
='#undef CONFIG_MENU'
7975 echocheck
"Subtitles sorting"
7976 if test "$_sortsub" = yes ; then
7977 def_sortsub
='#define CONFIG_SORTSUB 1'
7979 def_sortsub
='#undef CONFIG_SORTSUB'
7984 echocheck
"XMMS inputplugin support"
7985 if test "$_xmms" = yes ; then
7986 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7987 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
7988 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
7990 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7991 _xmmslibdir
=/usr
/lib
7994 def_xmms
='#define CONFIG_XMMS 1'
7996 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
7998 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
8001 def_xmms
='#undef CONFIG_XMMS'
8006 # --------------- GUI specific tests begin -------------------
8009 if test "$_gui" = yes ; then
8011 # Required libraries
8012 if test "$_libavcodec" != yes ||
8013 ! echo $_libavdecoders |
grep -q PNG_DECODER
; then
8014 die
"The GUI requires libavcodec with PNG support (needs zlib)."
8016 test "$_freetype" = no
&& test "$_bitmap_font" = no
&& \
8017 die
"The GUI requires either FreeType or bitmap font support."
8020 test "$_x11" != yes && die
"X11 support required for GUI compilation."
8022 echocheck
"XShape extension"
8023 if test "$_xshape" = auto
; then
8026 #include <X11/Xlib.h>
8027 #include <X11/Xproto.h>
8028 #include <X11/Xutil.h>
8029 #include <X11/extensions/shape.h>
8032 char *name = ":0.0";
8035 int eventbase, errorbase;
8036 if (getenv("DISPLAY"))
8037 name=getenv("DISPLAY");
8038 wsDisplay=XOpenDisplay(name);
8039 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
8041 XCloseDisplay(wsDisplay);
8045 cc_check
-lXext && _xshape
=yes
8047 if test "$_xshape" = yes ; then
8048 def_xshape
='#define CONFIG_XSHAPE 1'
8050 die
"The GUI requires the X11 extension XShape (which was not found)."
8055 if test "$_gtk1" = no
; then
8057 echocheck
"GTK+ version"
8059 if $_pkg_config gtk
+-2.0
--exists ; then
8060 _gtk
=$
($_pkg_config gtk
+-2.0
--modversion 2>/dev
/null
)
8061 extra_cflags
="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)"
8062 libs_mplayer
="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)"
8066 if $_pkg_config glib-2.0
--exists ; then
8067 echocheck
"glib version"
8068 _glib
=$
($_pkg_config glib-2.0
--modversion 2>/dev
/null
)
8069 libs_mplayer
="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)"
8072 def_gui
='#define CONFIG_GUI 1'
8073 def_gtk2
='#define CONFIG_GTK2 1'
8076 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
8079 echo "GTK-2 devel packages were not found, trying GTK 1.2"
8084 if test "$_gtk1" = yes ; then
8085 # Check for old GTK (1.2.x)
8086 echocheck
"GTK version"
8087 if test -z "$_gtkconfig" ; then
8088 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
8089 _gtkconfig
="gtk-config"
8090 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
8091 _gtkconfig
="gtk12-config"
8093 die
"The GUI requires GTK devel packages (which were not found)."
8096 _gtk
=$
($_gtkconfig --version 2>&1)
8097 extra_cflags
="$extra_cflags $($_gtkconfig --cflags 2>&1)"
8098 libs_mplayer
="$libs_mplayer $($_gtkconfig --libs 2>&1)"
8099 echores
"$_gtk (using $_gtkconfig)"
8102 echocheck
"glib version"
8103 if test -z "$_glibconfig" ; then
8104 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
8105 _glibconfig
="glib-config"
8106 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
8107 _glibconfig
="glib12-config"
8109 die
"The GUI requires GLIB devel packages (which were not found)"
8112 _glib
=$
($_glibconfig --version 2>&1)
8113 libs_mplayer
="$libs_mplayer $($_glibconfig --libs 2>&1)"
8114 echores
"$_glib (using $_glibconfig)"
8116 def_gui
='#define CONFIG_GUI 1'
8117 def_gtk2
='#undef CONFIG_GTK2'
8122 libs_mplayer
="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
8123 def_gui
='#define CONFIG_GUI 1'
8124 def_gtk2
='#undef CONFIG_GTK2'
8127 else #if test "$_gui"
8128 def_gui
='#undef CONFIG_GUI'
8129 def_gtk2
='#undef CONFIG_GTK2'
8131 # --------------- GUI specific tests end -------------------
8134 if test "$_charset" != "noconv" ; then
8135 def_charset
="#define MSG_CHARSET \"$_charset\""
8137 def_charset
="#undef MSG_CHARSET"
8141 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
8142 echocheck
"iconv program"
8143 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
8144 if test "$?" -ne 0 ; then
8146 echo "No working iconv program found, use "
8147 echo "--charset=UTF-8 to continue anyway."
8148 echo "If you also have problems with iconv library functions use --charset=noconv."
8149 echo "Messages in the GTK-2 interface will be broken then."
8156 #############################################################################
8158 echocheck
"automatic gdb attach"
8159 if test "$_crash_debug" = yes ; then
8160 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
8162 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
8165 echores
"$_crash_debug"
8167 echocheck
"compiler support for noexecstack"
8169 int main(void) { return 0; }
8171 if cc_check
-Wl,-z,noexecstack
; then
8172 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
8179 # Dynamic linking flags
8180 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
8182 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
8183 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
8184 _ld_dl_dynamic
='-rdynamic'
8187 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
8188 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
8189 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
8191 def_debug
='#undef MP_DEBUG'
8192 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
8195 echocheck
"joystick"
8196 def_joystick
='#undef CONFIG_JOYSTICK'
8197 if test "$_joystick" = yes ; then
8199 # TODO add some check
8200 def_joystick
='#define CONFIG_JOYSTICK 1'
8203 _res_comment
="unsupported under $system_name"
8206 echores
"$_joystick"
8209 if test "$_lirc" = auto
; then
8212 #include <lirc/lirc_client.h>
8213 int main(void) { return 0; }
8215 cc_check
-llirc_client && _lirc
=yes
8217 if test "$_lirc" = yes ; then
8218 def_lirc
='#define CONFIG_LIRC 1'
8219 libs_mplayer
="$libs_mplayer -llirc_client"
8221 def_lirc
='#undef CONFIG_LIRC'
8226 if test "$_lircc" = auto
; then
8229 #include <lirc/lircc.h>
8230 int main(void) { return 0; }
8232 cc_check
-llircc && _lircc
=yes
8234 if test "$_lircc" = yes ; then
8235 def_lircc
='#define CONFIG_LIRCC 1'
8236 libs_mplayer
="$libs_mplayer -llircc"
8238 def_lircc
='#undef CONFIG_LIRCC'
8243 # Detect maemo development platform libraries availability (http://www.maemo.org),
8244 # they are used when run on Nokia 770|8x0
8245 echocheck
"maemo (Nokia 770|8x0)"
8246 if test "$_maemo" = auto
; then
8249 #include <libosso.h>
8250 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
8252 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
8254 if test "$_maemo" = yes ; then
8255 def_maemo
='#define CONFIG_MAEMO 1'
8256 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
8257 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
8259 def_maemo
='#undef CONFIG_MAEMO'
8264 #############################################################################
8266 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
8267 # the OMF format needs to come after the 'extern symbol prefix' check, which
8270 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
8273 # linker paths should be the same for mencoder and mplayer
8275 for I
in $libs_mplayer ; do
8276 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
8277 if test -z "$_tmp" ; then
8278 extra_ldflags
="$extra_ldflags $I"
8280 _ld_tmp
="$_ld_tmp $I"
8283 libs_mplayer
=$_ld_tmp
8286 #############################################################################
8287 # 64 bit file offsets?
8288 if test "$_largefiles" = yes || freebsd
; then
8289 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8290 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
8291 # dvdread support requires this (for off64_t)
8292 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
8296 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
8298 # This must be the last test to be performed. Any other tests following it
8299 # could fail due to linker errors. libdvdnavmini is intentionally not linked
8300 # against libdvdread (to permit MPlayer to use its own copy of the library).
8301 # So any compilation using the flags added here but not linking against
8302 # libdvdread can fail.
8303 echocheck
"DVD support (libdvdnav)"
8305 if test "$_dvdnav" = auto
; then
8306 if test "$_dvdread_internal" = yes ; then
8309 _res_comment
="internal"
8311 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
8314 if test "$_dvdnav" = auto
; then
8316 #include <inttypes.h>
8317 #include <dvdnav/dvdnav.h>
8318 int main(void) { dvdnav_t *dvd=0; return 0; }
8321 _dvdnavdir
=$
($_dvdnavconfig --cflags)
8322 _dvdnavlibs
=$
($_dvdnavconfig --libs)
8323 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
8325 if test "$_dvdnav" = yes ; then
8327 def_dvdnav
='#define CONFIG_DVDNAV 1'
8328 if test "$dvdnav_internal" = yes ; then
8329 cflags_libdvdnav
="-Ilibdvdnav"
8330 _inputmodules
="dvdnav(internal) $_inputmodules"
8332 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
8333 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
8334 _inputmodules
="dvdnav $_inputmodules"
8337 def_dvdnav
='#undef CONFIG_DVDNAV'
8338 _noinputmodules
="dvdnav $_noinputmodules"
8342 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
8343 # Read dvdnav comment above.
8345 #############################################################################
8346 echo "Creating config.mak"
8347 cat > config.mak
<< EOF
8348 # -------- Generated by configure -----------
8350 # Ensure that locale settings do not interfere with shell commands.
8353 CONFIGURATION = $_configuration
8356 DOC_LANGS = $language_doc
8357 DOC_LANG_ALL = $doc_lang_all
8358 MAN_LANGS = $language_man
8359 MAN_LANG_ALL = $man_lang_all
8361 prefix = \$(DESTDIR)$_prefix
8362 BINDIR = \$(DESTDIR)$_bindir
8363 DATADIR = \$(DESTDIR)$_datadir
8364 LIBDIR = \$(DESTDIR)$_libdir
8365 MANDIR = \$(DESTDIR)$_mandir
8366 CONFDIR = \$(DESTDIR)$_confdir
8375 INSTALLSTRIP = $_install_strip
8379 CFLAGS = $CFLAGS $extra_cflags
8380 OPTFLAGS = $CFLAGS $extra_cflags
8381 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
8382 CFLAGS_DHAHELPER = $cflags_dhahelper
8383 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
8384 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
8385 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
8386 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
8387 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
8388 CFLAGS_STACKREALIGN = $cflags_stackrealign
8389 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
8390 CFLAGS_TREMOR_LOW = $cflags_tremor_low
8391 YASMFLAGS = $YASMFLAGS
8393 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
8394 EXTRALIBS_MPLAYER = $libs_mplayer
8395 EXTRALIBS_MENCODER = $libs_mencoder
8397 DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&,"
8399 MPDEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
8400 MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.hh,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &,"
8403 HELP_FILE = $_mp_help
8411 $(echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/')
8413 MENCODER = $_mencoder
8416 NEED_GETTIMEOFDAY = $_need_gettimeofday
8417 NEED_GLOB = $_need_glob
8418 NEED_MMAP = $_need_mmap
8419 NEED_SETENV = $_need_setenv
8420 NEED_SHMEM = $_need_shmem
8421 NEED_STRSEP = $_need_strsep
8422 NEED_SWAB = $_need_swab
8423 NEED_VSSCANF = $_need_vsscanf
8431 APPLE_IR = $_apple_ir
8432 APPLE_REMOTE = $_apple_remote
8434 AUDIO_INPUT = $_audio_input
8435 BITMAP_FONT = $_bitmap_font
8440 COREAUDIO = $_coreaudio
8441 COREVIDEO = $_corevideo
8445 DIRECT3D = $_direct3d
8446 DIRECTFB = $_directfb
8450 DVDNAV_INTERNAL = $dvdnav_internal
8452 DVDREAD_INTERNAL = $_dvdread_internal
8458 FAAD_INTERNAL = $_faad_internal
8459 FASTMEMCPY = $_fastmemcpy
8460 $mak_hardcoded_tables
8461 $mak_libavcodec_mpegaudio_hp
8463 FREETYPE = $_freetype
8468 GL_WIN32 = $_gl_win32
8470 MATRIXVIEW = $matrixview
8473 GUI_WIN32 = $_gui_win32
8474 HAVE_POSIX_SELECT = $_posix_select
8475 HAVE_SYS_MMAN_H = $_mman
8478 JOYSTICK = $_joystick
8483 LIBA52_INTERNAL = $_liba52_internal
8485 LIBASS_INTERNAL = $ass_internal
8489 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
8493 LIBMENU_DVBIN = $_menu_dvbin
8494 LIBMPEG2 = $_libmpeg2
8495 LIBNEMESI = $_nemesi
8497 LIBSMBCLIENT = $_smb
8498 LIBTHEORA = $_theora
8501 MACOSX_BUNDLE = $_macosx_bundle
8502 MACOSX_FINDER = $_macosx_finder
8508 MUSEPACK = $_musepack
8510 NATIVE_RTSP = $_native_rtsp
8514 PE_EXECUTABLE = $_pe_executable
8517 PRIORITY = $_priority
8521 QTX_CODECS_WIN32 = $_qtx_codecs_win32
8522 QTX_EMULATION = $_qtx_emulation
8525 RADIO_CAPTURE=$_radio_capture
8526 REAL_CODECS = $_real
8530 STREAM_CACHE = $_stream_cache
8531 SGIAUDIO = $_sgiaudio
8532 SUNAUDIO = $_sunaudio
8538 TREMOR_INTERNAL = $_tremor_internal
8540 TV_BSDBT848 = $_tv_bsdbt848
8541 TV_DSHOW = $_tv_dshow
8546 UNRAR_EXEC = $_unrar_exec
8552 VIDIX_PCIDB = $_vidix_pcidb_val
8553 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
8554 VIDIX_IVTV=$_vidix_drv_ivtv
8555 VIDIX_MACH64=$_vidix_drv_mach64
8556 VIDIX_MGA=$_vidix_drv_mga
8557 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
8558 VIDIX_NVIDIA=$_vidix_drv_nvidia
8559 VIDIX_PM2=$_vidix_drv_pm2
8560 VIDIX_PM3=$_vidix_drv_pm3
8561 VIDIX_RADEON=$_vidix_drv_radeon
8562 VIDIX_RAGE128=$_vidix_drv_rage128
8563 VIDIX_S3=$_vidix_drv_s3
8564 VIDIX_SH_VEU=$_vidix_drv_sh_veu
8565 VIDIX_SIS=$_vidix_drv_sis
8566 VIDIX_UNICHROME=$_vidix_drv_unichrome
8570 WIN32DLL = $_win32dll
8571 WIN32WAVEOUT = $_win32waveout
8572 WIN32_EMULATION = $_win32_emulation
8573 WINVIDIX = $winvidix
8576 XANIM_CODECS = $_xanim
8578 XMMS_PLUGINS = $_xmms
8584 YUV4MPEG = $_yuv4mpeg
8588 LIBAVUTIL = $_libavutil
8589 LIBAVUTIL_A = $_libavutil_a
8590 LIBAVUTIL_SO = $_libavutil_so
8591 LIBAVCODEC = $_libavcodec
8592 LIBAVCODEC_A = $_libavcodec_a
8593 LIBAVCODEC_SO = $_libavcodec_so
8594 LIBAVFORMAT = $_libavformat
8595 LIBAVFORMAT_A = $_libavformat_a
8596 LIBAVFORMAT_SO = $_libavformat_so
8597 LIBPOSTPROC = $_libpostproc
8598 LIBPOSTPROC_A = $_libpostproc_a
8599 LIBPOSTPROC_SO = $_libpostproc_so
8600 LIBSWSCALE = $_libswscale
8601 LIBSWSCALE_A = $_libswscale_a
8602 LIBSWSCALE_SO = $_libswscale_so
8605 HOSTCFLAGS=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3
8614 LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF)
8615 FULLNAME=\$(NAME)\$(BUILDSUF)
8617 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8620 CONFIG_FFT_MMX=$fft_mmx
8629 CONFIG_LIBDIRAC_DECODER=$_libdirac_lavc
8630 CONFIG_LIBDIRAC_ENCODER=$_libdirac_lavc
8631 CONFIG_LIBFAAC_ENCODER=$_faac_lavc
8632 CONFIG_LIBMP3LAME_ENCODER=$_mp3lame_lavc
8633 CONFIG_LIBOPENCORE_AMRNB_DECODER=$_libopencore_amrnb
8634 CONFIG_LIBOPENCORE_AMRNB_ENCODER=$_libopencore_amrnb
8635 CONFIG_LIBOPENCORE_AMRWB_DECODER=$_libopencore_amrwb
8636 OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
8637 OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
8638 CONFIG_LIBSCHROEDINGER_DECODER=$_libschroedinger_lavc
8639 CONFIG_LIBSCHROEDINGER_ENCODER=$_libschroedinger_lavc
8640 CONFIG_LIBVORBIS_ENCODER=$_libvorbis
8641 CONFIG_LIBX264_ENCODER=$_x264_lavc
8642 CONFIG_LIBXVID_ENCODER=$_xvid_lavc
8643 CONFIG_MLIB = $_mlib
8644 CONFIG_MUXERS=$_mencoder
8645 CONFIG_POSTPROC = yes
8646 # Prevent building libavcodec/imgresample.c with conflicting symbols
8648 CONFIG_VDPAU=$_vdpau
8652 HAVE_PTHREADS = $_pthreads
8654 HAVE_W32THREADS = $_w32threads
8655 HAVE_YASM = $_have_yasm
8657 $(echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8658 $(echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8659 $(echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8660 $(echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8661 $(echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8662 $(echo $_libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8663 $(echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8666 #############################################################################
8668 ff_config_enable
() {
8670 test -z "$_nprefix" && _nprefix
='CONFIG'
8672 if $
(echo $2 |
grep -q -E "(^| )$part($| )"); then
8673 echo "#define ${_nprefix}_$part 1"
8675 echo "#define ${_nprefix}_$part 0"
8680 echo "Creating config.h"
8682 /*----------------------------------------------------------------------------
8683 ** This file has been automatically generated by configure any changes in it
8684 ** will be lost when you run configure again.
8685 ** Instead of modifying definitions here, use the --enable/--disable options
8686 ** of the configure script! See ./configure --help for details.
8687 *---------------------------------------------------------------------------*/
8689 #ifndef MPLAYER_CONFIG_H
8690 #define MPLAYER_CONFIG_H
8692 /* Undefine this if you do not want to select mono audio (left or right)
8693 with a stereo MPEG layer 2/3 audio stream. The command line option
8694 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8695 right-only), with 0 being the default.
8697 #define CONFIG_FAKE_MONO 1
8699 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
8700 #define MAX_OUTBURST 65536
8702 /* set up audio OUTBURST. Do not change this! */
8703 #define OUTBURST 512
8705 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8707 #undef FAST_OSD_TABLE
8709 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8710 #define MPEG12_POSTPROC 1
8711 #define ATTRIBUTE_ALIGNED_MAX 16
8715 #define CONFIGURATION "$_configuration"
8717 #define MPLAYER_DATADIR "$_datadir"
8718 #define MPLAYER_CONFDIR "$_confdir"
8719 #define MPLAYER_LIBDIR "$_libdir"
8721 /* definitions needed by included libraries */
8722 #define HAVE_INTTYPES_H 1
8723 /* libmpeg2 + FFmpeg */
8726 #define HAVE_ERRNO_H 1
8727 /* libdvdcss + libdvdread */
8728 #define HAVE_LIMITS_H 1
8729 /* libdvdcss + libfaad2 */
8730 #define HAVE_UNISTD_H 1
8731 /* libfaad2 + libdvdread */
8732 #define STDC_HEADERS 1
8733 #define HAVE_MEMCPY 1
8735 #define HAVE_STRING_H 1
8736 #define HAVE_STRINGS_H 1
8737 #define HAVE_SYS_STAT_H 1
8738 #define HAVE_SYS_TYPES_H 1
8740 #define READ_CACHE_TRACE 0
8742 #define HAVE_DLFCN_H 1
8746 /* system headers */
8748 $def_alsa_asoundlib_h
8752 $def_mman_has_map_failed
8754 $def_sys_asoundlib_h
8755 $def_sys_soundcard_h
8762 /* system functions */
8793 /* system-specific features */
8807 $def_restrict_keyword
8812 /* configurable options */
8816 $def_dynamic_plugins
8818 $def_hardcoded_tables
8820 $def_runtime_cpudetection
8828 #define __CPU__ $iproc
8831 $(ff_config_enable "$_arch_all" "$_arch" "ARCH")
8832 $(ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE")
8836 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8837 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8857 /* codec libraries */
8862 $def_liba52_internal
8870 $def_mp3lame_preset_medium
8893 #define WIN32_PATH "$_win32codecsdir"
8897 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8906 /* Audio output drivers */
8921 $def_ossaudio_devdsp
8922 $def_ossaudio_devmixer
8935 $def_ioctl_bt848_h_name
8936 $def_ioctl_meteor_h_name
8978 $def_sockaddr_storage
8993 $def_directfb_version
9031 $def_vidix_drv_cyberblade
9033 $def_vidix_drv_mach64
9035 $def_vidix_drv_mga_crtc2
9036 $def_vidix_drv_nvidia
9038 $def_vidix_drv_radeon
9039 $def_vidix_drv_rage128
9041 $def_vidix_drv_sh_veu
9043 $def_vidix_drv_unichrome
9077 #define CONFIG_DECODERS 1
9078 #define CONFIG_ENCODERS 1
9079 #define CONFIG_DEMUXERS 1
9089 $def_libavcodec_mpegaudio_hp
9100 #define CONFIG_FASTDIV 0
9101 #define CONFIG_FFSERVER 0
9102 #define CONFIG_GPL 1
9103 #define CONFIG_GRAY 0
9104 #define CONFIG_LIBVORBIS 0
9105 #define CONFIG_POWERPC_PERF 0
9106 #define CONFIG_SMALL 0
9107 #define CONFIG_SWSCALE 1
9108 #define CONFIG_SWSCALE_ALPHA 1
9110 #if defined(HAVE_AF_INET6) && (!defined(_WIN32) || defined(__CYGWIN__))
9111 #define CONFIG_IPV6 1
9113 #define CONFIG_IPV6 0
9116 #define HAVE_ATTRIBUTE_PACKED 1
9117 #define HAVE_GETHRTIME 0
9118 #define HAVE_INLINE_ASM 0
9119 #define HAVE_LDBRX 0
9120 #define HAVE_POLL_H 1
9121 #define HAVE_PPC4XX 0
9122 #define HAVE_SETMODE 0
9123 #define HAVE_SYS_SELECT_H 0
9124 #define HAVE_VIRTUALALLOC 0
9126 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
9127 #define CONFIG_AANDCT 1
9128 #define CONFIG_FFT 1
9129 #define CONFIG_GOLOMB 1
9130 #define CONFIG_LPC 1
9131 #define CONFIG_MDCT 1
9132 #define CONFIG_RDFT 1
9134 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
9137 #define HAVE_EBP_AVAILABLE 1
9139 #define HAVE_EBP_AVAILABLE 0
9142 #define FFMPEG_CONFIGURATION "--enable-gpl --enable-postproc"
9143 #define FFMPEG_LICENSE "GPL version 2 or later"
9145 /* External libraries used through libavcodec. */
9148 $def_libopencore_amrnb
9149 $def_libopencore_amrwb
9151 $def_libschroedinger_lavc
9156 $(ff_config_enable "$_libavdecoders_all" "$_libavdecoders")
9157 $(ff_config_enable "$_libavencoders_all" "$_libavencoders")
9158 $(ff_config_enable "$_libavparsers_all" "$_libavparsers")
9159 $(ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers")
9160 $(ff_config_enable "$_libavmuxers_all" "$_libavmuxers")
9161 $(ff_config_enable "$_libavprotocols_all" "$_libavprotocols")
9162 $(ff_config_enable "$_libavbsfs_all" "$_libavbsfs")
9164 #define CONFIG_H263_VAAPI_HWACCEL 0
9165 #define CONFIG_MPEG2_VAAPI_HWACCEL 0
9166 #define CONFIG_MPEG4_VAAPI_HWACCEL 0
9167 #define CONFIG_H264_VAAPI_HWACCEL 0
9168 #define CONFIG_VC1_VAAPI_HWACCEL 0
9169 #define CONFIG_WMV3_VAAPI_HWACCEL 0
9171 #endif /* MPLAYER_CONFIG_H */
9174 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
9175 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
9177 #############################################################################
9181 Config files successfully generated by ./configure $_configuration !
9183 Install prefix: $_prefix
9184 Data directory: $_datadir
9185 Config direct.: $_confdir
9187 Byte order: $_byte_order
9188 Optimizing for: $_optimizing
9191 Messages/GUI: $language_msg
9192 Manual pages: $language_man
9193 Documentation: $language_doc
9195 Enabled optional drivers:
9196 Input: $_inputmodules
9197 Codecs: $_codecmodules
9198 Audio output: $_aomodules
9199 Video output: $_vomodules
9201 Disabled optional drivers:
9202 Input: $_noinputmodules
9203 Codecs: $_nocodecmodules
9204 Audio output: $_noaomodules
9205 Video output: $_novomodules
9207 'config.h' and 'config.mak' contain your configuration options.
9208 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
9209 compile *** DO NOT REPORT BUGS if you tweak these files ***
9211 'make' will now compile MPlayer and 'make install' will install it.
9212 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
9217 if test "$_mtrr" = yes ; then
9218 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
9224 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
9225 operating system ($system_name). You may encounter a few files that cannot
9226 be played due to missing open source video/audio codec support.
9233 Check $TMPLOG if you wonder why an autodetection failed (make sure
9234 development headers/packages are installed).
9236 NOTE: The --enable-* parameters unconditionally force options on, completely
9237 skipping autodetection. This behavior is unlike what you may be used to from
9238 autoconf-based configure scripts that can decide to override you. This greater
9239 level of control comes at a price. You may have to provide the correct compiler
9240 and linker flags yourself.
9241 If you used one of these options (except --enable-gui and similar ones that
9242 turn on internal features) and experience a compilation or linking failure,
9243 make sure you have passed the necessary compiler/linker flags to configure.
9245 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
9249 if test "$_warn_CFLAGS" = yes; then
9252 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
9255 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
9257 It is strongly recommended to let MPlayer choose the correct CFLAGS!
9258 To do so, execute 'CFLAGS= ./configure <options>'
9264 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"