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 --disable-liba52-internal disable builtin liba52 [autodetect]
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-big-endian force byte order to big-endian [autodetect]
479 --enable-debug[=1-3] compile-in debugging information [disable]
480 --enable-profile compile-in profiling information [disable]
481 --disable-sighandler disable sighandler for crashes [enable]
482 --enable-crash-debug enable automatic gdb attach on crash [disable]
483 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
485 Use these options if autodetection fails:
486 --extra-cflags=FLAGS extra CFLAGS
487 --extra-ldflags=FLAGS extra LDFLAGS
488 --extra-libs=FLAGS extra linker flags
489 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
490 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
491 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
493 --with-freetype-config=PATH path to freetype-config
494 --with-fribidi-config=PATH path to fribidi-config
495 --with-glib-config=PATH path to glib*-config
496 --with-gtk-config=PATH path to gtk*-config
497 --with-sdl-config=PATH path to sdl*-config
498 --with-dvdnav-config=PATH path to dvdnav-config
499 --with-dvdread-config=PATH path to dvdread-config
501 This configure script is NOT autoconf-based, even though its output is similar.
502 It will try to autodetect all configuration options. If you --enable an option
503 it will be forcefully turned on, skipping autodetection. This can break
504 compilation, so you need to know what you are doing.
509 # GOTCHA: the variables below defines the default behavior for autodetection
510 # and have - unless stated otherwise - at least 2 states : yes no
511 # If autodetection is available then the third state is: auto
534 test "$CC" && _cc
="$CC"
538 _runtime_cpudetection
=no
544 _libopencore_amrnb
=auto
545 _libopencore_amrwb
=auto
547 _libavdecoders_all
=$
(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
548 _libavdecoders
=$
(echo $_libavdecoders_all |
sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s
/MPEG4AAC_DECODER
//)
549 _libavencoders_all
=$
(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
550 _libavencoders
=$
(echo $_libavencoders_all |
sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s
/AAC_ENCODER
//)
551 _libavparsers_all
=$
(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
552 _libavparsers
=$_libavparsers_all
553 _libavbsfs_all
=$
(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
554 _libavbsfs
=$_libavbsfs_all
555 _libavdemuxers_all
=$
(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
556 _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
//)
557 _libavmuxers_all
=$
(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
558 _libavmuxers
=$
(echo $_libavmuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s
/RTP_MUXER
//)
559 _libavprotocols_all
=$
(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
560 _libavprotocols
=$_libavprotocols_all
568 _libavcodec_mpegaudio_hp
=yes
577 _xvmc
=no
#auto when complete
632 _liba52_internal
=auto
645 _dvdnavconfig
=dvdnav-config
646 _dvdreadconfig
=dvdread-config
648 _dvdread_internal
=auto
649 _libdvdcss_internal
=auto
660 _mlib
=no
#broken, thus disabled
692 _libschroedinger_lavc
=auto
737 _freetypeconfig
='freetype-config'
739 _fribidiconfig
='fribidi-config'
754 def_dos_paths
="#define HAVE_DOS_PATHS 0"
755 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
756 def_priority
="#undef CONFIG_PRIORITY"
757 def_pthread_cache
="#undef PTHREAD_CACHE"
765 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
768 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
771 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
774 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
777 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
780 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
783 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
786 _win32codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
789 _xanimcodecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
792 _realcodecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
796 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
799 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
803 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
805 --with-freetype-config=*)
806 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
808 --with-fribidi-config=*)
809 _fribidiconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
812 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
814 --with-glib-config=*)
815 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
817 --with-dvdnav-config=*)
818 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
820 --with-dvdread-config=*)
821 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
825 extra_cflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
828 extra_ldflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
831 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
833 --extra-libs-mplayer=*)
834 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
836 --extra-libs-mencoder=*)
837 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
841 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
844 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
847 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
850 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
853 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
856 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
859 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
862 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
865 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
868 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
871 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
874 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
877 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
880 language
=$
(echo $ac_option | cut
-d '=' -f 2)
899 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
904 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
905 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
906 --enable-cross-compile) _cross_compile
=yes ;;
907 --disable-cross-compile) _cross_compile
=no
;;
908 --enable-mencoder) _mencoder
=yes ;;
909 --disable-mencoder) _mencoder
=no
;;
910 --enable-mplayer) _mplayer
=yes ;;
911 --disable-mplayer) _mplayer
=no
;;
912 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
913 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
914 --enable-x11) _x11
=yes ;;
915 --disable-x11) _x11
=no
;;
916 --enable-xshape) _xshape
=yes ;;
917 --disable-xshape) _xshape
=no
;;
918 --enable-xss) _xss
=yes ;;
919 --disable-xss) _xss
=no
;;
920 --enable-xv) _xv
=yes ;;
921 --disable-xv) _xv
=no
;;
922 --enable-xvmc) _xvmc
=yes ;;
923 --disable-xvmc) _xvmc
=no
;;
924 --enable-vdpau) _vdpau
=yes ;;
925 --disable-vdpau) _vdpau
=no
;;
926 --enable-sdl) _sdl
=yes ;;
927 --disable-sdl) _sdl
=no
;;
928 --enable-kva) _kva
=yes ;;
929 --disable-kva) _kva
=no
;;
930 --enable-direct3d) _direct3d
=yes ;;
931 --disable-direct3d) _direct3d
=no
;;
932 --enable-directx) _directx
=yes ;;
933 --disable-directx) _directx
=no
;;
934 --enable-win32waveout) _win32waveout
=yes ;;
935 --disable-win32waveout) _win32waveout
=no
;;
936 --enable-nas) _nas
=yes ;;
937 --disable-nas) _nas
=no
;;
938 --enable-png) _png
=yes ;;
939 --disable-png) _png
=no
;;
940 --enable-mng) _mng
=yes ;;
941 --disable-mng) _mng
=no
;;
942 --enable-jpeg) _jpeg
=yes ;;
943 --disable-jpeg) _jpeg
=no
;;
944 --enable-libopenjpeg) libopenjpeg
=yes ;;
945 --disable-libopenjpeg)libopenjpeg
=no
;;
946 --enable-pnm) _pnm
=yes ;;
947 --disable-pnm) _pnm
=no
;;
948 --enable-md5sum) _md5sum
=yes ;;
949 --disable-md5sum) _md5sum
=no
;;
950 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
951 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
952 --enable-gif) _gif
=yes ;;
953 --disable-gif) _gif
=no
;;
954 --enable-gl) _gl
=yes ;;
955 --disable-gl) _gl
=no
;;
956 --enable-matrixview) matrixview
=yes ;;
957 --disable-matrixview) matrixview
=no
;;
958 --enable-ggi) _ggi
=yes ;;
959 --disable-ggi) _ggi
=no
;;
960 --enable-ggiwmh) _ggiwmh
=yes ;;
961 --disable-ggiwmh) _ggiwmh
=no
;;
962 --enable-aa) _aa
=yes ;;
963 --disable-aa) _aa
=no
;;
964 --enable-caca) _caca
=yes ;;
965 --disable-caca) _caca
=no
;;
966 --enable-svga) _svga
=yes ;;
967 --disable-svga) _svga
=no
;;
968 --enable-vesa) _vesa
=yes ;;
969 --disable-vesa) _vesa
=no
;;
970 --enable-fbdev) _fbdev
=yes ;;
971 --disable-fbdev) _fbdev
=no
;;
972 --enable-dvb) _dvb
=yes ;;
973 --disable-dvb) _dvb
=no
;;
974 --enable-dvbhead) _dvbhead
=yes ;;
975 --disable-dvbhead) _dvbhead
=no
;;
976 --enable-dxr2) _dxr2
=yes ;;
977 --disable-dxr2) _dxr2
=no
;;
978 --enable-dxr3) _dxr3
=yes ;;
979 --disable-dxr3) _dxr3
=no
;;
980 --enable-ivtv) _ivtv
=yes ;;
981 --disable-ivtv) _ivtv
=no
;;
982 --enable-v4l2) _v4l2
=yes ;;
983 --disable-v4l2) _v4l2
=no
;;
984 --enable-iconv) _iconv
=yes ;;
985 --disable-iconv) _iconv
=no
;;
986 --enable-langinfo) _langinfo
=yes ;;
987 --disable-langinfo) _langinfo
=no
;;
988 --enable-rtc) _rtc
=yes ;;
989 --disable-rtc) _rtc
=no
;;
990 --enable-libdv) _libdv
=yes ;;
991 --disable-libdv) _libdv
=no
;;
992 --enable-ossaudio) _ossaudio
=yes ;;
993 --disable-ossaudio) _ossaudio
=no
;;
994 --enable-arts) _arts
=yes ;;
995 --disable-arts) _arts
=no
;;
996 --enable-esd) _esd
=yes ;;
997 --disable-esd) _esd
=no
;;
998 --enable-pulse) _pulse
=yes ;;
999 --disable-pulse) _pulse
=no
;;
1000 --enable-jack) _jack
=yes ;;
1001 --disable-jack) _jack
=no
;;
1002 --enable-openal) _openal
=yes ;;
1003 --disable-openal) _openal
=no
;;
1004 --enable-dart) _dart
=yes ;;
1005 --disable-dart) _dart
=no
;;
1006 --enable-mad) _mad
=yes ;;
1007 --disable-mad) _mad
=no
;;
1008 --enable-mp3lame) _mp3lame
=yes ;;
1009 --disable-mp3lame) _mp3lame
=no
;;
1010 --enable-mp3lame-lavc) _mp3lame_lavc
=yes ;;
1011 --disable-mp3lame-lavc) _mp3lame_lavc
=no
;;
1012 --enable-toolame) _toolame
=yes ;;
1013 --disable-toolame) _toolame
=no
;;
1014 --enable-twolame) _twolame
=yes ;;
1015 --disable-twolame) _twolame
=no
;;
1016 --enable-libcdio) _libcdio
=yes ;;
1017 --disable-libcdio) _libcdio
=no
;;
1018 --enable-liblzo) _liblzo
=yes ;;
1019 --disable-liblzo) _liblzo
=no
;;
1020 --enable-libvorbis) _libvorbis
=yes ;;
1021 --disable-libvorbis) _libvorbis
=no
;;
1022 --enable-speex) _speex
=yes ;;
1023 --disable-speex) _speex
=no
;;
1024 --enable-tremor) _tremor
=yes ;;
1025 --disable-tremor) _tremor
=no
;;
1026 --enable-tremor-internal) _tremor_internal
=yes ;;
1027 --disable-tremor-internal) _tremor_internal
=no
;;
1028 --enable-tremor-low) _tremor_low
=yes ;;
1029 --disable-tremor-low) _tremor_low
=no
;;
1030 --enable-theora) _theora
=yes ;;
1031 --disable-theora) _theora
=no
;;
1032 --enable-mp3lib) _mp3lib
=yes ;;
1033 --disable-mp3lib) _mp3lib
=no
;;
1034 --enable-liba52-internal) _liba52_internal
=yes ;;
1035 --disable-liba52-internal) _liba52_internal
=no
;;
1036 --enable-liba52) _liba52
=yes ;;
1037 --disable-liba52) _liba52
=no
;;
1038 --enable-libdca) _libdca
=yes ;;
1039 --disable-libdca) _libdca
=no
;;
1040 --enable-libmpeg2) _libmpeg2
=yes ;;
1041 --disable-libmpeg2) _libmpeg2
=no
;;
1042 --enable-musepack) _musepack
=yes ;;
1043 --disable-musepack) _musepack
=no
;;
1044 --enable-faad) _faad
=yes ;;
1045 --disable-faad) _faad
=no
;;
1046 --enable-faad-internal) _faad_internal
=yes ;;
1047 --disable-faad-internal) _faad_internal
=no
;;
1048 --enable-faad-fixed) _faad_fixed
=yes ;;
1049 --disable-faad-fixed) _faad_fixed
=no
;;
1050 --enable-faac) _faac
=yes ;;
1051 --disable-faac) _faac
=no
;;
1052 --enable-faac-lavc) _faac_lavc
=yes ;;
1053 --disable-faac-lavc) _faac_lavc
=no
;;
1054 --enable-ladspa) _ladspa
=yes ;;
1055 --disable-ladspa) _ladspa
=no
;;
1056 --enable-libbs2b) _libbs2b
=yes ;;
1057 --disable-libbs2b) _libbs2b
=no
;;
1058 --enable-xmms) _xmms
=yes ;;
1059 --disable-xmms) _xmms
=no
;;
1060 --enable-vcd) _vcd
=yes ;;
1061 --disable-vcd) _vcd
=no
;;
1062 --enable-dvdread) _dvdread
=yes ;;
1063 --disable-dvdread) _dvdread
=no
;;
1064 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1065 --disable-dvdread-internal) _dvdread_internal
=no
;;
1066 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1067 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1068 --enable-dvdnav) _dvdnav
=yes ;;
1069 --disable-dvdnav) _dvdnav
=no
;;
1070 --enable-xanim) _xanim
=yes ;;
1071 --disable-xanim) _xanim
=no
;;
1072 --enable-real) _real
=yes ;;
1073 --disable-real) _real
=no
;;
1074 --enable-live) _live
=yes ;;
1075 --disable-live) _live
=no
;;
1076 --enable-nemesi) _nemesi
=yes ;;
1077 --disable-nemesi) _nemesi
=no
;;
1078 --enable-xinerama) _xinerama
=yes ;;
1079 --disable-xinerama) _xinerama
=no
;;
1080 --enable-mga) _mga
=yes ;;
1081 --disable-mga) _mga
=no
;;
1082 --enable-xmga) _xmga
=yes ;;
1083 --disable-xmga) _xmga
=no
;;
1084 --enable-vm) _vm
=yes ;;
1085 --disable-vm) _vm
=no
;;
1086 --enable-xf86keysym) _xf86keysym
=yes ;;
1087 --disable-xf86keysym) _xf86keysym
=no
;;
1088 --enable-mlib) _mlib
=yes ;;
1089 --disable-mlib) _mlib
=no
;;
1090 --enable-sunaudio) _sunaudio
=yes ;;
1091 --disable-sunaudio) _sunaudio
=no
;;
1092 --enable-sgiaudio) _sgiaudio
=yes ;;
1093 --disable-sgiaudio) _sgiaudio
=no
;;
1094 --enable-alsa) _alsa
=yes ;;
1095 --disable-alsa) _alsa
=no
;;
1096 --enable-tv) _tv
=yes ;;
1097 --disable-tv) _tv
=no
;;
1098 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1099 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1100 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1101 --disable-tv-v4l1) _tv_v4l1
=no
;;
1102 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1103 --disable-tv-v4l2) _tv_v4l2
=no
;;
1104 --enable-tv-dshow) _tv_dshow
=yes ;;
1105 --disable-tv-dshow) _tv_dshow
=no
;;
1106 --enable-radio) _radio
=yes ;;
1107 --enable-radio-capture) _radio_capture
=yes ;;
1108 --disable-radio-capture) _radio_capture
=no
;;
1109 --disable-radio) _radio
=no
;;
1110 --enable-radio-v4l) _radio_v4l
=yes ;;
1111 --disable-radio-v4l) _radio_v4l
=no
;;
1112 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1113 --disable-radio-v4l2) _radio_v4l2
=no
;;
1114 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1115 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1116 --enable-pvr) _pvr
=yes ;;
1117 --disable-pvr) _pvr
=no
;;
1118 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1119 --disable-fastmemcpy) _fastmemcpy
=no
;;
1120 --enable-network) _network
=yes ;;
1121 --disable-network) _network
=no
;;
1122 --enable-winsock2_h) _winsock2_h
=yes ;;
1123 --disable-winsock2_h) _winsock2_h
=no
;;
1124 --enable-smb) _smb
=yes ;;
1125 --disable-smb) _smb
=no
;;
1126 --enable-vidix) _vidix
=yes ;;
1127 --disable-vidix) _vidix
=no
;;
1128 --with-vidix-drivers=*)
1129 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1131 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1132 --enable-dhahelper) _dhahelper
=yes ;;
1133 --disable-dhahelper) _dhahelper
=no
;;
1134 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1135 --disable-svgalib_helper) _svgalib_helper
=no
;;
1136 --enable-joystick) _joystick
=yes ;;
1137 --disable-joystick) _joystick
=no
;;
1138 --enable-xvid) _xvid
=yes ;;
1139 --disable-xvid) _xvid
=no
;;
1140 --enable-xvid-lavc) _xvid_lavc
=yes ;;
1141 --disable-xvid-lavc) _xvid_lavc
=no
;;
1142 --enable-x264) _x264
=yes ;;
1143 --disable-x264) _x264
=no
;;
1144 --enable-x264-lavc) _x264_lavc
=yes ;;
1145 --disable-x264-lavc) _x264_lavc
=no
;;
1146 --enable-libdirac-lavc) _libdirac_lavc
=yes ;;
1147 --disable-libdirac-lavc) _libdirac_lavc
=no
;;
1148 --enable-libschroedinger-lavc) _libschroedinger_lavc
=yes ;;
1149 --disable-libschroedinger-lavc) _libschroedinger_lavc
=no
;;
1150 --enable-libnut) _libnut
=yes ;;
1151 --disable-libnut) _libnut
=no
;;
1152 --enable-libavutil_a) _libavutil_a
=yes ;;
1153 --disable-libavutil_a) _libavutil_a
=no
;;
1154 --enable-libavutil_so) _libavutil_so
=yes ;;
1155 --disable-libavutil_so) _libavutil_so
=no
;;
1156 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1157 --disable-libavcodec_a) _libavcodec_a
=no
;;
1158 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1159 --disable-libavcodec_so) _libavcodec_so
=no
;;
1160 --enable-libopencore_amrnb) _libopencore_amrnb
=yes ;;
1161 --disable-libopencore_amrnb) _libopencore_amrnb
=no
;;
1162 --enable-libopencore_amrwb) _libopencore_amrwb
=yes ;;
1163 --disable-libopencore_amrwb) _libopencore_amrwb
=no
;;
1164 --enable-decoder=*) _libavdecoders
="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1165 --disable-decoder=*) _libavdecoders
=$
(echo $_libavdecoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1166 --enable-encoder=*) _libavencoders
="$_libavencoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1167 --disable-encoder=*) _libavencoders
=$
(echo $_libavencoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1168 --enable-parser=*) _libavparsers
="$_libavparsers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1169 --disable-parser=*) _libavparsers
=$
(echo $_libavparsers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1170 --enable-protocol=*) _libavprotocols
="$_libavprotocols $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1171 --disable-protocol=*) _libavprotocols
=$
(echo $_libavprotocols |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1172 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1173 --disable-demuxer=*) _libavdemuxers
=$
(echo $_libavdemuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1174 --enable-muxer=*) _libavmuxers
="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1175 --disable-muxer=*) _libavmuxers
=$
(echo $_libavmuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1176 --enable-libavformat_a) _libavformat_a
=yes ;;
1177 --disable-libavformat_a) _libavformat_a
=no
;;
1178 --enable-libavformat_so) _libavformat_so
=yes ;;
1179 --disable-libavformat_so) _libavformat_so
=no
;;
1180 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1181 --disable-libpostproc_a) _libpostproc_a
=no
;;
1182 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1183 --disable-libpostproc_so) _libpostproc_so
=no
;;
1184 --enable-libswscale_a) _libswscale_a
=yes ;;
1185 --disable-libswscale_a) _libswscale_a
=no
;;
1186 --enable-libswscale_so) _libswscale_so
=yes ;;
1187 --disable-libswscale_so) _libswscale_so
=no
;;
1188 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1189 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1191 --enable-lirc) _lirc
=yes ;;
1192 --disable-lirc) _lirc
=no
;;
1193 --enable-lircc) _lircc
=yes ;;
1194 --disable-lircc) _lircc
=no
;;
1195 --enable-apple-remote) _apple_remote
=yes ;;
1196 --disable-apple-remote) _apple_remote
=no
;;
1197 --enable-apple-ir) _apple_ir
=yes ;;
1198 --disable-apple-ir) _apple_ir
=no
;;
1199 --enable-gui) _gui
=yes ;;
1200 --disable-gui) _gui
=no
;;
1201 --enable-gtk1) _gtk1
=yes ;;
1202 --disable-gtk1) _gtk1
=no
;;
1203 --enable-termcap) _termcap
=yes ;;
1204 --disable-termcap) _termcap
=no
;;
1205 --enable-termios) _termios
=yes ;;
1206 --disable-termios) _termios
=no
;;
1207 --enable-3dfx) _3dfx
=yes ;;
1208 --disable-3dfx) _3dfx
=no
;;
1209 --enable-s3fb) _s3fb
=yes ;;
1210 --disable-s3fb) _s3fb
=no
;;
1211 --enable-wii) _wii
=yes ;;
1212 --disable-wii) _wii
=no
;;
1213 --enable-tdfxfb) _tdfxfb
=yes ;;
1214 --disable-tdfxfb) _tdfxfb
=no
;;
1215 --disable-tdfxvid) _tdfxvid
=no
;;
1216 --enable-tdfxvid) _tdfxvid
=yes ;;
1217 --disable-xvr100) _xvr100
=no
;;
1218 --enable-xvr100) _xvr100
=yes ;;
1219 --disable-tga) _tga
=no
;;
1220 --enable-tga) _tga
=yes ;;
1221 --enable-directfb) _directfb
=yes ;;
1222 --disable-directfb) _directfb
=no
;;
1223 --enable-zr) _zr
=yes ;;
1224 --disable-zr) _zr
=no
;;
1225 --enable-bl) _bl
=yes ;;
1226 --disable-bl) _bl
=no
;;
1227 --enable-mtrr) _mtrr
=yes ;;
1228 --disable-mtrr) _mtrr
=no
;;
1229 --enable-largefiles) _largefiles
=yes ;;
1230 --disable-largefiles) _largefiles
=no
;;
1231 --enable-shm) _shm
=yes ;;
1232 --disable-shm) _shm
=no
;;
1233 --enable-select) _select
=yes ;;
1234 --disable-select) _select
=no
;;
1235 --enable-linux-devfs) _linux_devfs
=yes ;;
1236 --disable-linux-devfs) _linux_devfs
=no
;;
1237 --enable-cdparanoia) _cdparanoia
=yes ;;
1238 --disable-cdparanoia) _cdparanoia
=no
;;
1239 --enable-cddb) _cddb
=yes ;;
1240 --disable-cddb) _cddb
=no
;;
1241 --enable-big-endian) _big_endian
=yes ;;
1242 --disable-big-endian) _big_endian
=no
;;
1243 --enable-bitmap-font) _bitmap_font
=yes ;;
1244 --disable-bitmap-font) _bitmap_font
=no
;;
1245 --enable-freetype) _freetype
=yes ;;
1246 --disable-freetype) _freetype
=no
;;
1247 --enable-fontconfig) _fontconfig
=yes ;;
1248 --disable-fontconfig) _fontconfig
=no
;;
1249 --enable-unrarexec) _unrar_exec
=yes ;;
1250 --disable-unrarexec) _unrar_exec
=no
;;
1251 --enable-ftp) _ftp
=yes ;;
1252 --disable-ftp) _ftp
=no
;;
1253 --enable-vstream) _vstream
=yes ;;
1254 --disable-vstream) _vstream
=no
;;
1255 --enable-pthreads) _pthreads
=yes ;;
1256 --disable-pthreads) _pthreads
=no
;;
1257 --enable-w32threads) _w32threads
=yes ;;
1258 --disable-w32threads) _w32threads
=no
;;
1259 --enable-ass) _ass
=yes ;;
1260 --disable-ass) _ass
=no
;;
1261 --enable-ass-internal) ass_internal
=yes ;;
1262 --disable-ass-internal) ass_internal
=no
;;
1263 --enable-rpath) _rpath
=yes ;;
1264 --disable-rpath) _rpath
=no
;;
1266 --enable-fribidi) _fribidi
=yes ;;
1267 --disable-fribidi) _fribidi
=no
;;
1269 --enable-enca) _enca
=yes ;;
1270 --disable-enca) _enca
=no
;;
1272 --enable-inet6) _inet6
=yes ;;
1273 --disable-inet6) _inet6
=no
;;
1275 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1276 --disable-gethostbyname2) _gethostbyname2
=no
;;
1278 --enable-dga1) _dga1
=yes ;;
1279 --disable-dga1) _dga1
=no
;;
1280 --enable-dga2) _dga2
=yes ;;
1281 --disable-dga2) _dga2
=no
;;
1283 --enable-menu) _menu
=yes ;;
1284 --disable-menu) _menu
=no
;;
1286 --enable-qtx) _qtx
=yes ;;
1287 --disable-qtx) _qtx
=no
;;
1289 --enable-coreaudio) _coreaudio
=yes ;;
1290 --disable-coreaudio) _coreaudio
=no
;;
1291 --enable-corevideo) _corevideo
=yes ;;
1292 --disable-corevideo) _corevideo
=no
;;
1293 --enable-quartz) _quartz
=yes ;;
1294 --disable-quartz) _quartz
=no
;;
1295 --enable-macosx-finder) _macosx_finder
=yes ;;
1296 --disable-macosx-finder) _macosx_finder
=no
;;
1297 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1298 --disable-macosx-bundle) _macosx_bundle
=no
;;
1300 --enable-maemo) _maemo
=yes ;;
1301 --disable-maemo) _maemo
=no
;;
1303 --enable-sortsub) _sortsub
=yes ;;
1304 --disable-sortsub) _sortsub
=no
;;
1306 --enable-crash-debug) _crash_debug
=yes ;;
1307 --disable-crash-debug) _crash_debug
=no
;;
1308 --enable-sighandler) _sighandler
=yes ;;
1309 --disable-sighandler) _sighandler
=no
;;
1310 --enable-win32dll) _win32dll
=yes ;;
1311 --disable-win32dll) _win32dll
=no
;;
1313 --enable-sse) _sse
=yes ;;
1314 --disable-sse) _sse
=no
;;
1315 --enable-sse2) _sse2
=yes ;;
1316 --disable-sse2) _sse2
=no
;;
1317 --enable-ssse3) _ssse3
=yes ;;
1318 --disable-ssse3) _ssse3
=no
;;
1319 --enable-mmxext) _mmxext
=yes ;;
1320 --disable-mmxext) _mmxext
=no
;;
1321 --enable-3dnow) _3dnow
=yes ;;
1322 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1323 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1324 --disable-3dnowext) _3dnowext
=no
;;
1325 --enable-cmov) _cmov
=yes ;;
1326 --disable-cmov) _cmov
=no
;;
1327 --enable-fast-cmov) _fast_cmov
=yes ;;
1328 --disable-fast-cmov) _fast_cmov
=no
;;
1329 --enable-altivec) _altivec
=yes ;;
1330 --disable-altivec) _altivec
=no
;;
1331 --enable-armv5te) _armv5te
=yes ;;
1332 --disable-armv5te) _armv5te
=no
;;
1333 --enable-armv6) _armv6
=yes ;;
1334 --disable-armv6) _armv6
=no
;;
1335 --enable-armv6t2) _armv6t2
=yes ;;
1336 --disable-armv6t2) _armv6t2
=no
;;
1337 --enable-armvfp) _armvfp
=yes ;;
1338 --disable-armvfp) _armvfp
=no
;;
1339 --enable-neon) neon
=yes ;;
1340 --disable-neon) neon
=no
;;
1341 --enable-iwmmxt) _iwmmxt
=yes ;;
1342 --disable-iwmmxt) _iwmmxt
=no
;;
1343 --enable-mmx) _mmx
=yes ;;
1344 --disable-mmx) # 3Dnow! and MMX2 require MMX
1345 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1348 echo "Unknown parameter: $ac_option"
1355 # Atmos: moved this here, to be correct, if --prefix is specified
1356 test -z "$_bindir" && _bindir
="$_prefix/bin"
1357 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1358 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1359 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1360 test -z "$_libdir" && _libdir
="$_prefix/lib"
1362 # Determine our OS name and CPU architecture
1363 if test -z "$_target" ; then
1365 system_name
=$
(uname
-s 2>&1)
1366 case "$system_name" in
1367 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1381 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1391 system_name
="$system_name-UNKNOWN"
1396 # host's CPU/instruction set
1397 host_arch
=$
(uname
-p 2>&1)
1398 case "$host_arch" in
1399 i386|sparc|ppc|alpha|arm|mips|vax
)
1401 powerpc
) # Darwin returns 'powerpc'
1404 *) # uname -p on Linux returns 'unknown' for the processor type,
1405 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1407 # Maybe uname -m (machine hardware name) returns something we
1410 # x86/x86pc is used by QNX
1411 case "$(uname -m 2>&1)" in
1412 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
;;
1413 ia64
) host_arch
=ia64
;;
1414 macppc|ppc
) host_arch
=ppc
;;
1415 ppc64
) host_arch
=ppc64
;;
1416 alpha
) host_arch
=alpha
;;
1417 sparc
) host_arch
=sparc
;;
1418 sparc64
) host_arch
=sparc64
;;
1419 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1420 arm
*|zaurus|cats
) host_arch
=arm
;;
1421 sh3|sh4|sh4a
) host_arch
=sh
;;
1422 s390
) host_arch
=s390
;;
1423 s390x
) host_arch
=s390x
;;
1424 *mips
*) host_arch
=mips
;;
1425 vax
) host_arch
=vax
;;
1426 xtensa
*) host_arch
=xtensa
;;
1427 *) host_arch
=UNKNOWN
;;
1431 else # if test -z "$_target"
1432 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1433 case "$(echo $system_name | tr A-Z a-z)" in
1434 linux
) system_name
=Linux
;;
1435 freebsd
) system_name
=FreeBSD
;;
1436 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1437 netbsd
) system_name
=NetBSD
;;
1438 bsd
/os
) system_name
=BSD
/OS
;;
1439 openbsd
) system_name
=OpenBSD
;;
1440 dragonfly
) system_name
=DragonFly
;;
1441 sunos
) system_name
=SunOS
;;
1442 qnx
) system_name
=QNX
;;
1443 morphos
) system_name
=MorphOS
;;
1444 amigaos
) system_name
=AmigaOS
;;
1445 mingw32
*) system_name
=MINGW32
;;
1447 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1448 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1449 if test $
(echo $host_arch) != "x86_64" ; then
1450 host_arch
=$
(echo $host_arch |
tr '_' '-')
1454 extra_cflags
="-I. $extra_cflags"
1455 _timer
=timer-linux.c
1458 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1459 extra_cflags
="$extra_cflags -I/usr/local/include"
1462 if netbsd || dragonfly
; then
1463 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1464 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1468 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1469 _timer
=timer-darwin.c
1473 extra_ldflags
="$extra_ldflags -lC"
1484 # -lwinmm is always needed for osdep/timer-win2.c
1485 extra_ldflags
="$extra_ldflags -lwinmm"
1489 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1490 def_priority
="#define CONFIG_PRIORITY 1"
1502 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1503 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1507 extra_ldflags
="$extra_ldflags -lph"
1515 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1516 def_priority
="#define CONFIG_PRIORITY 1"
1519 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1524 TMPLOG
="configure.log"
1525 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1526 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1527 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1528 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1529 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1532 echo configuration
: $_configuration > "$TMPLOG"
1536 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1537 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1541 # Checking CC version...
1542 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1543 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1544 echocheck
"$_cc version"
1546 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1547 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1548 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1549 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1550 # TODO verify older icc/ecc compatibility
1553 cc_version
="v. ?.??, bad"
1557 cc_version
="$cc_version, ok"
1560 cc_version
="$cc_version, bad"
1564 echores
"$cc_version"
1566 for _cc
in "$_cc" cc gcc
; do
1567 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1568 if test "$cc_name_tmp" = "gcc"; then
1569 cc_name
=$cc_name_tmp
1570 echocheck
"$_cc version"
1572 cc_version
=$
($_cc -dumpversion 2>&1)
1578 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1579 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1580 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1583 echores
"$cc_version"
1588 test "$cc_fail" = yes && die
"unsupported compiler version"
1590 if test -z "$_target" && x86
; then
1593 int test[(int)sizeof(char *)-7];
1597 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1600 echo "Detected operating system: $system_name"
1601 echo "Detected host architecture: $host_arch"
1604 test "$_host_cc" || _host_cc
=$_cc
1607 echocheck
"cross compilation"
1608 if test $_cross_compile = auto
; then
1610 int main(void) { return 0; }
1613 cc_check
&& "$TMPEXE" && _cross_compile
=no
1615 echores
$_cross_compile
1617 if test $_cross_compile = yes; then
1625 # now that we know what compiler should be used for compilation, try to find
1626 # out which assembler is used by the $_cc compiler
1627 if test "$_as" = auto
; then
1628 _as
=$
($_cc -print-prog-name=as
)
1629 test -z "$_as" && _as
=as
1632 if test "$_nm" = auto
; then
1633 _nm
=$
($_cc -print-prog-name=nm
)
1634 test -z "$_nm" && _nm
=nm
1637 # XXX: this should be ok..
1640 if test "$_runtime_cpudetection" = no
; then
1642 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1643 # FIXME: Remove the cygwin check once AMD CPUs are supported
1644 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1645 # Linux with /proc mounted, extract CPU information from it
1646 _cpuinfo
="cat /proc/cpuinfo"
1647 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86_32
; then
1648 # FreeBSD with Linux emulation /proc mounted,
1649 # extract CPU information from it
1650 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1651 elif darwin
&& ! x86
; then
1652 # use hostinfo on Darwin
1655 # use 'lsattr' on AIX
1656 _cpuinfo
="lsattr -E -l proc0 -a type"
1658 # all other OSes try to extract CPU information from a small helper
1659 # program cpuinfo instead
1660 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1661 _cpuinfo
="./cpuinfo$_exesuf"
1665 # gather more CPU information
1666 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1667 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1668 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1669 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1670 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1672 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1674 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1675 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1677 for ext
in $pparam ; do
1678 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1681 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1682 test $_sse = kernel_check
&& _mmxext
=kernel_check
1684 echocheck
"CPU vendor"
1685 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1687 echocheck
"CPU type"
1691 fi # test "$_runtime_cpudetection" = no
1693 if x86
&& test "$_runtime_cpudetection" = no
; then
1695 if test "$1" = kernel_check
; then
1696 echocheck
"kernel support of $2"
1700 void catch() { exit(1); }
1702 signal(SIGILL, catch);
1703 __asm__ volatile ("$3":::"memory"); return 0;
1707 if cc_check
&& tmp_run
; then
1710 _optimizing
="$_optimizing $2"
1715 echo "It seems that your kernel does not correctly support $2."
1716 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1723 extcheck
$_mmx "mmx" "emms"
1724 extcheck
$_mmxext "mmxext" "sfence"
1725 extcheck
$_3dnow "3dnow" "femms"
1726 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1727 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1728 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1729 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1730 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1732 echocheck
"mtrr support"
1733 if test "$_mtrr" = kernel_check
; then
1735 _optimizing
="$_optimizing mtrr"
1739 if test "$_gcc3_ext" != ""; then
1740 # if we had to disable sse/sse2 because the active kernel does not
1741 # support this instruction set extension, we also have to tell
1742 # gcc3 to not generate sse/sse2 instructions for normal C code
1744 int main(void) { return 0; }
1746 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1752 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1753 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1754 _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'
1755 case "$host_arch" in
1756 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1758 _target_arch
="ARCH_X86 = yes"
1759 _target_subarch
="ARCH_X86_32 = yes"
1760 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1765 if test "$_runtime_cpudetection" = no
; then
1769 3) proc
=i386 iproc
=386 ;;
1770 4) proc
=i486 iproc
=486 ;;
1771 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1772 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1773 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1775 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1777 elif test "$pmodel" -ge 8; then
1779 elif test "$pmodel" -ge 6; then
1786 # It's a bit difficult to determine the correct type of Family 6
1787 # AMD CPUs just from their signature. Instead, we check directly
1788 # whether it supports SSE.
1789 if test "$_sse" = yes; then
1790 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1793 # Again, gcc treats athlon and athlon-tbird similarly.
1798 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1799 # caught and remedied in the optimization tests below.
1803 *) proc
=k8 iproc
=686 ;;
1808 3) proc
=i386 iproc
=386 ;;
1809 4) proc
=i486 iproc
=486 ;;
1811 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1812 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1818 if test "$pmodel" -ge 15; then
1820 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1822 elif test "$pmodel" -ge 7; then
1824 elif test "$pmodel" -ge 3; then
1831 # A nocona in 32-bit mode has no more capabilities than a prescott.
1832 if test "$pmodel" -ge 3; then
1837 test $_fast_cmov = "auto" && _fast_cmov
=no
1839 *) proc
=prescott iproc
=686 ;;
1845 if test "$pmodel" -ge 8; then
1847 elif test "$pmodel" -ge 4; then
1854 if test "$pmodel" -ge 9; then
1861 *) proc
=i686 iproc
=i686
;;
1866 3) proc
=i386 iproc
=386 ;;
1867 4) proc
=i486 iproc
=486 ;;
1868 *) proc
=i586 iproc
=586 ;;
1872 proc
=i586 iproc
=586 ;;
1874 fi # test "$_runtime_cpudetection" = no
1877 # check that gcc supports our CPU, if not, fall back to earlier ones
1878 # LGB: check -mcpu and -march swithing step by step with enabling
1879 # to fall back till 386.
1881 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1883 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1889 echocheck
"GCC & CPU optimization abilities"
1891 int main(void) { return 0; }
1893 if test "$_runtime_cpudetection" = no
; then
1894 cc_check
-march=native
&& proc
=native
1895 if test "$proc" = "k8"; then
1896 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1898 if test "$proc" = "athlon-xp"; then
1899 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1901 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1902 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1904 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1905 if ! cc_check
-march=$proc $cpuopt=$proc; then
1906 if cc_check
-march=i586
$cpuopt=i686
; then
1913 if test "$proc" = "prescott" ; then
1914 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1916 if test "$proc" = "core2" ; then
1917 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1919 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
1920 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1922 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1923 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1925 if test "$proc" = "i586"; then
1926 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1928 if test "$proc" = "i486" ; then
1929 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1931 if test "$proc" = "i386" ; then
1932 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1934 if test "$proc" = "error" ; then
1935 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1939 elif test "$proc" = "i586-i686"; then
1940 _march
="-march=i586"
1941 _mcpu
="$cpuopt=i686"
1944 _march
="-march=$proc"
1945 _mcpu
="$cpuopt=$proc"
1948 else # if test "$_runtime_cpudetection" = no
1949 _mcpu
="$cpuopt=generic"
1950 # at least i486 required, for bswap instruction
1951 _march
="-march=i486"
1952 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1953 cc_check
$_mcpu || _mcpu
=""
1954 cc_check
$_march $_mcpu || _march
=""
1957 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1958 ## autodetected mcpu/march parameters
1959 if test "$_target" ; then
1960 # TODO: it may be a good idea to check GCC and fall back in all cases
1961 if test "$host_arch" = "i586-i686"; then
1962 _march
="-march=i586"
1963 _mcpu
="$cpuopt=i686"
1965 _march
="-march=$host_arch"
1966 _mcpu
="$cpuopt=$host_arch"
1974 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1975 i686|athlon
*|pentium
*) iproc
=686 ;;
1980 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1991 _target_arch
='ARCH_IA64 = yes'
1992 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
1998 _target_subarch
='ARCH_X86_64 = yes'
1999 _target_arch
="ARCH_X86 = yes"
2000 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2001 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2004 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
2005 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
2010 test $_fast_cmov = "auto" && _fast_cmov
=yes
2011 if test "$_runtime_cpudetection" = no
; then
2019 # 64-bit prescotts exist, but as far as GCC is concerned they
2020 # have the same capabilities as a nocona.
2028 fi # test "$_runtime_cpudetection" = no
2030 echocheck
"GCC & CPU optimization abilities"
2032 int main(void) { return 0; }
2034 # This is a stripped-down version of the i386 fallback.
2035 if test "$_runtime_cpudetection" = no
; then
2036 cc_check
-march=native
&& proc
=native
2037 # --- AMD processors ---
2038 if test "$proc" = "k8"; then
2039 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2041 # This will fail if gcc version < 3.3, which is ok because earlier
2042 # versions don't really support 64-bit on amd64.
2043 # Is this a valid assumption? -Corey
2044 if test "$proc" = "athlon-xp"; then
2045 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2047 # --- Intel processors ---
2048 if test "$proc" = "core2"; then
2049 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2051 if test "$proc" = "nocona"; then
2052 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2054 if test "$proc" = "pentium4"; then
2055 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2058 _march
="-march=$proc"
2059 _mcpu
="$cpuopt=$proc"
2060 if test "$proc" = "error" ; then
2061 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2065 else # if test "$_runtime_cpudetection" = no
2066 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2067 _march
="-march=x86-64"
2068 _mcpu
="$cpuopt=generic"
2069 cc_check
$_mcpu || _mcpu
="x86-64"
2070 cc_check
$_mcpu || _mcpu
=""
2071 cc_check
$_march $_mcpu || _march
=""
2081 _target_arch
='ARCH_SPARC = yes'
2083 if test "$host_arch" = "sparc64" ; then
2086 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2088 echocheck
"CPU type"
2090 case "$(echo $karch)" in
2095 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2107 arm|armv4l|armv5tel
)
2109 _target_arch
='ARCH_ARM = yes'
2115 _target_arch
='ARCH_AVR32 = yes'
2116 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2122 _target_arch
='ARCH_SH4 = yes'
2126 ppc|ppc64|powerpc|powerpc64
)
2128 def_dcbzl
='#define HAVE_DCBZL 0'
2129 _target_arch
='ARCH_PPC = yes'
2130 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2133 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2135 _target_subarch
='ARCH_PPC64 = yes'
2136 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2138 echocheck
"CPU type"
2139 case $system_name in
2141 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2142 if test -n "$($_cpuinfo | grep altivec)"; then
2143 test $_altivec = auto
&& _altivec
=yes
2147 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2148 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2149 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2150 test $_altivec = auto
&& _altivec
=yes
2154 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2156 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2159 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2160 test $_altivec = auto
&& _altivec
=yes
2166 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2169 if test "$_altivec" = yes; then
2170 echores
"$proc altivec"
2176 echocheck
"GCC & CPU optimization abilities"
2178 if test -n "$proc"; then
2180 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2181 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2182 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2183 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2184 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2185 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2186 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2187 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2188 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2191 # gcc 3.1(.1) and up supports 7400 and 7450
2192 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2194 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2195 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2199 # gcc 3.2 and up supports 970
2200 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2202 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2203 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2207 # gcc 3.3 and up supports POWER4
2208 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2210 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2214 # gcc 3.4 and up supports 440*
2215 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2217 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2218 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2222 # gcc 4.0 and up supports POWER5
2223 if test "$_cc_major" -ge "4"; then
2225 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2231 if test -n "$_mcpu"; then
2232 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2233 echores
"$_optimizing"
2242 _target_arch
='ARCH_ALPHA = yes'
2245 echocheck
"CPU type"
2248 unsigned long ver, mask;
2249 __asm__ ("implver %0" : "=r" (ver));
2250 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2251 printf("%ld-%x\n", ver, ~mask);
2255 $_cc -o "$TMPEXE" "$TMPC"
2256 case $
("$TMPEXE") in
2258 0-0) proc
="ev4"; _mvi
="0";;
2259 1-0) proc
="ev5"; _mvi
="0";;
2260 1-1) proc
="ev56"; _mvi
="0";;
2261 1-101) proc
="pca56"; _mvi
="1";;
2262 2-303) proc
="ev6"; _mvi
="1";;
2263 2-307) proc
="ev67"; _mvi
="1";;
2264 2-1307) proc
="ev68"; _mvi
="1";;
2268 echocheck
"GCC & CPU optimization abilities"
2269 if test "$proc" = "ev68" ; then
2270 cc_check
-mcpu=$proc || proc
=ev67
2272 if test "$proc" = "ev67" ; then
2273 cc_check
-mcpu=$proc || proc
=ev6
2283 _target_arch
='ARCH_SGI_MIPS = yes'
2287 echocheck
"CPU type"
2288 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2289 case "$(echo $proc)" in
2290 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2291 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2292 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2293 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2294 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2295 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2297 # gcc < 3.x does not support -mtune.
2298 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2308 _target_arch
='ARCH_PA_RISC = yes'
2314 _target_arch
='ARCH_S390 = yes'
2320 _target_arch
='ARCH_S390X = yes'
2326 _target_arch
='ARCH_VAX = yes'
2332 _target_arch
='ARCH_XTENSA = yes'
2338 _target_arch
='ARCH_GENERIC = yes'
2342 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2343 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2344 die
"unsupported architecture $host_arch"
2346 esac # case "$host_arch" in
2348 if test "$_runtime_cpudetection" = yes ; then
2350 test "$_cmov" != no
&& _cmov
=yes
2352 test "$_mmx" != no
&& _mmx
=yes
2353 test "$_3dnow" != no
&& _3dnow
=yes
2354 test "$_3dnowext" != no
&& _3dnowext
=yes
2355 test "$_mmxext" != no
&& _mmxext
=yes
2356 test "$_sse" != no
&& _sse
=yes
2357 test "$_sse2" != no
&& _sse2
=yes
2358 test "$_ssse3" != no
&& _ssse3
=yes
2359 test "$_mtrr" != no
&& _mtrr
=yes
2368 echocheck
"byte order"
2369 if test "$_big_endian" = auto
; then
2371 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2372 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2373 int main(void) { return (int)ascii_name; }
2376 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2382 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2385 if test "$_big_endian" = yes ; then
2386 _byte_order
='big-endian'
2387 def_words_endian
='#define WORDS_BIGENDIAN 1'
2388 def_bigendian
='#define HAVE_BIGENDIAN 1'
2390 _byte_order
='little-endian'
2391 def_words_endian
='#undef WORDS_BIGENDIAN'
2392 def_bigendian
='#define HAVE_BIGENDIAN 0'
2394 echores
"$_byte_order"
2397 echocheck
"extern symbol prefix"
2401 cc_check
-c || die
"Symbol mangling check failed."
2402 sym
=$
($_nm -P -g $TMPEXE)
2403 extern_prefix
=${sym%%ff_extern*}
2404 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2405 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2406 echores
$extern_prefix
2409 echocheck
"assembler support of -pipe option"
2411 int main(void) { return 0; }
2413 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2416 echocheck
"compiler support of named assembler arguments"
2418 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2419 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2420 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2422 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2424 echores
$_named_asm_args
2427 if darwin
&& test "$cc_vendor" = "gnu" ; then
2428 echocheck
"GCC support of -mstackrealign"
2429 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2430 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2431 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2432 # wrong code with this flag, but this can be worked around by adding
2433 # -fno-unit-at-a-time as described in the blog post at
2434 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2436 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2437 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2439 cc_check
-O4 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2440 test -z "$cflags_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2441 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2442 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2443 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2446 # Checking for CFLAGS
2448 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2449 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2451 elif test -z "$CFLAGS" ; then
2452 if test "$cc_vendor" = "intel" ; then
2453 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2454 elif test "$cc_vendor" != "gnu" ; then
2455 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2457 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2458 extra_ldflags
="$extra_ldflags -ffast-math"
2465 int main(void) { return 0; }
2467 if test "$cc_vendor" = "gnu" ; then
2468 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2469 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
2470 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2471 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2472 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2474 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2477 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2480 if test -n "$LDFLAGS" ; then
2481 extra_ldflags
="$extra_ldflags $LDFLAGS"
2483 elif test "$cc_vendor" = "intel" ; then
2484 extra_ldflags
="$extra_ldflags -i-static"
2486 if test -n "$CPPFLAGS" ; then
2487 extra_cflags
="$extra_cflags $CPPFLAGS"
2494 # Checking assembler (_as) compatibility...
2495 # Added workaround for older as that reads from stdin by default - atmos
2496 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2497 echocheck
"assembler ($_as $as_version)"
2499 _pref_as_version
='2.9.1'
2501 if test "$_mmx" = yes ; then
2502 echo 'emms' >> $TMPS
2504 if test "$_3dnow" = yes ; then
2505 _pref_as_version
='2.10.1'
2506 echo 'femms' >> $TMPS
2508 if test "$_3dnowext" = yes ; then
2509 _pref_as_version
='2.10.1'
2510 echo 'pswapd %mm0, %mm0' >> $TMPS
2512 if test "$_mmxext" = yes ; then
2513 _pref_as_version
='2.10.1'
2514 echo 'movntq %mm0, (%eax)' >> $TMPS
2516 if test "$_sse" = yes ; then
2517 _pref_as_version
='2.10.1'
2518 echo 'xorps %xmm0, %xmm0' >> $TMPS
2520 #if test "$_sse2" = yes ; then
2521 # _pref_as_version='2.11'
2522 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2524 if test "$_cmov" = yes ; then
2525 _pref_as_version
='2.10.1'
2526 echo 'cmovb %eax, %ebx' >> $TMPS
2528 if test "$_ssse3" = yes ; then
2529 _pref_as_version
='2.16.92'
2530 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2532 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2534 if test "$as_verc_fail" != yes ; then
2537 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2539 die
"obsolete binutils version"
2544 echocheck
".align is a power of two"
2545 if test "$_asmalign_pot" = auto
; then
2548 int main(void) { __asm__ (".align 3"); return 0; }
2550 cc_check
&& _asmalign_pot
=yes
2552 if test "$_asmalign_pot" = "yes" ; then
2553 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2555 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2557 echores
$_asmalign_pot
2560 echocheck
"10 assembler operands"
2562 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2568 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2573 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2574 echores
$ten_operands
2576 echocheck
"ebx availability"
2578 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2585 // just adding ebx to clobber list seems unreliable with some
2586 // compilers, e.g. Haiku's gcc 2.95
2588 // and the above check does not work for OSX 64 bit...
2589 __asm__ volatile("":::"%ebx");
2593 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2594 echores
$ebx_available
2600 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2601 #error PIC not enabled
2606 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2610 if test -z "$YASMFLAGS" ; then
2612 x86_64
&& objformat
="macho64" || objformat
="macho"
2618 # currently tested for Linux x86, x86_64
2619 YASMFLAGS
="-f $objformat"
2620 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2621 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2622 case "$objformat" in
2623 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2624 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2630 echo "pabsw xmm0, xmm0" > $TMPS
2631 yasm_check || _yasm
=""
2632 if test $_yasm ; then
2633 test "$_mmx" = "yes" && fft_mmx
="yes"
2634 def_yasm
='#define HAVE_YASM 1'
2638 def_yasm
='#define HAVE_YASM 0'
2645 def_bswap
='#define HAVE_BSWAP 0'
2646 echo 'bswap %eax' > $TMPS
2647 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2652 #FIXME: This should happen before the check for CFLAGS..
2653 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2654 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2656 # check if AltiVec is supported by the compiler, and how to enable it
2657 echocheck
"GCC AltiVec flags"
2659 int main(void) { return 0; }
2661 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2662 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2663 # check if <altivec.h> should be included
2665 #include <altivec.h>
2666 int main(void) { return 0; }
2668 if $
(cc_check
$_altivec_gcc_flags) ; then
2669 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2670 inc_altivec_h
='#include <altivec.h>'
2673 int main(void) { return 0; }
2675 if $
(cc_check
-faltivec) ; then
2676 _altivec_gcc_flags
="-faltivec"
2679 _altivec_gcc_flags
="none, AltiVec disabled"
2683 echores
"$_altivec_gcc_flags"
2685 # check if the compiler supports braces for vector declarations
2688 int main(void) { (vector int) {1}; return 0; }
2690 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2692 # Disable runtime cpudetection if we cannot generate AltiVec code or
2693 # AltiVec is disabled by the user.
2694 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2695 && _runtime_cpudetection
=no
2697 # Show that we are optimizing for AltiVec (if enabled and supported).
2698 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2699 && _optimizing
="$_optimizing altivec"
2701 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2702 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2706 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2708 echocheck
"XFORM ASM support"
2710 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2712 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2713 echores
"$xform_asm"
2717 echocheck
"ARM pld instruction"
2719 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2725 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2726 if test $_armv5te = "auto" ; then
2728 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2731 cc_check
&& _armv5te
=yes
2735 echocheck
"ARMv6 (SIMD instructions)"
2736 if test $_armv6 = "auto" ; then
2738 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2741 cc_check
&& _armv6
=yes
2745 echocheck
"ARMv6t2 (SIMD instructions)"
2746 if test $_armv6t2 = "auto" ; then
2748 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2751 cc_check
&& _armv6t2
=yes
2756 if test $_armvfp = "auto" ; then
2758 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2761 cc_check
&& _armvfp
=yes
2765 echocheck
"ARM NEON"
2766 if test $neon = "auto" ; then
2768 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2771 cc_check
&& neon
=yes
2775 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2776 if test $_iwmmxt = "auto" ; then
2778 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2781 cc_check
&& _iwmmxt
=yes
2786 _cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2787 test "$_altivec" = yes && _cpuexts
="ALTIVEC $_cpuexts"
2788 test "$_mmx" = yes && _cpuexts
="MMX $_cpuexts"
2789 test "$_mmxext" = yes && _cpuexts
="MMX2 $_cpuexts"
2790 test "$_3dnow" = yes && _cpuexts
="AMD3DNOW $_cpuexts"
2791 test "$_3dnowext" = yes && _cpuexts
="AMD3DNOWEXT $_cpuexts"
2792 test "$_sse" = yes && _cpuexts
="SSE $_cpuexts"
2793 test "$_sse2" = yes && _cpuexts
="SSE2 $_cpuexts"
2794 test "$_ssse3" = yes && _cpuexts
="SSSE3 $_cpuexts"
2795 test "$_cmov" = yes && _cpuexts
="CMOV $_cpuexts"
2796 test "$_fast_cmov" = yes && _cpuexts
="FAST_CMOV $_cpuexts"
2797 test "$pld" = yes && _cpuexts
="PLD $_cpuexts"
2798 test "$_armv5te" = yes && _cpuexts
="ARMV5TE $_cpuexts"
2799 test "$_armv6" = yes && _cpuexts
="ARMV6 $_cpuexts"
2800 test "$_armv6t2" = yes && _cpuexts
="ARMV6T2 $_cpuexts"
2801 test "$_armvfp" = yes && _cpuexts
="ARMVFP $_cpuexts"
2802 test "$neon" = yes && _cpuexts
="NEON $_cpuexts"
2803 test "$_iwmmxt" = yes && _cpuexts
="IWMMXT $_cpuexts"
2804 test "$_vis" = yes && _cpuexts
="VIS $_cpuexts"
2805 test "$_mvi" = yes && _cpuexts
="MVI $_cpuexts"
2807 # Checking kernel version...
2808 if x86_32
&& linux
; then
2810 kernel_version
=$
(uname
-r 2>&1)
2811 echocheck
"$system_name kernel version"
2812 case "$kernel_version" in
2813 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2814 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2815 _k_verc_problem
=yes;;
2817 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2820 if test "$_k_verc_fail" ; then
2821 echores
"$kernel_version, fail"
2822 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2823 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2824 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2825 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2826 echo "2.2.x you must upgrade it to get SSE support!"
2827 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2829 echores
"$kernel_version, ok"
2833 ######################
2834 # MAIN TESTS GO HERE #
2835 ######################
2840 int main(void) { return 0; }
2842 if cc_check
-lposix ; then
2843 extra_ldflags
="$extra_ldflags -lposix"
2851 int main(void) { return 0; }
2853 if cc_check
-lm ; then
2862 echocheck
"langinfo"
2863 if test "$_langinfo" = auto
; then
2865 #include <langinfo.h>
2866 int main(void) { nl_langinfo(CODESET); return 0; }
2869 cc_check
&& _langinfo
=yes
2871 if test "$_langinfo" = yes ; then
2872 def_langinfo
='#define HAVE_LANGINFO 1'
2874 def_langinfo
='#undef HAVE_LANGINFO'
2876 echores
"$_langinfo"
2879 echocheck
"language"
2880 # Set preferred languages, "all" uses English as main language.
2881 test -z "$language" && language
=$LINGUAS
2882 test -z "$language_doc" && language_doc
=$language
2883 test -z "$language_man" && language_man
=$language
2884 test -z "$language_msg" && language_msg
=$language
2885 language_doc
=$
(echo $language_doc |
tr , " ")
2886 language_man
=$
(echo $language_man |
tr , " ")
2887 language_msg
=$
(echo $language_msg |
tr , " ")
2889 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2890 test "$language_man" = "all" && language_man
=$man_lang_all
2891 test "$language_msg" = "all" && language_msg
=en
2893 # Prune non-existing translations from language lists.
2894 # Set message translation to the first available language.
2895 # Fall back on English.
2896 for lang
in $language_doc ; do
2897 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2899 language_doc
=$tmp_language_doc
2900 test -z "$language_doc" && language_doc
=en
2902 for lang
in $language_man ; do
2903 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2905 language_man
=$tmp_language_man
2906 test -z "$language_man" && language_man
=en
2908 for lang
in $language_msg ; do
2909 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2911 language_msg
=$tmp_language_msg
2912 test -z "$language_msg" && language_msg
=en
2913 _mp_help
="help/help_mp-${language_msg}.h"
2914 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2917 echocheck
"enable sighandler"
2918 if test "$_sighandler" = yes ; then
2919 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2921 def_sighandler
='#undef CONFIG_SIGHANDLER'
2923 echores
"$_sighandler"
2925 echocheck
"runtime cpudetection"
2926 if test "$_runtime_cpudetection" = yes ; then
2927 _optimizing
="Runtime CPU-Detection enabled"
2928 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2930 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2932 echores
"$_runtime_cpudetection"
2935 echocheck
"restrict keyword"
2936 for restrict_keyword
in restrict __restrict __restrict__
; do
2937 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2939 def_restrict_keyword
=$restrict_keyword
2943 if [ -n "$def_restrict_keyword" ]; then
2944 echores
"$def_restrict_keyword"
2948 # Avoid infinite recursion loop ("#define restrict restrict")
2949 if [ "$def_restrict_keyword" != "restrict" ]; then
2950 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2952 def_restrict_keyword
=""
2956 echocheck
"__builtin_expect"
2957 # GCC branch prediction hint
2960 a = __builtin_expect(a, 10);
2961 return a == 10 ? 0 : 1;
2963 int main(void) { return foo(10) && foo(0); }
2966 cc_check
&& _builtin_expect
=yes
2967 if test "$_builtin_expect" = yes ; then
2968 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2970 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2972 echores
"$_builtin_expect"
2978 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2981 cc_check
-lkstat && _kstat
=yes
2982 if test "$_kstat" = yes ; then
2983 def_kstat
="#define HAVE_LIBKSTAT 1"
2984 extra_ldflags
="$extra_ldflags -lkstat"
2986 def_kstat
="#undef HAVE_LIBKSTAT"
2992 # required for nanosleep on some systems
2995 int main(void) { (void) nanosleep(0, 0); return 0; }
2998 cc_check
-lposix4 && _posix4
=yes
2999 if test "$_posix4" = yes ; then
3000 extra_ldflags
="$extra_ldflags -lposix4"
3004 for func
in llrint log2 lrint lrintf round roundf truncf
; do
3008 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
3011 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
3012 if eval test "x\$_$func" = "xyes"; then
3013 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3016 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3025 int main(void) { char a; mkstemp(&a); return 0; }
3028 cc_check
&& _mkstemp
=yes
3029 if test "$_mkstemp" = yes ; then
3030 def_mkstemp
='#define HAVE_MKSTEMP 1'
3032 def_mkstemp
='#undef HAVE_MKSTEMP'
3037 echocheck
"nanosleep"
3038 # also check for nanosleep
3041 int main(void) { (void) nanosleep(0, 0); return 0; }
3044 cc_check
&& _nanosleep
=yes
3045 if test "$_nanosleep" = yes ; then
3046 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3048 def_nanosleep
='#undef HAVE_NANOSLEEP'
3050 echores
"$_nanosleep"
3054 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3055 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3058 #include <sys/socket.h>
3059 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3062 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3063 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3065 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3066 if test $_winsock2_h = auto
; then
3069 #include <winsock2.h>
3070 int main(void) { (void) gethostbyname(0); return 0; }
3072 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3074 test "$_ld_sock" && _res_comment
="using $_ld_sock"
3078 if test $_winsock2_h = yes ; then
3080 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3082 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3086 echocheck
"arpa/inet.h"
3088 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3090 #include <arpa/inet.h>
3091 int main(void) { return 0; }
3093 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3094 echores
"$arpa_inet_h"
3097 echocheck
"inet_pton()"
3098 def_inet_pton
='#define HAVE_INET_PTON 0'
3101 #include <sys/types.h>
3102 #include <sys/socket.h>
3103 #include <arpa/inet.h>
3104 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3106 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3107 cc_check
$_ld_tmp && inet_pton
=yes && break
3109 if test $inet_pton = yes ; then
3110 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3111 def_inet_pton
='#define HAVE_INET_PTON 1'
3113 echores
"$inet_pton"
3116 echocheck
"inet_aton()"
3117 def_inet_aton
='#define HAVE_INET_ATON 0'
3120 #include <sys/types.h>
3121 #include <sys/socket.h>
3122 #include <arpa/inet.h>
3123 int main(void) { (void) inet_aton(0, 0); return 0; }
3125 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3126 cc_check
$_ld_tmp && inet_aton
=yes && break
3128 if test $inet_aton = yes ; then
3129 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3130 def_inet_aton
='#define HAVE_INET_ATON 1'
3132 echores
"$inet_aton"
3135 echocheck
"socklen_t"
3137 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3140 int main(void) { socklen_t v = 0; return v; }
3142 cc_check
&& _socklen_t
=yes && break
3144 if test "$_socklen_t" = yes ; then
3145 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3147 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3149 echores
"$_socklen_t"
3152 echocheck
"closesocket()"
3155 #include <winsock2.h>
3156 int main(void) { closesocket(~0); return 0; }
3158 cc_check
$_ld_sock && _closesocket
=yes
3159 if test "$_closesocket" = yes ; then
3160 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3162 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3164 echores
"$_closesocket"
3168 test $_winsock2_h = no
&& test $inet_pton = no
&&
3169 test $inet_aton = no
&& _network
=no
3170 if test "$_network" = yes ; then
3171 def_network
='#define CONFIG_NETWORK 1'
3172 extra_ldflags
="$extra_ldflags $_ld_sock"
3173 _inputmodules
="network $_inputmodules"
3175 _noinputmodules
="network $_noinputmodules"
3176 def_network
='#undef CONFIG_NETWORK'
3183 if test "$_inet6" = auto
; then
3185 #include <sys/types.h>
3186 #if !defined(_WIN32) || defined(__CYGWIN__)
3187 #include <sys/socket.h>
3188 #include <netinet/in.h>
3190 #include <ws2tcpip.h>
3192 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3195 if cc_check
$_ld_sock ; then
3199 if test "$_inet6" = yes ; then
3200 def_inet6
='#define HAVE_AF_INET6 1'
3202 def_inet6
='#undef HAVE_AF_INET6'
3207 echocheck
"gethostbyname2"
3208 if test "$_gethostbyname2" = auto
; then
3210 #include <sys/types.h>
3211 #include <sys/socket.h>
3213 int main(void) { gethostbyname2("", AF_INET); return 0; }
3220 if test "$_gethostbyname2" = yes ; then
3221 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3223 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3225 echores
"$_gethostbyname2"
3228 echocheck
"inttypes.h (required)"
3230 #include <inttypes.h>
3231 int main(void) { return 0; }
3234 cc_check
&& _inttypes
=yes
3235 echores
"$_inttypes"
3237 if test "$_inttypes" = no
; then
3238 echocheck
"bitypes.h (inttypes.h predecessor)"
3240 #include <sys/bitypes.h>
3241 int main(void) { return 0; }
3243 cc_check
&& _inttypes
=yes
3244 if test "$_inttypes" = yes ; then
3245 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."
3247 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3252 echocheck
"int_fastXY_t in inttypes.h"
3254 #include <inttypes.h>
3256 volatile int_fast16_t v= 0;
3260 cc_check
&& _fast_inttypes
=yes
3261 if test "$_fast_inttypes" = no
; then
3263 typedef signed char int_fast8_t;
3264 typedef signed int int_fast16_t;
3265 typedef signed int int_fast32_t;
3266 typedef signed long long int_fast64_t;
3267 typedef unsigned char uint_fast8_t;
3268 typedef unsigned int uint_fast16_t;
3269 typedef unsigned int uint_fast32_t;
3270 typedef unsigned long long uint_fast64_t;'
3272 echores
"$_fast_inttypes"
3275 echocheck
"malloc.h"
3278 int main(void) { (void) malloc(0); return 0; }
3281 cc_check
&& _malloc
=yes
3282 if test "$_malloc" = yes ; then
3283 def_malloc_h
='#define HAVE_MALLOC_H 1'
3285 def_malloc_h
='#define HAVE_MALLOC_H 0'
3287 # malloc.h emits a warning in FreeBSD and OpenBSD
3288 freebsd || openbsd || dragonfly
&& def_malloc_h
='#define HAVE_MALLOC_H 0'
3292 echocheck
"memalign()"
3293 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3294 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3297 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3300 cc_check
&& _memalign
=yes
3301 if test "$_memalign" = yes ; then
3302 def_memalign
='#define HAVE_MEMALIGN 1'
3304 def_memalign
='#define HAVE_MEMALIGN 0'
3305 def_map_memalign
='#define memalign(a,b) malloc(b)'
3306 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3308 echores
"$_memalign"
3311 echocheck
"posix_memalign()"
3313 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3315 #define _XOPEN_SOURCE 600
3317 int main(void) { posix_memalign(NULL, 0, 0); }
3319 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3320 echores
"$posix_memalign"
3323 echocheck
"alloca.h"
3326 int main(void) { (void) alloca(0); return 0; }
3329 cc_check
&& _alloca
=yes
3331 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3333 def_alloca_h
='#undef HAVE_ALLOCA_H'
3338 echocheck
"fastmemcpy"
3339 if test "$_fastmemcpy" = yes ; then
3340 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3342 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3344 echores
"$_fastmemcpy"
3349 #include <sys/types.h>
3350 #include <sys/mman.h>
3351 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3354 cc_check
&& _mman
=yes
3355 if test "$_mman" = yes ; then
3356 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3358 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3359 os2
&& _need_mmap
=yes
3364 #include <sys/types.h>
3365 #include <sys/mman.h>
3366 int main(void) { void *p = MAP_FAILED; return 0; }
3368 _mman_has_map_failed
=no
3369 cc_check
&& _mman_has_map_failed
=yes
3370 if test "$_mman_has_map_failed" = yes ; then
3371 def_mman_has_map_failed
=''
3373 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3376 echocheck
"dynamic loader"
3380 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3383 for _ld_tmp
in "" "-ldl" ; do
3384 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3386 if test "$_dl" = yes ; then
3387 def_dl
='#define HAVE_LIBDL 1'
3389 def_dl
='#undef HAVE_LIBDL'
3394 echocheck
"dynamic a/v plugins support"
3395 if test "$_dl" = no
; then
3398 if test "$_dynamic_plugins" = yes ; then
3399 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3401 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3403 echores
"$_dynamic_plugins"
3406 def_threads
='#define HAVE_THREADS 0'
3410 THREAD_CFLAGS
=-D_REENTRANT
3411 elif freebsd || netbsd || openbsd || bsdos
; then
3412 THREAD_CFLAGS
=-D_THREAD_SAFE
3414 if test "$_pthreads" = auto
; then
3416 #include <pthread.h>
3417 void* func(void *arg) { return arg; }
3418 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3422 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3423 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3424 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3428 if test "$_pthreads" = yes ; then
3429 test $_ld_pthread && _res_comment
="using $_ld_pthread"
3430 def_pthreads
='#define HAVE_PTHREADS 1'
3431 def_threads
='#define HAVE_THREADS 1'
3432 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3434 _res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3435 def_pthreads
='#undef HAVE_PTHREADS'
3436 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3437 mingw32 || _win32dll
=no
3439 echores
"$_pthreads"
3442 if test "$_pthreads" = yes ; then
3443 def_pthread_cache
="#define PTHREAD_CACHE 1"
3446 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3450 echocheck
"w32threads"
3451 if test "$_pthreads" = yes ; then
3452 _res_comment
="using pthread instead"
3455 if test "$_w32threads" = auto
; then
3457 mingw32
&& _w32threads
=yes
3459 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3460 echores
"$_w32threads"
3464 if test "$_rpath" = yes ; then
3465 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3466 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3473 if test "$_iconv" = auto
; then
3478 #define INBUFSIZE 1024
3479 #define OUTBUFSIZE 4096
3481 char inbuffer[INBUFSIZE];
3482 char outbuffer[OUTBUFSIZE];
3487 char *tocode="UTF-8";
3488 char *fromcode="cp1250";
3489 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3490 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3491 char *iptr=inbuffer;
3492 char *optr=outbuffer;
3493 size_t inleft=numread;
3494 size_t outleft=OUTBUFSIZE;
3495 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3497 write(1, outbuffer, OUTBUFSIZE - outleft);
3500 if (iconv_close(icdsc) == -1)
3507 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3508 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3512 if test "$_iconv" = yes ; then
3513 def_iconv
='#define CONFIG_ICONV 1'
3515 def_iconv
='#undef CONFIG_ICONV'
3520 echocheck
"soundcard.h"
3522 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3523 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3524 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3526 #include <$_soundcard_header>
3527 int main(void) { return 0; }
3529 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3532 if test "$_soundcard_h" = yes ; then
3533 if test $_soundcard_header = "sys/soundcard.h"; then
3534 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3536 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3539 echores
"$_soundcard_h"
3542 echocheck
"sys/dvdio.h"
3545 #include <sys/dvdio.h>
3546 int main(void) { return 0; }
3549 cc_check
&& _dvdio
=yes
3550 if test "$_dvdio" = yes ; then
3551 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3553 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3558 echocheck
"sys/cdio.h"
3561 #include <sys/cdio.h>
3562 int main(void) { return 0; }
3565 cc_check
&& _cdio
=yes
3566 if test "$_cdio" = yes ; then
3567 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3569 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3574 echocheck
"linux/cdrom.h"
3576 #include <sys/types.h>
3577 #include <linux/cdrom.h>
3578 int main(void) { return 0; }
3581 cc_check
&& _cdrom
=yes
3582 if test "$_cdrom" = yes ; then
3583 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3585 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3593 int main(void) { return 0; }
3596 cc_check
&& _dvd
=yes
3597 if test "$_dvd" = yes ; then
3598 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3600 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3606 echocheck
"BSDI dvd.h"
3609 int main(void) { return 0; }
3612 cc_check
&& _bsdi_dvd
=yes
3613 if test "$_bsdi_dvd" = yes ; then
3614 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3616 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3618 echores
"$_bsdi_dvd"
3623 # also used by AIX, but AIX does not support VCD and/or libdvdread
3624 echocheck
"HP-UX SCSI header"
3626 #include <sys/scsi.h>
3627 int main(void) { return 0; }
3630 cc_check
&& _hpux_scsi_h
=yes
3631 if test "$_hpux_scsi_h" = yes ; then
3632 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3634 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3636 echores
"$_hpux_scsi_h"
3641 echocheck
"userspace SCSI headers (Solaris)"
3644 #include <stropts.h>
3645 #include <sys/scsi/scsi_types.h>
3646 #include <sys/scsi/impl/uscsi.h>
3647 int main(void) { return 0; }
3650 cc_check
&& _sol_scsi_h
=yes
3651 if test "$_sol_scsi_h" = yes ; then
3652 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3654 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3656 echores
"$_sol_scsi_h"
3661 if test "$_termcap" = auto
; then
3665 int main(void) { tgetent(NULL, NULL); return 0; }
3668 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3669 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3670 && _termcap
=yes && break
3673 if test "$_termcap" = yes ; then
3674 def_termcap
='#define HAVE_TERMCAP 1'
3675 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3677 def_termcap
='#undef HAVE_TERMCAP'
3683 def_termios
='#undef HAVE_TERMIOS'
3684 def_termios_h
='#undef HAVE_TERMIOS_H'
3685 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3686 if test "$_termios" = auto
; then
3688 for _termios_header
in "sys/termios.h" "termios.h"; do
3690 #include <$_termios_header>
3691 int main(void) { return 0; }
3693 cc_check
&& _termios
=yes && _res_comment
="using $_termios_header" && break
3697 if test "$_termios" = yes ; then
3698 def_termios
='#define HAVE_TERMIOS 1'
3699 if test "$_termios_header" = "termios.h" ; then
3700 def_termios_h
='#define HAVE_TERMIOS_H 1'
3702 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3709 if test "$_shm" = auto
; then
3711 #include <sys/types.h>
3712 #include <sys/shm.h>
3713 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3716 cc_check
&& _shm
=yes
3718 if test "$_shm" = yes ; then
3719 def_shm
='#define HAVE_SHM 1'
3721 def_shm
='#undef HAVE_SHM'
3726 echocheck
"strsep()"
3729 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3732 cc_check
&& _strsep
=yes
3733 if test "$_strsep" = yes ; then
3734 def_strsep
='#define HAVE_STRSEP 1'
3737 def_strsep
='#undef HAVE_STRSEP'
3743 echocheck
"vsscanf()"
3745 #define _ISOC99_SOURCE
3748 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3751 cc_check
&& _vsscanf
=yes
3752 if test "$_vsscanf" = yes ; then
3753 def_vsscanf
='#define HAVE_VSSCANF 1'
3756 def_vsscanf
='#undef HAVE_VSSCANF'
3764 #define _XOPEN_SOURCE 600
3766 int main(void) { swab(0, 0, 0); return 0; }
3769 cc_check
&& _swab
=yes
3770 if test "$_swab" = yes ; then
3771 def_swab
='#define HAVE_SWAB 1'
3774 def_swab
='#undef HAVE_SWAB'
3779 echocheck
"POSIX select()"
3783 #include <sys/types.h>
3785 #include <sys/time.h>
3787 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3790 def_posix_select
='#undef HAVE_POSIX_SELECT'
3791 #select() of kLIBC (OS/2) supports socket only
3792 ! os2
&& cc_check
&& _posix_select
=yes \
3793 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3794 echores
"$_posix_select"
3797 echocheck
"audio select()"
3798 if test "$_select" = no
; then
3799 def_select
='#undef HAVE_AUDIO_SELECT'
3800 elif test "$_select" = yes ; then
3801 def_select
='#define HAVE_AUDIO_SELECT 1'
3806 echocheck
"gettimeofday()"
3809 #include <sys/time.h>
3810 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3813 cc_check
&& _gettimeofday
=yes
3814 if test "$_gettimeofday" = yes ; then
3815 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3816 _need_gettimeofday
=no
3818 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3819 _need_gettimeofday
=yes
3821 echores
"$_gettimeofday"
3828 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3831 cc_check
&& _glob
=yes
3832 if test "$_glob" = yes ; then
3833 def_glob
='#define HAVE_GLOB 1'
3836 def_glob
='#undef HAVE_GLOB'
3842 echocheck
"setenv()"
3845 int main(void) { setenv("","",0); return 0; }
3848 cc_check
&& _setenv
=yes
3849 if test "$_setenv" = yes ; then
3850 def_setenv
='#define HAVE_SETENV 1'
3853 def_setenv
='#undef HAVE_SETENV'
3860 echocheck
"sysi86()"
3862 #include <sys/sysi86.h>
3863 int main(void) { sysi86(0); return 0; }
3866 cc_check
&& _sysi86
=yes
3867 if test "$_sysi86" = yes ; then
3868 def_sysi86
='#define HAVE_SYSI86 1'
3870 #include <sys/sysi86.h>
3871 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3873 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3875 def_sysi86
='#undef HAVE_SYSI86'
3881 echocheck
"sys/sysinfo.h"
3883 #include <sys/sysinfo.h>
3885 struct sysinfo s_info;
3891 cc_check
&& _sys_sysinfo
=yes
3892 if test "$_sys_sysinfo" = yes ; then
3893 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
3895 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
3897 echores
"$_sys_sysinfo"
3902 echocheck
"Mac OS X Finder Support"
3903 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
3904 if test "$_macosx_finder" = yes ; then
3905 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
3906 extra_ldflags
="$extra_ldflags -framework Carbon"
3908 echores
"$_macosx_finder"
3910 echocheck
"Mac OS X Bundle file locations"
3911 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
3912 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
3913 if test "$_macosx_bundle" = yes ; then
3914 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
3915 extra_ldflags
="$extra_ldflags -framework Carbon"
3917 echores
"$_macosx_bundle"
3919 echocheck
"Apple Remote"
3920 if test "$_apple_remote" = auto
; then
3924 #include <IOKit/IOCFPlugIn.h>
3926 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3927 CFMutableDictionaryRef hidMatchDictionary;
3928 IOReturn ioReturnValue;
3930 // Set up a matching dictionary to search the I/O Registry by class.
3931 // name for all HID class devices
3932 hidMatchDictionary = IOServiceMatching("AppleIRController");
3934 // Now search I/O Registry for matching devices.
3935 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3936 hidMatchDictionary, &hidObjectIterator);
3938 // If search is unsuccessful, return nonzero.
3939 if (ioReturnValue != kIOReturnSuccess ||
3940 !IOIteratorIsValid(hidObjectIterator)) {
3946 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
3948 if test "$_apple_remote" = yes ; then
3949 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
3950 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
3952 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
3954 echores
"$_apple_remote"
3960 echocheck
"Apple IR"
3961 if test "$_apple_ir" = auto
; then
3964 #include <linux/types.h>
3965 #include <linux/input.h>
3967 struct input_event ev;
3972 cc_check
&& _apple_ir
=yes
3974 if test "$_apple_ir" = yes ; then
3975 def_apple_ir
='#define CONFIG_APPLE_IR 1'
3977 def_apple_ir
='#undef CONFIG_APPLE_IR'
3979 echores
"$_apple_ir"
3982 echocheck
"pkg-config"
3983 _pkg_config
=pkg-config
3984 if $
($_pkg_config --version > /dev
/null
2>&1); then
3985 if test "$_ld_static"; then
3986 _pkg_config
="$_pkg_config --static"
3995 echocheck
"Samba support (libsmbclient)"
3996 if test "$_smb" = yes; then
3997 extra_ldflags
="$extra_ldflags -lsmbclient"
3999 if test "$_smb" = auto
; then
4002 #include <libsmbclient.h>
4003 int main(void) { smbc_opendir("smb://"); return 0; }
4005 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
4006 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
4011 if test "$_smb" = yes; then
4012 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
4013 _inputmodules
="smb $_inputmodules"
4015 def_smb
="#undef CONFIG_LIBSMBCLIENT"
4016 _noinputmodules
="smb $_noinputmodules"
4027 if test "$_tdfxfb" = yes ; then
4028 def_tdfxfb
='#define CONFIG_TDFXFB 1'
4029 _vomodules
="tdfxfb $_vomodules"
4031 def_tdfxfb
='#undef CONFIG_TDFXFB'
4032 _novomodules
="tdfxfb $_novomodules"
4037 if test "$_s3fb" = yes ; then
4038 def_s3fb
='#define CONFIG_S3FB 1'
4039 _vomodules
="s3fb $_vomodules"
4041 def_s3fb
='#undef CONFIG_S3FB'
4042 _novomodules
="s3fb $_novomodules"
4047 if test "$_wii" = yes ; then
4048 def_wii
='#define CONFIG_WII 1'
4049 _vomodules
="wii $_vomodules"
4051 def_wii
='#undef CONFIG_WII'
4052 _novomodules
="wii $_novomodules"
4057 if test "$_tdfxvid" = yes ; then
4058 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
4059 _vomodules
="tdfx_vid $_vomodules"
4061 def_tdfxvid
='#undef CONFIG_TDFX_VID'
4062 _novomodules
="tdfx_vid $_novomodules"
4067 if test "$_xvr100" = auto
; then
4070 #include <sys/fbio.h>
4071 #include <sys/visual_io.h>
4073 struct vis_identifier ident;
4074 struct fbgattr attr;
4075 ioctl(0, VIS_GETIDENTIFIER, &ident);
4076 ioctl(0, FBIOGATTR, &attr);
4081 cc_check
&& _xvr100
=yes
4083 if test "$_xvr100" = yes ; then
4084 def_xvr100
='#define CONFIG_XVR100 1'
4085 _vomodules
="xvr100 $_vomodules"
4087 def_tdfxvid
='#undef CONFIG_XVR100'
4088 _novomodules
="xvr100 $_novomodules"
4093 if test "$_tga" = yes ; then
4094 def_tga
='#define CONFIG_TGA 1'
4095 _vomodules
="tga $_vomodules"
4097 def_tga
='#undef CONFIG_TGA'
4098 _novomodules
="tga $_novomodules"
4103 echocheck
"md5sum support"
4104 if test "$_md5sum" = yes; then
4105 def_md5sum
="#define CONFIG_MD5SUM 1"
4106 _vomodules
="md5sum $_vomodules"
4108 def_md5sum
="#undef CONFIG_MD5SUM"
4109 _novomodules
="md5sum $_novomodules"
4114 echocheck
"yuv4mpeg support"
4115 if test "$_yuv4mpeg" = yes; then
4116 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4117 _vomodules
="yuv4mpeg $_vomodules"
4119 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4120 _novomodules
="yuv4mpeg $_novomodules"
4122 echores
"$_yuv4mpeg"
4126 if test "$_bl" = yes ; then
4127 def_bl
='#define CONFIG_BL 1'
4128 _vomodules
="bl $_vomodules"
4130 def_bl
='#undef CONFIG_BL'
4131 _novomodules
="bl $_novomodules"
4136 echocheck
"DirectFB"
4137 if test "$_directfb" = auto
; then
4140 #include <directfb.h>
4141 int main(void) { DirectFBInit(0, 0); return 0; }
4143 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4144 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4145 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4146 extra_cflags
="$extra_cflags $_inc_tmp" && break
4151 expr $1 \
* 65536 + $2 \
* 256 + $3
4154 if test "$_directfb" = yes; then
4156 #include <directfb_version.h>
4158 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4161 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4162 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4163 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4164 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4165 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4166 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4167 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4168 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4169 _res_comment
="$_directfb_version"
4170 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4172 def_directfb_version
='#undef DIRECTFBVERSION'
4174 _res_comment
="version >=0.9.13 required"
4178 _res_comment
="failed to get version"
4181 echores
"$_directfb"
4183 if test "$_directfb" = yes ; then
4184 def_directfb
='#define CONFIG_DIRECTFB 1'
4185 _vomodules
="directfb $_vomodules"
4186 libs_mplayer
="$libs_mplayer -ldirectfb"
4188 def_directfb
='#undef CONFIG_DIRECTFB'
4189 _novomodules
="directfb $_novomodules"
4191 if test "$_dfbmga" = yes; then
4192 _vomodules
="dfbmga $_vomodules"
4193 def_dfbmga
='#define CONFIG_DFBMGA 1'
4195 _novomodules
="dfbmga $_novomodules"
4196 def_dfbmga
='#undef CONFIG_DFBMGA'
4200 echocheck
"X11 headers presence"
4202 _res_comment
="check if the dev(el) packages are installed"
4203 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4204 if test -f "$I/X11/Xlib.h" ; then
4210 if test $_cross_compile = no
; then
4211 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/X11R
6/include \
4212 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4213 if test -f "$I/X11/Xlib.h" ; then
4214 extra_cflags
="$extra_cflags -I$I"
4216 _res_comment
="using $I"
4221 echores
"$_x11_headers"
4225 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4227 #include <X11/Xlib.h>
4228 #include <X11/Xutil.h>
4229 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4231 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4232 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64 \
4235 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4237 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4239 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4240 && _x11
=yes && break
4243 if test "$_x11" = yes ; then
4244 def_x11
='#define CONFIG_X11 1'
4245 _vomodules
="x11 xover $_vomodules"
4248 def_x11
='#undef CONFIG_X11'
4249 _novomodules
="x11 $_novomodules"
4250 _res_comment
="check if the dev(el) packages are installed"
4251 # disable stuff that depends on X
4252 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4256 echocheck
"Xss screensaver extensions"
4257 if test "$_xss" = auto
; then
4259 #include <X11/Xlib.h>
4260 #include <X11/extensions/scrnsaver.h>
4261 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4264 cc_check
-lXss && _xss
=yes
4266 if test "$_xss" = yes ; then
4267 def_xss
='#define CONFIG_XSS 1'
4268 libs_mplayer
="$libs_mplayer -lXss"
4270 def_xss
='#undef CONFIG_XSS'
4277 if test "$_x11" = yes ; then
4279 #include <X11/Xmd.h>
4280 #include <X11/Xlib.h>
4281 #include <X11/Xutil.h>
4282 #include <X11/Xatom.h>
4283 #include <X11/extensions/dpms.h>
4284 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4286 cc_check
-lXdpms && _xdpms3
=yes
4288 #include <X11/Xlib.h>
4289 #include <X11/extensions/dpms.h>
4290 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4292 cc_check
-lXext && _xdpms4
=yes
4294 if test "$_xdpms4" = yes ; then
4295 def_xdpms
='#define CONFIG_XDPMS 1'
4296 _res_comment
="using Xdpms 4"
4298 elif test "$_xdpms3" = yes ; then
4299 def_xdpms
='#define CONFIG_XDPMS 1'
4300 libs_mplayer
="$libs_mplayer -lXdpms"
4301 _res_comment
="using Xdpms 3"
4304 def_xdpms
='#undef CONFIG_XDPMS'
4310 if test "$_xv" = auto
; then
4312 #include <X11/Xlib.h>
4313 #include <X11/extensions/Xvlib.h>
4315 (void) XvGetPortAttribute(0, 0, 0, 0);
4316 (void) XvQueryPortAttributes(0, 0, 0);
4320 cc_check
-lXv && _xv
=yes
4323 if test "$_xv" = yes ; then
4324 def_xv
='#define CONFIG_XV 1'
4325 libs_mplayer
="$libs_mplayer -lXv"
4326 _vomodules
="xv $_vomodules"
4328 def_xv
='#undef CONFIG_XV'
4329 _novomodules
="xv $_novomodules"
4335 if test "$_xv" = yes && test "$_xvmc" != no
; then
4338 #include <X11/Xlib.h>
4339 #include <X11/extensions/Xvlib.h>
4340 #include <X11/extensions/XvMClib.h>
4342 (void) XvMCQueryExtension(0,0,0);
4343 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4346 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4347 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4350 if test "$_xvmc" = yes ; then
4351 def_xvmc
='#define CONFIG_XVMC 1'
4352 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4353 _vomodules
="xvmc $_vomodules"
4354 _res_comment
="using $_xvmclib"
4356 def_xvmc
='#define CONFIG_XVMC 0'
4357 _novomodules
="xvmc $_novomodules"
4358 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_XVMC_DECODER
//)
4364 if test "$_vdpau" = auto
; then
4366 if test "$_dl" = yes ; then
4368 #include <vdpau/vdpau_x11.h>
4370 (void) vdp_device_create_x11(0, 0, 0, 0);
4371 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4373 cc_check
-lvdpau && _vdpau
=yes
4376 if test "$_vdpau" = yes ; then
4377 def_vdpau
='#define CONFIG_VDPAU 1'
4378 libs_mplayer
="$libs_mplayer -lvdpau"
4379 _vomodules
="vdpau $_vomodules"
4381 def_vdpau
='#define CONFIG_VDPAU 0'
4382 _novomodules
="vdpau $_novomodules"
4383 _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
//)
4388 echocheck
"Xinerama"
4389 if test "$_xinerama" = auto
; then
4391 #include <X11/Xlib.h>
4392 #include <X11/extensions/Xinerama.h>
4393 int main(void) { (void) XineramaIsActive(0); return 0; }
4396 cc_check
-lXinerama && _xinerama
=yes
4399 if test "$_xinerama" = yes ; then
4400 def_xinerama
='#define CONFIG_XINERAMA 1'
4401 libs_mplayer
="$libs_mplayer -lXinerama"
4403 def_xinerama
='#undef CONFIG_XINERAMA'
4405 echores
"$_xinerama"
4408 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4409 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4410 # named 'X extensions' or something similar.
4411 # This check may be useful for future mplayer versions (to change resolution)
4412 # If you run into problems, remove '-lXxf86vm'.
4414 if test "$_vm" = auto
; then
4416 #include <X11/Xlib.h>
4417 #include <X11/extensions/xf86vmode.h>
4418 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4421 cc_check
-lXxf86vm && _vm
=yes
4423 if test "$_vm" = yes ; then
4424 def_vm
='#define CONFIG_XF86VM 1'
4425 libs_mplayer
="$libs_mplayer -lXxf86vm"
4427 def_vm
='#undef CONFIG_XF86VM'
4431 # Check for the presence of special keycodes, like audio control buttons
4432 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4433 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4434 # have these new keycodes.
4435 echocheck
"XF86keysym"
4436 if test "$_xf86keysym" = auto
; then
4439 #include <X11/Xlib.h>
4440 #include <X11/XF86keysym.h>
4441 int main(void) { return XF86XK_AudioPause; }
4443 cc_check
&& _xf86keysym
=yes
4445 if test "$_xf86keysym" = yes ; then
4446 def_xf86keysym
='#define CONFIG_XF86XK 1'
4448 def_xf86keysym
='#undef CONFIG_XF86XK'
4450 echores
"$_xf86keysym"
4453 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4455 #include <X11/Xlib.h>
4456 #include <X11/extensions/xf86dga.h>
4457 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4460 cc_check
-lXxf86dga && _dga2
=yes
4462 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4464 #include <X11/Xlib.h>
4465 #include <X11/extensions/xf86dga.h>
4466 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4469 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4473 def_dga
='#undef CONFIG_DGA'
4474 def_dga1
='#undef CONFIG_DGA1'
4475 def_dga2
='#undef CONFIG_DGA2'
4476 if test "$_dga1" = yes ; then
4478 def_dga1
='#define CONFIG_DGA1 1'
4479 _res_comment
="using DGA 1.0"
4480 elif test "$_dga2" = yes ; then
4482 def_dga2
='#define CONFIG_DGA2 1'
4483 _res_comment
="using DGA 2.0"
4485 if test "$_dga" = yes ; then
4486 def_dga
='#define CONFIG_DGA 1'
4487 libs_mplayer
="$libs_mplayer -lXxf86dga"
4488 _vomodules
="dga $_vomodules"
4490 _novomodules
="dga $_novomodules"
4496 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4497 def_3dfx
='#define CONFIG_3DFX 1'
4498 _vomodules
="3dfx $_vomodules"
4500 def_3dfx
='#undef CONFIG_3DFX'
4501 _novomodules
="3dfx $_novomodules"
4507 def_vidix
='#undef CONFIG_VIDIX'
4508 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4509 _vidix_drv_cyberblade
=no
4510 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4512 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4513 _vidix_drv_mach64
=no
4514 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4516 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4517 _vidix_drv_mga_crtc2
=no
4518 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4519 _vidix_drv_nvidia
=no
4520 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4522 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4524 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4525 _vidix_drv_radeon
=no
4526 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4527 _vidix_drv_rage128
=no
4528 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4530 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4531 _vidix_drv_sh_veu
=no
4532 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4534 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4535 _vidix_drv_unichrome
=no
4536 if test "$_vidix" = auto
; then
4538 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4540 x86_64
&& win32
&& _vidix
=no
4541 (ppc || alpha
) && linux
&& _vidix
=yes
4545 if test "$_vidix" = yes ; then
4546 def_vidix
='#define CONFIG_VIDIX 1'
4547 _vomodules
="cvidix $_vomodules"
4548 # FIXME: ivtv driver temporarily disabled until we have a proper test
4549 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4550 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4552 # some vidix drivers are architecture and os specific, discard them elsewhere
4553 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4554 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4556 for driver
in $_vidix_drivers ; do
4557 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4558 eval _vidix_drv_
${driver}=yes
4559 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4562 echocheck
"VIDIX PCI device name database"
4563 echores
"$_vidix_pcidb"
4564 if test "$_vidix_pcidb" = yes ; then
4570 echocheck
"VIDIX dhahelper support"
4571 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4572 echores
"$_dhahelper"
4574 echocheck
"VIDIX svgalib_helper support"
4575 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4576 echores
"$_svgalib_helper"
4579 _novomodules
="cvidix $_novomodules"
4582 if test "$_vidix" = yes && win32
; then
4584 _vomodules
="winvidix $_vomodules"
4585 libs_mplayer
="$libs_mplayer -lgdi32"
4587 _novomodules
="winvidix $_novomodules"
4589 if test "$_vidix" = yes && test "$_x11" = yes; then
4591 _vomodules
="xvidix $_vomodules"
4593 _novomodules
="xvidix $_novomodules"
4596 echocheck
"/dev/mga_vid"
4597 if test "$_mga" = auto
; then
4599 test -c /dev
/mga_vid
&& _mga
=yes
4601 if test "$_mga" = yes ; then
4602 def_mga
='#define CONFIG_MGA 1'
4603 _vomodules
="mga $_vomodules"
4605 def_mga
='#undef CONFIG_MGA'
4606 _novomodules
="mga $_novomodules"
4611 if test "$_xmga" = auto
; then
4613 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4615 if test "$_xmga" = yes ; then
4616 def_xmga
='#define CONFIG_XMGA 1'
4617 _vomodules
="xmga $_vomodules"
4619 def_xmga
='#undef CONFIG_XMGA'
4620 _novomodules
="xmga $_novomodules"
4626 if test "$_ggi" = auto
; then
4628 #include <ggi/ggi.h>
4629 int main(void) { ggiInit(); return 0; }
4632 cc_check
-lggi && _ggi
=yes
4634 if test "$_ggi" = yes ; then
4635 def_ggi
='#define CONFIG_GGI 1'
4636 libs_mplayer
="$libs_mplayer -lggi"
4637 _vomodules
="ggi $_vomodules"
4639 def_ggi
='#undef CONFIG_GGI'
4640 _novomodules
="ggi $_novomodules"
4644 echocheck
"GGI extension: libggiwmh"
4645 if test "$_ggiwmh" = auto
; then
4648 #include <ggi/ggi.h>
4649 #include <ggi/wmh.h>
4650 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4652 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4654 # needed to get right output on obscure combination
4655 # like --disable-ggi --enable-ggiwmh
4656 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4657 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4658 libs_mplayer
="$libs_mplayer -lggiwmh"
4661 def_ggiwmh
='#undef CONFIG_GGIWMH'
4667 if test "$_aa" = auto
; then
4670 extern struct aa_hardware_params aa_defparams;
4671 extern struct aa_renderparams aa_defrenderparams;
4675 (void) aa_init(0, 0, 0);
4676 c = aa_autoinit(&aa_defparams);
4677 p = aa_getrenderparams();
4678 aa_autoinitkbd(c,0);
4682 for _ld_tmp
in "-laa" ; do
4683 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4686 if test "$_aa" = yes ; then
4687 def_aa
='#define CONFIG_AA 1'
4689 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4691 _vomodules
="aa $_vomodules"
4693 def_aa
='#undef CONFIG_AA'
4694 _novomodules
="aa $_novomodules"
4700 if test "$_caca" = auto
; then
4702 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4705 #ifdef CACA_API_VERSION_1
4708 int main(void) { (void) caca_init(); return 0; }
4710 cc_check $
(caca-config
--libs) && _caca
=yes
4713 if test "$_caca" = yes ; then
4714 def_caca
='#define CONFIG_CACA 1'
4715 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4716 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4717 _vomodules
="caca $_vomodules"
4719 def_caca
='#undef CONFIG_CACA'
4720 _novomodules
="caca $_novomodules"
4726 if test "$_svga" = auto
; then
4729 int main(void) { return 0; }
4732 cc_check
-lvga $_ld_lm && _svga
=yes
4734 if test "$_svga" = yes ; then
4735 def_svga
='#define CONFIG_SVGALIB 1'
4736 libs_mplayer
="$libs_mplayer -lvga"
4737 _vomodules
="svga $_vomodules"
4739 def_svga
='#undef CONFIG_SVGALIB'
4740 _novomodules
="svga $_novomodules"
4746 if test "$_fbdev" = auto
; then
4750 if test "$_fbdev" = yes ; then
4751 def_fbdev
='#define CONFIG_FBDEV 1'
4752 _vomodules
="fbdev $_vomodules"
4754 def_fbdev
='#undef CONFIG_FBDEV'
4755 _novomodules
="fbdev $_novomodules"
4762 if test "$_dvb" = auto
; then
4766 #include <sys/ioctl.h>
4770 #include <ost/dmx.h>
4771 #include <ost/frontend.h>
4772 #include <ost/sec.h>
4773 #include <ost/video.h>
4774 #include <ost/audio.h>
4775 int main(void) {return 0;}
4777 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4778 cc_check
$_inc_tmp && _dvb
=yes && \
4779 extra_cflags
="$extra_cflags $_inc_tmp" && break
4783 if test "$_dvb" = yes ; then
4784 def_dvb
='#define CONFIG_DVB 1'
4785 def_dvbin
='#define CONFIG_DVBIN 1'
4786 _aomodules
="mpegpes(dvb) $_aomodules"
4787 _vomodules
="mpegpes(dvb) $_vomodules"
4790 echocheck
"DVB HEAD"
4791 if test "$_dvbhead" = auto
; then
4796 #include <sys/ioctl.h>
4800 #include <linux/dvb/dmx.h>
4801 #include <linux/dvb/frontend.h>
4802 #include <linux/dvb/video.h>
4803 #include <linux/dvb/audio.h>
4804 int main(void) {return 0;}
4806 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4807 cc_check
$_inc_tmp && _dvbhead
=yes && \
4808 extra_cflags
="$extra_cflags $_inc_tmp" && break
4812 if test "$_dvbhead" = yes ; then
4813 def_dvb
='#define CONFIG_DVB 1'
4814 def_dvb_head
='#define CONFIG_DVB_HEAD 1'
4815 def_dvbin
='#define CONFIG_DVBIN 1'
4816 _aomodules
="mpegpes(dvb) $_aomodules"
4817 _vomodules
="mpegpes(dvb) $_vomodules"
4820 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4821 def_dvb
='#undef CONFIG_DVB'
4822 def_dvb_head
='#undef CONFIG_DVB_HEAD'
4823 def_dvbin
='#undef CONFIG_DVBIN '
4824 _aomodules
="mpegpes(file) $_aomodules"
4825 _vomodules
="mpegpes(file) $_vomodules"
4828 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4830 _inputmodules
="dvb $_inputmodules"
4833 _noinputmodules
="dvb $_noinputmodules"
4839 echocheck
"QuickTime"
4840 if test "$quicktime" = auto
; then
4842 #include <QuickTime/QuickTime.h>
4844 ImageDescription *desc;
4851 cc_check
-framework QuickTime
&& quicktime
=yes
4853 if test "$quicktime" = yes ; then
4854 extra_ldflags
="$extra_ldflags -framework QuickTime"
4855 def_quicktime
='#define CONFIG_QUICKTIME 1'
4857 def_quicktime
='#undef CONFIG_QUICKTIME'
4863 if test "$_quartz" = auto
; then
4865 #include <Carbon/Carbon.h>
4867 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
4872 cc_check
-framework Carbon
&& _quartz
=yes
4874 if test "$_quartz" = yes ; then
4875 libs_mplayer
="$libs_mplayer -framework Carbon"
4876 def_quartz
='#define CONFIG_QUARTZ 1'
4877 _vomodules
="quartz $_vomodules"
4879 def_quartz
='#undef CONFIG_QUARTZ'
4880 _novomodules
="quartz $_novomodules"
4884 echocheck
"CoreVideo"
4885 if test "$_corevideo" = auto
; then
4887 #include <Carbon/Carbon.h>
4888 #include <CoreServices/CoreServices.h>
4889 #include <OpenGL/OpenGL.h>
4890 #include <QuartzCore/CoreVideo.h>
4891 int main(void) { return 0; }
4894 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
4896 if test "$_corevideo" = yes ; then
4897 _vomodules
="corevideo $_vomodules"
4898 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
4899 def_corevideo
='#define CONFIG_COREVIDEO 1'
4901 _novomodules
="corevideo $_novomodules"
4902 def_corevideo
='#undef CONFIG_COREVIDEO'
4904 echores
"$_corevideo"
4909 # make sure this stays below CoreVideo to avoid issues due to namespace
4910 # conflicts between -lGL and -framework OpenGL
4912 #Note: this test is run even with --enable-gl since we autodetect linker flags
4913 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4916 #include <windows.h>
4920 #include <X11/Xlib.h>
4926 wglCreateContext(dc);
4928 glXCreateContext(NULL, NULL, NULL, True);
4935 if cc_check
-lGL $_ld_lm ; then
4938 libs_mplayer
="$libs_mplayer -lGL $_ld_dl"
4939 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4942 libs_mplayer
="$libs_mplayer -lGL $_ld_pthread $_ld_dl"
4944 if cc_check
-DGL_WIN32 -lopengl32 ; then
4947 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
4952 if test "$_gl" = yes ; then
4953 def_gl
='#define CONFIG_GL 1'
4954 _res_comment
="backends:"
4955 if test "$_gl_win32" = yes ; then
4956 def_gl_win32
='#define CONFIG_GL_WIN32 1'
4957 _res_comment
="$_res_comment win32"
4959 if test "$_gl_x11" = yes ; then
4960 def_gl_x11
='#define CONFIG_GL_X11 1'
4961 _res_comment
="$_res_comment x11"
4963 _vomodules
="opengl $_vomodules"
4965 def_gl
='#undef CONFIG_GL'
4966 def_gl_win32
='#undef CONFIG_GL_WIN32'
4967 def_gl_x11
='#undef CONFIG_GL_X11'
4968 _novomodules
="opengl $_novomodules"
4973 echocheck
"MatrixView"
4974 if test "$_gl" = no
; then
4977 if test "$matrixview" = yes ; then
4978 _vomodules
="matrixview $_vomodules"
4979 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
4981 _novomodules
="matrixview $_novomodules"
4982 def_matrixview
='#undef CONFIG_MATRIXVIEW'
4984 echores
"$matrixview"
4987 echocheck
"PNG support"
4988 if test "$_png" = auto
; then
4991 # Don't check for -lpng on irix since it has its own libpng
4992 # incompatible with the GNU libpng
4993 _res_comment
="disabled on irix (not GNU libpng)"
4999 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
5000 printf("libpng: %s\n", png_libpng_ver);
5001 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
5004 cc_check
-lpng -lz $_ld_lm && _png
=yes
5008 if test "$_png" = yes ; then
5009 def_png
='#define CONFIG_PNG 1'
5010 extra_ldflags
="$extra_ldflags -lpng -lz"
5012 def_png
='#undef CONFIG_PNG'
5015 echocheck
"MNG support"
5016 if test "$_mng" = auto
; then
5021 const char * p_ver = mng_version_text();
5022 return !p_ver || p_ver[0] == 0;
5025 if cc_check
-lmng -lz $_ld_lm ; then
5030 if test "$_mng" = yes ; then
5031 def_mng
='#define CONFIG_MNG 1'
5032 extra_ldflags
="$extra_ldflags -lmng -lz"
5034 def_mng
='#undef CONFIG_MNG'
5037 echocheck
"JPEG support"
5038 if test "$_jpeg" = auto
; then
5045 #include <jpeglib.h>
5046 int main(void) { return 0; }
5048 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
5052 if test "$_jpeg" = yes ; then
5053 def_jpeg
='#define CONFIG_JPEG 1'
5054 _vomodules
="jpeg $_vomodules"
5055 extra_ldflags
="$extra_ldflags -ljpeg"
5057 def_jpeg
='#undef CONFIG_JPEG'
5058 _novomodules
="jpeg $_novomodules"
5062 echocheck
"OpenJPEG (JPEG2000) support"
5063 if test "$libopenjpeg" = auto
; then
5067 #include <openjpeg.h>
5068 int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
5070 cc_check
-lopenjpeg $_ld_lm && libopenjpeg
=yes
5072 echores
"$libopenjpeg"
5073 if test "$libopenjpeg" = yes ; then
5074 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 1'
5075 extra_ldflags
="$extra_ldflags -lopenjpeg"
5076 _libavdecoders
="$_libavdecoders LIBOPENJPEG_DECODER"
5077 _libavencoders
="$_libavencoders LIBOPENJPEG_ENCODER"
5078 _codecmodules
="OpenJPEG $_codecmodules"
5080 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 0'
5081 _nocodecmodules
="OpenJPEG $_nocodecmodules"
5085 echocheck
"PNM support"
5086 if test "$_pnm" = yes; then
5087 def_pnm
="#define CONFIG_PNM 1"
5088 _vomodules
="pnm $_vomodules"
5090 def_pnm
="#undef CONFIG_PNM"
5091 _novomodules
="pnm $_novomodules"
5097 echocheck
"GIF support"
5098 # This is to appease people who want to force gif support.
5099 # If it is forced to yes, then we still do checks to determine
5100 # which gif library to use.
5101 if test "$_gif" = yes ; then
5106 if test "$_gif" = auto
; then
5109 #include <gif_lib.h>
5110 int main(void) { return 0; }
5112 for _ld_gif
in "-lungif" "-lgif" ; do
5113 cc_check
$_ld_gif && _gif
=yes && break
5117 # If no library was found, and the user wants support forced,
5118 # then we force it on with libgif, as this is the safest
5119 # assumption IMHO. (libungif & libregif both create symbolic
5120 # links to libgif. We also assume that no x11 support is needed,
5121 # because if you are forcing this, then you _should_ know what
5122 # you are doing. [ Besides, package maintainers should never
5123 # have compiled x11 deps into libungif in the first place. ] )
5126 if test "$_force_gif" = yes && test "$_gif" = no
; then
5131 if test "$_gif" = yes ; then
5132 def_gif
='#define CONFIG_GIF 1'
5133 _codecmodules
="gif $_codecmodules"
5134 _vomodules
="gif89a $_vomodules"
5135 _res_comment
="old version, some encoding functions disabled"
5136 def_gif_4
='#undef CONFIG_GIF_4'
5137 extra_ldflags
="$extra_ldflags $_ld_gif"
5141 #include <gif_lib.h>
5142 void catch() { exit(1); }
5144 signal(SIGSEGV, catch); // catch segfault
5145 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5146 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5150 if cc_check
"$_ld_gif" ; then
5151 def_gif_4
='#define CONFIG_GIF_4 1'
5155 def_gif
='#undef CONFIG_GIF'
5156 def_gif_4
='#undef CONFIG_GIF_4'
5157 _novomodules
="gif89a $_novomodules"
5158 _nocodecmodules
="gif $_nocodecmodules"
5163 case "$_gif" in yes*)
5164 echocheck
"broken giflib workaround"
5165 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5168 #include <gif_lib.h>
5171 printf("UserData is at address %p\n", gif.UserData);
5175 if cc_check
"$_ld_gif" ; then
5176 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5185 echocheck
"VESA support"
5186 if test "$_vesa" = auto
; then
5189 int main(void) { vbeVersion(); return 0; }
5192 cc_check
-lvbe -llrmi && _vesa
=yes
5194 if test "$_vesa" = yes ; then
5195 def_vesa
='#define CONFIG_VESA 1'
5196 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5197 _vomodules
="vesa $_vomodules"
5199 def_vesa
='#undef CONFIG_VESA'
5200 _novomodules
="vesa $_novomodules"
5212 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5213 if test -z "$_sdlconfig" ; then
5214 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5215 _sdlconfig
="sdl-config"
5216 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5217 _sdlconfig
="sdl11-config"
5222 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5224 #ifdef CONFIG_SDL_SDL_H
5225 #include <SDL/SDL.h>
5230 // we allow SDL hacking our main() only on OSX
5233 int main(int argc, char *argv[]) {
5234 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5239 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" ; do
5240 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5242 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5246 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5248 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5249 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5251 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5252 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5254 _inc_tmp
="$($_sdlconfig --cflags)"
5255 _ld_tmp
="$($_sdlconfig --libs)"
5257 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5258 _sdlversion
=$
($_sdlconfig --version |
sed 's/[^0-9]//g')
5259 if test "$_sdlversion" -gt 116 ; then
5260 if test "$_sdlversion" -lt 121 ; then
5261 def_sdlbuggy
='#define BUGGY_SDL'
5263 def_sdlbuggy
='#undef BUGGY_SDL'
5270 if test "$_sdl" = yes ; then
5271 def_sdl
='#define CONFIG_SDL 1'
5272 extra_cflags
="$extra_cflags $_inc_tmp"
5273 libs_mplayer
="$libs_mplayer $_ld_tmp"
5274 _vomodules
="sdl $_vomodules"
5275 _aomodules
="sdl $_aomodules"
5276 _res_comment
="using $_sdlconfig"
5278 def_sdl
='#undef CONFIG_SDL'
5279 _novomodules
="sdl $_novomodules"
5280 _noaomodules
="sdl $_noaomodules"
5286 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5287 if test "$_kva" = auto
; then
5291 int main( void ) { return 0; }
5294 cc_check
-lkva && _kva
=yes
5296 if test "$_kva" = yes ; then
5297 def_kva
='#define CONFIG_KVA 1'
5298 libs_mplayer
="$libs_mplayer -lkva"
5299 _vomodules
="kva $_vomodules"
5301 def_kva
='#undef CONFIG_KVA'
5302 _novomodules
="kva $_novomodules"
5310 echocheck
"Windows waveout"
5311 if test "$_win32waveout" = auto
; then
5313 #include <windows.h>
5314 #include <mmsystem.h>
5315 int main(void) { return 0; }
5318 cc_check
-lwinmm && _win32waveout
=yes
5320 if test "$_win32waveout" = yes ; then
5321 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5322 libs_mplayer
="$libs_mplayer -lwinmm"
5323 _aomodules
="win32 $_aomodules"
5325 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5326 _noaomodules
="win32 $_noaomodules"
5328 echores
"$_win32waveout"
5330 echocheck
"Direct3D"
5331 if test "$_direct3d" = auto
; then
5333 #include <windows.h>
5335 int main(void) { return 0; }
5338 cc_check
&& _direct3d
=yes
5340 if test "$_direct3d" = yes ; then
5341 def_direct3d
='#define CONFIG_DIRECT3D 1'
5342 _vomodules
="direct3d $_vomodules"
5344 def_direct3d
='#undef CONFIG_DIRECT3D'
5345 _novomodules
="direct3d $_novomodules"
5347 echores
"$_direct3d"
5350 if test "$_directx" = auto
; then
5352 #include <windows.h>
5355 int main(void) { return 0; }
5358 cc_check
-lgdi32 && _directx
=yes
5360 if test "$_directx" = yes ; then
5361 def_directx
='#define CONFIG_DIRECTX 1'
5362 libs_mplayer
="$libs_mplayer -lgdi32"
5363 _vomodules
="directx $_vomodules"
5364 _aomodules
="dsound $_aomodules"
5366 def_directx
='#undef CONFIG_DIRECTX'
5367 _novomodules
="directx $_novomodules"
5368 _noaomodules
="dsound $_noaomodules"
5376 if test "$_dxr2" = auto
; then
5379 #include <dxr2ioctl.h>
5380 int main(void) { return 0; }
5382 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5383 cc_check
$_inc_tmp && _dxr2
=yes && \
5384 extra_cflags
="$extra_cflags $_inc_tmp" && break
5387 if test "$_dxr2" = yes; then
5388 def_dxr2
='#define CONFIG_DXR2 1'
5389 _aomodules
="dxr2 $_aomodules"
5390 _vomodules
="dxr2 $_vomodules"
5392 def_dxr2
='#undef CONFIG_DXR2'
5393 _noaomodules
="dxr2 $_noaomodules"
5394 _novomodules
="dxr2 $_novomodules"
5399 if test "$_dxr3" = auto
; then
5401 #include <linux/em8300.h>
5402 int main(void) { return 0; }
5405 cc_check
&& _dxr3
=yes
5407 if test "$_dxr3" = yes ; then
5408 def_dxr3
='#define CONFIG_DXR3 1'
5409 _vomodules
="dxr3 $_vomodules"
5411 def_dxr3
='#undef CONFIG_DXR3'
5412 _novomodules
="dxr3 $_novomodules"
5417 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5418 if test "$_ivtv" = auto
; then
5421 #include <inttypes.h>
5422 #include <linux/types.h>
5423 #include <linux/videodev2.h>
5424 #include <linux/ivtv.h>
5425 #include <sys/ioctl.h>
5427 struct ivtv_cfg_stop_decode sd;
5428 struct ivtv_cfg_start_decode sd1;
5429 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5430 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5434 cc_check
&& _ivtv
=yes
5436 if test "$_ivtv" = yes ; then
5437 def_ivtv
='#define CONFIG_IVTV 1'
5438 _vomodules
="ivtv $_vomodules"
5439 _aomodules
="ivtv $_aomodules"
5441 def_ivtv
='#undef CONFIG_IVTV'
5442 _novomodules
="ivtv $_novomodules"
5443 _noaomodules
="ivtv $_noaomodules"
5448 echocheck
"V4L2 MPEG Decoder"
5449 if test "$_v4l2" = auto
; then
5452 #include <inttypes.h>
5453 #include <linux/types.h>
5454 #include <linux/videodev2.h>
5455 #include <linux/version.h>
5457 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5458 #error kernel headers too old, need 2.6.22
5460 struct v4l2_ext_controls ctrls;
5461 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5466 cc_check
&& _v4l2
=yes
5468 if test "$_v4l2" = yes ; then
5469 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5470 _vomodules
="v4l2 $_vomodules"
5471 _aomodules
="v4l2 $_aomodules"
5473 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5474 _novomodules
="v4l2 $_novomodules"
5475 _noaomodules
="v4l2 $_noaomodules"
5486 echocheck
"OSS Audio"
5487 if test "$_ossaudio" = auto
; then
5489 #include <sys/ioctl.h>
5490 #include <$_soundcard_header>
5491 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5494 cc_check
&& _ossaudio
=yes
5496 if test "$_ossaudio" = yes ; then
5497 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5498 _aomodules
="oss $_aomodules"
5499 if test "$_linux_devfs" = yes; then
5500 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5501 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5504 #include <sys/ioctl.h>
5505 #include <$_soundcard_header>
5506 #ifdef OPEN_SOUND_SYSTEM
5507 int main(void) { return 0; }
5509 #error Not the real thing
5513 cc_check
&& _real_ossaudio
=yes
5514 if test "$_real_ossaudio" = yes; then
5515 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5516 elif netbsd || openbsd
; then
5517 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5518 extra_ldflags
="$extra_ldflags -lossaudio"
5520 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5522 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5525 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5526 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5527 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5528 _noaomodules
="oss $_noaomodules"
5530 echores
"$_ossaudio"
5534 if test "$_arts" = auto
; then
5536 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5540 int main(void) { return 0; }
5542 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5547 if test "$_arts" = yes ; then
5548 def_arts
='#define CONFIG_ARTS 1'
5549 _aomodules
="arts $_aomodules"
5550 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5551 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5553 _noaomodules
="arts $_noaomodules"
5559 if test "$_esd" = auto
; then
5561 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5565 int main(void) { int fd = esd_open_sound("test"); return fd; }
5567 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5573 if test "$_esd" = yes ; then
5574 def_esd
='#define CONFIG_ESD 1'
5575 _aomodules
="esd $_aomodules"
5576 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5577 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5579 echocheck
"esd_get_latency()"
5582 int main(void) { return esd_get_latency(0); }
5584 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5585 echores
"$_esd_latency"
5587 def_esd
='#undef CONFIG_ESD'
5588 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5589 _noaomodules
="esd $_noaomodules"
5594 if test "$_nas" = auto
; then
5596 #include <audio/audiolib.h>
5597 int main(void) { return 0; }
5600 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5602 if test "$_nas" = yes ; then
5603 def_nas
='#define CONFIG_NAS 1'
5604 libs_mplayer
="$libs_mplayer -laudio -lXt"
5605 _aomodules
="nas $_aomodules"
5607 _noaomodules
="nas $_noaomodules"
5608 def_nas
='#undef CONFIG_NAS'
5614 if test "$_pulse" = auto
; then
5616 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5619 #include <pulse/pulseaudio.h>
5620 int main(void) { return 0; }
5622 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5628 if test "$_pulse" = yes ; then
5629 def_pulse
='#define CONFIG_PULSE 1'
5630 _aomodules
="pulse $_aomodules"
5631 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5632 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5634 def_pulse
='#undef CONFIG_PULSE'
5635 _noaomodules
="pulse $_noaomodules"
5640 if test "$_jack" = auto
; then
5644 #include <jack/jack.h>
5645 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5647 if cc_check
-ljack ; then
5648 libs_mplayer
="$libs_mplayer -ljack"
5649 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5650 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5651 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5657 if test "$_jack" = yes ; then
5658 def_jack
='#define CONFIG_JACK 1'
5659 _aomodules
="jack $_aomodules"
5661 _noaomodules
="jack $_noaomodules"
5666 if test "$_openal" = auto
; then
5670 #include <OpenAL/al.h>
5675 alSourceQueueBuffers(0, 0, 0);
5676 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5680 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5681 cc_check
$I && _openal
=yes && break
5682 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5684 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5686 if test "$_openal" = yes ; then
5687 def_openal
='#define CONFIG_OPENAL 1'
5688 _aomodules
="openal $_aomodules"
5690 _noaomodules
="openal $_noaomodules"
5694 echocheck
"ALSA audio"
5695 if test "$_alloca" != yes ; then
5697 _res_comment
="alloca missing"
5699 if test "$_alsa" != no
; then
5702 #include <sys/time.h>
5703 #include <sys/asoundlib.h>
5704 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5705 #error "alsa version != 0.5.x"
5707 int main(void) { return 0; }
5709 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5712 #include <sys/time.h>
5713 #include <sys/asoundlib.h>
5714 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5715 #error "alsa version != 0.9.x"
5717 int main(void) { return 0; }
5719 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5721 #include <sys/time.h>
5722 #include <alsa/asoundlib.h>
5723 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5724 #error "alsa version != 0.9.x"
5726 int main(void) { return 0; }
5728 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5731 #include <sys/time.h>
5732 #include <sys/asoundlib.h>
5733 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5734 #error "alsa version != 1.0.x"
5736 int main(void) { return 0; }
5738 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5740 #include <sys/time.h>
5741 #include <alsa/asoundlib.h>
5742 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5743 #error "alsa version != 1.0.x"
5745 int main(void) { return 0; }
5747 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5749 def_alsa
='#undef CONFIG_ALSA'
5750 def_alsa5
='#undef CONFIG_ALSA5'
5751 def_alsa9
='#undef CONFIG_ALSA9'
5752 def_alsa1x
='#undef CONFIG_ALSA1X'
5753 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5754 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5755 if test "$_alsaver" ; then
5757 if test "$_alsaver" = '0.5.x' ; then
5759 _aomodules
="alsa5 $_aomodules"
5760 def_alsa5
='#define CONFIG_ALSA5 1'
5761 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5762 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5763 elif test "$_alsaver" = '0.9.x-sys' ; then
5765 _aomodules
="alsa $_aomodules"
5766 def_alsa
='#define CONFIG_ALSA 1'
5767 def_alsa9
='#define CONFIG_ALSA9 1'
5768 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5769 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5770 elif test "$_alsaver" = '0.9.x-alsa' ; then
5772 _aomodules
="alsa $_aomodules"
5773 def_alsa
='#define CONFIG_ALSA 1'
5774 def_alsa9
='#define CONFIG_ALSA9 1'
5775 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5776 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5777 elif test "$_alsaver" = '1.0.x-sys' ; then
5779 _aomodules
="alsa $_aomodules"
5780 def_alsa
='#define CONFIG_ALSA 1'
5781 def_alsa1x
="#define CONFIG_ALSA1X 1"
5782 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5783 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5784 elif test "$_alsaver" = '1.0.x-alsa' ; then
5786 _aomodules
="alsa $_aomodules"
5787 def_alsa
='#define CONFIG_ALSA 1'
5788 def_alsa1x
="#define CONFIG_ALSA1X 1"
5789 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5790 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5793 _res_comment
="unknown version"
5795 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5797 _noaomodules
="alsa $_noaomodules"
5802 echocheck
"Sun audio"
5803 if test "$_sunaudio" = auto
; then
5805 #include <sys/types.h>
5806 #include <sys/audioio.h>
5807 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5810 cc_check
&& _sunaudio
=yes
5812 if test "$_sunaudio" = yes ; then
5813 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5814 _aomodules
="sun $_aomodules"
5816 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5817 _noaomodules
="sun $_noaomodules"
5819 echores
"$_sunaudio"
5822 def_mlib
='#define CONFIG_MLIB 0'
5824 echocheck
"Sun mediaLib"
5825 if test "$_mlib" = auto
; then
5829 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5831 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5838 echocheck
"CoreAudio"
5839 if test "$_coreaudio" = auto
; then
5841 #include <CoreAudio/CoreAudio.h>
5842 #include <AudioToolbox/AudioToolbox.h>
5843 #include <AudioUnit/AudioUnit.h>
5844 int main(void) { return 0; }
5847 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5849 if test "$_coreaudio" = yes ; then
5850 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5851 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5852 _aomodules
="coreaudio $_aomodules"
5854 def_coreaudio
='#undef CONFIG_COREAUDIO'
5855 _noaomodules
="coreaudio $_noaomodules"
5862 echocheck
"SGI audio"
5863 if test "$_sgiaudio" = auto
; then
5864 # check for SGI audio
5866 #include <dmedia/audio.h>
5867 int main(void) { return 0; }
5870 cc_check
&& _sgiaudio
=yes
5872 if test "$_sgiaudio" = "yes" ; then
5873 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
5874 libs_mplayer
="$libs_mplayer -laudio"
5875 _aomodules
="sgi $_aomodules"
5877 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
5878 _noaomodules
="sgi $_noaomodules"
5880 echores
"$_sgiaudio"
5886 if test "$_dart" = auto
; then
5890 int main( void ) { return 0; }
5893 cc_check
-ldart && _dart
=yes
5895 if test "$_dart" = yes ; then
5896 def_dart
='#define CONFIG_DART 1'
5897 libs_mplayer
="$libs_mplayer -ldart"
5898 _aomodules
="dart $_aomodules"
5900 def_dart
='#undef CONFIG_DART'
5901 _noaomodules
="dart $_noaomodules"
5907 # set default CD/DVD devices
5908 if win32 || os2
; then
5909 default_cdrom_device
="D:"
5911 default_cdrom_device
="/dev/disk1"
5912 elif dragonfly
; then
5913 default_cdrom_device
="/dev/cd0"
5915 default_cdrom_device
="/dev/acd0"
5917 default_cdrom_device
="/dev/rcd0a"
5919 default_cdrom_device
="/vol/dev/aliases/cdrom0"
5920 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
5921 # file system and the volfs service.
5922 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
5924 default_cdrom_device
="a1ide.device:2"
5926 default_cdrom_device
="/dev/cdrom"
5929 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
5930 default_dvd_device
=$default_cdrom_device
5932 default_dvd_device
="/dev/rdiskN"
5934 default_dvd_device
="/dev/dvd"
5938 echocheck
"VCD support"
5939 if test "$_vcd" = auto
; then
5941 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos
; then
5945 #include <ddk/ntddcdrm.h>
5946 int main(void) { return 0; }
5948 cc_check
&& _vcd
=yes
5951 if test "$_vcd" = yes; then
5952 _inputmodules
="vcd $_inputmodules"
5953 def_vcd
='#define CONFIG_VCD 1'
5955 def_vcd
='#undef CONFIG_VCD'
5956 _noinputmodules
="vcd $_noinputmodules"
5957 _res_comment
="not supported on this OS"
5964 if test "$_dvdread_internal" = auto
; then
5965 _dvdread_internal
=no
5967 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
5968 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5969 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
5970 || darwin || win32 || os2
; then
5971 _dvdread_internal
=yes
5973 extra_cflags
="-Ilibdvdread4 $extra_cflags"
5975 elif test "$_dvdread" = auto
; then
5977 if test "$_dl" = yes; then
5979 #include <inttypes.h>
5980 #include <dvdread/dvd_reader.h>
5981 #include <dvdread/ifo_types.h>
5982 #include <dvdread/ifo_read.h>
5983 #include <dvdread/nav_read.h>
5984 int main(void) { return 0; }
5986 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
5987 _dvdreadlibs
=$
($_dvdreadconfig --libs)
5988 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5989 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
5991 extra_cflags
="$extra_cflags $_dvdreadcflags"
5992 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
5993 _res_comment
="external"
5998 if test "$_dvdread_internal" = yes; then
5999 def_dvdread
='#define CONFIG_DVDREAD 1'
6000 _inputmodules
="dvdread(internal) $_inputmodules"
6002 _res_comment
="internal"
6003 elif test "$_dvdread" = yes; then
6004 def_dvdread
='#define CONFIG_DVDREAD 1'
6006 extra_ldflags
="$extra_ldflags -ldvdread"
6007 _inputmodules
="dvdread(external) $_inputmodules"
6008 _res_comment
="external"
6010 def_dvdread
='#undef CONFIG_DVDREAD'
6011 _noinputmodules
="dvdread $_noinputmodules"
6016 echocheck
"internal libdvdcss"
6017 if test "$_libdvdcss_internal" = auto
; then
6018 _libdvdcss_internal
=no
6019 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
6020 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
6022 if test "$_libdvdcss_internal" = yes ; then
6023 if linux || netbsd || openbsd || bsdos
; then
6024 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
6025 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
6026 elif freebsd || dragonfly
; then
6027 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
6029 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
6030 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
6032 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
6034 cflags_libdvdcss
="-DSYS_BEOS"
6036 cflags_libdvdcss
="-DSYS_OS2"
6038 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
6039 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
6040 _inputmodules
="libdvdcss(internal) $_inputmodules"
6043 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
6045 echores
"$_libdvdcss_internal"
6048 echocheck
"cdparanoia"
6049 if test "$_cdparanoia" = auto
; then
6051 #include <cdda_interface.h>
6052 #include <cdda_paranoia.h>
6053 // This need a better test. How ?
6054 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
6057 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
6058 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
6059 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
6062 if test "$_cdparanoia" = yes ; then
6064 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
6065 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
6067 echores
"$_cdparanoia"
6071 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
6074 #include <cdio/version.h>
6075 #include <cdio/cdda.h>
6076 #include <cdio/paranoia.h>
6078 void *test = cdda_verbose_set;
6079 printf("%s\n", CDIO_VERSION);
6080 return test == (void *)1;
6084 for _ld_tmp
in "" "-lwinmm" ; do
6085 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
6086 cc_check
$_ld_tmp $_ld_lm \
6087 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6089 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
6090 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
6091 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
6092 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
6093 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6096 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
6098 def_libcdio
='#define CONFIG_LIBCDIO 1'
6099 def_havelibcdio
='yes'
6101 if test "$_cdparanoia" = yes ; then
6102 _res_comment
="using cdparanoia"
6104 def_libcdio
='#undef CONFIG_LIBCDIO'
6105 def_havelibcdio
='no'
6109 if test "$_cdda" = yes ; then
6110 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
6111 def_cdparanoia
='#define CONFIG_CDDA 1'
6112 _inputmodules
="cdda $_inputmodules"
6114 def_cdparanoia
='#undef CONFIG_CDDA'
6115 _noinputmodules
="cdda $_noinputmodules"
6118 if test "$_cddb" = yes ; then
6119 def_cddb
='#define CONFIG_CDDB 1'
6120 _inputmodules
="cddb $_inputmodules"
6123 def_cddb
='#undef CONFIG_CDDB'
6124 _noinputmodules
="cddb $_noinputmodules"
6127 echocheck
"bitmap font support"
6128 if test "$_bitmap_font" = yes ; then
6129 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6131 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6133 echores
"$_bitmap_font"
6136 echocheck
"freetype >= 2.0.9"
6138 # freetype depends on iconv
6139 if test "$_iconv" = no
; then
6141 _res_comment
="iconv support needed"
6144 if test "$_freetype" = auto
; then
6145 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6148 #include <ft2build.h>
6149 #include FT_FREETYPE_H
6150 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6151 #error "Need FreeType 2.0.9 or newer"
6155 FT_Int major=-1,minor=-1,patch=-1;
6156 int err=FT_Init_FreeType(&library);
6161 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6166 if test "$_freetype" = yes ; then
6167 def_freetype
='#define CONFIG_FREETYPE 1'
6168 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6169 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6171 def_freetype
='#undef CONFIG_FREETYPE'
6173 echores
"$_freetype"
6175 if test "$_freetype" = no
; then
6177 _res_comment
="FreeType support needed"
6179 echocheck
"fontconfig"
6180 if test "$_fontconfig" = auto
; then
6184 #include <fontconfig/fontconfig.h>
6187 if (err == FcFalse) {
6188 printf("Couldn't initialize fontconfig lib\n");
6195 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6196 _ld_tmp
="-lfontconfig $_ld_tmp"
6197 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6199 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6200 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6201 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6202 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6203 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6206 if test "$_fontconfig" = yes ; then
6207 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6209 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6211 echores
"$_fontconfig"
6214 echocheck
"SSA/ASS support"
6215 # libass depends on FreeType
6216 if test "$_freetype" = no
; then
6219 _res_comment
="FreeType support needed"
6222 if test "$_ass" = auto
; then
6224 #include <ft2build.h>
6225 #include FT_FREETYPE_H
6226 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
6227 #error "Need FreeType 2.1.8 or newer"
6229 int main(void) { return 0; }
6232 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _ass
=yes
6233 if test "$_ass" = no
; then
6235 _res_comment
="FreeType >= 2.1.8 needed"
6236 elif test "$ass_internal" = no
; then
6237 _res_comment
="external"
6238 extra_ldflags
="$extra_ldflags -lass"
6241 if test "$_ass" = yes ; then
6242 def_ass
='#define CONFIG_ASS 1'
6244 def_ass
='#undef CONFIG_ASS'
6246 if test "$ass_internal" = yes ; then
6247 def_ass_internal
='#define CONFIG_ASS_INTERNAL 1'
6249 def_ass_internal
='#undef CONFIG_ASS_INTERNAL'
6254 echocheck
"fribidi with charsets"
6257 if test "$_fribidi" = auto
; then
6261 /* workaround for fribidi 0.10.4 and below */
6262 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6263 #include <fribidi/fribidi.h>
6265 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6266 printf("Fribidi headers are not consistents with the library!\n");
6275 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6276 if $_fribidiconfig --version > /dev
/null
2>&1 &&
6277 test "$_fribidi" = no
; then
6278 _inc_tmp
="$($_fribidiconfig --cflags)"
6279 _ld_tmp
="$($_fribidiconfig --libs)"
6280 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6283 if test "$_fribidi" = yes ; then
6284 def_fribidi
='#define CONFIG_FRIBIDI 1'
6285 extra_cflags
="$extra_cflags $_inc_tmp"
6286 extra_ldflags
="$extra_ldflags $_ld_tmp"
6288 def_fribidi
='#undef CONFIG_FRIBIDI'
6294 if test "$_enca" = auto
; then
6296 #include <sys/types.h>
6301 langs = enca_get_languages(&langcnt);
6306 cc_check
-lenca $_ld_lm && _enca
=yes
6308 if test "$_enca" = yes ; then
6309 def_enca
='#define CONFIG_ENCA 1'
6310 extra_ldflags
="$extra_ldflags -lenca"
6312 def_enca
='#undef CONFIG_ENCA'
6320 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6323 cc_check
-lz && _zlib
=yes
6324 if test "$_zlib" = yes ; then
6325 def_zlib
='#define CONFIG_ZLIB 1'
6326 extra_ldflags
="$extra_ldflags -lz"
6328 def_zlib
='#define CONFIG_ZLIB 0'
6329 _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
//)
6330 _libavencoders
=$
(echo $_libavencoders |
sed -e s
/FLASHSV_ENCODER
// -e s
/PNG_ENCODER
// -e s
/ZMBV_ENCODER
// -e s
/ZLIB_ENCODER
//)
6337 def_bzlib
='#define CONFIG_BZLIB 0'
6340 int main(void) { BZ2_bzlibVersion(); return 0; }
6342 cc_check
-lbz2 && bzlib
=yes
6343 if test "$bzlib" = yes ; then
6344 def_bzlib
='#define CONFIG_BZLIB 1'
6345 extra_ldflags
="$extra_ldflags -lbz2"
6351 if test "$_rtc" = auto
; then
6353 #include <sys/ioctl.h>
6355 #include <linux/rtc.h>
6358 #define RTC_PIE_ON RTCIO_PIE_ON
6360 int main(void) { return RTC_PIE_ON; }
6363 cc_check
&& _rtc
=yes
6366 if test "$_rtc" = yes ; then
6367 def_rtc
='#define HAVE_RTC 1'
6369 def_rtc
='#undef HAVE_RTC'
6374 echocheck
"liblzo2 support"
6375 if test "$_liblzo" = auto
; then
6378 #include <lzo/lzo1x.h>
6379 int main(void) { lzo_init();return 0; }
6381 cc_check
-llzo2 && _liblzo
=yes
6383 if test "$_liblzo" = yes ; then
6384 def_liblzo
='#define CONFIG_LIBLZO 1'
6385 extra_ldflags
="$extra_ldflags -llzo2"
6386 _codecmodules
="liblzo $_codecmodules"
6388 def_liblzo
='#undef CONFIG_LIBLZO'
6389 _nocodecmodules
="liblzo $_nocodecmodules"
6394 echocheck
"mad support"
6395 if test "$_mad" = auto
; then
6399 int main(void) { return 0; }
6401 cc_check
-lmad && _mad
=yes
6403 if test "$_mad" = yes ; then
6404 def_mad
='#define CONFIG_LIBMAD 1'
6405 extra_ldflags
="$extra_ldflags -lmad"
6406 _codecmodules
="libmad $_codecmodules"
6408 def_mad
='#undef CONFIG_LIBMAD'
6409 _nocodecmodules
="libmad $_nocodecmodules"
6414 if test "$_twolame" = auto
; then
6416 #include <twolame.h>
6417 int main(void) { twolame_init(); return 0; }
6420 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6422 if test "$_twolame" = yes ; then
6423 def_twolame
='#define CONFIG_TWOLAME 1'
6424 libs_mencoder
="$libs_mencoder -ltwolame"
6425 _codecmodules
="twolame $_codecmodules"
6427 def_twolame
='#undef CONFIG_TWOLAME'
6428 _nocodecmodules
="twolame $_nocodecmodules"
6433 if test "$_toolame" = auto
; then
6435 if test "$_twolame" = yes ; then
6436 _res_comment
="disabled by twolame"
6439 #include <toolame.h>
6440 int main(void) { toolame_init(); return 0; }
6442 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6445 if test "$_toolame" = yes ; then
6446 def_toolame
='#define CONFIG_TOOLAME 1'
6447 libs_mencoder
="$libs_mencoder -ltoolame"
6448 _codecmodules
="toolame $_codecmodules"
6450 def_toolame
='#undef CONFIG_TOOLAME'
6451 _nocodecmodules
="toolame $_nocodecmodules"
6453 if test "$_toolamedir" ; then
6454 _res_comment
="using $_toolamedir"
6458 echocheck
"OggVorbis support"
6459 if test "$_tremor_internal" = yes; then
6461 elif test "$_tremor" = auto
; then
6464 #include <tremor/ivorbiscodec.h>
6465 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6467 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6469 if test "$_libvorbis" = auto
; then
6472 #include <vorbis/codec.h>
6473 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6475 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6477 if test "$_tremor_internal" = yes ; then
6479 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6480 def_tremor
='#define CONFIG_TREMOR 1'
6481 _codecmodules
="tremor(internal) $_codecmodules"
6482 _res_comment
="internal Tremor"
6483 if test "$_tremor_low" = yes ; then
6484 cflags_tremor_low
="-D_LOW_ACCURACY_"
6485 _res_comment
="internal low accuracy Tremor"
6487 elif test "$_tremor" = yes ; then
6489 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6490 def_tremor
='#define CONFIG_TREMOR 1'
6491 _codecmodules
="tremor(external) $_codecmodules"
6492 _res_comment
="external Tremor"
6493 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6494 elif test "$_libvorbis" = yes ; then
6496 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6497 _codecmodules
="libvorbis $_codecmodules"
6498 _res_comment
="libvorbis"
6499 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6502 _nocodecmodules
="libvorbis $_nocodecmodules"
6506 echocheck
"libspeex (version >= 1.1 required)"
6507 if test "$_speex" = auto
; then
6510 #include <speex/speex.h>
6511 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6513 cc_check
-lspeex $_ld_lm && _speex
=yes
6515 if test "$_speex" = yes ; then
6516 def_speex
='#define CONFIG_SPEEX 1'
6517 extra_ldflags
="$extra_ldflags -lspeex"
6518 _codecmodules
="speex $_codecmodules"
6520 def_speex
='#undef CONFIG_SPEEX'
6521 _nocodecmodules
="speex $_nocodecmodules"
6525 echocheck
"OggTheora support"
6526 if test "$_theora" = auto
; then
6529 #include <theora/theora.h>
6532 /* Theora is in flux, make sure that all interface routines and datatypes
6533 * exist and work the way we expect it, so we don't break MPlayer. */
6542 theora_info_init(&inf);
6543 theora_comment_init(&tc);
6547 /* we don't want to execute this kind of nonsense; just for making sure
6548 * that compilation works... */
6549 memset(&op, 0, sizeof(op));
6550 r = theora_decode_header(&inf, &tc, &op);
6551 r = theora_decode_init(&st, &inf);
6552 t = theora_granule_time(&st, op.granulepos);
6553 r = theora_decode_packetin(&st, &op);
6554 r = theora_decode_YUVout(&st, &yuv);
6560 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6561 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6562 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6563 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6564 if test _theora
= no
; then
6565 _ld_theora
="-ltheora -logg"
6566 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6568 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6569 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6570 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6571 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6572 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6573 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6574 if test _theora
= no
; then
6575 _ld_theora
="-ltheora -logg"
6576 cc_check tremor
/bitwise.c
$_ld_theora &&
6577 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6581 if test "$_theora" = yes ; then
6582 def_theora
='#define CONFIG_OGGTHEORA 1'
6583 _codecmodules
="libtheora $_codecmodules"
6584 # when --enable-theora is forced, we'd better provide a probably sane
6585 # $_ld_theora than nothing
6586 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6588 def_theora
='#undef CONFIG_OGGTHEORA'
6589 _nocodecmodules
="libtheora $_nocodecmodules"
6593 echocheck
"internal mp3lib support"
6594 if test "$_mp3lib" = auto
; then
6595 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6597 if test "$_mp3lib" = yes ; then
6598 def_mp3lib
='#define CONFIG_MP3LIB 1'
6599 _codecmodules
="mp3lib(internal) $_codecmodules"
6601 def_mp3lib
='#undef CONFIG_MP3LIB'
6602 _nocodecmodules
="mp3lib(internal) $_nocodecmodules"
6606 echocheck
"liba52 support"
6607 if test "$_liba52_internal" = auto
; then
6608 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
6610 def_liba52
='#undef CONFIG_LIBA52'
6611 def_liba52_internal
="#undef CONFIG_LIBA52_INTERNAL"
6612 if test "$_liba52_internal" = yes ; then
6614 def_liba52_internal
="#define CONFIG_LIBA52_INTERNAL 1"
6615 _res_comment
="internal"
6616 elif test "$_liba52_internal" = no
&& test "$_liba52" = auto
; then
6619 #include <inttypes.h>
6620 #include <a52dec/a52.h>
6621 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6623 cc_check
-la52 && _liba52
=yes && _res_comment
="external" && extra_ldflags
="$extra_ldflags -la52"
6625 if test "$_liba52" = yes ; then
6626 def_liba52
='#define CONFIG_LIBA52 1'
6627 _codecmodules
="liba52($_res_comment) $_codecmodules"
6629 _nocodecmodules
="liba52 $_nocodecmodules"
6633 echocheck
"internal libmpeg2 support"
6634 if test "$_libmpeg2" = auto
; then
6636 if alpha
&& test cc_vendor
=gnu
; then
6638 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6640 _res_comment
="broken gcc"
6645 if test "$_libmpeg2" = yes ; then
6646 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6647 _codecmodules
="libmpeg2(internal) $_codecmodules"
6649 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6650 _nocodecmodules
="libmpeg2(internal) $_nocodecmodules"
6652 echores
"$_libmpeg2"
6654 echocheck
"libdca support"
6655 if test "$_libdca" = auto
; then
6658 #include <inttypes.h>
6660 int main(void) { dts_init(0); return 0; }
6662 for _ld_dca
in -ldts -ldca ; do
6663 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6664 && _libdca
=yes && break
6667 if test "$_libdca" = yes ; then
6668 def_libdca
='#define CONFIG_LIBDCA 1'
6669 _codecmodules
="libdca $_codecmodules"
6671 def_libdca
='#undef CONFIG_LIBDCA'
6672 _nocodecmodules
="libdca $_nocodecmodules"
6676 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6677 if test "$_musepack" = auto
; then
6681 #include <mpcdec/mpcdec.h>
6683 mpc_streaminfo info;
6684 mpc_decoder decoder;
6685 mpc_decoder_set_streaminfo(&decoder, &info);
6686 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6690 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6692 if test "$_musepack" = yes ; then
6693 def_musepack
='#define CONFIG_MUSEPACK 1'
6694 extra_ldflags
="$extra_ldflags -lmpcdec"
6695 _codecmodules
="musepack $_codecmodules"
6697 def_musepack
='#undef CONFIG_MUSEPACK'
6698 _nocodecmodules
="musepack $_nocodecmodules"
6700 echores
"$_musepack"
6703 echocheck
"FAAC support"
6704 if test "$_faac" = auto
; then
6706 #include <inttypes.h>
6708 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6711 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6712 cc_check
-O4 $_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6715 if test "$_faac" = yes ; then
6716 def_faac
="#define CONFIG_FAAC 1"
6717 test "$_faac_lavc" = auto
&& _faac_lavc
=yes
6718 if test "$_faac_lavc" = yes ; then
6719 def_faac_lavc
="#define CONFIG_LIBFAAC 1"
6720 libs_mplayer
="$libs_mplayer $_ld_faac"
6721 _libavencoders
="$_libavencoders LIBFAAC_ENCODER"
6723 _codecmodules
="faac $_codecmodules"
6726 def_faac
="#undef CONFIG_FAAC"
6727 def_faac_lavc
="#define CONFIG_LIBFAAC 0"
6728 _nocodecmodules
="faac $_nocodecmodules"
6730 _res_comment
="in libavcodec: $_faac_lavc"
6734 echocheck
"FAAD2 support"
6735 if test "$_faad_internal" = auto
; then
6736 if x86_32
&& test cc_vendor
=gnu
; then
6738 3.1*|
3.2) # ICE/insn with these versions
6740 _res_comment
="broken gcc"
6752 if test "$_faad" = auto
; then
6755 #ifndef FAAD_MIN_STREAMSIZE
6756 #error Too old version
6758 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6759 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6761 cc_check
-lfaad $_ld_lm && _faad
=yes
6764 def_faad
='#undef CONFIG_FAAD'
6765 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6766 if test "$_faad_internal" = yes ; then
6767 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6768 _res_comment
="internal floating-point"
6769 if test "$_faad_fixed" = yes ; then
6770 # The FIXED_POINT implementation of FAAD2 improves performance
6771 # on some platforms, especially for SBR files.
6772 cflags_faad_fixed
="-DFIXED_POINT"
6773 _res_comment
="internal fixed-point"
6775 elif test "$_faad" = yes ; then
6776 extra_ldflags
="$extra_ldflags -lfaad"
6779 if test "$_faad" = yes ; then
6780 def_faad
='#define CONFIG_FAAD 1'
6781 if test "$_faad_internal" = yes ; then
6782 _codecmodules
="faad2(internal) $_codecmodules"
6784 _codecmodules
="faad2 $_codecmodules"
6788 _nocodecmodules
="faad2 $_nocodecmodules"
6793 echocheck
"LADSPA plugin support"
6794 if test "$_ladspa" = auto
; then
6799 const LADSPA_Descriptor *ld = NULL;
6804 cc_check
&& _ladspa
=yes
6806 if test "$_ladspa" = yes; then
6807 def_ladspa
="#define CONFIG_LADSPA 1"
6809 def_ladspa
="#undef CONFIG_LADSPA"
6814 echocheck
"libbs2b audio filter support"
6815 if test "$_libbs2b" = auto
; then
6818 #if BS2B_VERSION_MAJOR < 3
6819 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6829 if $_pkg_config --exists libbs2b
; then
6830 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6831 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6832 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6833 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6835 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6836 -I/usr
/local
/include
/bs2b
; do
6837 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6838 extra_ldflags
="$extra_ldflags -lbs2b"
6839 extra_cflags
="$extra_cflags $_inc_tmp"
6846 def_libbs2b
="#undef CONFIG_LIBBS2B"
6847 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
6851 if test -z "$_codecsdir" ; then
6852 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6853 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6854 if test -d "$dir" ; then
6860 # Fall back on default directory.
6861 if test -z "$_codecsdir" ; then
6862 _codecsdir
="$_libdir/codecs"
6863 mingw32
&& _codecsdir
="codecs"
6864 os2
&& _codecsdir
="codecs"
6868 echocheck
"Win32 codecs"
6869 if test "$_win32dll" = auto
; then
6871 if x86_32
&& ! qnx
; then
6875 if test "$_win32dll" = yes ; then
6876 def_win32dll
='#define CONFIG_WIN32DLL 1'
6877 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6878 _res_comment
="using $_win32codecsdir"
6880 def_win32_loader
='#define WIN32_LOADER 1'
6881 _win32_emulation
=yes
6883 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
6884 _res_comment
="using native windows"
6886 _codecmodules
="win32 $_codecmodules"
6888 def_win32dll
='#undef CONFIG_WIN32DLL'
6889 def_win32_loader
='#undef WIN32_LOADER'
6890 _nocodecmodules
="win32 $_nocodecmodules"
6892 echores
"$_win32dll"
6895 echocheck
"XAnim codecs"
6896 if test "$_xanim" = auto
; then
6898 _res_comment
="dynamic loader support needed"
6899 if test "$_dl" = yes ; then
6903 if test "$_xanim" = yes ; then
6904 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6905 def_xanim
='#define CONFIG_XANIM 1'
6906 def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6907 _codecmodules
="xanim $_codecmodules"
6908 _res_comment
="using $_xanimcodecsdir"
6910 def_xanim
='#undef CONFIG_XANIM'
6911 def_xanim_path
='#undef XACODEC_PATH'
6912 _nocodecmodules
="xanim $_nocodecmodules"
6917 echocheck
"RealPlayer codecs"
6918 if test "$_real" = auto
; then
6920 _res_comment
="dynamic loader support needed"
6921 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6922 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32
) ; then
6926 if test "$_real" = yes ; then
6927 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6928 def_real
='#define CONFIG_REALCODECS 1'
6929 def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6930 _codecmodules
="real $_codecmodules"
6931 _res_comment
="using $_realcodecsdir"
6933 def_real
='#undef CONFIG_REALCODECS'
6934 def_real_path
="#undef REALCODEC_PATH"
6935 _nocodecmodules
="real $_nocodecmodules"
6940 echocheck
"QuickTime codecs"
6942 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
6943 if test "$_qtx" = auto
; then
6944 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
6946 if test "$_qtx" = yes ; then
6947 def_qtx
='#define CONFIG_QTX_CODECS 1'
6948 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
6949 _codecmodules
="qtx $_codecmodules"
6950 darwin || win32 || _qtx_emulation
=yes
6952 def_qtx
='#undef CONFIG_QTX_CODECS'
6953 _nocodecmodules
="qtx $_nocodecmodules"
6957 echocheck
"Nemesi Streaming Media libraries"
6958 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
6960 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6961 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
6962 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
6966 if test "$_nemesi" = yes; then
6968 def_nemesi
='#define CONFIG_LIBNEMESI 1'
6969 _inputmodules
="nemesi $_inputmodules"
6971 _native_rtsp
="$_network"
6973 def_nemesi
='#undef CONFIG_LIBNEMESI'
6974 _noinputmodules
="nemesi $_noinputmodules"
6978 echocheck
"LIVE555 Streaming Media libraries"
6979 if test "$_live" = auto
&& test "$_network" = yes ; then
6980 cat > $TMPCPP << EOF
6981 #include <liveMedia.hh>
6982 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6983 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6985 int main(void) { return 0; }
6989 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
6990 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6991 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
6992 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
6993 $_livelibdir/groupsock/libgroupsock.a \
6994 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6995 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6996 $extra_ldflags -lstdc++" \
6997 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
6998 -I$_livelibdir/UsageEnvironment/include \
6999 -I$_livelibdir/BasicUsageEnvironment/include \
7000 -I$_livelibdir/groupsock/include" && \
7003 if test "$_live" != yes ; then
7004 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
7005 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
7010 if test "$_live" = yes && test "$_network" = yes; then
7011 test $_livelibdir && _res_comment
="using $_livelibdir"
7012 def_live
='#define CONFIG_LIVE555 1'
7013 _inputmodules
="live555 $_inputmodules"
7014 elif test "$_live_dist" = yes && test "$_network" = yes; then
7015 _res_comment
="using distribution version"
7017 def_live
='#define CONFIG_LIVE555 1'
7018 extra_ldflags
="$extra_ldflags $ld_tmp"
7019 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
7020 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
7021 _inputmodules
="live555 $_inputmodules"
7024 def_live
='#undef CONFIG_LIVE555'
7025 _noinputmodules
="live555 $_noinputmodules"
7030 echocheck
"FFmpeg libavutil"
7031 if test "$_libavutil_a" = auto
; then
7032 if test -d libavutil
; then
7034 _res_comment
="static"
7036 die
"MPlayer will not compile without libavutil in the source tree."
7038 elif test "$_libavutil_so" = auto
; then
7041 #include <libavutil/common.h>
7042 int main(void) { av_gcd(1,1); return 0; }
7044 if $_pkg_config --exists libavutil
; then
7045 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
7046 _ld_tmp
=$
($_pkg_config --libs libavutil
)
7047 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7048 && _libavutil_so
=yes
7049 elif cc_check
-lavutil $_ld_lm ; then
7050 extra_ldflags
="$extra_ldflags -lavutil"
7052 _res_comment
="using libavutil.so, but static libavutil is recommended"
7056 def_libavutil
='#undef CONFIG_LIBAVUTIL'
7057 def_libavutil_a
='#undef CONFIG_LIBAVUTIL_A'
7058 def_libavutil_so
='#undef CONFIG_LIBAVUTIL_SO'
7059 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
7060 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
7061 test "$_libavutil_a" = yes && def_libavutil_a
='#define CONFIG_LIBAVUTIL_A 1'
7062 test "$_libavutil_so" = yes && def_libavutil_so
='#define CONFIG_LIBAVUTIL_SO 1'
7063 # neither static nor shared libavutil is available, but it is mandatory ...
7064 if test "$_libavutil" = no
; then
7065 die
"You need static or shared libavutil, MPlayer will not compile without!"
7067 echores
"$_libavutil"
7069 echocheck
"FFmpeg libavcodec"
7070 if test "$_libavcodec_a" = auto
; then
7072 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
7074 _res_comment
="static"
7076 elif test "$_libavcodec_so" = auto
; then
7078 _res_comment
="libavcodec.so is discouraged over static libavcodec"
7080 #include <libavcodec/avcodec.h>
7081 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
7083 if $_pkg_config --exists libavcodec
; then
7084 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
7085 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
7086 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7087 && _libavcodec_so
=yes
7088 elif cc_check
-lavcodec $_ld_lm ; then
7089 extra_ldflags
="$extra_ldflags -lavcodec"
7091 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
7095 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
7096 def_libavcodec_a
='#undef CONFIG_LIBAVCODEC_A'
7097 def_libavcodec_so
='#undef CONFIG_LIBAVCODEC_SO'
7098 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
7099 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
7100 test "$_libavcodec_a" = yes && def_libavcodec_a
='#define CONFIG_LIBAVCODEC_A 1'
7101 test "$_libavcodec_so" = yes && def_libavcodec_so
='#define CONFIG_LIBAVCODEC_SO 1'
7102 test "$_libavcodec_mpegaudio_hp" = yes \
7103 && def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
7104 if test "$_libavcodec_a" = yes ; then
7105 _codecmodules
="libavcodec(internal) $_codecmodules"
7106 elif test "$_libavcodec_so" = yes ; then
7107 _codecmodules
="libavcodec.so $_codecmodules"
7109 _nocodecmodules
="libavcodec $_nocodecmodules"
7111 echores
"$_libavcodec"
7113 echocheck
"FFmpeg libavformat"
7114 if test "$_libavformat_a" = auto
; then
7116 if test -d libavformat
&& test -f libavformat
/utils.c
; then
7118 _res_comment
="static"
7120 elif test "$_libavformat_so" = auto
; then
7123 #include <libavformat/avformat.h>
7124 #include <libavcodec/opt.h>
7125 int main(void) { av_alloc_format_context(); return 0; }
7127 if $_pkg_config --exists libavformat
; then
7128 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
7129 _ld_tmp
=$
($_pkg_config --libs libavformat
)
7130 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7131 && _libavformat_so
=yes
7132 elif cc_check
$_ld_lm -lavformat ; then
7133 extra_ldflags
="$extra_ldflags -lavformat"
7135 _res_comment
="using libavformat.so, but static libavformat is recommended"
7139 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
7140 def_libavformat_a
='#undef CONFIG_LIBAVFORMAT_A'
7141 def_libavformat_so
='#undef CONFIG_LIBAVFORMAT_SO'
7142 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
7143 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
7144 test "$_libavformat_a" = yes && def_libavformat_a
='#define CONFIG_LIBAVFORMAT_A 1'
7145 test "$_libavformat_so" = yes \
7146 && def_libavformat_so
='#define CONFIG_LIBAVFORMAT_SO 1'
7147 echores
"$_libavformat"
7149 echocheck
"FFmpeg libpostproc"
7150 if test "$_libpostproc_a" = auto
; then
7152 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
7153 _libpostproc_a
='yes'
7154 _res_comment
="static"
7156 elif test "$_libpostproc_so" = auto
; then
7159 #include <inttypes.h>
7160 #include <libpostproc/postprocess.h>
7161 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
7163 if cc_check
-lpostproc $_ld_lm ; then
7164 extra_ldflags
="$extra_ldflags -lpostproc"
7166 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
7170 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
7171 def_libpostproc_a
='#undef CONFIG_LIBPOSTPROC_A'
7172 def_libpostproc_so
='#undef CONFIG_LIBPOSTPROC_SO'
7173 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
7174 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
7175 test "$_libpostproc_a" = yes && def_libpostproc_a
='#define CONFIG_LIBPOSTPROC_A 1'
7176 test "$_libpostproc_so" = yes \
7177 && def_libpostproc_so
='#define CONFIG_LIBPOSTPROC_SO 1'
7178 echores
"$_libpostproc"
7180 echocheck
"FFmpeg libswscale"
7181 if test "$_libswscale_a" = auto
; then
7183 if test -d libswscale
&& test -f libswscale
/swscale.h
; then
7185 _res_comment
="static"
7187 elif test "$_libswscale_so" = auto
; then
7189 _res_comment
="using libswscale.so, but static libswscale is recommended"
7191 #include <libswscale/swscale.h>
7192 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
7194 if $_pkg_config --exists libswscale
; then
7195 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
7196 _ld_tmp
=$
($_pkg_config --libs libswscale
)
7197 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7198 && _libswscale_so
=yes
7199 elif cc_check
-lswscale ; then
7200 extra_ldflags
="$extra_ldflags -lswscale"
7205 def_libswscale
='#undef CONFIG_LIBSWSCALE'
7206 def_libswscale_a
='#undef CONFIG_LIBSWSCALE_A'
7207 def_libswscale_so
='#undef CONFIG_LIBSWSCALE_SO'
7208 test "$_libswscale_a" = yes ||
test "$_libswscale_so" = yes && _libswscale
=yes
7209 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
7210 test "$_libswscale_a" = yes && def_libswscale_a
='#define CONFIG_LIBSWSCALE_A 1'
7211 test "$_libswscale_so" = yes \
7212 && def_libswscale_so
='#define CONFIG_LIBSWSCALE_SO 1'
7213 echores
"$_libswscale"
7215 echocheck
"libopencore_amr narrowband"
7216 if test "$_libopencore_amrnb" = auto
; then
7217 _libopencore_amrnb
=no
7219 #include <opencore-amrnb/interf_dec.h>
7220 int main(void) { Decoder_Interface_init(); return 0; }
7222 cc_check
-lopencore-amrnb && _libopencore_amrnb
=yes
7223 if test "$_libavcodec_a" != yes ; then
7224 _libopencore_amrnb
=no
7225 _res_comment
="libavcodec (static) is required by libopencore_amrnb, sorry"
7228 if test "$_libopencore_amrnb" = yes ; then
7229 _libopencore_amr
=yes
7230 extra_ldflags
="$extra_ldflags -lopencore-amrnb"
7231 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 1'
7232 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
7233 _libavencoders
="$_libavencoders LIBOPENCORE_AMRNB_ENCODER"
7234 _codecmodules
="libopencore_amrnb $_codecmodules"
7236 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 0'
7237 _nocodecmodules
="libopencore_amrnb $_nocodecmodules"
7239 echores
"$_libopencore_amrnb"
7242 echocheck
"libopencore_amr wideband"
7243 if test "$_libopencore_amrwb" = auto
; then
7244 _libopencore_amrwb
=no
7246 #include <opencore-amrwb/dec_if.h>
7247 int main(void) { D_IF_init(); return 0; }
7249 cc_check
-lopencore-amrwb && _libopencore_amrwb
=yes
7250 if test "$_libavcodec_a" != yes ; then
7251 _libopencore_amrwb
=no
7252 _res_comment
="libavcodec (static) is required by libopencore_amrwb, sorry"
7255 if test "$_libopencore_amrwb" = yes ; then
7256 _libopencore_amr
=yes
7257 extra_ldflags
="$extra_ldflags -lopencore-amrwb"
7258 def_libopencore_amrwb
='#define CONFIG_LIBOPENCORE_AMRWB 1'
7259 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
7260 _libavencoders
="$_libavencoders LIBOPENCORE_AMRWB_DECODER"
7261 _codecmodules
="libopencore_amrwb $_codecmodules"
7263 def_libopencore_amrwb
='#define LIBOPENCORE_AMRWB 0'
7264 _nocodecmodules
="libopencore_amrwb $_nocodecmodules"
7266 echores
"$_libopencore_amrwb"
7268 echocheck
"libdv-0.9.5+"
7269 if test "$_libdv" = auto
; then
7272 #include <libdv/dv.h>
7273 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7275 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7277 if test "$_libdv" = yes ; then
7278 def_libdv
='#define CONFIG_LIBDV095 1'
7279 extra_ldflags
="$extra_ldflags -ldv"
7280 _codecmodules
="libdv $_codecmodules"
7282 def_libdv
='#undef CONFIG_LIBDV095'
7283 _nocodecmodules
="libdv $_nocodecmodules"
7289 if test "$_xvid" = auto
; then
7293 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7295 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7296 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7300 if test "$_xvid" = yes ; then
7301 def_xvid
='#define CONFIG_XVID4 1'
7302 _codecmodules
="xvid $_codecmodules"
7304 def_xvid
='#undef CONFIG_XVID4'
7305 _nocodecmodules
="xvid $_nocodecmodules"
7309 echocheck
"Xvid two pass plugin"
7310 if test "$_xvid" = yes && test "$_xvid_lavc" = auto
; then
7313 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
7315 cc_check
&& _xvid_lavc
=yes
7317 if test "$_xvid_lavc" = yes ; then
7318 def_xvid_lavc
='#define CONFIG_LIBXVID 1'
7319 _libavencoders
="$_libavencoders LIBXVID_ENCODER"
7322 def_xvid_lavc
='#define CONFIG_LIBXVID 0'
7324 echores
"$_xvid_lavc"
7328 if test "$_x264" = auto
; then
7330 #include <inttypes.h>
7333 #error We do not support old versions of x264. Get the latest from git.
7335 int main(void) { x264_encoder_open((void*)0); return 0; }
7338 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7339 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7343 if test "$_x264" = yes ; then
7344 def_x264
='#define CONFIG_X264 1'
7345 _codecmodules
="x264 $_codecmodules"
7346 test "$_x264_lavc" = auto
&& _x264_lavc
=yes
7347 if test "$_x264_lavc" = yes ; then
7348 def_x264_lavc
='#define CONFIG_LIBX264 1'
7349 libs_mplayer
="$libs_mplayer $_ld_x264"
7350 _libavencoders
="$_libavencoders LIBX264_ENCODER"
7354 def_x264
='#undef CONFIG_X264'
7355 def_x264_lavc
='#define CONFIG_LIBX264 0'
7356 _nocodecmodules
="x264 $_nocodecmodules"
7358 _res_comment
="in libavcodec: $_x264_lavc"
7362 echocheck
"libdirac"
7363 if test "$_libdirac_lavc" = auto
; then
7365 if test "$_libavcodec_a" != yes; then
7366 _res_comment
="libavcodec (static) is required by libdirac, sorry"
7369 #include <libdirac_encoder/dirac_encoder.h>
7370 #include <libdirac_decoder/dirac_parser.h>
7373 dirac_encoder_context_t enc_ctx;
7374 dirac_decoder_t *dec_handle;
7375 dirac_encoder_context_init(&enc_ctx, VIDEO_FORMAT_SD_576I50);
7376 dec_handle = dirac_decoder_init(0);
7378 dirac_decoder_close(dec_handle);
7382 if $_pkg_config --exists dirac
; then
7383 _inc_dirac
=$
($_pkg_config --silence-errors --cflags dirac
)
7384 _ld_dirac
=$
($_pkg_config --silence-errors --libs dirac
)
7385 cc_check
$_inc_dirac $_ld_dirac &&
7386 _libdirac_lavc
=yes &&
7387 extra_cflags
="$extra_cflags $_inc_dirac" &&
7388 extra_ldflags
="$extra_ldflags $_ld_dirac"
7392 if test "$_libdirac_lavc" = yes ; then
7393 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 1'
7394 _libavencoders
="$_libavencoders LIBDIRAC_ENCODER"
7395 _libavdecoders
="$_libavdecoders LIBDIRAC_DECODER"
7396 _codecmodules
="libdirac $_codecmodules"
7398 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 0'
7399 _nocodecmodules
="libdirac $_nocodecmodules"
7401 echores
"$_libdirac_lavc"
7404 echocheck
"libschroedinger"
7405 if test "$_libschroedinger_lavc" = auto
; then
7406 _libschroedinger_lavc
=no
7407 if test "$_libavcodec_a" != yes; then
7408 _res_comment
="libavcodec (static) is required by libschroedinger, sorry"
7411 #include <schroedinger/schro.h>
7412 int main(void) { schro_init(); return 0; }
7414 if $_pkg_config --exists schroedinger-1.0
; then
7415 _inc_schroedinger
=$
($_pkg_config --silence-errors --cflags schroedinger-1.0
)
7416 _ld_schroedinger
=$
($_pkg_config --silence-errors --libs schroedinger-1.0
)
7417 cc_check
$_inc_schroedinger $_ld_schroedinger &&
7418 _libschroedinger_lavc
=yes &&
7419 extra_cflags
="$extra_cflags $_inc_schroedinger" &&
7420 extra_ldflags
="$extra_ldflags $_ld_schroedinger"
7424 if test "$_libschroedinger_lavc" = yes ; then
7425 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 1'
7426 _libavencoders
="$_libavencoders LIBSCHROEDINGER_ENCODER"
7427 _libavdecoders
="$_libavdecoders LIBSCHROEDINGER_DECODER"
7428 _codecmodules
="libschroedinger $_codecmodules"
7430 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 0'
7431 _nocodecmodules
="libschroedinger $_nocodecmodules"
7433 echores
"$_libschroedinger_lavc"
7436 if test "$_libnut" = auto
; then
7440 #include <inttypes.h>
7442 nut_context_tt * nut;
7443 int main(void) { (void)nut_error(0); return 0; }
7446 cc_check
-lnut && _libnut
=yes
7449 if test "$_libnut" = yes ; then
7450 def_libnut
='#define CONFIG_LIBNUT 1'
7451 extra_ldflags
="$extra_ldflags -lnut"
7453 def_libnut
='#undef CONFIG_LIBNUT'
7457 #check must be done after libavcodec one
7459 if test "$_zr" = auto
; then
7460 #36067's seem to identify themselves as 36057PQC's, so the line
7461 #below should work for 36067's and 36057's.
7462 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7468 if test "$_zr" = yes ; then
7469 if test "$_libavcodec_a" = yes ; then
7470 def_zr
='#define CONFIG_ZR 1'
7471 _vomodules
="zr zr2 $_vomodules"
7473 _res_comment
="libavcodec (static) is required by zr, sorry"
7474 _novomodules
="zr $_novomodules"
7475 def_zr
='#undef CONFIG_ZR'
7478 def_zr
='#undef CONFIG_ZR'
7479 _novomodules
="zr zr2 $_novomodules"
7483 # mencoder requires (optional) those libs: libmp3lame
7484 if test "$_mencoder" != no
; then
7486 echocheck
"libmp3lame"
7487 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7488 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7489 if test "$_mp3lame" = auto
; then
7492 #include <lame/lame.h>
7493 int main(void) { lame_version_t lv; (void) lame_init();
7494 get_lame_version_numerical(&lv);
7497 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7499 if test "$_mp3lame" = yes ; then
7500 def_mp3lame
="#define CONFIG_MP3LAME 1"
7501 _ld_mp3lame
=-lmp3lame
7502 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7504 #include <lame/lame.h>
7505 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7507 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7509 #include <lame/lame.h>
7510 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7512 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7513 test "$_mp3lame_lavc" = auto
&& _mp3lame_lavc
=yes
7514 if test "$_mp3lame_lavc" = yes ; then
7515 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 1"
7516 _libavencoders
="$_libavencoders LIBMP3LAME_ENCODER"
7517 libs_mplayer
="$libs_mplayer $_ld_mp3lame"
7521 def_mp3lame
='#undef CONFIG_MP3LAME'
7522 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 0"
7524 _res_comment
="in libavcodec: $_mp3lame_lavc"
7527 fi # test "$_mencoder" != no
7529 echocheck
"mencoder"
7530 if test "$_mencoder" = yes ; then
7531 def_muxers
='#define CONFIG_MUXERS 1'
7533 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint, png for vf_screenshot
7534 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
7535 test "$_zlib" = yes && _libavencoders
="$_libavencoders PNG_ENCODER"
7537 def_muxers
='#define CONFIG_MUXERS 0'
7539 echores
"$_mencoder"
7542 echocheck
"UnRAR executable"
7543 if test "$_unrar_exec" = auto
; then
7545 mingw32
&& _unrar_exec
="no"
7547 if test "$_unrar_exec" = yes ; then
7548 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7550 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7552 echores
"$_unrar_exec"
7554 echocheck
"TV interface"
7555 if test "$_tv" = yes ; then
7556 def_tv
='#define CONFIG_TV 1'
7557 _inputmodules
="tv $_inputmodules"
7559 _noinputmodules
="tv $_noinputmodules"
7560 def_tv
='#undef CONFIG_TV'
7565 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7566 echocheck
"*BSD BT848 bt8xx header"
7568 for file in "machine/ioctl_bt848.h" \
7569 "dev/bktr/ioctl_bt848.h" \
7570 "dev/video/bktr/ioctl_bt848.h" \
7571 "dev/ic/bt8xx.h" ; do
7573 #include <sys/types.h>
7574 #include <sys/ioctl.h>
7576 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7580 _ioctl_bt848_h_name
="$file"
7584 if test "$_ioctl_bt848_h" = yes ; then
7585 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7586 _res_comment
="using $_ioctl_bt848_h_name"
7588 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7590 echores
"$_ioctl_bt848_h"
7592 echocheck
"*BSD ioctl_meteor.h"
7594 for file in "machine/ioctl_meteor.h" \
7595 "dev/bktr/ioctl_meteor.h" \
7596 "dev/video/bktr/ioctl_meteor.h" ; do
7598 #include <sys/types.h>
7600 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7604 _ioctl_meteor_h_name
="$file"
7608 if test "$_ioctl_meteor_h" = yes ; then
7609 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7610 _res_comment
="using $_ioctl_meteor_h_name"
7612 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7614 echores
"$_ioctl_meteor_h"
7616 echocheck
"*BSD BrookTree 848 TV interface"
7617 if test "$_tv_bsdbt848" = auto
; then
7619 if test "$_tv" = yes ; then
7621 #include <sys/types.h>
7622 $def_ioctl_meteor_h_name
7623 $def_ioctl_bt848_h_name
7624 #ifdef IOCTL_METEOR_H_NAME
7625 #include IOCTL_METEOR_H_NAME
7627 #ifdef IOCTL_BT848_H_NAME
7628 #include IOCTL_BT848_H_NAME
7631 ioctl(0, METEORSINPUT, 0);
7632 ioctl(0, TVTUNER_GETFREQ, 0);
7636 cc_check
&& _tv_bsdbt848
=yes
7639 if test "$_tv_bsdbt848" = yes ; then
7640 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7641 _inputmodules
="tv-bsdbt848 $_inputmodules"
7643 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7644 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7646 echores
"$_tv_bsdbt848"
7647 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7650 echocheck
"DirectShow TV interface"
7651 if test "$_tv_dshow" = auto
; then
7653 if test "$_tv" = yes && win32
; then
7658 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7662 cc_check
-lole32 -luuid && _tv_dshow
=yes
7665 if test "$_tv_dshow" = yes ; then
7666 _inputmodules
="tv-dshow $_inputmodules"
7667 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7668 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7670 _noinputmodules
="tv-dshow $_noinputmodules"
7671 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7673 echores
"$_tv_dshow"
7676 echocheck
"Video 4 Linux TV interface"
7677 if test "$_tv_v4l1" = auto
; then
7679 if test "$_tv" = yes && linux
; then
7682 #include <linux/videodev.h>
7683 int main(void) { return 0; }
7685 cc_check
&& _tv_v4l1
=yes
7688 if test "$_tv_v4l1" = yes ; then
7691 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7692 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7693 _inputmodules
="tv-v4l $_inputmodules"
7695 _noinputmodules
="tv-v4l1 $_noinputmodules"
7696 def_tv_v4l
='#undef CONFIG_TV_V4L'
7701 echocheck
"Video 4 Linux 2 TV interface"
7702 if test "$_tv_v4l2" = auto
; then
7704 if test "$_tv" = yes && linux
; then
7707 #include <linux/types.h>
7708 #include <linux/videodev2.h>
7709 int main(void) { return 0; }
7711 cc_check
&& _tv_v4l2
=yes
7714 if test "$_tv_v4l2" = yes ; then
7717 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7718 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7719 _inputmodules
="tv-v4l2 $_inputmodules"
7721 _noinputmodules
="tv-v4l2 $_noinputmodules"
7722 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7727 echocheck
"Radio interface"
7728 if test "$_radio" = yes ; then
7729 def_radio
='#define CONFIG_RADIO 1'
7730 _inputmodules
="radio $_inputmodules"
7731 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7734 if test "$_radio_capture" = yes ; then
7736 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7738 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7741 _noinputmodules
="radio $_noinputmodules"
7742 def_radio
='#undef CONFIG_RADIO'
7743 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7747 echocheck
"Capture for Radio interface"
7748 echores
"$_radio_capture"
7750 echocheck
"Video 4 Linux 2 Radio interface"
7751 if test "$_radio_v4l2" = auto
; then
7753 if test "$_radio" = yes && linux
; then
7756 #include <linux/types.h>
7757 #include <linux/videodev2.h>
7758 int main(void) { return 0; }
7760 cc_check
&& _radio_v4l2
=yes
7763 if test "$_radio_v4l2" = yes ; then
7764 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7766 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7768 echores
"$_radio_v4l2"
7770 echocheck
"Video 4 Linux Radio interface"
7771 if test "$_radio_v4l" = auto
; then
7773 if test "$_radio" = yes && linux
; then
7776 #include <linux/videodev.h>
7777 int main(void) { return 0; }
7779 cc_check
&& _radio_v4l
=yes
7782 if test "$_radio_v4l" = yes ; then
7783 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7785 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7787 echores
"$_radio_v4l"
7789 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7790 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7791 echocheck
"*BSD BrookTree 848 Radio interface"
7794 #include <sys/types.h>
7795 $def_ioctl_bt848_h_name
7796 #ifdef IOCTL_BT848_H_NAME
7797 #include IOCTL_BT848_H_NAME
7799 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7801 cc_check
&& _radio_bsdbt848
=yes
7802 echores
"$_radio_bsdbt848"
7803 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7805 if test "$_radio_bsdbt848" = yes ; then
7806 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7808 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7811 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7812 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7813 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7816 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7817 if test "$_pvr" = auto
; then
7819 if test "$_tv_v4l2" = yes && linux
; then
7822 #include <inttypes.h>
7823 #include <linux/types.h>
7824 #include <linux/videodev2.h>
7825 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7827 cc_check
&& _pvr
=yes
7830 if test "$_pvr" = yes ; then
7831 def_pvr
='#define CONFIG_PVR 1'
7832 _inputmodules
="pvr $_inputmodules"
7834 _noinputmodules
="pvr $_noinputmodules"
7835 def_pvr
='#undef CONFIG_PVR'
7841 if ! beos
&& test "$_ftp" = yes ; then
7842 def_ftp
='#define CONFIG_FTP 1'
7843 _inputmodules
="ftp $_inputmodules"
7845 _noinputmodules
="ftp $_noinputmodules"
7846 def_ftp
='#undef CONFIG_FTP'
7850 echocheck
"vstream client"
7851 if test "$_vstream" = auto
; then
7854 #include <vstream-client.h>
7855 void vstream_error(const char *format, ... ) {}
7856 int main(void) { vstream_start(); return 0; }
7858 cc_check
-lvstream-client && _vstream
=yes
7860 if test "$_vstream" = yes ; then
7861 def_vstream
='#define CONFIG_VSTREAM 1'
7862 _inputmodules
="vstream $_inputmodules"
7863 extra_ldflags
="$extra_ldflags -lvstream-client"
7865 _noinputmodules
="vstream $_noinputmodules"
7866 def_vstream
='#undef CONFIG_VSTREAM'
7871 echocheck
"OSD menu"
7872 if test "$_menu" = yes ; then
7873 def_menu
='#define CONFIG_MENU 1'
7874 test $_dvbin = "yes" && _menu_dvbin
=yes
7876 def_menu
='#undef CONFIG_MENU'
7882 echocheck
"Subtitles sorting"
7883 if test "$_sortsub" = yes ; then
7884 def_sortsub
='#define CONFIG_SORTSUB 1'
7886 def_sortsub
='#undef CONFIG_SORTSUB'
7891 echocheck
"XMMS inputplugin support"
7892 if test "$_xmms" = yes ; then
7893 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7894 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
7895 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
7897 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7898 _xmmslibdir
=/usr
/lib
7901 def_xmms
='#define CONFIG_XMMS 1'
7903 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
7905 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7908 def_xmms
='#undef CONFIG_XMMS'
7913 # --------------- GUI specific tests begin -------------------
7916 if test "$_gui" = yes ; then
7918 # Required libraries
7919 if test "$_libavcodec" != yes ||
7920 ! echo $_libavdecoders |
grep -q PNG_DECODER
; then
7921 die
"The GUI requires libavcodec with PNG support (needs zlib)."
7923 test "$_freetype" = no
&& test "$_bitmap_font" = no
&& \
7924 die
"The GUI requires either FreeType or bitmap font support."
7927 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7929 echocheck
"XShape extension"
7930 if test "$_xshape" = auto
; then
7933 #include <X11/Xlib.h>
7934 #include <X11/Xproto.h>
7935 #include <X11/Xutil.h>
7936 #include <X11/extensions/shape.h>
7939 char *name = ":0.0";
7942 int eventbase, errorbase;
7943 if (getenv("DISPLAY"))
7944 name=getenv("DISPLAY");
7945 wsDisplay=XOpenDisplay(name);
7946 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7948 XCloseDisplay(wsDisplay);
7952 cc_check
-lXext && _xshape
=yes
7954 if test "$_xshape" = yes ; then
7955 def_xshape
='#define CONFIG_XSHAPE 1'
7957 die
"The GUI requires the X11 extension XShape (which was not found)."
7962 if test "$_gtk1" = no
; then
7964 echocheck
"GTK+ version"
7966 if $_pkg_config gtk
+-2.0
--exists ; then
7967 _gtk
=$
($_pkg_config gtk
+-2.0
--modversion 2>/dev
/null
)
7968 extra_cflags
="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)"
7969 libs_mplayer
="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)"
7973 if $_pkg_config glib-2.0
--exists ; then
7974 echocheck
"glib version"
7975 _glib
=$
($_pkg_config glib-2.0
--modversion 2>/dev
/null
)
7976 libs_mplayer
="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)"
7979 def_gui
='#define CONFIG_GUI 1'
7980 def_gtk2
='#define CONFIG_GTK2 1'
7983 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7986 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7991 if test "$_gtk1" = yes ; then
7992 # Check for old GTK (1.2.x)
7993 echocheck
"GTK version"
7994 if test -z "$_gtkconfig" ; then
7995 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7996 _gtkconfig
="gtk-config"
7997 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7998 _gtkconfig
="gtk12-config"
8000 die
"The GUI requires GTK devel packages (which were not found)."
8003 _gtk
=$
($_gtkconfig --version 2>&1)
8004 extra_cflags
="$extra_cflags $($_gtkconfig --cflags 2>&1)"
8005 libs_mplayer
="$libs_mplayer $($_gtkconfig --libs 2>&1)"
8006 echores
"$_gtk (using $_gtkconfig)"
8009 echocheck
"glib version"
8010 if test -z "$_glibconfig" ; then
8011 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
8012 _glibconfig
="glib-config"
8013 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
8014 _glibconfig
="glib12-config"
8016 die
"The GUI requires GLIB devel packages (which were not found)"
8019 _glib
=$
($_glibconfig --version 2>&1)
8020 libs_mplayer
="$libs_mplayer $($_glibconfig --libs 2>&1)"
8021 echores
"$_glib (using $_glibconfig)"
8023 def_gui
='#define CONFIG_GUI 1'
8024 def_gtk2
='#undef CONFIG_GTK2'
8029 libs_mplayer
="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
8030 def_gui
='#define CONFIG_GUI 1'
8031 def_gtk2
='#undef CONFIG_GTK2'
8034 else #if test "$_gui"
8035 def_gui
='#undef CONFIG_GUI'
8036 def_gtk2
='#undef CONFIG_GTK2'
8038 # --------------- GUI specific tests end -------------------
8041 if test "$_charset" != "noconv" ; then
8042 def_charset
="#define MSG_CHARSET \"$_charset\""
8044 def_charset
="#undef MSG_CHARSET"
8048 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
8049 echocheck
"iconv program"
8050 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
8051 if test "$?" -ne 0 ; then
8053 echo "No working iconv program found, use "
8054 echo "--charset=UTF-8 to continue anyway."
8055 echo "If you also have problems with iconv library functions use --charset=noconv."
8056 echo "Messages in the GTK-2 interface will be broken then."
8063 #############################################################################
8065 echocheck
"automatic gdb attach"
8066 if test "$_crash_debug" = yes ; then
8067 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
8069 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
8072 echores
"$_crash_debug"
8074 echocheck
"compiler support for noexecstack"
8076 int main(void) { return 0; }
8078 if cc_check
-Wl,-z,noexecstack
; then
8079 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
8086 # Dynamic linking flags
8087 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
8089 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
8090 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
8091 _ld_dl_dynamic
='-rdynamic'
8094 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
8095 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
8096 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
8098 def_debug
='#undef MP_DEBUG'
8099 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
8102 echocheck
"joystick"
8103 def_joystick
='#undef CONFIG_JOYSTICK'
8104 if test "$_joystick" = yes ; then
8106 # TODO add some check
8107 def_joystick
='#define CONFIG_JOYSTICK 1'
8110 _res_comment
="unsupported under $system_name"
8113 echores
"$_joystick"
8116 if test "$_lirc" = auto
; then
8119 #include <lirc/lirc_client.h>
8120 int main(void) { return 0; }
8122 cc_check
-llirc_client && _lirc
=yes
8124 if test "$_lirc" = yes ; then
8125 def_lirc
='#define CONFIG_LIRC 1'
8126 libs_mplayer
="$libs_mplayer -llirc_client"
8128 def_lirc
='#undef CONFIG_LIRC'
8133 if test "$_lircc" = auto
; then
8136 #include <lirc/lircc.h>
8137 int main(void) { return 0; }
8139 cc_check
-llircc && _lircc
=yes
8141 if test "$_lircc" = yes ; then
8142 def_lircc
='#define CONFIG_LIRCC 1'
8143 libs_mplayer
="$libs_mplayer -llircc"
8145 def_lircc
='#undef CONFIG_LIRCC'
8150 # Detect maemo development platform libraries availability (http://www.maemo.org),
8151 # they are used when run on Nokia 770|8x0
8152 echocheck
"maemo (Nokia 770|8x0)"
8153 if test "$_maemo" = auto
; then
8156 #include <libosso.h>
8157 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
8159 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
8161 if test "$_maemo" = yes ; then
8162 def_maemo
='#define CONFIG_MAEMO 1'
8163 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
8164 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
8166 def_maemo
='#undef CONFIG_MAEMO'
8171 #############################################################################
8173 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
8174 # the OMF format needs to come after the 'extern symbol prefix' check, which
8177 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
8180 # linker paths should be the same for mencoder and mplayer
8182 for I
in $libs_mplayer ; do
8183 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
8184 if test -z "$_tmp" ; then
8185 extra_ldflags
="$extra_ldflags $I"
8187 _ld_tmp
="$_ld_tmp $I"
8190 libs_mplayer
=$_ld_tmp
8193 #############################################################################
8194 # 64 bit file offsets?
8195 if test "$_largefiles" = yes || freebsd
; then
8196 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8197 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
8198 # dvdread support requires this (for off64_t)
8199 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
8203 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
8205 # This must be the last test to be performed. Any other tests following it
8206 # could fail due to linker errors. libdvdnavmini is intentionally not linked
8207 # against libdvdread (to permit MPlayer to use its own copy of the library).
8208 # So any compilation using the flags added here but not linking against
8209 # libdvdread can fail.
8210 echocheck
"DVD support (libdvdnav)"
8212 if test "$_dvdnav" = auto
; then
8213 if test "$_dvdread_internal" = yes ; then
8216 _res_comment
="internal"
8218 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
8221 if test "$_dvdnav" = auto
; then
8223 #include <inttypes.h>
8224 #include <dvdnav/dvdnav.h>
8225 int main(void) { dvdnav_t *dvd=0; return 0; }
8228 _dvdnavdir
=$
($_dvdnavconfig --cflags)
8229 _dvdnavlibs
=$
($_dvdnavconfig --libs)
8230 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
8232 if test "$_dvdnav" = yes ; then
8234 def_dvdnav
='#define CONFIG_DVDNAV 1'
8235 if test "$dvdnav_internal" = yes ; then
8236 cflags_libdvdnav
="-Ilibdvdnav"
8237 _inputmodules
="dvdnav(internal) $_inputmodules"
8239 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
8240 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
8241 _inputmodules
="dvdnav $_inputmodules"
8244 def_dvdnav
='#undef CONFIG_DVDNAV'
8245 _noinputmodules
="dvdnav $_noinputmodules"
8249 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
8250 # Read dvdnav comment above.
8252 #############################################################################
8253 echo "Creating config.mak"
8254 cat > config.mak
<< EOF
8255 # -------- Generated by configure -----------
8257 # Ensure that locale settings do not interfere with shell commands.
8260 CONFIGURATION = $_configuration
8263 DOC_LANGS = $language_doc
8264 DOC_LANG_ALL = $doc_lang_all
8265 MAN_LANGS = $language_man
8266 MAN_LANG_ALL = $man_lang_all
8268 prefix = \$(DESTDIR)$_prefix
8269 BINDIR = \$(DESTDIR)$_bindir
8270 DATADIR = \$(DESTDIR)$_datadir
8271 LIBDIR = \$(DESTDIR)$_libdir
8272 MANDIR = \$(DESTDIR)$_mandir
8273 CONFDIR = \$(DESTDIR)$_confdir
8282 INSTALLSTRIP = $_install_strip
8286 CFLAGS = $CFLAGS $extra_cflags
8287 OPTFLAGS = $CFLAGS $extra_cflags
8288 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
8289 CFLAGS_DHAHELPER = $cflags_dhahelper
8290 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
8291 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
8292 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
8293 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
8294 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
8295 CFLAGS_STACKREALIGN = $cflags_stackrealign
8296 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
8297 CFLAGS_TREMOR_LOW = $cflags_tremor_low
8298 YASMFLAGS = $YASMFLAGS
8300 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
8301 EXTRALIBS_MPLAYER = $libs_mplayer
8302 EXTRALIBS_MENCODER = $libs_mencoder
8304 DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&,"
8306 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 &,"
8307 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 &,"
8310 HELP_FILE = $_mp_help
8318 $(echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/')
8320 MENCODER = $_mencoder
8323 NEED_GETTIMEOFDAY = $_need_gettimeofday
8324 NEED_GLOB = $_need_glob
8325 NEED_MMAP = $_need_mmap
8326 NEED_SETENV = $_need_setenv
8327 NEED_SHMEM = $_need_shmem
8328 NEED_STRSEP = $_need_strsep
8329 NEED_SWAB = $_need_swab
8330 NEED_VSSCANF = $_need_vsscanf
8338 APPLE_IR = $_apple_ir
8339 APPLE_REMOTE = $_apple_remote
8341 AUDIO_INPUT = $_audio_input
8342 BITMAP_FONT = $_bitmap_font
8347 COREAUDIO = $_coreaudio
8348 COREVIDEO = $_corevideo
8352 DIRECT3D = $_direct3d
8353 DIRECTFB = $_directfb
8357 DVDNAV_INTERNAL = $dvdnav_internal
8359 DVDREAD_INTERNAL = $_dvdread_internal
8365 FAAD_INTERNAL = $_faad_internal
8366 FASTMEMCPY = $_fastmemcpy
8368 FREETYPE = $_freetype
8373 GL_WIN32 = $_gl_win32
8375 MATRIXVIEW = $matrixview
8378 GUI_WIN32 = $_gui_win32
8379 HAVE_POSIX_SELECT = $_posix_select
8380 HAVE_SYS_MMAN_H = $_mman
8383 JOYSTICK = $_joystick
8388 LIBA52_INTERNAL = $_liba52_internal
8390 LIBASS_INTERNAL = $ass_internal
8394 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
8398 LIBMENU_DVBIN = $_menu_dvbin
8399 LIBMPEG2 = $_libmpeg2
8400 LIBNEMESI = $_nemesi
8402 LIBSMBCLIENT = $_smb
8403 LIBTHEORA = $_theora
8406 MACOSX_BUNDLE = $_macosx_bundle
8407 MACOSX_FINDER = $_macosx_finder
8413 MUSEPACK = $_musepack
8415 NATIVE_RTSP = $_native_rtsp
8419 PE_EXECUTABLE = $_pe_executable
8422 PRIORITY = $_priority
8426 QTX_CODECS_WIN32 = $_qtx_codecs_win32
8427 QTX_EMULATION = $_qtx_emulation
8430 RADIO_CAPTURE=$_radio_capture
8431 REAL_CODECS = $_real
8435 STREAM_CACHE = $_stream_cache
8436 SGIAUDIO = $_sgiaudio
8437 SUNAUDIO = $_sunaudio
8443 TREMOR_INTERNAL = $_tremor_internal
8445 TV_BSDBT848 = $_tv_bsdbt848
8446 TV_DSHOW = $_tv_dshow
8451 UNRAR_EXEC = $_unrar_exec
8457 VIDIX_PCIDB = $_vidix_pcidb_val
8458 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
8459 VIDIX_IVTV=$_vidix_drv_ivtv
8460 VIDIX_MACH64=$_vidix_drv_mach64
8461 VIDIX_MGA=$_vidix_drv_mga
8462 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
8463 VIDIX_NVIDIA=$_vidix_drv_nvidia
8464 VIDIX_PM2=$_vidix_drv_pm2
8465 VIDIX_PM3=$_vidix_drv_pm3
8466 VIDIX_RADEON=$_vidix_drv_radeon
8467 VIDIX_RAGE128=$_vidix_drv_rage128
8468 VIDIX_S3=$_vidix_drv_s3
8469 VIDIX_SH_VEU=$_vidix_drv_sh_veu
8470 VIDIX_SIS=$_vidix_drv_sis
8471 VIDIX_UNICHROME=$_vidix_drv_unichrome
8475 WIN32DLL = $_win32dll
8476 WIN32WAVEOUT = $_win32waveout
8477 WIN32_EMULATION = $_win32_emulation
8478 WINVIDIX = $winvidix
8481 XANIM_CODECS = $_xanim
8483 XMMS_PLUGINS = $_xmms
8489 YUV4MPEG = $_yuv4mpeg
8493 LIBAVUTIL = $_libavutil
8494 LIBAVUTIL_A = $_libavutil_a
8495 LIBAVUTIL_SO = $_libavutil_so
8496 LIBAVCODEC = $_libavcodec
8497 LIBAVCODEC_A = $_libavcodec_a
8498 LIBAVCODEC_SO = $_libavcodec_so
8499 LIBAVFORMAT = $_libavformat
8500 LIBAVFORMAT_A = $_libavformat_a
8501 LIBAVFORMAT_SO = $_libavformat_so
8502 LIBPOSTPROC = $_libpostproc
8503 LIBPOSTPROC_A = $_libpostproc_a
8504 LIBPOSTPROC_SO = $_libpostproc_so
8505 LIBSWSCALE = $_libswscale
8506 LIBSWSCALE_A = $_libswscale_a
8507 LIBSWSCALE_SO = $_libswscale_so
8516 LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF)
8518 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8521 CONFIG_FFT_MMX=$fft_mmx
8530 CONFIG_LIBDIRAC_DECODER=$_libdirac_lavc
8531 CONFIG_LIBDIRAC_ENCODER=$_libdirac_lavc
8532 CONFIG_LIBFAAC_ENCODER=$_faac_lavc
8533 CONFIG_LIBMP3LAME_ENCODER=$_mp3lame_lavc
8534 CONFIG_LIBOPENCORE_AMRNB_DECODER=$_libopencore_amrnb
8535 CONFIG_LIBOPENCORE_AMRNB_ENCODER=$_libopencore_amrnb
8536 CONFIG_LIBOPENCORE_AMRWB_DECODER=$_libopencore_amrwb
8537 OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
8538 OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
8539 CONFIG_LIBSCHROEDINGER_DECODER=$_libschroedinger_lavc
8540 CONFIG_LIBSCHROEDINGER_ENCODER=$_libschroedinger_lavc
8541 CONFIG_LIBVORBIS_ENCODER=$_libvorbis
8542 CONFIG_LIBX264_ENCODER=$_x264_lavc
8543 CONFIG_LIBXVID_ENCODER=$_xvid_lavc
8544 CONFIG_MLIB = $_mlib
8545 CONFIG_MUXERS=$_mencoder
8546 CONFIG_POSTPROC = yes
8547 # Prevent building libavcodec/imgresample.c with conflicting symbols
8549 CONFIG_VDPAU=$_vdpau
8553 HAVE_PTHREADS = $_pthreads
8555 HAVE_W32THREADS = $_w32threads
8556 HAVE_YASM = $_have_yasm
8558 $(echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8559 $(echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8560 $(echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8561 $(echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8562 $(echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8563 $(echo $_libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8564 $(echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8567 #############################################################################
8569 ff_config_enable
() {
8571 test -z "$_nprefix" && _nprefix
='CONFIG'
8573 if $
(echo $2 |
grep -q -E "(^| )$part($| )"); then
8574 echo "#define ${_nprefix}_$part 1"
8576 echo "#define ${_nprefix}_$part 0"
8581 echo "Creating config.h"
8583 /*----------------------------------------------------------------------------
8584 ** This file has been automatically generated by configure any changes in it
8585 ** will be lost when you run configure again.
8586 ** Instead of modifying definitions here, use the --enable/--disable options
8587 ** of the configure script! See ./configure --help for details.
8588 *---------------------------------------------------------------------------*/
8590 #ifndef MPLAYER_CONFIG_H
8591 #define MPLAYER_CONFIG_H
8593 /* Undefine this if you do not want to select mono audio (left or right)
8594 with a stereo MPEG layer 2/3 audio stream. The command line option
8595 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8596 right-only), with 0 being the default.
8598 #define CONFIG_FAKE_MONO 1
8600 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
8601 #define MAX_OUTBURST 65536
8603 /* set up audio OUTBURST. Do not change this! */
8604 #define OUTBURST 512
8606 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8608 #undef FAST_OSD_TABLE
8610 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8611 #define MPEG12_POSTPROC 1
8612 #define ATTRIBUTE_ALIGNED_MAX 16
8616 #define CONFIGURATION "$_configuration"
8618 #define MPLAYER_DATADIR "$_datadir"
8619 #define MPLAYER_CONFDIR "$_confdir"
8620 #define MPLAYER_LIBDIR "$_libdir"
8622 /* definitions needed by included libraries */
8623 #define HAVE_INTTYPES_H 1
8624 /* libmpeg2 + FFmpeg */
8627 #define HAVE_ERRNO_H 1
8628 /* libdvdcss + libdvdread */
8629 #define HAVE_LIMITS_H 1
8630 /* libdvdcss + libfaad2 */
8631 #define HAVE_UNISTD_H 1
8632 /* libfaad2 + libdvdread */
8633 #define STDC_HEADERS 1
8634 #define HAVE_MEMCPY 1
8636 #define HAVE_STRING_H 1
8637 #define HAVE_STRINGS_H 1
8638 #define HAVE_SYS_STAT_H 1
8639 #define HAVE_SYS_TYPES_H 1
8641 #define READ_CACHE_TRACE 0
8643 #define HAVE_DLFCN_H 1
8647 /* system headers */
8649 $def_alsa_asoundlib_h
8653 $def_mman_has_map_failed
8655 $def_sys_asoundlib_h
8656 $def_sys_soundcard_h
8663 /* system functions */
8691 /* system-specific features */
8705 $def_restrict_keyword
8710 /* configurable options */
8714 $def_dynamic_plugins
8717 $def_runtime_cpudetection
8725 #define __CPU__ $iproc
8728 $(ff_config_enable "$_arch_all" "$_arch" "ARCH")
8729 $(ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE")
8733 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8734 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8754 /* codec libraries */
8759 $def_liba52_internal
8767 $def_mp3lame_preset_medium
8790 #define WIN32_PATH "$_win32codecsdir"
8794 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8803 /* Audio output drivers */
8818 $def_ossaudio_devdsp
8819 $def_ossaudio_devmixer
8832 $def_ioctl_bt848_h_name
8833 $def_ioctl_meteor_h_name
8887 $def_directfb_version
8925 $def_vidix_drv_cyberblade
8927 $def_vidix_drv_mach64
8929 $def_vidix_drv_mga_crtc2
8930 $def_vidix_drv_nvidia
8932 $def_vidix_drv_radeon
8933 $def_vidix_drv_rage128
8935 $def_vidix_drv_sh_veu
8937 $def_vidix_drv_unichrome
8971 #define CONFIG_DECODERS 1
8972 #define CONFIG_ENCODERS 1
8973 #define CONFIG_DEMUXERS 1
8983 $def_libavcodec_mpegaudio_hp
8994 #define CONFIG_FASTDIV 0
8995 #define CONFIG_FFSERVER 0
8996 #define CONFIG_GPL 1
8997 #define CONFIG_GRAY 0
8998 #define CONFIG_HARDCODED_TABLES 0
8999 #define CONFIG_LIBVORBIS 0
9000 #define CONFIG_POWERPC_PERF 0
9001 #define CONFIG_SMALL 0
9002 #define CONFIG_SWSCALE 1
9003 #define CONFIG_SWSCALE_ALPHA 1
9005 #ifdef HAVE_AF_INET6
9006 #define CONFIG_IPV6 1
9008 #define CONFIG_IPV6 0
9011 #define HAVE_ATTRIBUTE_PACKED 1
9012 #define HAVE_GETHRTIME 0
9013 #define HAVE_INLINE_ASM 0
9014 #define HAVE_LDBRX 0
9015 #define HAVE_POLL_H 1
9016 #define HAVE_PPC4XX 0
9017 #define HAVE_SETMODE 0
9018 #define HAVE_SYS_SELECT_H 0
9019 #define HAVE_VIRTUALALLOC 0
9021 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
9022 #define CONFIG_AANDCT 1
9023 #define CONFIG_FFT 1
9024 #define CONFIG_GOLOMB 1
9025 #define CONFIG_LPC 1
9026 #define CONFIG_MDCT 1
9027 #define CONFIG_RDFT 1
9029 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
9032 #define HAVE_EBP_AVAILABLE 1
9034 #define HAVE_EBP_AVAILABLE 0
9037 #define FFMPEG_CONFIGURATION "--enable-gpl --enable-postproc"
9038 #define FFMPEG_LICENSE "GPL version 2 or later"
9040 /* External libraries used through libavcodec. */
9043 $def_libopencore_amrnb
9044 $def_libopencore_amrwb
9046 $def_libschroedinger_lavc
9051 $(ff_config_enable "$_libavdecoders_all" "$_libavdecoders")
9052 $(ff_config_enable "$_libavencoders_all" "$_libavencoders")
9053 $(ff_config_enable "$_libavparsers_all" "$_libavparsers")
9054 $(ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers")
9055 $(ff_config_enable "$_libavmuxers_all" "$_libavmuxers")
9056 $(ff_config_enable "$_libavprotocols_all" "$_libavprotocols")
9057 $(ff_config_enable "$_libavbsfs_all" "$_libavbsfs")
9059 #define CONFIG_H263_VAAPI_HWACCEL 0
9060 #define CONFIG_MPEG2_VAAPI_HWACCEL 0
9061 #define CONFIG_MPEG4_VAAPI_HWACCEL 0
9062 #define CONFIG_H264_VAAPI_HWACCEL 0
9063 #define CONFIG_VC1_VAAPI_HWACCEL 0
9064 #define CONFIG_WMV3_VAAPI_HWACCEL 0
9066 #endif /* MPLAYER_CONFIG_H */
9069 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
9070 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
9072 #############################################################################
9076 Config files successfully generated by ./configure $_configuration !
9078 Install prefix: $_prefix
9079 Data directory: $_datadir
9080 Config direct.: $_confdir
9082 Byte order: $_byte_order
9083 Optimizing for: $_optimizing
9086 Messages/GUI: $language_msg
9087 Manual pages: $language_man
9088 Documentation: $language_doc
9090 Enabled optional drivers:
9091 Input: $_inputmodules
9092 Codecs: $_codecmodules
9093 Audio output: $_aomodules
9094 Video output: $_vomodules
9096 Disabled optional drivers:
9097 Input: $_noinputmodules
9098 Codecs: $_nocodecmodules
9099 Audio output: $_noaomodules
9100 Video output: $_novomodules
9102 'config.h' and 'config.mak' contain your configuration options.
9103 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
9104 compile *** DO NOT REPORT BUGS if you tweak these files ***
9106 'make' will now compile MPlayer and 'make install' will install it.
9107 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
9112 if test "$_mtrr" = yes ; then
9113 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
9119 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
9120 operating system ($system_name). You may encounter a few files that cannot
9121 be played due to missing open source video/audio codec support.
9128 Check $TMPLOG if you wonder why an autodetection failed (make sure
9129 development headers/packages are installed).
9131 NOTE: The --enable-* parameters unconditionally force options on, completely
9132 skipping autodetection. This behavior is unlike what you may be used to from
9133 autoconf-based configure scripts that can decide to override you. This greater
9134 level of control comes at a price. You may have to provide the correct compiler
9135 and linker flags yourself.
9136 If you used one of these options (except --enable-gui and similar ones that
9137 turn on internal features) and experience a compilation or linking failure,
9138 make sure you have passed the necessary compiler/linker flags to configure.
9140 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
9144 if test "$_warn_CFLAGS" = yes; then
9147 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
9150 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
9152 It is strongly recommended to let MPlayer choose the correct CFLAGS!
9153 To do so, execute 'CFLAGS= ./configure <options>'
9159 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"