3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: Check the Subversion log.
8 # Cleanups all over the place (c) 2001 pl
11 # This configure script is *not* autoconf-based and has different semantics.
12 # It attempts to autodetect all settings and options where possible. It is
13 # possible to override autodetection with the --enable-option/--disable-option
14 # command line parameters. --enable-option forces the option on skipping
15 # autodetection. Yes, this means that compilation may fail and yes, this is not
16 # how autoconf-based configure scripts behave.
18 # configure generates a series of configuration files:
19 # - config.h contains #defines that are used in the C code.
20 # - config.mak is included from the Makefiles.
22 # If you want to add a new check for $feature, here is a simple skeleton:
24 # echocheck "$feature"
25 # if test "$_feature" = auto; then
27 # #include <feature.h>
28 # int main(void) { return 0; }
31 # cc_check && _feature=yes
33 # if test "$_feature" = yes ; then
34 # def_feature='#define CONFIG_FEATURE 1'
36 # def_feature='#undef CONFIG_FEATURE'
40 # Furthermore you need to add the variable _feature to the list of default
41 # settings and set it to one of yes/no/auto. Also add appropriate
42 # --enable-feature/--disable-feature command line options.
43 # The results of the check should be written to config.h and config.mak
44 # at the end of this script. The variable names used for this should be
45 # uniform, i.e. if the option is named 'feature':
47 # _feature : should have a value of yes/no/auto
48 # def_feature : '#define ... 1' or '#undef ...' for conditional compilation
49 # _ld_feature : '-L/path/dir -lfeature' GCC options
51 #############################################################################
53 # Prevent locale nonsense from breaking basic text processing utils
56 # Store the configure line that was used
59 # Prefer these macros to full length text !
60 # These macros only return an error code - NO display is done
65 echo "$_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
67 $_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
75 compile_check
$TMPC $@
79 compile_check
$TMPCPP $@
-lstdc++
84 cat "$TMPS" >> "$TMPLOG"
86 echo "$_yasm $YASMFLAGS -o $TMPEXE $TMPS $@" >> "$TMPLOG"
88 $_yasm $YASMFLAGS -o "$TMPEXE" "$TMPS" "$@" >> "$TMPLOG" 2>&1
96 "$TMPEXE" >> "$TMPLOG" 2>&1
99 # Display error message, flushes tempfile, exit
104 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
105 echo "Check \"$TMPLOG\" if you do not understand why it failed."
109 # OS test booleans functions
111 test "$(echo $system_name | tr A-Z a-z)" = "$(echo $1 | tr A-Z a-z)"
113 aix
() { issystem
"AIX"; }
114 amigaos
() { issystem
"AmigaOS"; }
115 beos
() { issystem
"BEOS"; }
116 bsdos
() { issystem
"BSD/OS"; }
117 cygwin
() { issystem
"CYGWIN"; }
118 darwin
() { issystem
"Darwin"; }
119 dragonfly
() { issystem
"DragonFly"; }
120 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; }
121 gnu
() { issystem
"GNU"; }
122 hpux
() { issystem
"HP-UX"; }
123 irix
() { issystem
"IRIX"; }
124 linux
() { issystem
"Linux"; }
125 mingw32
() { issystem
"MINGW32"; }
126 morphos
() { issystem
"MorphOS"; }
127 netbsd
() { issystem
"NetBSD"; }
128 openbsd
() { issystem
"OpenBSD"; }
129 os2
() { issystem
"OS/2"; }
130 qnx
() { issystem
"QNX"; }
131 sunos
() { issystem
"SunOS"; }
132 win32
() { cygwin || mingw32
; }
134 # arch test boolean functions
135 # x86/x86pc is used by QNX
138 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
145 x86_64|amd64
) return 0 ;;
156 ppc|ppc64|powerpc|powerpc64
) return 0;;
175 # Use this before starting a check
177 echo "============ Checking for $@ ============" >> "$TMPLOG"
178 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
181 # Use this to echo the results of a check
183 if test "$_res_comment" ; then
184 _res_comment
="($_res_comment)"
186 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
187 echo "##########################################" >> "$TMPLOG"
189 echo "$@ $_res_comment"
192 #############################################################################
194 # Check how echo works in this /bin/sh
196 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
197 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
200 msg_lang_all
=$
(echo help
/help_mp-??.h help
/help_mp-??_??.h |
sed -e "s:help/help_mp-\(..\).h:\1:g" -e "s:help/help_mp-\(.....\).h:\1:g")
201 man_lang_all
=$
(echo DOCS
/man
/??
/mplayer
.1 DOCS
/man
/??_??
/mplayer
.1 |
sed -e "s:DOCS/man/\(..\)/mplayer.1:\1:g" -e "s:DOCS/man/\(.._..\)/mplayer.1:\1:g")
202 doc_lang_all
=$
(echo DOCS
/xml
/??
/ DOCS
/xml
/??_??
/ |
sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g")
206 Usage: $0 [OPTIONS]...
209 -h, --help display this help and exit
211 Installation directories:
212 --prefix=DIR prefix directory for installation [/usr/local]
213 --bindir=DIR directory for installing binaries [PREFIX/bin]
214 --datadir=DIR directory for installing machine independent
215 data files (skins, etc) [PREFIX/share/mplayer]
216 --mandir=DIR directory for installing man pages [PREFIX/share/man]
217 --confdir=DIR directory for installing configuration files
219 --libdir=DIR directory for object code libraries [PREFIX/lib]
220 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
223 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
224 --disable-mplayer disable MPlayer compilation [enable]
225 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
226 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
227 --disable-largefiles disable support for files > 2GB [enable]
228 --enable-linux-devfs set default devices to devfs [disable]
229 --enable-termcap use termcap database for key codes [autodetect]
230 --enable-termios use termios database for key codes [autodetect]
231 --disable-iconv disable iconv for encoding conversion [autodetect]
232 --disable-langinfo do not use langinfo [autodetect]
233 --enable-lirc enable LIRC (remote control) support [autodetect]
234 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
235 --enable-joystick enable joystick support [disable]
236 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
237 --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
238 --disable-vm disable X video mode extensions [autodetect]
239 --disable-xf86keysym disable support for multimedia keys [autodetect]
240 --enable-radio enable radio interface [disable]
241 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
242 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
243 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
244 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
245 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
246 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
247 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
248 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
249 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
250 --disable-network disable networking [enable]
251 --enable-winsock2_h enable winsock2_h [autodetect]
252 --enable-smb enable Samba (SMB) input [autodetect]
253 --enable-live enable LIVE555 Streaming Media [autodetect]
254 --enable-nemesi enable Nemesi Streaming Media [autodetect]
255 --disable-vcd disable VCD support [autodetect]
256 --disable-dvdnav disable libdvdnav [autodetect]
257 --disable-dvdread disable libdvdread [autodetect]
258 --disable-dvdread-internal disable internal libdvdread [autodetect]
259 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
260 --disable-cdparanoia disable cdparanoia [autodetect]
261 --disable-cddb disable cddb [autodetect]
262 --disable-bitmap-font disable bitmap font support [enable]
263 --disable-freetype disable FreeType 2 font rendering [autodetect]
264 --disable-fontconfig disable fontconfig font lookup [autodetect]
265 --disable-unrarexec disable using of UnRAR executable [enabled]
266 --enable-menu enable OSD menu (not DVD menu) [disabled]
267 --disable-sortsub disable subtitle sorting [enabled]
268 --enable-fribidi enable the FriBiDi libs [autodetect]
269 --disable-enca disable ENCA charset oracle library [autodetect]
270 --disable-maemo disable maemo specific features [autodetect]
271 --enable-macosx-finder enable Mac OS X Finder invocation parameter
273 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
274 --disable-inet6 disable IPv6 support [autodetect]
275 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
276 --disable-ftp disable FTP support [enabled]
277 --disable-vstream disable TiVo vstream client support [autodetect]
278 --disable-pthreads disable Posix threads support [autodetect]
279 --disable-w32threads disable Win32 threads support [autodetect]
280 --disable-ass-internal disable internal SSA/ASS subtitle support [autodetect]
281 --disable-ass disable SSA/ASS subtitle support [autodetect]
282 --enable-rpath enable runtime linker path for extra libs [disabled]
285 --enable-gif enable GIF support [autodetect]
286 --enable-png enable PNG input/output support [autodetect]
287 --enable-mng enable MNG input support [autodetect]
288 --enable-jpeg enable JPEG input/output support [autodetect]
289 --enable-libcdio enable libcdio support [autodetect]
290 --enable-liblzo enable liblzo support [autodetect]
291 --disable-win32dll disable Win32 DLL support [autodetect]
292 --disable-qtx disable QuickTime codecs support [enabled]
293 --disable-xanim disable XAnim codecs support [enabled]
294 --disable-real disable RealPlayer codecs support [enabled]
295 --disable-xvid disable Xvid [autodetect]
296 --disable-xvid-lavc disable Xvid in libavcodec [autodetect]
297 --disable-x264 disable x264 [autodetect]
298 --disable-x264-lavc disable x264 in libavcodec [autodetect]
299 --disable-libdirac-lavc disable Dirac in libavcodec [autodetect]
300 --disable-libschroedinger-lavc disable Dirac in libavcodec (Schroedinger
301 decoder) [autodetect]
302 --disable-libnut disable libnut [autodetect]
303 --disable-libavutil_a disable static libavutil [autodetect]
304 --disable-libavcodec_a disable static libavcodec [autodetect]
305 --disable-libavformat_a disable static libavformat [autodetect]
306 --disable-libpostproc_a disable static libpostproc [autodetect]
307 --disable-libswscale_a disable static libswscale [autodetect]
308 --disable-libavutil_so disable shared libavutil [autodetect]
309 --disable-libavcodec_so disable shared libavcodec [autodetect]
310 --disable-libavformat_so disable shared libavformat [autodetect]
311 --disable-libpostproc_so disable shared libpostproc [autodetect]
312 --disable-libswscale_so disable shared libswscale [autodetect]
313 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
314 in libavcodec [enabled]
315 --disable-tremor-internal disable internal Tremor [enabled]
316 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
317 --enable-tremor enable external Tremor [autodetect]
318 --disable-libvorbis disable libvorbis support [autodetect]
319 --disable-speex disable Speex support [autodetect]
320 --enable-theora enable OggTheora libraries [autodetect]
321 --enable-faad enable external FAAD2 (AAC) [autodetect]
322 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
323 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
324 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
325 --disable-faac-lavc disable support for FAAC in libavcodec [autodetect]
326 --disable-ladspa disable LADSPA plugin support [autodetect]
327 --disable-libbs2b disable libbs2b audio filter support [autodetect]
328 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
329 --disable-mad disable libmad (MPEG audio) support [autodetect]
330 --disable-mp3lame disable LAME MP3 encoding support [autodetect]
331 --disable-mp3lame-lavc disable LAME in libavcodec [autodetect]
332 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
333 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
334 --enable-xmms enable XMMS input plugin support [disabled]
335 --enable-libdca enable libdca support [autodetect]
336 --disable-mp3lib disable builtin mp3lib [autodetect]
337 --disable-liba52 disable liba52 [autodetect]
338 --enable-liba52-internal enable builtin liba52 [disabled]
339 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
340 --disable-musepack disable musepack support [autodetect]
341 --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect]
342 --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect]
343 --disable-libopenjpeg disable OpenJPEG (JPEG2000) input/output support [autodetect]
344 --disable-decoder=DECODER disable specified FFmpeg decoder
345 --enable-decoder=DECODER enable specified FFmpeg decoder
346 --disable-encoder=ENCODER disable specified FFmpeg encoder
347 --enable-encoder=ENCODER enable specified FFmpeg encoder
348 --disable-parser=PARSER disable specified FFmpeg parser
349 --enable-parser=PARSER enable specified FFmpeg parser
350 --disable-protocol=PROTO disable specified FFmpeg protocol
351 --enable-protocol=PROTO enable specified FFmpeg protocol
352 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
353 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
354 --disable-muxer=MUXER disable specified FFmpeg muxer
355 --enable-muxer=MUXER enable specified FFmpeg muxer
358 --disable-vidix disable VIDIX [for x86 *nix]
359 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
360 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
361 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
362 --disable-vidix-pcidb disable VIDIX PCI device name database
363 --enable-dhahelper enable VIDIX dhahelper support
364 --enable-svgalib_helper enable VIDIX svgalib_helper support
365 --enable-gl enable OpenGL video output [autodetect]
366 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
367 --enable-dga2 enable DGA 2 support [autodetect]
368 --enable-dga1 enable DGA 1 support [autodetect]
369 --enable-vesa enable VESA video output [autodetect]
370 --enable-svga enable SVGAlib video output [autodetect]
371 --enable-sdl enable SDL video output [autodetect]
372 --enable-kva enable KVA video output [autodetect]
373 --enable-aa enable AAlib video output [autodetect]
374 --enable-caca enable CACA video output [autodetect]
375 --enable-ggi enable GGI video output [autodetect]
376 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
377 --enable-direct3d enable Direct3D video output [autodetect]
378 --enable-directx enable DirectX video output [autodetect]
379 --enable-dxr2 enable DXR2 video output [autodetect]
380 --enable-dxr3 enable DXR3/H+ video output [autodetect]
381 --enable-ivtv enable IVTV TV-Out video output [autodetect]
382 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
383 --enable-dvb enable DVB video output [autodetect]
384 --enable-mga enable mga_vid video output [autodetect]
385 --enable-xmga enable mga_vid X11 video output [autodetect]
386 --enable-xv enable Xv video output [autodetect]
387 --enable-xvmc enable XvMC acceleration [disable]
388 --enable-vdpau enable VDPAU acceleration [autodetect]
389 --enable-vm enable XF86VidMode support [autodetect]
390 --enable-xinerama enable Xinerama support [autodetect]
391 --enable-x11 enable X11 video output [autodetect]
392 --enable-xshape enable XShape support [autodetect]
393 --disable-xss disable screensaver support via xss [autodetect]
394 --enable-fbdev enable FBDev video output [autodetect]
395 --enable-mlib enable mediaLib video output (Solaris) [disable]
396 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
397 --enable-tdfxfb enable tdfxfb video output [disable]
398 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
399 --enable-wii enable Nintendo Wii/GameCube video output [disable]
400 --enable-directfb enable DirectFB video output [autodetect]
401 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
402 --enable-bl enable Blinkenlights video output [disable]
403 --enable-tdfxvid enable tdfx_vid video output [disable]
404 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
405 --disable-tga disable Targa video output [enable]
406 --disable-pnm disable PNM video output [enable]
407 --disable-md5sum disable md5sum video output [enable]
408 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
409 --disable-corevideo disable CoreVideo video output [autodetect]
410 --disable-quartz disable Quartz video output [autodetect]
413 --disable-alsa disable ALSA audio output [autodetect]
414 --disable-ossaudio disable OSS audio output [autodetect]
415 --disable-arts disable aRts audio output [autodetect]
416 --disable-esd disable esd audio output [autodetect]
417 --disable-pulse disable Pulseaudio audio output [autodetect]
418 --disable-jack disable JACK audio output [autodetect]
419 --disable-openal disable OpenAL audio output [autodetect]
420 --disable-nas disable NAS audio output [autodetect]
421 --disable-sgiaudio disable SGI audio output [autodetect]
422 --disable-sunaudio disable Sun audio output [autodetect]
423 --disable-kai disable KAI audio output [autodetect]
424 --disable-dart disable DART audio output [autodetect]
425 --disable-win32waveout disable Windows waveout audio output [autodetect]
426 --disable-coreaudio disable CoreAudio audio output [autodetect]
427 --disable-select disable using select() on the audio device [enable]
430 --charset=charset convert the console messages to this character set
431 --language-doc=lang language to use for the documentation [en]
432 --language-man=lang language to use for the man pages [en]
433 --language-msg=lang language to use for the messages and the GUI [en]
434 --language=lang default language to use [en]
435 Specific options override --language. You can pass a list of languages separated
436 by whitespace or commas instead of a single language. Nonexisting translations
437 will be dropped from each list. All documentation and man page translations
438 available in the list will be installed, for the messages the first available
439 translation will be used. The value "all" will activate all translations. The
440 LINGUAS environment variable is honored. In all cases the fallback is English.
441 Available values are: all $msg_lang_all
443 Miscellaneous options:
444 --enable-runtime-cpudetection enable runtime CPU detection [disable]
445 --enable-cross-compile enable cross-compilation [autodetect]
446 --cc=COMPILER C compiler to build MPlayer [gcc]
447 --host-cc=COMPILER C compiler for tools needed while building [gcc]
448 --as=ASSEMBLER assembler to build MPlayer [as]
449 --nm=NM nm tool to build MPlayer [nm]
450 --yasm=YASM Yasm assembler to build MPlayer [yasm]
451 --ar=AR librarian to build MPlayer [ar]
452 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
453 --windres=WINDRES windres to build MPlayer [windres]
454 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
455 --enable-static build a statically linked binary
456 --with-install=PATH path to a custom install program
459 --enable-mmx enable MMX [autodetect]
460 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
461 --enable-3dnow enable 3DNow! [autodetect]
462 --enable-3dnowext enable extended 3DNow! [autodetect]
463 --enable-sse enable SSE [autodetect]
464 --enable-sse2 enable SSE2 [autodetect]
465 --enable-ssse3 enable SSSE3 [autodetect]
466 --enable-shm enable shm [autodetect]
467 --enable-altivec enable AltiVec (PowerPC) [autodetect]
468 --enable-armv5te enable DSP extensions (ARM) [autodetect]
469 --enable-armv6 enable ARMv6 (ARM) [autodetect]
470 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
471 --enable-armvfp enable ARM VFP (ARM) [autodetect]
472 --enable-neon enable NEON (ARM) [autodetect]
473 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
474 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
475 --enable-hardcoded-tables put tables in binary instead of calculating them at startup [disable]
476 --enable-big-endian force byte order to big-endian [autodetect]
477 --enable-debug[=1-3] compile-in debugging information [disable]
478 --enable-profile compile-in profiling information [disable]
479 --disable-sighandler disable sighandler for crashes [enable]
480 --enable-crash-debug enable automatic gdb attach on crash [disable]
481 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
483 Use these options if autodetection fails:
484 --extra-cflags=FLAGS extra CFLAGS
485 --extra-ldflags=FLAGS extra LDFLAGS
486 --extra-libs=FLAGS extra linker flags
487 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
488 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
489 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
491 --with-freetype-config=PATH path to freetype-config
492 --with-fribidi-config=PATH path to fribidi-config
493 --with-glib-config=PATH path to glib*-config
494 --with-gtk-config=PATH path to gtk*-config
495 --with-sdl-config=PATH path to sdl*-config
496 --with-dvdnav-config=PATH path to dvdnav-config
497 --with-dvdread-config=PATH path to dvdread-config
499 This configure script is NOT autoconf-based, even though its output is similar.
500 It will try to autodetect all configuration options. If you --enable an option
501 it will be forcefully turned on, skipping autodetection. This can break
502 compilation, so you need to know what you are doing.
507 # GOTCHA: the variables below defines the default behavior for autodetection
508 # and have - unless stated otherwise - at least 2 states : yes no
509 # If autodetection is available then the third state is: auto
533 test "$CC" && _cc
="$CC"
537 _runtime_cpudetection
=no
543 _libopencore_amrnb
=auto
544 _libopencore_amrwb
=auto
546 _libavdecoders_all
=$
(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
547 _libavdecoders
=$
(echo $_libavdecoders_all |
sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s
/MPEG4AAC_DECODER
//)
548 _libavencoders_all
=$
(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
549 _libavencoders
=$
(echo $_libavencoders_all |
sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s
/AAC_ENCODER
//)
550 _libavparsers_all
=$
(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
551 _libavparsers
=$_libavparsers_all
552 _libavbsfs_all
=$
(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
553 _libavbsfs
=$_libavbsfs_all
554 _libavhwaccels_all
=$
(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
555 # Disable all hardware accelerators for now.
557 _libavdemuxers_all
=$
(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
558 _libavdemuxers
=$
(echo $_libavdemuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s
/REDIR_DEMUXER
// -e s
/AVISYNTH_DEMUXER
//)
559 _libavmuxers_all
=$
(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
560 _libavmuxers
=$
(echo $_libavmuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s
/RTP_MUXER
// -e s
/RTSP_MUXER
//)
561 _libavprotocols_all
=$
(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
562 _libavprotocols
=$_libavprotocols_all
570 _libavcodec_mpegaudio_hp
=yes
579 _xvmc
=no
#auto when complete
647 _dvdnavconfig
=dvdnav-config
648 _dvdreadconfig
=dvdread-config
650 _dvdread_internal
=auto
651 _libdvdcss_internal
=auto
662 _mlib
=no
#broken, thus disabled
684 _struct_addrinfo
=auto
686 _struct_sockaddr_storage
=auto
698 _libschroedinger_lavc
=auto
743 _freetypeconfig
='freetype-config'
745 _fribidiconfig
='fribidi-config'
760 def_dos_paths
="#define HAVE_DOS_PATHS 0"
761 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
762 def_priority
="#undef CONFIG_PRIORITY"
763 def_pthread_cache
="#undef PTHREAD_CACHE"
771 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
774 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
777 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
780 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
783 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
786 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
789 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
793 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
796 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
800 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
802 --with-freetype-config=*)
803 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
805 --with-fribidi-config=*)
806 _fribidiconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
809 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
811 --with-glib-config=*)
812 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
814 --with-dvdnav-config=*)
815 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
817 --with-dvdread-config=*)
818 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
822 extra_cflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
825 extra_ldflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
828 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
830 --extra-libs-mplayer=*)
831 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
833 --extra-libs-mencoder=*)
834 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
838 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
841 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
844 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
847 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
850 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
853 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
856 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
859 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
862 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
865 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
868 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
871 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
874 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
877 language
=$
(echo $ac_option | cut
-d '=' -f 2)
896 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
901 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
902 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
903 --enable-cross-compile) _cross_compile
=yes ;;
904 --disable-cross-compile) _cross_compile
=no
;;
905 --enable-mencoder) _mencoder
=yes ;;
906 --disable-mencoder) _mencoder
=no
;;
907 --enable-mplayer) _mplayer
=yes ;;
908 --disable-mplayer) _mplayer
=no
;;
909 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
910 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
911 --enable-x11) _x11
=yes ;;
912 --disable-x11) _x11
=no
;;
913 --enable-xshape) _xshape
=yes ;;
914 --disable-xshape) _xshape
=no
;;
915 --enable-xss) _xss
=yes ;;
916 --disable-xss) _xss
=no
;;
917 --enable-xv) _xv
=yes ;;
918 --disable-xv) _xv
=no
;;
919 --enable-xvmc) _xvmc
=yes ;;
920 --disable-xvmc) _xvmc
=no
;;
921 --enable-vdpau) _vdpau
=yes ;;
922 --disable-vdpau) _vdpau
=no
;;
923 --enable-sdl) _sdl
=yes ;;
924 --disable-sdl) _sdl
=no
;;
925 --enable-kva) _kva
=yes ;;
926 --disable-kva) _kva
=no
;;
927 --enable-direct3d) _direct3d
=yes ;;
928 --disable-direct3d) _direct3d
=no
;;
929 --enable-directx) _directx
=yes ;;
930 --disable-directx) _directx
=no
;;
931 --enable-win32waveout) _win32waveout
=yes ;;
932 --disable-win32waveout) _win32waveout
=no
;;
933 --enable-nas) _nas
=yes ;;
934 --disable-nas) _nas
=no
;;
935 --enable-png) _png
=yes ;;
936 --disable-png) _png
=no
;;
937 --enable-mng) _mng
=yes ;;
938 --disable-mng) _mng
=no
;;
939 --enable-jpeg) _jpeg
=yes ;;
940 --disable-jpeg) _jpeg
=no
;;
941 --enable-libopenjpeg) libopenjpeg
=yes ;;
942 --disable-libopenjpeg)libopenjpeg
=no
;;
943 --enable-pnm) _pnm
=yes ;;
944 --disable-pnm) _pnm
=no
;;
945 --enable-md5sum) _md5sum
=yes ;;
946 --disable-md5sum) _md5sum
=no
;;
947 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
948 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
949 --enable-gif) _gif
=yes ;;
950 --disable-gif) _gif
=no
;;
951 --enable-gl) _gl
=yes ;;
952 --disable-gl) _gl
=no
;;
953 --enable-matrixview) matrixview
=yes ;;
954 --disable-matrixview) matrixview
=no
;;
955 --enable-ggi) _ggi
=yes ;;
956 --disable-ggi) _ggi
=no
;;
957 --enable-ggiwmh) _ggiwmh
=yes ;;
958 --disable-ggiwmh) _ggiwmh
=no
;;
959 --enable-aa) _aa
=yes ;;
960 --disable-aa) _aa
=no
;;
961 --enable-caca) _caca
=yes ;;
962 --disable-caca) _caca
=no
;;
963 --enable-svga) _svga
=yes ;;
964 --disable-svga) _svga
=no
;;
965 --enable-vesa) _vesa
=yes ;;
966 --disable-vesa) _vesa
=no
;;
967 --enable-fbdev) _fbdev
=yes ;;
968 --disable-fbdev) _fbdev
=no
;;
969 --enable-dvb) _dvb
=yes ;;
970 --disable-dvb) _dvb
=no
;;
971 --enable-dxr2) _dxr2
=yes ;;
972 --disable-dxr2) _dxr2
=no
;;
973 --enable-dxr3) _dxr3
=yes ;;
974 --disable-dxr3) _dxr3
=no
;;
975 --enable-ivtv) _ivtv
=yes ;;
976 --disable-ivtv) _ivtv
=no
;;
977 --enable-v4l2) _v4l2
=yes ;;
978 --disable-v4l2) _v4l2
=no
;;
979 --enable-iconv) _iconv
=yes ;;
980 --disable-iconv) _iconv
=no
;;
981 --enable-langinfo) _langinfo
=yes ;;
982 --disable-langinfo) _langinfo
=no
;;
983 --enable-rtc) _rtc
=yes ;;
984 --disable-rtc) _rtc
=no
;;
985 --enable-libdv) _libdv
=yes ;;
986 --disable-libdv) _libdv
=no
;;
987 --enable-ossaudio) _ossaudio
=yes ;;
988 --disable-ossaudio) _ossaudio
=no
;;
989 --enable-arts) _arts
=yes ;;
990 --disable-arts) _arts
=no
;;
991 --enable-esd) _esd
=yes ;;
992 --disable-esd) _esd
=no
;;
993 --enable-pulse) _pulse
=yes ;;
994 --disable-pulse) _pulse
=no
;;
995 --enable-jack) _jack
=yes ;;
996 --disable-jack) _jack
=no
;;
997 --enable-openal) _openal
=yes ;;
998 --disable-openal) _openal
=no
;;
999 --enable-kai) _kai
=yes ;;
1000 --disable-kai) _kai
=no
;;
1001 --enable-dart) _dart
=yes ;;
1002 --disable-dart) _dart
=no
;;
1003 --enable-mad) _mad
=yes ;;
1004 --disable-mad) _mad
=no
;;
1005 --enable-mp3lame) _mp3lame
=yes ;;
1006 --disable-mp3lame) _mp3lame
=no
;;
1007 --enable-mp3lame-lavc) _mp3lame_lavc
=yes ;;
1008 --disable-mp3lame-lavc) _mp3lame_lavc
=no
;;
1009 --enable-toolame) _toolame
=yes ;;
1010 --disable-toolame) _toolame
=no
;;
1011 --enable-twolame) _twolame
=yes ;;
1012 --disable-twolame) _twolame
=no
;;
1013 --enable-libcdio) _libcdio
=yes ;;
1014 --disable-libcdio) _libcdio
=no
;;
1015 --enable-liblzo) _liblzo
=yes ;;
1016 --disable-liblzo) _liblzo
=no
;;
1017 --enable-libvorbis) _libvorbis
=yes ;;
1018 --disable-libvorbis) _libvorbis
=no
;;
1019 --enable-speex) _speex
=yes ;;
1020 --disable-speex) _speex
=no
;;
1021 --enable-tremor) _tremor
=yes ;;
1022 --disable-tremor) _tremor
=no
;;
1023 --enable-tremor-internal) _tremor_internal
=yes ;;
1024 --disable-tremor-internal) _tremor_internal
=no
;;
1025 --enable-tremor-low) _tremor_low
=yes ;;
1026 --disable-tremor-low) _tremor_low
=no
;;
1027 --enable-theora) _theora
=yes ;;
1028 --disable-theora) _theora
=no
;;
1029 --enable-mp3lib) _mp3lib
=yes ;;
1030 --disable-mp3lib) _mp3lib
=no
;;
1031 --enable-liba52-internal) _liba52_internal
=yes ;;
1032 --disable-liba52-internal) _liba52_internal
=no
;;
1033 --enable-liba52) _liba52
=yes ;;
1034 --disable-liba52) _liba52
=no
;;
1035 --enable-libdca) _libdca
=yes ;;
1036 --disable-libdca) _libdca
=no
;;
1037 --enable-libmpeg2) _libmpeg2
=yes ;;
1038 --disable-libmpeg2) _libmpeg2
=no
;;
1039 --enable-musepack) _musepack
=yes ;;
1040 --disable-musepack) _musepack
=no
;;
1041 --enable-faad) _faad
=yes ;;
1042 --disable-faad) _faad
=no
;;
1043 --enable-faad-internal) _faad_internal
=yes ;;
1044 --disable-faad-internal) _faad_internal
=no
;;
1045 --enable-faad-fixed) _faad_fixed
=yes ;;
1046 --disable-faad-fixed) _faad_fixed
=no
;;
1047 --enable-faac) _faac
=yes ;;
1048 --disable-faac) _faac
=no
;;
1049 --enable-faac-lavc) _faac_lavc
=yes ;;
1050 --disable-faac-lavc) _faac_lavc
=no
;;
1051 --enable-ladspa) _ladspa
=yes ;;
1052 --disable-ladspa) _ladspa
=no
;;
1053 --enable-libbs2b) _libbs2b
=yes ;;
1054 --disable-libbs2b) _libbs2b
=no
;;
1055 --enable-xmms) _xmms
=yes ;;
1056 --disable-xmms) _xmms
=no
;;
1057 --enable-vcd) _vcd
=yes ;;
1058 --disable-vcd) _vcd
=no
;;
1059 --enable-dvdread) _dvdread
=yes ;;
1060 --disable-dvdread) _dvdread
=no
;;
1061 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1062 --disable-dvdread-internal) _dvdread_internal
=no
;;
1063 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1064 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1065 --enable-dvdnav) _dvdnav
=yes ;;
1066 --disable-dvdnav) _dvdnav
=no
;;
1067 --enable-xanim) _xanim
=yes ;;
1068 --disable-xanim) _xanim
=no
;;
1069 --enable-real) _real
=yes ;;
1070 --disable-real) _real
=no
;;
1071 --enable-live) _live
=yes ;;
1072 --disable-live) _live
=no
;;
1073 --enable-nemesi) _nemesi
=yes ;;
1074 --disable-nemesi) _nemesi
=no
;;
1075 --enable-xinerama) _xinerama
=yes ;;
1076 --disable-xinerama) _xinerama
=no
;;
1077 --enable-mga) _mga
=yes ;;
1078 --disable-mga) _mga
=no
;;
1079 --enable-xmga) _xmga
=yes ;;
1080 --disable-xmga) _xmga
=no
;;
1081 --enable-vm) _vm
=yes ;;
1082 --disable-vm) _vm
=no
;;
1083 --enable-xf86keysym) _xf86keysym
=yes ;;
1084 --disable-xf86keysym) _xf86keysym
=no
;;
1085 --enable-mlib) _mlib
=yes ;;
1086 --disable-mlib) _mlib
=no
;;
1087 --enable-sunaudio) _sunaudio
=yes ;;
1088 --disable-sunaudio) _sunaudio
=no
;;
1089 --enable-sgiaudio) _sgiaudio
=yes ;;
1090 --disable-sgiaudio) _sgiaudio
=no
;;
1091 --enable-alsa) _alsa
=yes ;;
1092 --disable-alsa) _alsa
=no
;;
1093 --enable-tv) _tv
=yes ;;
1094 --disable-tv) _tv
=no
;;
1095 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1096 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1097 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1098 --disable-tv-v4l1) _tv_v4l1
=no
;;
1099 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1100 --disable-tv-v4l2) _tv_v4l2
=no
;;
1101 --enable-tv-dshow) _tv_dshow
=yes ;;
1102 --disable-tv-dshow) _tv_dshow
=no
;;
1103 --enable-radio) _radio
=yes ;;
1104 --enable-radio-capture) _radio_capture
=yes ;;
1105 --disable-radio-capture) _radio_capture
=no
;;
1106 --disable-radio) _radio
=no
;;
1107 --enable-radio-v4l) _radio_v4l
=yes ;;
1108 --disable-radio-v4l) _radio_v4l
=no
;;
1109 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1110 --disable-radio-v4l2) _radio_v4l2
=no
;;
1111 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1112 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1113 --enable-pvr) _pvr
=yes ;;
1114 --disable-pvr) _pvr
=no
;;
1115 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1116 --disable-fastmemcpy) _fastmemcpy
=no
;;
1117 --enable-hardcoded-tables) hardcoded_tables
=yes ;;
1118 --disable-hardcoded-tables) hardcoded_tables
=no
;;
1119 --enable-network) _network
=yes ;;
1120 --disable-network) _network
=no
;;
1121 --enable-winsock2_h) _winsock2_h
=yes ;;
1122 --disable-winsock2_h) _winsock2_h
=no
;;
1123 --enable-smb) _smb
=yes ;;
1124 --disable-smb) _smb
=no
;;
1125 --enable-vidix) _vidix
=yes ;;
1126 --disable-vidix) _vidix
=no
;;
1127 --with-vidix-drivers=*)
1128 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1130 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1131 --enable-dhahelper) _dhahelper
=yes ;;
1132 --disable-dhahelper) _dhahelper
=no
;;
1133 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1134 --disable-svgalib_helper) _svgalib_helper
=no
;;
1135 --enable-joystick) _joystick
=yes ;;
1136 --disable-joystick) _joystick
=no
;;
1137 --enable-xvid) _xvid
=yes ;;
1138 --disable-xvid) _xvid
=no
;;
1139 --enable-xvid-lavc) _xvid_lavc
=yes ;;
1140 --disable-xvid-lavc) _xvid_lavc
=no
;;
1141 --enable-x264) _x264
=yes ;;
1142 --disable-x264) _x264
=no
;;
1143 --enable-x264-lavc) _x264_lavc
=yes ;;
1144 --disable-x264-lavc) _x264_lavc
=no
;;
1145 --enable-libdirac-lavc) _libdirac_lavc
=yes ;;
1146 --disable-libdirac-lavc) _libdirac_lavc
=no
;;
1147 --enable-libschroedinger-lavc) _libschroedinger_lavc
=yes ;;
1148 --disable-libschroedinger-lavc) _libschroedinger_lavc
=no
;;
1149 --enable-libnut) _libnut
=yes ;;
1150 --disable-libnut) _libnut
=no
;;
1151 --enable-libavutil_a) _libavutil_a
=yes ;;
1152 --disable-libavutil_a) _libavutil_a
=no
;;
1153 --enable-libavutil_so) _libavutil_so
=yes ;;
1154 --disable-libavutil_so) _libavutil_so
=no
;;
1155 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1156 --disable-libavcodec_a) _libavcodec_a
=no
;;
1157 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1158 --disable-libavcodec_so) _libavcodec_so
=no
;;
1159 --enable-libopencore_amrnb) _libopencore_amrnb
=yes ;;
1160 --disable-libopencore_amrnb) _libopencore_amrnb
=no
;;
1161 --enable-libopencore_amrwb) _libopencore_amrwb
=yes ;;
1162 --disable-libopencore_amrwb) _libopencore_amrwb
=no
;;
1163 --enable-decoder=*) _libavdecoders
="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1164 --disable-decoder=*) _libavdecoders
=$
(echo $_libavdecoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1165 --enable-encoder=*) _libavencoders
="$_libavencoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1166 --disable-encoder=*) _libavencoders
=$
(echo $_libavencoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1167 --enable-parser=*) _libavparsers
="$_libavparsers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1168 --disable-parser=*) _libavparsers
=$
(echo $_libavparsers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1169 --enable-protocol=*) _libavprotocols
="$_libavprotocols $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1170 --disable-protocol=*) _libavprotocols
=$
(echo $_libavprotocols |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1171 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1172 --disable-demuxer=*) _libavdemuxers
=$
(echo $_libavdemuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1173 --enable-muxer=*) _libavmuxers
="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1174 --disable-muxer=*) _libavmuxers
=$
(echo $_libavmuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1175 --enable-libavformat_a) _libavformat_a
=yes ;;
1176 --disable-libavformat_a) _libavformat_a
=no
;;
1177 --enable-libavformat_so) _libavformat_so
=yes ;;
1178 --disable-libavformat_so) _libavformat_so
=no
;;
1179 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1180 --disable-libpostproc_a) _libpostproc_a
=no
;;
1181 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1182 --disable-libpostproc_so) _libpostproc_so
=no
;;
1183 --enable-libswscale_a) _libswscale_a
=yes ;;
1184 --disable-libswscale_a) _libswscale_a
=no
;;
1185 --enable-libswscale_so) _libswscale_so
=yes ;;
1186 --disable-libswscale_so) _libswscale_so
=no
;;
1187 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1188 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1190 --enable-lirc) _lirc
=yes ;;
1191 --disable-lirc) _lirc
=no
;;
1192 --enable-lircc) _lircc
=yes ;;
1193 --disable-lircc) _lircc
=no
;;
1194 --enable-apple-remote) _apple_remote
=yes ;;
1195 --disable-apple-remote) _apple_remote
=no
;;
1196 --enable-apple-ir) _apple_ir
=yes ;;
1197 --disable-apple-ir) _apple_ir
=no
;;
1198 --enable-gui) _gui
=yes ;;
1199 --disable-gui) _gui
=no
;;
1200 --enable-gtk1) _gtk1
=yes ;;
1201 --disable-gtk1) _gtk1
=no
;;
1202 --enable-termcap) _termcap
=yes ;;
1203 --disable-termcap) _termcap
=no
;;
1204 --enable-termios) _termios
=yes ;;
1205 --disable-termios) _termios
=no
;;
1206 --enable-3dfx) _3dfx
=yes ;;
1207 --disable-3dfx) _3dfx
=no
;;
1208 --enable-s3fb) _s3fb
=yes ;;
1209 --disable-s3fb) _s3fb
=no
;;
1210 --enable-wii) _wii
=yes ;;
1211 --disable-wii) _wii
=no
;;
1212 --enable-tdfxfb) _tdfxfb
=yes ;;
1213 --disable-tdfxfb) _tdfxfb
=no
;;
1214 --disable-tdfxvid) _tdfxvid
=no
;;
1215 --enable-tdfxvid) _tdfxvid
=yes ;;
1216 --disable-xvr100) _xvr100
=no
;;
1217 --enable-xvr100) _xvr100
=yes ;;
1218 --disable-tga) _tga
=no
;;
1219 --enable-tga) _tga
=yes ;;
1220 --enable-directfb) _directfb
=yes ;;
1221 --disable-directfb) _directfb
=no
;;
1222 --enable-zr) _zr
=yes ;;
1223 --disable-zr) _zr
=no
;;
1224 --enable-bl) _bl
=yes ;;
1225 --disable-bl) _bl
=no
;;
1226 --enable-mtrr) _mtrr
=yes ;;
1227 --disable-mtrr) _mtrr
=no
;;
1228 --enable-largefiles) _largefiles
=yes ;;
1229 --disable-largefiles) _largefiles
=no
;;
1230 --enable-shm) _shm
=yes ;;
1231 --disable-shm) _shm
=no
;;
1232 --enable-select) _select
=yes ;;
1233 --disable-select) _select
=no
;;
1234 --enable-linux-devfs) _linux_devfs
=yes ;;
1235 --disable-linux-devfs) _linux_devfs
=no
;;
1236 --enable-cdparanoia) _cdparanoia
=yes ;;
1237 --disable-cdparanoia) _cdparanoia
=no
;;
1238 --enable-cddb) _cddb
=yes ;;
1239 --disable-cddb) _cddb
=no
;;
1240 --enable-big-endian) _big_endian
=yes ;;
1241 --disable-big-endian) _big_endian
=no
;;
1242 --enable-bitmap-font) _bitmap_font
=yes ;;
1243 --disable-bitmap-font) _bitmap_font
=no
;;
1244 --enable-freetype) _freetype
=yes ;;
1245 --disable-freetype) _freetype
=no
;;
1246 --enable-fontconfig) _fontconfig
=yes ;;
1247 --disable-fontconfig) _fontconfig
=no
;;
1248 --enable-unrarexec) _unrar_exec
=yes ;;
1249 --disable-unrarexec) _unrar_exec
=no
;;
1250 --enable-ftp) _ftp
=yes ;;
1251 --disable-ftp) _ftp
=no
;;
1252 --enable-vstream) _vstream
=yes ;;
1253 --disable-vstream) _vstream
=no
;;
1254 --enable-pthreads) _pthreads
=yes ;;
1255 --disable-pthreads) _pthreads
=no
;;
1256 --enable-w32threads) _w32threads
=yes ;;
1257 --disable-w32threads) _w32threads
=no
;;
1258 --enable-ass) _ass
=yes ;;
1259 --disable-ass) _ass
=no
;;
1260 --enable-ass-internal) ass_internal
=yes ;;
1261 --disable-ass-internal) ass_internal
=no
;;
1262 --enable-rpath) _rpath
=yes ;;
1263 --disable-rpath) _rpath
=no
;;
1265 --enable-fribidi) _fribidi
=yes ;;
1266 --disable-fribidi) _fribidi
=no
;;
1268 --enable-enca) _enca
=yes ;;
1269 --disable-enca) _enca
=no
;;
1271 --enable-inet6) _inet6
=yes ;;
1272 --disable-inet6) _inet6
=no
;;
1274 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1275 --disable-gethostbyname2) _gethostbyname2
=no
;;
1277 --enable-dga1) _dga1
=yes ;;
1278 --disable-dga1) _dga1
=no
;;
1279 --enable-dga2) _dga2
=yes ;;
1280 --disable-dga2) _dga2
=no
;;
1282 --enable-menu) _menu
=yes ;;
1283 --disable-menu) _menu
=no
;;
1285 --enable-qtx) _qtx
=yes ;;
1286 --disable-qtx) _qtx
=no
;;
1288 --enable-coreaudio) _coreaudio
=yes ;;
1289 --disable-coreaudio) _coreaudio
=no
;;
1290 --enable-corevideo) _corevideo
=yes ;;
1291 --disable-corevideo) _corevideo
=no
;;
1292 --enable-quartz) _quartz
=yes ;;
1293 --disable-quartz) _quartz
=no
;;
1294 --enable-macosx-finder) _macosx_finder
=yes ;;
1295 --disable-macosx-finder) _macosx_finder
=no
;;
1296 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1297 --disable-macosx-bundle) _macosx_bundle
=no
;;
1299 --enable-maemo) _maemo
=yes ;;
1300 --disable-maemo) _maemo
=no
;;
1302 --enable-sortsub) _sortsub
=yes ;;
1303 --disable-sortsub) _sortsub
=no
;;
1305 --enable-crash-debug) _crash_debug
=yes ;;
1306 --disable-crash-debug) _crash_debug
=no
;;
1307 --enable-sighandler) _sighandler
=yes ;;
1308 --disable-sighandler) _sighandler
=no
;;
1309 --enable-win32dll) _win32dll
=yes ;;
1310 --disable-win32dll) _win32dll
=no
;;
1312 --enable-sse) _sse
=yes ;;
1313 --disable-sse) _sse
=no
;;
1314 --enable-sse2) _sse2
=yes ;;
1315 --disable-sse2) _sse2
=no
;;
1316 --enable-ssse3) _ssse3
=yes ;;
1317 --disable-ssse3) _ssse3
=no
;;
1318 --enable-mmxext) _mmxext
=yes ;;
1319 --disable-mmxext) _mmxext
=no
;;
1320 --enable-3dnow) _3dnow
=yes ;;
1321 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1322 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1323 --disable-3dnowext) _3dnowext
=no
;;
1324 --enable-cmov) _cmov
=yes ;;
1325 --disable-cmov) _cmov
=no
;;
1326 --enable-fast-cmov) _fast_cmov
=yes ;;
1327 --disable-fast-cmov) _fast_cmov
=no
;;
1328 --enable-fast-clz) _fast_clz
=yes ;;
1329 --disable-fast-clz) _fast_clz
=no
;;
1330 --enable-altivec) _altivec
=yes ;;
1331 --disable-altivec) _altivec
=no
;;
1332 --enable-armv5te) _armv5te
=yes ;;
1333 --disable-armv5te) _armv5te
=no
;;
1334 --enable-armv6) _armv6
=yes ;;
1335 --disable-armv6) _armv6
=no
;;
1336 --enable-armv6t2) _armv6t2
=yes ;;
1337 --disable-armv6t2) _armv6t2
=no
;;
1338 --enable-armvfp) _armvfp
=yes ;;
1339 --disable-armvfp) _armvfp
=no
;;
1340 --enable-neon) neon
=yes ;;
1341 --disable-neon) neon
=no
;;
1342 --enable-iwmmxt) _iwmmxt
=yes ;;
1343 --disable-iwmmxt) _iwmmxt
=no
;;
1344 --enable-mmx) _mmx
=yes ;;
1345 --disable-mmx) # 3Dnow! and MMX2 require MMX
1346 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1349 echo "Unknown parameter: $ac_option"
1356 # Atmos: moved this here, to be correct, if --prefix is specified
1357 test -z "$_bindir" && _bindir
="$_prefix/bin"
1358 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1359 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1360 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1361 test -z "$_libdir" && _libdir
="$_prefix/lib"
1363 # Determine our OS name and CPU architecture
1364 if test -z "$_target" ; then
1366 system_name
=$
(uname
-s 2>&1)
1367 case "$system_name" in
1368 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1382 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1392 system_name
="$system_name-UNKNOWN"
1397 # host's CPU/instruction set
1398 host_arch
=$
(uname
-p 2>&1)
1399 case "$host_arch" in
1400 i386|sparc|ppc|alpha|arm|mips|vax
)
1402 powerpc
) # Darwin returns 'powerpc'
1405 *) # uname -p on Linux returns 'unknown' for the processor type,
1406 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1408 # Maybe uname -m (machine hardware name) returns something we
1411 # x86/x86pc is used by QNX
1412 case "$(uname -m 2>&1)" in
1413 x86_64|amd64|i
[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium
*|athlon
*|i586_i686|i586-i686|BePC
) host_arch
=i386
;;
1414 ia64
) host_arch
=ia64
;;
1415 macppc|ppc
) host_arch
=ppc
;;
1416 ppc64
) host_arch
=ppc64
;;
1417 alpha
) host_arch
=alpha
;;
1418 sparc
) host_arch
=sparc
;;
1419 sparc64
) host_arch
=sparc64
;;
1420 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1421 arm
*|zaurus|cats
) host_arch
=arm
;;
1422 sh3|sh4|sh4a
) host_arch
=sh
;;
1423 s390
) host_arch
=s390
;;
1424 s390x
) host_arch
=s390x
;;
1425 *mips
*) host_arch
=mips
;;
1426 vax
) host_arch
=vax
;;
1427 xtensa
*) host_arch
=xtensa
;;
1428 *) host_arch
=UNKNOWN
;;
1432 else # if test -z "$_target"
1433 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1434 case "$(echo $system_name | tr A-Z a-z)" in
1435 linux
) system_name
=Linux
;;
1436 freebsd
) system_name
=FreeBSD
;;
1437 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1438 netbsd
) system_name
=NetBSD
;;
1439 bsd
/os
) system_name
=BSD
/OS
;;
1440 openbsd
) system_name
=OpenBSD
;;
1441 dragonfly
) system_name
=DragonFly
;;
1442 sunos
) system_name
=SunOS
;;
1443 qnx
) system_name
=QNX
;;
1444 morphos
) system_name
=MorphOS
;;
1445 amigaos
) system_name
=AmigaOS
;;
1446 mingw32
*) system_name
=MINGW32
;;
1448 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1449 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1450 if test $
(echo $host_arch) != "x86_64" ; then
1451 host_arch
=$
(echo $host_arch |
tr '_' '-')
1455 extra_cflags
="-I. $extra_cflags"
1456 _timer
=timer-linux.c
1459 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1460 extra_cflags
="$extra_cflags -I/usr/local/include"
1463 if netbsd || dragonfly
; then
1464 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1465 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1469 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1470 _timer
=timer-darwin.c
1474 extra_ldflags
="$extra_ldflags -lC"
1485 extra_cflags
="$extra_cflags -fno-common"
1486 # -lwinmm is always needed for osdep/timer-win2.c
1487 extra_ldflags
="$extra_ldflags -lwinmm"
1491 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1492 def_priority
="#define CONFIG_PRIORITY 1"
1504 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1505 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1509 extra_ldflags
="$extra_ldflags -lph"
1517 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1518 def_priority
="#define CONFIG_PRIORITY 1"
1521 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1526 TMPLOG
="configure.log"
1527 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1528 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1529 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1530 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1531 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1534 echo configuration
: $_configuration > "$TMPLOG"
1538 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1539 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1543 # Checking CC version...
1544 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1545 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1546 echocheck
"$_cc version"
1548 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1549 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1550 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1551 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1552 # TODO verify older icc/ecc compatibility
1555 cc_version
="v. ?.??, bad"
1559 cc_version
="$cc_version, ok"
1562 cc_version
="$cc_version, bad"
1566 echores
"$cc_version"
1568 for _cc
in "$_cc" gcc cc
; do
1569 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1570 if test "$cc_name_tmp" = "gcc"; then
1571 cc_name
=$cc_name_tmp
1572 echocheck
"$_cc version"
1574 cc_version
=$
($_cc -dumpversion 2>&1)
1580 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1581 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1582 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1585 echores
"$cc_version"
1588 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1589 if test "$cc_name_tmp" = "Sun C"; then
1590 echocheck
"$_cc version"
1592 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1593 _res_comment
="experimental support only"
1594 echores
"Sun C $cc_version"
1599 test "$cc_fail" = yes && die
"unsupported compiler version"
1601 if test -z "$_target" && x86
; then
1604 int test[(int)sizeof(char *)-7];
1608 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1611 echo "Detected operating system: $system_name"
1612 echo "Detected host architecture: $host_arch"
1615 test "$_host_cc" || _host_cc
=$_cc
1618 echocheck
"cross compilation"
1619 if test $_cross_compile = auto
; then
1621 int main(void) { return 0; }
1624 cc_check
&& "$TMPEXE" && _cross_compile
=no
1626 echores
$_cross_compile
1628 if test $_cross_compile = yes; then
1636 # now that we know what compiler should be used for compilation, try to find
1637 # out which assembler is used by the $_cc compiler
1638 if test "$_as" = auto
; then
1639 _as
=$
($_cc -print-prog-name=as
)
1640 test -z "$_as" && _as
=as
1643 if test "$_nm" = auto
; then
1644 _nm
=$
($_cc -print-prog-name=nm
)
1645 test -z "$_nm" && _nm
=nm
1648 # XXX: this should be ok..
1651 if test "$_runtime_cpudetection" = no
; then
1653 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1654 # FIXME: Remove the cygwin check once AMD CPUs are supported
1655 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1656 # Linux with /proc mounted, extract CPU information from it
1657 _cpuinfo
="cat /proc/cpuinfo"
1658 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1659 # FreeBSD with Linux emulation /proc mounted,
1660 # extract CPU information from it
1661 # Don't use it on x86 though, it never reports 3Dnow
1662 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1663 elif darwin
&& ! x86
; then
1664 # use hostinfo on Darwin
1667 # use 'lsattr' on AIX
1668 _cpuinfo
="lsattr -E -l proc0 -a type"
1670 # all other OSes try to extract CPU information from a small helper
1671 # program cpuinfo instead
1672 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1673 _cpuinfo
="./cpuinfo$_exesuf"
1677 # gather more CPU information
1678 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1679 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1680 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1681 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1682 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1684 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1686 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1687 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1689 for ext
in $pparam ; do
1690 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1693 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1694 test $_sse = kernel_check
&& _mmxext
=kernel_check
1696 echocheck
"CPU vendor"
1697 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1699 echocheck
"CPU type"
1703 fi # test "$_runtime_cpudetection" = no
1705 if x86
&& test "$_runtime_cpudetection" = no
; then
1707 if test "$1" = kernel_check
; then
1708 echocheck
"kernel support of $2"
1712 void catch() { exit(1); }
1714 signal(SIGILL, catch);
1715 __asm__ volatile ("$3":::"memory"); return 0;
1719 if cc_check
&& tmp_run
; then
1722 _optimizing
="$_optimizing $2"
1727 echo "It seems that your kernel does not correctly support $2."
1728 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1735 extcheck
$_mmx "mmx" "emms"
1736 extcheck
$_mmxext "mmxext" "sfence"
1737 extcheck
$_3dnow "3dnow" "femms"
1738 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1739 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1740 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1741 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1742 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1744 echocheck
"mtrr support"
1745 if test "$_mtrr" = kernel_check
; then
1747 _optimizing
="$_optimizing mtrr"
1751 if test "$_gcc3_ext" != ""; then
1752 # if we had to disable sse/sse2 because the active kernel does not
1753 # support this instruction set extension, we also have to tell
1754 # gcc3 to not generate sse/sse2 instructions for normal C code
1756 int main(void) { return 0; }
1758 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1764 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1765 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1766 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 0'
1767 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 0'
1768 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1769 subarch_all
='X86_32 X86_64 PPC64'
1770 case "$host_arch" in
1771 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1774 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1775 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
1776 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
1781 if test "$_runtime_cpudetection" = no
; then
1785 3) proc
=i386 iproc
=386 ;;
1786 4) proc
=i486 iproc
=486 ;;
1787 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1788 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1789 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1791 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1793 elif test "$pmodel" -ge 8; then
1795 elif test "$pmodel" -ge 6; then
1802 # It's a bit difficult to determine the correct type of Family 6
1803 # AMD CPUs just from their signature. Instead, we check directly
1804 # whether it supports SSE.
1805 if test "$_sse" = yes; then
1806 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1809 # Again, gcc treats athlon and athlon-tbird similarly.
1814 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1815 # caught and remedied in the optimization tests below.
1819 *) proc
=amdfam10 iproc
=686
1820 test $_fast_clz = "auto" && _fast_clz
=yes
1826 3) proc
=i386 iproc
=386 ;;
1827 4) proc
=i486 iproc
=486 ;;
1829 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1830 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1836 if test "$pmodel" -ge 15; then
1838 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1840 elif test "$pmodel" -ge 7; then
1842 elif test "$pmodel" -ge 3; then
1847 test $_fast_clz = "auto" && _fast_clz
=yes
1850 # A nocona in 32-bit mode has no more capabilities than a prescott.
1851 if test "$pmodel" -ge 3; then
1855 test $_fast_clz = "auto" && _fast_clz
=yes
1857 test $_fast_cmov = "auto" && _fast_cmov
=no
1859 *) proc
=prescott iproc
=686 ;;
1865 if test "$pmodel" -ge 8; then
1867 elif test "$pmodel" -ge 4; then
1874 if test "$pmodel" -ge 9; then
1881 *) proc
=i686 iproc
=i686
;;
1886 3) proc
=i386 iproc
=386 ;;
1887 4) proc
=i486 iproc
=486 ;;
1888 *) proc
=i586 iproc
=586 ;;
1892 proc
=i586 iproc
=586 ;;
1894 test $_fast_clz = "auto" && _fast_clz
=no
1895 fi # test "$_runtime_cpudetection" = no
1898 # check that gcc supports our CPU, if not, fall back to earlier ones
1899 # LGB: check -mcpu and -march swithing step by step with enabling
1900 # to fall back till 386.
1902 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1904 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1910 echocheck
"GCC & CPU optimization abilities"
1912 int main(void) { return 0; }
1914 if test "$_runtime_cpudetection" = no
; then
1915 if test $cc_vendor != "intel" ; then
1916 cc_check
-march=native
&& proc
=native
1918 if test "$proc" = "k8"; then
1919 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1921 if test "$proc" = "athlon-xp"; then
1922 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1924 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1925 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1927 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1928 if ! cc_check
-march=$proc $cpuopt=$proc; then
1929 if cc_check
-march=i586
$cpuopt=i686
; then
1936 if test "$proc" = "prescott" ; then
1937 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1939 if test "$proc" = "core2" ; then
1940 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1942 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
1943 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1945 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1946 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1948 if test "$proc" = "i586"; then
1949 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1951 if test "$proc" = "i486" ; then
1952 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1954 if test "$proc" = "i386" ; then
1955 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1957 if test "$proc" = "error" ; then
1958 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1962 elif test "$proc" = "i586-i686"; then
1963 _march
="-march=i586"
1964 _mcpu
="$cpuopt=i686"
1967 _march
="-march=$proc"
1968 _mcpu
="$cpuopt=$proc"
1971 else # if test "$_runtime_cpudetection" = no
1972 _mcpu
="$cpuopt=generic"
1973 # at least i486 required, for bswap instruction
1974 _march
="-march=i486"
1975 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1976 cc_check
$_mcpu || _mcpu
=""
1977 cc_check
$_march $_mcpu || _march
=""
1980 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1981 ## autodetected mcpu/march parameters
1982 if test "$_target" ; then
1983 # TODO: it may be a good idea to check GCC and fall back in all cases
1984 if test "$host_arch" = "i586-i686"; then
1985 _march
="-march=i586"
1986 _mcpu
="$cpuopt=i686"
1988 _march
="-march=$host_arch"
1989 _mcpu
="$cpuopt=$host_arch"
1997 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1998 i686|athlon
*|pentium
*) iproc
=686 ;;
2003 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
2008 test $_fast_clz = "auto" && _fast_clz
=yes
2015 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2022 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2023 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2026 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
2027 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
2032 if test "$_runtime_cpudetection" = no
; then
2037 test $_fast_clz = "auto" && _fast_clz
=no
2046 # 64-bit prescotts exist, but as far as GCC is concerned they
2047 # have the same capabilities as a nocona.
2049 test $_fast_cmov = "auto" && _fast_cmov
=no
2050 test $_fast_clz = "auto" && _fast_clz
=no
2057 fi # test "$_runtime_cpudetection" = no
2059 echocheck
"GCC & CPU optimization abilities"
2061 int main(void) { return 0; }
2063 # This is a stripped-down version of the i386 fallback.
2064 if test "$_runtime_cpudetection" = no
; then
2065 if test $cc_vendor != "intel" ; then
2066 cc_check
-march=native
&& proc
=native
2068 # --- AMD processors ---
2069 if test "$proc" = "k8"; then
2070 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2072 # This will fail if gcc version < 3.3, which is ok because earlier
2073 # versions don't really support 64-bit on amd64.
2074 # Is this a valid assumption? -Corey
2075 if test "$proc" = "athlon-xp"; then
2076 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2078 # --- Intel processors ---
2079 if test "$proc" = "core2"; then
2080 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2082 if test "$proc" = "x86-64"; then
2083 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2085 if test "$proc" = "nocona"; then
2086 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2088 if test "$proc" = "pentium4"; then
2089 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2092 _march
="-march=$proc"
2093 _mcpu
="$cpuopt=$proc"
2094 if test "$proc" = "error" ; then
2095 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2099 else # if test "$_runtime_cpudetection" = no
2100 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2101 _march
="-march=x86-64"
2102 _mcpu
="$cpuopt=generic"
2103 cc_check
$_mcpu || _mcpu
="x86-64"
2104 cc_check
$_mcpu || _mcpu
=""
2105 cc_check
$_march $_mcpu || _march
=""
2109 test $_fast_cmov = "auto" && _fast_cmov
=yes
2110 test $_fast_clz = "auto" && _fast_clz
=yes
2118 if test "$host_arch" = "sparc64" ; then
2121 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2123 echocheck
"CPU type"
2125 case "$(echo $karch)" in
2130 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2149 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2151 test $_fast_clz = "auto" && _fast_clz
=yes
2159 ppc|ppc64|powerpc|powerpc64
)
2161 def_dcbzl
='#define HAVE_DCBZL 0'
2162 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2163 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
2164 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
2167 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2169 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2171 echocheck
"CPU type"
2172 case $system_name in
2174 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2175 if test -n "$($_cpuinfo | grep altivec)"; then
2176 test $_altivec = auto
&& _altivec
=yes
2180 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2181 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2182 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2183 test $_altivec = auto
&& _altivec
=yes
2187 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2189 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2192 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2193 test $_altivec = auto
&& _altivec
=yes
2199 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2202 if test "$_altivec" = yes; then
2203 echores
"$proc altivec"
2209 echocheck
"GCC & CPU optimization abilities"
2211 if test -n "$proc"; then
2213 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2214 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2215 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2216 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2217 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2218 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2219 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2220 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2221 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2224 # gcc 3.1(.1) and up supports 7400 and 7450
2225 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2227 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2228 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2232 # gcc 3.2 and up supports 970
2233 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2235 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2236 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2240 # gcc 3.3 and up supports POWER4
2241 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2243 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2247 # gcc 3.4 and up supports 440*
2248 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2250 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2251 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2255 # gcc 4.0 and up supports POWER5
2256 if test "$_cc_major" -ge "4"; then
2258 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2264 if test -n "$_mcpu"; then
2265 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2266 echores
"$_optimizing"
2271 test $_fast_clz = "auto" && _fast_clz
=yes
2279 echocheck
"CPU type"
2282 unsigned long ver, mask;
2283 __asm__ ("implver %0" : "=r" (ver));
2284 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2285 printf("%ld-%x\n", ver, ~mask);
2289 $_cc -o "$TMPEXE" "$TMPC"
2290 case $
("$TMPEXE") in
2292 0-0) proc
="ev4"; _mvi
="0";;
2293 1-0) proc
="ev5"; _mvi
="0";;
2294 1-1) proc
="ev56"; _mvi
="0";;
2295 1-101) proc
="pca56"; _mvi
="1";;
2296 2-303) proc
="ev6"; _mvi
="1";;
2297 2-307) proc
="ev67"; _mvi
="1";;
2298 2-1307) proc
="ev68"; _mvi
="1";;
2302 echocheck
"GCC & CPU optimization abilities"
2303 if test "$proc" = "ev68" ; then
2304 cc_check
-mcpu=$proc || proc
=ev67
2306 if test "$proc" = "ev67" ; then
2307 cc_check
-mcpu=$proc || proc
=ev6
2312 test $_fast_clz = "auto" && _fast_clz
=yes
2322 echocheck
"CPU type"
2323 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2324 case "$(echo $proc)" in
2325 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2326 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2327 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2328 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2329 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2330 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2332 # gcc < 3.x does not support -mtune.
2333 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2339 test $_fast_clz = "auto" && _fast_clz
=yes
2373 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2374 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2375 die
"unsupported architecture $host_arch"
2377 esac # case "$host_arch" in
2379 if test "$_runtime_cpudetection" = yes ; then
2381 test "$_cmov" != no
&& _cmov
=yes
2383 test "$_mmx" != no
&& _mmx
=yes
2384 test "$_3dnow" != no
&& _3dnow
=yes
2385 test "$_3dnowext" != no
&& _3dnowext
=yes
2386 test "$_mmxext" != no
&& _mmxext
=yes
2387 test "$_sse" != no
&& _sse
=yes
2388 test "$_sse2" != no
&& _sse2
=yes
2389 test "$_ssse3" != no
&& _ssse3
=yes
2390 test "$_mtrr" != no
&& _mtrr
=yes
2399 echocheck
"byte order"
2400 if test "$_big_endian" = auto
; then
2402 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2403 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2404 int main(void) { return (int)ascii_name; }
2407 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2413 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2416 if test "$_big_endian" = yes ; then
2417 _byte_order
='big-endian'
2418 def_words_endian
='#define WORDS_BIGENDIAN 1'
2419 def_bigendian
='#define HAVE_BIGENDIAN 1'
2420 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 1'
2422 _byte_order
='little-endian'
2423 def_words_endian
='#undef WORDS_BIGENDIAN'
2424 def_bigendian
='#define HAVE_BIGENDIAN 0'
2425 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 0'
2427 echores
"$_byte_order"
2430 echocheck
"extern symbol prefix"
2434 cc_check
-c || die
"Symbol mangling check failed."
2435 sym
=$
($_nm -P -g $TMPEXE)
2436 extern_prefix
=${sym%%ff_extern*}
2437 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2438 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2439 echores
$extern_prefix
2442 echocheck
"assembler support of -pipe option"
2444 int main(void) { return 0; }
2446 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2447 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2450 echocheck
"compiler support of named assembler arguments"
2452 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2453 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2454 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2456 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2458 echores
$_named_asm_args
2461 if darwin
&& test "$cc_vendor" = "gnu" ; then
2462 echocheck
"GCC support of -mstackrealign"
2463 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2464 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2465 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2466 # wrong code with this flag, but this can be worked around by adding
2467 # -fno-unit-at-a-time as described in the blog post at
2468 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2470 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2471 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2473 cc_check
-O4 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2474 test -z "$cflags_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2475 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2476 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2477 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2480 # Checking for CFLAGS
2482 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2483 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2485 elif test -z "$CFLAGS" ; then
2486 if test "$cc_vendor" = "intel" ; then
2487 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2488 elif test "$cc_vendor" = "sun" ; then
2489 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2490 elif test "$cc_vendor" != "gnu" ; then
2491 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2493 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2494 extra_ldflags
="$extra_ldflags -ffast-math"
2501 int main(void) { return 0; }
2503 if test "$cc_vendor" = "gnu" ; then
2504 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2505 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
2506 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2507 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2508 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2509 cc_check
-Wmissing-prototypes && CFLAGS
="-Wmissing-prototypes $CFLAGS"
2510 cc_check
-Wstrict-prototypes && CFLAGS
="-Wstrict-prototypes $CFLAGS"
2512 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2515 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2516 cc_check
-MD -MP && CFLAGS
="-MD -MP $CFLAGS"
2519 if test -n "$LDFLAGS" ; then
2520 extra_ldflags
="$extra_ldflags $LDFLAGS"
2522 elif test "$cc_vendor" = "intel" ; then
2523 extra_ldflags
="$extra_ldflags -i-static"
2525 if test -n "$CPPFLAGS" ; then
2526 extra_cflags
="$extra_cflags $CPPFLAGS"
2533 # Checking assembler (_as) compatibility...
2534 # Added workaround for older as that reads from stdin by default - atmos
2535 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2536 echocheck
"assembler ($_as $as_version)"
2538 _pref_as_version
='2.9.1'
2540 if test "$_mmx" = yes ; then
2541 echo 'emms' >> $TMPS
2543 if test "$_3dnow" = yes ; then
2544 _pref_as_version
='2.10.1'
2545 echo 'femms' >> $TMPS
2547 if test "$_3dnowext" = yes ; then
2548 _pref_as_version
='2.10.1'
2549 echo 'pswapd %mm0, %mm0' >> $TMPS
2551 if test "$_mmxext" = yes ; then
2552 _pref_as_version
='2.10.1'
2553 echo 'movntq %mm0, (%eax)' >> $TMPS
2555 if test "$_sse" = yes ; then
2556 _pref_as_version
='2.10.1'
2557 echo 'xorps %xmm0, %xmm0' >> $TMPS
2559 #if test "$_sse2" = yes ; then
2560 # _pref_as_version='2.11'
2561 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2563 if test "$_cmov" = yes ; then
2564 _pref_as_version
='2.10.1'
2565 echo 'cmovb %eax, %ebx' >> $TMPS
2567 if test "$_ssse3" = yes ; then
2568 _pref_as_version
='2.16.92'
2569 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2571 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2573 if test "$as_verc_fail" != yes ; then
2576 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2578 die
"obsolete binutils version"
2583 echocheck
".align is a power of two"
2584 if test "$_asmalign_pot" = auto
; then
2587 int main(void) { __asm__ (".align 3"); return 0; }
2589 cc_check
&& _asmalign_pot
=yes
2591 if test "$_asmalign_pot" = "yes" ; then
2592 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2594 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2596 echores
$_asmalign_pot
2599 echocheck
"10 assembler operands"
2601 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2607 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2612 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2613 echores
$ten_operands
2615 echocheck
"ebx availability"
2617 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2624 // just adding ebx to clobber list seems unreliable with some
2625 // compilers, e.g. Haiku's gcc 2.95
2627 // and the above check does not work for OSX 64 bit...
2628 __asm__ volatile("":::"%ebx");
2632 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2633 echores
$ebx_available
2639 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2640 #error PIC not enabled
2645 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2649 if test -z "$YASMFLAGS" ; then
2651 x86_64
&& objformat
="macho64" || objformat
="macho"
2657 # currently tested for Linux x86, x86_64
2658 YASMFLAGS
="-f $objformat"
2659 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2660 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2661 case "$objformat" in
2662 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2663 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2669 echo "pabsw xmm0, xmm0" > $TMPS
2670 yasm_check || _yasm
=""
2671 if test $_yasm ; then
2672 def_yasm
='#define HAVE_YASM 1'
2676 def_yasm
='#define HAVE_YASM 0'
2682 def_bswap
='#define HAVE_BSWAP 0'
2683 echo 'bswap %eax' > $TMPS
2684 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2689 #FIXME: This should happen before the check for CFLAGS..
2690 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2691 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2693 # check if AltiVec is supported by the compiler, and how to enable it
2694 echocheck
"GCC AltiVec flags"
2696 int main(void) { return 0; }
2698 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2699 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2700 # check if <altivec.h> should be included
2702 #include <altivec.h>
2703 int main(void) { return 0; }
2705 if $
(cc_check
$_altivec_gcc_flags) ; then
2706 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2707 inc_altivec_h
='#include <altivec.h>'
2710 int main(void) { return 0; }
2712 if $
(cc_check
-faltivec) ; then
2713 _altivec_gcc_flags
="-faltivec"
2716 _altivec_gcc_flags
="none, AltiVec disabled"
2720 echores
"$_altivec_gcc_flags"
2722 # check if the compiler supports braces for vector declarations
2725 int main(void) { (vector int) {1}; return 0; }
2727 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2729 # Disable runtime cpudetection if we cannot generate AltiVec code or
2730 # AltiVec is disabled by the user.
2731 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2732 && _runtime_cpudetection
=no
2734 # Show that we are optimizing for AltiVec (if enabled and supported).
2735 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2736 && _optimizing
="$_optimizing altivec"
2738 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2739 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2743 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2745 echocheck
"XFORM ASM support"
2747 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2749 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2750 echores
"$xform_asm"
2754 echocheck
"ARM pld instruction"
2756 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2762 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2763 if test $_armv5te = "auto" ; then
2765 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2768 cc_check
&& _armv5te
=yes
2772 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2774 echocheck
"ARMv6 (SIMD instructions)"
2775 if test $_armv6 = "auto" ; then
2777 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2780 cc_check
&& _armv6
=yes
2784 echocheck
"ARMv6t2 (SIMD instructions)"
2785 if test $_armv6t2 = "auto" ; then
2787 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2790 cc_check
&& _armv6t2
=yes
2795 if test $_armvfp = "auto" ; then
2797 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2800 cc_check
&& _armvfp
=yes
2804 echocheck
"ARM NEON"
2805 if test $neon = "auto" ; then
2807 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2810 cc_check
&& neon
=yes
2814 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2815 if test $_iwmmxt = "auto" ; then
2817 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2820 cc_check
&& _iwmmxt
=yes
2825 cpuexts_all
='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI'
2826 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2827 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2828 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2829 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2830 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2831 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2832 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2833 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2834 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2835 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2836 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2837 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2838 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2839 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2840 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2841 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2842 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2843 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2844 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2845 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2847 # Checking kernel version...
2848 if x86_32
&& linux
; then
2850 kernel_version
=$
(uname
-r 2>&1)
2851 echocheck
"$system_name kernel version"
2852 case "$kernel_version" in
2853 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2854 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2855 _k_verc_problem
=yes;;
2857 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2860 if test "$_k_verc_fail" ; then
2861 echores
"$kernel_version, fail"
2862 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2863 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2864 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2865 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2866 echo "2.2.x you must upgrade it to get SSE support!"
2867 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2869 echores
"$kernel_version, ok"
2873 ######################
2874 # MAIN TESTS GO HERE #
2875 ######################
2880 int main(void) { return 0; }
2882 if cc_check
-lposix ; then
2883 extra_ldflags
="$extra_ldflags -lposix"
2891 int main(void) { return 0; }
2893 if cc_check
-lm ; then
2902 echocheck
"langinfo"
2903 if test "$_langinfo" = auto
; then
2905 #include <langinfo.h>
2906 int main(void) { nl_langinfo(CODESET); return 0; }
2909 cc_check
&& _langinfo
=yes
2911 if test "$_langinfo" = yes ; then
2912 def_langinfo
='#define HAVE_LANGINFO 1'
2914 def_langinfo
='#undef HAVE_LANGINFO'
2916 echores
"$_langinfo"
2919 echocheck
"language"
2920 # Set preferred languages, "all" uses English as main language.
2921 test -z "$language" && language
=$LINGUAS
2922 test -z "$language_doc" && language_doc
=$language
2923 test -z "$language_man" && language_man
=$language
2924 test -z "$language_msg" && language_msg
=$language
2925 language_doc
=$
(echo $language_doc |
tr , " ")
2926 language_man
=$
(echo $language_man |
tr , " ")
2927 language_msg
=$
(echo $language_msg |
tr , " ")
2929 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2930 test "$language_man" = "all" && language_man
=$man_lang_all
2931 test "$language_msg" = "all" && language_msg
=en
2933 # Prune non-existing translations from language lists.
2934 # Set message translation to the first available language.
2935 # Fall back on English.
2936 for lang
in $language_doc ; do
2937 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2939 language_doc
=$tmp_language_doc
2940 test -z "$language_doc" && language_doc
=en
2942 for lang
in $language_man ; do
2943 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2945 language_man
=$tmp_language_man
2946 test -z "$language_man" && language_man
=en
2948 for lang
in $language_msg ; do
2949 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2951 language_msg
=$tmp_language_msg
2952 test -z "$language_msg" && language_msg
=en
2953 _mp_help
="help/help_mp-${language_msg}.h"
2954 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2957 echocheck
"enable sighandler"
2958 if test "$_sighandler" = yes ; then
2959 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2961 def_sighandler
='#undef CONFIG_SIGHANDLER'
2963 echores
"$_sighandler"
2965 echocheck
"runtime cpudetection"
2966 if test "$_runtime_cpudetection" = yes ; then
2967 _optimizing
="Runtime CPU-Detection enabled"
2968 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2970 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2972 echores
"$_runtime_cpudetection"
2975 echocheck
"restrict keyword"
2976 for restrict_keyword
in restrict __restrict __restrict__
; do
2977 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2979 def_restrict_keyword
=$restrict_keyword
2983 if [ -n "$def_restrict_keyword" ]; then
2984 echores
"$def_restrict_keyword"
2988 # Avoid infinite recursion loop ("#define restrict restrict")
2989 if [ "$def_restrict_keyword" != "restrict" ]; then
2990 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2992 def_restrict_keyword
=""
2996 echocheck
"__builtin_expect"
2997 # GCC branch prediction hint
3000 a = __builtin_expect(a, 10);
3001 return a == 10 ? 0 : 1;
3003 int main(void) { return foo(10) && foo(0); }
3006 cc_check
&& _builtin_expect
=yes
3007 if test "$_builtin_expect" = yes ; then
3008 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
3010 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
3012 echores
"$_builtin_expect"
3018 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
3021 cc_check
-lkstat && _kstat
=yes
3022 if test "$_kstat" = yes ; then
3023 def_kstat
="#define HAVE_LIBKSTAT 1"
3024 extra_ldflags
="$extra_ldflags -lkstat"
3026 def_kstat
="#undef HAVE_LIBKSTAT"
3032 # required for nanosleep on some systems
3035 int main(void) { (void) nanosleep(0, 0); return 0; }
3038 cc_check
-lposix4 && _posix4
=yes
3039 if test "$_posix4" = yes ; then
3040 extra_ldflags
="$extra_ldflags -lposix4"
3044 for func
in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf
; do
3048 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
3051 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
3052 if eval test "x\$_$func" = "xyes"; then
3053 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3056 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3065 int main(void) { char a; mkstemp(&a); return 0; }
3068 cc_check
&& _mkstemp
=yes
3069 if test "$_mkstemp" = yes ; then
3070 def_mkstemp
='#define HAVE_MKSTEMP 1'
3072 def_mkstemp
='#undef HAVE_MKSTEMP'
3077 echocheck
"nanosleep"
3078 # also check for nanosleep
3081 int main(void) { (void) nanosleep(0, 0); return 0; }
3084 cc_check
&& _nanosleep
=yes
3085 if test "$_nanosleep" = yes ; then
3086 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3088 def_nanosleep
='#undef HAVE_NANOSLEEP'
3090 echores
"$_nanosleep"
3094 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3095 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3098 #include <sys/socket.h>
3099 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3102 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3103 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3105 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3106 if test $_winsock2_h = auto
; then
3109 #include <winsock2.h>
3110 int main(void) { (void) gethostbyname(0); return 0; }
3112 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3114 test "$_ld_sock" && _res_comment
="using $_ld_sock"
3118 if test $_winsock2_h = yes ; then
3120 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3121 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=1'
3123 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3124 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=0'
3128 echocheck
"netdb.h, struct addrinfo"
3129 if test "$_struct_addrinfo" = auto
; then
3133 #include <winsock2.h>
3134 #include <ws2tcpip.h>
3136 #include <sys/types.h>
3137 #include <sys/socket.h>
3140 int main(void) { struct addrinfo ai; return 0; }
3142 cc_check
$cc_check_winsock2_h && _struct_addrinfo
=yes
3144 echores
"$_struct_addrinfo"
3146 if test "$_struct_addrinfo" = yes; then
3147 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 1"
3149 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 0"
3153 echocheck
"netdb.h, getaddrinfo()"
3154 if test "$_getaddrinfo" = auto
; then
3158 #include <winsock2.h>
3160 #include <sys/types.h>
3161 #include <sys/socket.h>
3164 int main(void) { (void) getaddrinfo(0, 0, 0, 0); return 0; }
3166 cc_check
$cc_check_winsock2_h && _getaddrinfo
=yes
3168 echores
"$_getaddrinfo"
3170 if test "$_getaddrinfo" = yes; then
3171 def_getaddrinfo
="#define HAVE_GETADDRINFO 1"
3173 def_getaddrinfo
="#define HAVE_GETADDRINFO 0"
3177 echocheck
"sockaddr_storage"
3178 if test "$_struct_sockaddr_storage" = auto
; then
3179 _struct_sockaddr_storage
=no
3182 #include <winsock2.h>
3184 #include <sys/socket.h>
3186 int main(void) { struct sockaddr_storage sas; return 0; }
3188 cc_check
$cc_check_winsock2_h && _struct_sockaddr_storage
=yes
3190 echores
"$_struct_sockaddr_storage"
3192 if test "$_struct_sockaddr_storage" = yes; then
3193 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
3195 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
3199 echocheck
"struct ipv6_mreq"
3200 _struct_ipv6_mreq
=no
3201 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 0"
3202 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3205 int main(void) { struct ipv6_mreq mreq6; return 0; }
3207 cc_check
&& _struct_ipv6_mreq
=yes && \
3208 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 1" && break
3210 echores
"$_struct_ipv6_mreq"
3213 echocheck
"struct sockaddr_in6"
3214 _struct_sockaddr_in6
=no
3215 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 0"
3216 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3219 int main(void) { struct sockaddr_in6 addr; return 0; }
3221 cc_check
&& _struct_sockaddr_in6
=yes && \
3222 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 1" && break
3224 echores
"$_struct_sockaddr_in6"
3227 echocheck
"struct sockaddr sa_len"
3228 _struct_sockaddr_sa_len
=no
3229 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 0"
3232 #include <winsock2.h>
3234 #include <sys/types.h>
3235 #include <sys/socket.h>
3237 int main(void) { const void *p = &((struct sockaddr *)0)->sa_len; return 0; }
3239 cc_check
$cc_check_winsock2_h && _struct_sockaddr_sa_len
=yes && \
3240 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 1"
3241 echores
"$_struct_sockaddr_sa_len"
3244 echocheck
"arpa/inet.h"
3246 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3248 #include <arpa/inet.h>
3249 int main(void) { return 0; }
3251 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3252 echores
"$arpa_inet_h"
3255 echocheck
"inet_pton()"
3256 def_inet_pton
='#define HAVE_INET_PTON 0'
3259 #include <sys/types.h>
3260 #include <sys/socket.h>
3261 #include <arpa/inet.h>
3262 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3264 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3265 cc_check
$_ld_tmp && inet_pton
=yes && break
3267 if test $inet_pton = yes ; then
3268 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3269 def_inet_pton
='#define HAVE_INET_PTON 1'
3271 echores
"$inet_pton"
3274 echocheck
"inet_aton()"
3275 def_inet_aton
='#define HAVE_INET_ATON 0'
3278 #include <sys/types.h>
3279 #include <sys/socket.h>
3280 #include <arpa/inet.h>
3281 int main(void) { (void) inet_aton(0, 0); return 0; }
3283 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3284 cc_check
$_ld_tmp && inet_aton
=yes && break
3286 if test $inet_aton = yes ; then
3287 test "$_ld_tmp" && _res_comment
="using $_ld_tmp"
3288 def_inet_aton
='#define HAVE_INET_ATON 1'
3290 echores
"$inet_aton"
3293 echocheck
"socklen_t"
3295 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3298 int main(void) { socklen_t v = 0; return v; }
3300 cc_check
&& _socklen_t
=yes && break
3302 if test "$_socklen_t" = yes ; then
3303 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3305 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3307 echores
"$_socklen_t"
3310 echocheck
"closesocket()"
3313 #include <winsock2.h>
3314 int main(void) { closesocket(~0); return 0; }
3316 cc_check
$_ld_sock && _closesocket
=yes
3317 if test "$_closesocket" = yes ; then
3318 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3320 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3322 echores
"$_closesocket"
3326 test $_winsock2_h = no
&& test $inet_pton = no
&&
3327 test $inet_aton = no
&& _network
=no
3328 if test "$_network" = yes ; then
3329 def_network
='#define CONFIG_NETWORK 1'
3330 extra_ldflags
="$extra_ldflags $_ld_sock"
3331 _inputmodules
="network $_inputmodules"
3333 _noinputmodules
="network $_noinputmodules"
3334 def_network
='#undef CONFIG_NETWORK'
3336 _libavprotocols
=$
(echo $_libavprotocols |
sed -e s
/GOPHER_PROTOCOL
// -e s
/HTTP_PROTOCOL
// -e s
/RTMP_PROTOCOL
// -e s
/RTP_PROTOCOL
// -e s
/TCP_PROTOCOL
// -e s
/UDP_PROTOCOL
//)
3337 _libavdemuxers
=$
(echo $_libavdemuxers |
sed -e s
/RTSP_DEMUXER
// -e s
/SDP_DEMUXER
//)
3343 if test "$_inet6" = auto
; then
3345 #include <sys/types.h>
3346 #if !defined(_WIN32) || defined(__CYGWIN__)
3347 #include <sys/socket.h>
3348 #include <netinet/in.h>
3350 #include <ws2tcpip.h>
3352 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3355 if cc_check
$_ld_sock ; then
3359 if test "$_inet6" = yes ; then
3360 def_inet6
='#define HAVE_AF_INET6 1'
3362 def_inet6
='#undef HAVE_AF_INET6'
3367 echocheck
"gethostbyname2"
3368 if test "$_gethostbyname2" = auto
; then
3370 #include <sys/types.h>
3371 #include <sys/socket.h>
3373 int main(void) { gethostbyname2("", AF_INET); return 0; }
3380 if test "$_gethostbyname2" = yes ; then
3381 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3383 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3385 echores
"$_gethostbyname2"
3388 echocheck
"inttypes.h (required)"
3390 #include <inttypes.h>
3391 int main(void) { return 0; }
3394 cc_check
&& _inttypes
=yes
3395 echores
"$_inttypes"
3397 if test "$_inttypes" = no
; then
3398 echocheck
"bitypes.h (inttypes.h predecessor)"
3400 #include <sys/bitypes.h>
3401 int main(void) { return 0; }
3403 cc_check
&& _inttypes
=yes
3404 if test "$_inttypes" = yes ; then
3405 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."
3407 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3412 echocheck
"int_fastXY_t in inttypes.h"
3414 #include <inttypes.h>
3416 volatile int_fast16_t v= 0;
3420 cc_check
&& _fast_inttypes
=yes
3421 if test "$_fast_inttypes" = no
; then
3423 typedef signed char int_fast8_t;
3424 typedef signed int int_fast16_t;
3425 typedef signed int int_fast32_t;
3426 typedef signed long long int_fast64_t;
3427 typedef unsigned char uint_fast8_t;
3428 typedef unsigned int uint_fast16_t;
3429 typedef unsigned int uint_fast32_t;
3430 typedef unsigned long long uint_fast64_t;'
3432 echores
"$_fast_inttypes"
3435 echocheck
"malloc.h"
3438 int main(void) { (void) malloc(0); return 0; }
3441 cc_check
&& _malloc
=yes
3442 if test "$_malloc" = yes ; then
3443 def_malloc_h
='#define HAVE_MALLOC_H 1'
3445 def_malloc_h
='#define HAVE_MALLOC_H 0'
3450 echocheck
"memalign()"
3451 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3452 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3455 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3458 cc_check
&& _memalign
=yes
3459 if test "$_memalign" = yes ; then
3460 def_memalign
='#define HAVE_MEMALIGN 1'
3462 def_memalign
='#define HAVE_MEMALIGN 0'
3463 def_map_memalign
='#define memalign(a,b) malloc(b)'
3464 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3466 echores
"$_memalign"
3469 echocheck
"posix_memalign()"
3471 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3473 #define _XOPEN_SOURCE 600
3475 int main(void) { posix_memalign(NULL, 0, 0); }
3477 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3478 echores
"$posix_memalign"
3481 echocheck
"alloca.h"
3484 int main(void) { (void) alloca(0); return 0; }
3487 cc_check
&& _alloca
=yes
3489 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3491 def_alloca_h
='#undef HAVE_ALLOCA_H'
3496 echocheck
"fastmemcpy"
3497 if test "$_fastmemcpy" = yes ; then
3498 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3500 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3502 echores
"$_fastmemcpy"
3505 echocheck
"hard-coded tables"
3506 if test "$hardcoded_tables" = yes ; then
3507 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 1'
3508 mak_hardcoded_tables
='CONFIG_HARDCODED_TABLES = yes'
3510 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 0'
3512 echores
"$hardcoded_tables"
3517 #include <sys/types.h>
3518 #include <sys/mman.h>
3519 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3522 cc_check
&& _mman
=yes
3523 if test "$_mman" = yes ; then
3524 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3526 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3527 os2
&& _need_mmap
=yes
3532 #include <sys/types.h>
3533 #include <sys/mman.h>
3534 int main(void) { void *p = MAP_FAILED; return 0; }
3536 _mman_has_map_failed
=no
3537 cc_check
&& _mman_has_map_failed
=yes
3538 if test "$_mman_has_map_failed" = yes ; then
3539 def_mman_has_map_failed
=''
3541 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3544 echocheck
"dynamic loader"
3548 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3551 for _ld_tmp
in "" "-ldl" ; do
3552 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3554 if test "$_dl" = yes ; then
3555 def_dl
='#define HAVE_LIBDL 1'
3557 def_dl
='#undef HAVE_LIBDL'
3562 echocheck
"dynamic a/v plugins support"
3563 if test "$_dl" = no
; then
3566 if test "$_dynamic_plugins" = yes ; then
3567 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3569 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3571 echores
"$_dynamic_plugins"
3574 def_threads
='#define HAVE_THREADS 0'
3578 THREAD_CFLAGS
=-D_REENTRANT
3579 elif freebsd || netbsd || openbsd || bsdos
; then
3580 THREAD_CFLAGS
=-D_THREAD_SAFE
3582 if test "$_pthreads" = auto
; then
3584 #include <pthread.h>
3585 void* func(void *arg) { return arg; }
3586 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3590 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3591 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3592 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3596 if test "$_pthreads" = yes ; then
3597 test $_ld_pthread && _res_comment
="using $_ld_pthread"
3598 def_pthreads
='#define HAVE_PTHREADS 1'
3599 def_threads
='#define HAVE_THREADS 1'
3600 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3602 _res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3603 def_pthreads
='#undef HAVE_PTHREADS'
3604 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3605 mingw32 || _win32dll
=no
3607 echores
"$_pthreads"
3610 if test "$_pthreads" = yes ; then
3611 def_pthread_cache
="#define PTHREAD_CACHE 1"
3614 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3618 echocheck
"w32threads"
3619 if test "$_pthreads" = yes ; then
3620 _res_comment
="using pthread instead"
3623 if test "$_w32threads" = auto
; then
3625 mingw32
&& _w32threads
=yes
3627 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3628 echores
"$_w32threads"
3632 if test "$_rpath" = yes ; then
3633 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3634 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3641 if test "$_iconv" = auto
; then
3646 #define INBUFSIZE 1024
3647 #define OUTBUFSIZE 4096
3649 char inbuffer[INBUFSIZE];
3650 char outbuffer[OUTBUFSIZE];
3655 char *tocode="UTF-8";
3656 char *fromcode="cp1250";
3657 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3658 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3659 char *iptr=inbuffer;
3660 char *optr=outbuffer;
3661 size_t inleft=numread;
3662 size_t outleft=OUTBUFSIZE;
3663 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3665 write(1, outbuffer, OUTBUFSIZE - outleft);
3668 if (iconv_close(icdsc) == -1)
3675 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3676 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3680 if test "$_iconv" = yes ; then
3681 def_iconv
='#define CONFIG_ICONV 1'
3683 def_iconv
='#undef CONFIG_ICONV'
3688 echocheck
"soundcard.h"
3690 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3691 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3692 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3694 #include <$_soundcard_header>
3695 int main(void) { return 0; }
3697 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3700 if test "$_soundcard_h" = yes ; then
3701 if test $_soundcard_header = "sys/soundcard.h"; then
3702 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3704 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3707 echores
"$_soundcard_h"
3710 echocheck
"sys/dvdio.h"
3713 #include <sys/dvdio.h>
3714 int main(void) { return 0; }
3717 cc_check
&& _dvdio
=yes
3718 if test "$_dvdio" = yes ; then
3719 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3721 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3726 echocheck
"sys/cdio.h"
3729 #include <sys/cdio.h>
3730 int main(void) { return 0; }
3733 cc_check
&& _cdio
=yes
3734 if test "$_cdio" = yes ; then
3735 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3737 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3742 echocheck
"linux/cdrom.h"
3744 #include <sys/types.h>
3745 #include <linux/cdrom.h>
3746 int main(void) { return 0; }
3749 cc_check
&& _cdrom
=yes
3750 if test "$_cdrom" = yes ; then
3751 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3753 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3761 int main(void) { return 0; }
3764 cc_check
&& _dvd
=yes
3765 if test "$_dvd" = yes ; then
3766 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3768 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3774 echocheck
"BSDI dvd.h"
3777 int main(void) { return 0; }
3780 cc_check
&& _bsdi_dvd
=yes
3781 if test "$_bsdi_dvd" = yes ; then
3782 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3784 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3786 echores
"$_bsdi_dvd"
3791 # also used by AIX, but AIX does not support VCD and/or libdvdread
3792 echocheck
"HP-UX SCSI header"
3794 #include <sys/scsi.h>
3795 int main(void) { return 0; }
3798 cc_check
&& _hpux_scsi_h
=yes
3799 if test "$_hpux_scsi_h" = yes ; then
3800 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3802 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3804 echores
"$_hpux_scsi_h"
3809 echocheck
"userspace SCSI headers (Solaris)"
3812 #include <stropts.h>
3813 #include <sys/scsi/scsi_types.h>
3814 #include <sys/scsi/impl/uscsi.h>
3815 int main(void) { return 0; }
3818 cc_check
&& _sol_scsi_h
=yes
3819 if test "$_sol_scsi_h" = yes ; then
3820 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3822 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3824 echores
"$_sol_scsi_h"
3829 if test "$_termcap" = auto
; then
3833 int main(void) { tgetent(NULL, NULL); return 0; }
3836 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3837 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3838 && _termcap
=yes && break
3841 if test "$_termcap" = yes ; then
3842 def_termcap
='#define HAVE_TERMCAP 1'
3843 test $_ld_tmp && _res_comment
="using $_ld_tmp"
3845 def_termcap
='#undef HAVE_TERMCAP'
3851 def_termios
='#undef HAVE_TERMIOS'
3852 def_termios_h
='#undef HAVE_TERMIOS_H'
3853 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3854 if test "$_termios" = auto
; then
3856 for _termios_header
in "sys/termios.h" "termios.h"; do
3858 #include <$_termios_header>
3859 int main(void) { return 0; }
3861 cc_check
&& _termios
=yes && _res_comment
="using $_termios_header" && break
3865 if test "$_termios" = yes ; then
3866 def_termios
='#define HAVE_TERMIOS 1'
3867 if test "$_termios_header" = "termios.h" ; then
3868 def_termios_h
='#define HAVE_TERMIOS_H 1'
3870 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3877 if test "$_shm" = auto
; then
3879 #include <sys/types.h>
3880 #include <sys/shm.h>
3881 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3884 cc_check
&& _shm
=yes
3886 if test "$_shm" = yes ; then
3887 def_shm
='#define HAVE_SHM 1'
3889 def_shm
='#undef HAVE_SHM'
3894 echocheck
"strsep()"
3897 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3900 cc_check
&& _strsep
=yes
3901 if test "$_strsep" = yes ; then
3902 def_strsep
='#define HAVE_STRSEP 1'
3905 def_strsep
='#undef HAVE_STRSEP'
3911 echocheck
"vsscanf()"
3913 #define _ISOC99_SOURCE
3916 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3919 cc_check
&& _vsscanf
=yes
3920 if test "$_vsscanf" = yes ; then
3921 def_vsscanf
='#define HAVE_VSSCANF 1'
3924 def_vsscanf
='#undef HAVE_VSSCANF'
3932 #define _XOPEN_SOURCE 600
3934 int main(void) { swab(0, 0, 0); return 0; }
3937 cc_check
&& _swab
=yes
3938 if test "$_swab" = yes ; then
3939 def_swab
='#define HAVE_SWAB 1'
3942 def_swab
='#undef HAVE_SWAB'
3947 echocheck
"POSIX select()"
3951 #include <sys/types.h>
3953 #include <sys/time.h>
3955 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3958 def_posix_select
='#undef HAVE_POSIX_SELECT'
3959 #select() of kLIBC (OS/2) supports socket only
3960 ! os2
&& cc_check
&& _posix_select
=yes \
3961 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3962 echores
"$_posix_select"
3965 echocheck
"audio select()"
3966 if test "$_select" = no
; then
3967 def_select
='#undef HAVE_AUDIO_SELECT'
3968 elif test "$_select" = yes ; then
3969 def_select
='#define HAVE_AUDIO_SELECT 1'
3974 echocheck
"gettimeofday()"
3977 #include <sys/time.h>
3978 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3981 cc_check
&& _gettimeofday
=yes
3982 if test "$_gettimeofday" = yes ; then
3983 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3984 _need_gettimeofday
=no
3986 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3987 _need_gettimeofday
=yes
3989 echores
"$_gettimeofday"
3996 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3999 cc_check
&& _glob
=yes
4000 if test "$_glob" = yes ; then
4001 def_glob
='#define HAVE_GLOB 1'
4004 def_glob
='#undef HAVE_GLOB'
4010 echocheck
"setenv()"
4013 int main(void) { setenv("","",0); return 0; }
4016 cc_check
&& _setenv
=yes
4017 if test "$_setenv" = yes ; then
4018 def_setenv
='#define HAVE_SETENV 1'
4021 def_setenv
='#undef HAVE_SETENV'
4027 echocheck
"setmode()"
4029 def_setmode
='#define HAVE_SETMODE 0'
4032 int main(void) { setmode(0, 0); return 0; }
4034 cc_check
&& _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
4039 echocheck
"sysi86()"
4041 #include <sys/sysi86.h>
4042 int main(void) { sysi86(0); return 0; }
4045 cc_check
&& _sysi86
=yes
4046 if test "$_sysi86" = yes ; then
4047 def_sysi86
='#define HAVE_SYSI86 1'
4049 #include <sys/sysi86.h>
4050 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
4052 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
4054 def_sysi86
='#undef HAVE_SYSI86'
4060 echocheck
"sys/sysinfo.h"
4062 #include <sys/sysinfo.h>
4064 struct sysinfo s_info;
4070 cc_check
&& _sys_sysinfo
=yes
4071 if test "$_sys_sysinfo" = yes ; then
4072 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
4074 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
4076 echores
"$_sys_sysinfo"
4081 echocheck
"Mac OS X Finder Support"
4082 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
4083 if test "$_macosx_finder" = yes ; then
4084 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
4085 extra_ldflags
="$extra_ldflags -framework Carbon"
4087 echores
"$_macosx_finder"
4089 echocheck
"Mac OS X Bundle file locations"
4090 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
4091 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
4092 if test "$_macosx_bundle" = yes ; then
4093 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
4094 extra_ldflags
="$extra_ldflags -framework Carbon"
4096 echores
"$_macosx_bundle"
4098 echocheck
"Apple Remote"
4099 if test "$_apple_remote" = auto
; then
4103 #include <IOKit/IOCFPlugIn.h>
4105 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
4106 CFMutableDictionaryRef hidMatchDictionary;
4107 IOReturn ioReturnValue;
4109 // Set up a matching dictionary to search the I/O Registry by class.
4110 // name for all HID class devices
4111 hidMatchDictionary = IOServiceMatching("AppleIRController");
4113 // Now search I/O Registry for matching devices.
4114 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
4115 hidMatchDictionary, &hidObjectIterator);
4117 // If search is unsuccessful, return nonzero.
4118 if (ioReturnValue != kIOReturnSuccess ||
4119 !IOIteratorIsValid(hidObjectIterator)) {
4125 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
4127 if test "$_apple_remote" = yes ; then
4128 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
4129 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
4131 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
4133 echores
"$_apple_remote"
4139 echocheck
"Apple IR"
4140 if test "$_apple_ir" = auto
; then
4143 #include <linux/types.h>
4144 #include <linux/input.h>
4146 struct input_event ev;
4151 cc_check
&& _apple_ir
=yes
4153 if test "$_apple_ir" = yes ; then
4154 def_apple_ir
='#define CONFIG_APPLE_IR 1'
4156 def_apple_ir
='#undef CONFIG_APPLE_IR'
4158 echores
"$_apple_ir"
4161 echocheck
"pkg-config"
4162 _pkg_config
=pkg-config
4163 if $
($_pkg_config --version > /dev
/null
2>&1); then
4164 if test "$_ld_static"; then
4165 _pkg_config
="$_pkg_config --static"
4174 echocheck
"Samba support (libsmbclient)"
4175 if test "$_smb" = yes; then
4176 extra_ldflags
="$extra_ldflags -lsmbclient"
4178 if test "$_smb" = auto
; then
4181 #include <libsmbclient.h>
4182 int main(void) { smbc_opendir("smb://"); return 0; }
4184 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
4185 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
4190 if test "$_smb" = yes; then
4191 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
4192 _inputmodules
="smb $_inputmodules"
4194 def_smb
="#undef CONFIG_LIBSMBCLIENT"
4195 _noinputmodules
="smb $_noinputmodules"
4206 if test "$_tdfxfb" = yes ; then
4207 def_tdfxfb
='#define CONFIG_TDFXFB 1'
4208 _vomodules
="tdfxfb $_vomodules"
4210 def_tdfxfb
='#undef CONFIG_TDFXFB'
4211 _novomodules
="tdfxfb $_novomodules"
4216 if test "$_s3fb" = yes ; then
4217 def_s3fb
='#define CONFIG_S3FB 1'
4218 _vomodules
="s3fb $_vomodules"
4220 def_s3fb
='#undef CONFIG_S3FB'
4221 _novomodules
="s3fb $_novomodules"
4226 if test "$_wii" = yes ; then
4227 def_wii
='#define CONFIG_WII 1'
4228 _vomodules
="wii $_vomodules"
4230 def_wii
='#undef CONFIG_WII'
4231 _novomodules
="wii $_novomodules"
4236 if test "$_tdfxvid" = yes ; then
4237 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
4238 _vomodules
="tdfx_vid $_vomodules"
4240 def_tdfxvid
='#undef CONFIG_TDFX_VID'
4241 _novomodules
="tdfx_vid $_novomodules"
4246 if test "$_xvr100" = auto
; then
4249 #include <sys/fbio.h>
4250 #include <sys/visual_io.h>
4252 struct vis_identifier ident;
4253 struct fbgattr attr;
4254 ioctl(0, VIS_GETIDENTIFIER, &ident);
4255 ioctl(0, FBIOGATTR, &attr);
4260 cc_check
&& _xvr100
=yes
4262 if test "$_xvr100" = yes ; then
4263 def_xvr100
='#define CONFIG_XVR100 1'
4264 _vomodules
="xvr100 $_vomodules"
4266 def_tdfxvid
='#undef CONFIG_XVR100'
4267 _novomodules
="xvr100 $_novomodules"
4272 if test "$_tga" = yes ; then
4273 def_tga
='#define CONFIG_TGA 1'
4274 _vomodules
="tga $_vomodules"
4276 def_tga
='#undef CONFIG_TGA'
4277 _novomodules
="tga $_novomodules"
4282 echocheck
"md5sum support"
4283 if test "$_md5sum" = yes; then
4284 def_md5sum
="#define CONFIG_MD5SUM 1"
4285 _vomodules
="md5sum $_vomodules"
4287 def_md5sum
="#undef CONFIG_MD5SUM"
4288 _novomodules
="md5sum $_novomodules"
4293 echocheck
"yuv4mpeg support"
4294 if test "$_yuv4mpeg" = yes; then
4295 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4296 _vomodules
="yuv4mpeg $_vomodules"
4298 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4299 _novomodules
="yuv4mpeg $_novomodules"
4301 echores
"$_yuv4mpeg"
4305 if test "$_bl" = yes ; then
4306 def_bl
='#define CONFIG_BL 1'
4307 _vomodules
="bl $_vomodules"
4309 def_bl
='#undef CONFIG_BL'
4310 _novomodules
="bl $_novomodules"
4315 echocheck
"DirectFB"
4316 if test "$_directfb" = auto
; then
4319 #include <directfb.h>
4320 int main(void) { DirectFBInit(0, 0); return 0; }
4322 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4323 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4324 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4325 extra_cflags
="$extra_cflags $_inc_tmp" && break
4330 expr $1 \
* 65536 + $2 \
* 256 + $3
4333 if test "$_directfb" = yes; then
4335 #include <directfb_version.h>
4337 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4340 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4341 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4342 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4343 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4344 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4345 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4346 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4347 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4348 _res_comment
="$_directfb_version"
4349 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4351 def_directfb_version
='#undef DIRECTFBVERSION'
4353 _res_comment
="version >=0.9.13 required"
4357 _res_comment
="failed to get version"
4360 echores
"$_directfb"
4362 if test "$_directfb" = yes ; then
4363 def_directfb
='#define CONFIG_DIRECTFB 1'
4364 _vomodules
="directfb $_vomodules"
4365 libs_mplayer
="$libs_mplayer -ldirectfb"
4367 def_directfb
='#undef CONFIG_DIRECTFB'
4368 _novomodules
="directfb $_novomodules"
4370 if test "$_dfbmga" = yes; then
4371 _vomodules
="dfbmga $_vomodules"
4372 def_dfbmga
='#define CONFIG_DFBMGA 1'
4374 _novomodules
="dfbmga $_novomodules"
4375 def_dfbmga
='#undef CONFIG_DFBMGA'
4379 echocheck
"X11 headers presence"
4381 _res_comment
="check if the dev(el) packages are installed"
4382 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4383 if test -f "$I/X11/Xlib.h" ; then
4389 if test $_cross_compile = no
; then
4390 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4391 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4392 if test -f "$I/X11/Xlib.h" ; then
4393 extra_cflags
="$extra_cflags -I$I"
4395 _res_comment
="using $I"
4400 echores
"$_x11_headers"
4404 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4406 #include <X11/Xlib.h>
4407 #include <X11/Xutil.h>
4408 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4410 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4411 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4414 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4416 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4418 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4419 && _x11
=yes && break
4422 if test "$_x11" = yes ; then
4423 def_x11
='#define CONFIG_X11 1'
4424 _vomodules
="x11 xover $_vomodules"
4427 def_x11
='#undef CONFIG_X11'
4428 _novomodules
="x11 $_novomodules"
4429 _res_comment
="check if the dev(el) packages are installed"
4430 # disable stuff that depends on X
4431 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4435 echocheck
"Xss screensaver extensions"
4436 if test "$_xss" = auto
; then
4438 #include <X11/Xlib.h>
4439 #include <X11/extensions/scrnsaver.h>
4440 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4443 cc_check
-lXss && _xss
=yes
4445 if test "$_xss" = yes ; then
4446 def_xss
='#define CONFIG_XSS 1'
4447 libs_mplayer
="$libs_mplayer -lXss"
4449 def_xss
='#undef CONFIG_XSS'
4456 if test "$_x11" = yes ; then
4458 #include <X11/Xmd.h>
4459 #include <X11/Xlib.h>
4460 #include <X11/Xutil.h>
4461 #include <X11/Xatom.h>
4462 #include <X11/extensions/dpms.h>
4463 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4465 cc_check
-lXdpms && _xdpms3
=yes
4467 #include <X11/Xlib.h>
4468 #include <X11/extensions/dpms.h>
4469 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4471 cc_check
-lXext && _xdpms4
=yes
4473 if test "$_xdpms4" = yes ; then
4474 def_xdpms
='#define CONFIG_XDPMS 1'
4475 _res_comment
="using Xdpms 4"
4477 elif test "$_xdpms3" = yes ; then
4478 def_xdpms
='#define CONFIG_XDPMS 1'
4479 libs_mplayer
="$libs_mplayer -lXdpms"
4480 _res_comment
="using Xdpms 3"
4483 def_xdpms
='#undef CONFIG_XDPMS'
4489 if test "$_xv" = auto
; then
4491 #include <X11/Xlib.h>
4492 #include <X11/extensions/Xvlib.h>
4494 (void) XvGetPortAttribute(0, 0, 0, 0);
4495 (void) XvQueryPortAttributes(0, 0, 0);
4499 cc_check
-lXv && _xv
=yes
4502 if test "$_xv" = yes ; then
4503 def_xv
='#define CONFIG_XV 1'
4504 libs_mplayer
="$libs_mplayer -lXv"
4505 _vomodules
="xv $_vomodules"
4507 def_xv
='#undef CONFIG_XV'
4508 _novomodules
="xv $_novomodules"
4514 if test "$_xv" = yes && test "$_xvmc" != no
; then
4517 #include <X11/Xlib.h>
4518 #include <X11/extensions/Xvlib.h>
4519 #include <X11/extensions/XvMClib.h>
4521 (void) XvMCQueryExtension(0,0,0);
4522 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4525 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4526 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4529 if test "$_xvmc" = yes ; then
4530 def_xvmc
='#define CONFIG_XVMC 1'
4531 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4532 _vomodules
="xvmc $_vomodules"
4533 _res_comment
="using $_xvmclib"
4535 def_xvmc
='#define CONFIG_XVMC 0'
4536 _novomodules
="xvmc $_novomodules"
4537 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_XVMC_DECODER
//)
4543 if test "$_vdpau" = auto
; then
4545 if test "$_dl" = yes ; then
4547 #include <vdpau/vdpau_x11.h>
4549 (void) vdp_device_create_x11(0, 0, 0, 0);
4550 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4552 cc_check
-lvdpau && _vdpau
=yes
4555 if test "$_vdpau" = yes ; then
4556 def_vdpau
='#define CONFIG_VDPAU 1'
4557 libs_mplayer
="$libs_mplayer -lvdpau"
4558 _vomodules
="vdpau $_vomodules"
4560 def_vdpau
='#define CONFIG_VDPAU 0'
4561 _novomodules
="vdpau $_novomodules"
4562 _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
//)
4567 echocheck
"Xinerama"
4568 if test "$_xinerama" = auto
; then
4570 #include <X11/Xlib.h>
4571 #include <X11/extensions/Xinerama.h>
4572 int main(void) { (void) XineramaIsActive(0); return 0; }
4575 cc_check
-lXinerama && _xinerama
=yes
4578 if test "$_xinerama" = yes ; then
4579 def_xinerama
='#define CONFIG_XINERAMA 1'
4580 libs_mplayer
="$libs_mplayer -lXinerama"
4582 def_xinerama
='#undef CONFIG_XINERAMA'
4584 echores
"$_xinerama"
4587 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4588 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4589 # named 'X extensions' or something similar.
4590 # This check may be useful for future mplayer versions (to change resolution)
4591 # If you run into problems, remove '-lXxf86vm'.
4593 if test "$_vm" = auto
; then
4595 #include <X11/Xlib.h>
4596 #include <X11/extensions/xf86vmode.h>
4597 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4600 cc_check
-lXxf86vm && _vm
=yes
4602 if test "$_vm" = yes ; then
4603 def_vm
='#define CONFIG_XF86VM 1'
4604 libs_mplayer
="$libs_mplayer -lXxf86vm"
4606 def_vm
='#undef CONFIG_XF86VM'
4610 # Check for the presence of special keycodes, like audio control buttons
4611 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4612 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4613 # have these new keycodes.
4614 echocheck
"XF86keysym"
4615 if test "$_xf86keysym" = auto
; then
4618 #include <X11/Xlib.h>
4619 #include <X11/XF86keysym.h>
4620 int main(void) { return XF86XK_AudioPause; }
4622 cc_check
&& _xf86keysym
=yes
4624 if test "$_xf86keysym" = yes ; then
4625 def_xf86keysym
='#define CONFIG_XF86XK 1'
4627 def_xf86keysym
='#undef CONFIG_XF86XK'
4629 echores
"$_xf86keysym"
4632 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4634 #include <X11/Xlib.h>
4635 #include <X11/extensions/xf86dga.h>
4636 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4639 cc_check
-lXxf86dga && _dga2
=yes
4641 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4643 #include <X11/Xlib.h>
4644 #include <X11/extensions/xf86dga.h>
4645 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4648 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4652 def_dga
='#undef CONFIG_DGA'
4653 def_dga1
='#undef CONFIG_DGA1'
4654 def_dga2
='#undef CONFIG_DGA2'
4655 if test "$_dga1" = yes ; then
4657 def_dga1
='#define CONFIG_DGA1 1'
4658 _res_comment
="using DGA 1.0"
4659 elif test "$_dga2" = yes ; then
4661 def_dga2
='#define CONFIG_DGA2 1'
4662 _res_comment
="using DGA 2.0"
4664 if test "$_dga" = yes ; then
4665 def_dga
='#define CONFIG_DGA 1'
4666 libs_mplayer
="$libs_mplayer -lXxf86dga"
4667 _vomodules
="dga $_vomodules"
4669 _novomodules
="dga $_novomodules"
4675 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4676 def_3dfx
='#define CONFIG_3DFX 1'
4677 _vomodules
="3dfx $_vomodules"
4679 def_3dfx
='#undef CONFIG_3DFX'
4680 _novomodules
="3dfx $_novomodules"
4686 def_vidix
='#undef CONFIG_VIDIX'
4687 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4688 _vidix_drv_cyberblade
=no
4689 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4691 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4692 _vidix_drv_mach64
=no
4693 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4695 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4696 _vidix_drv_mga_crtc2
=no
4697 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4698 _vidix_drv_nvidia
=no
4699 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4701 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4703 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4704 _vidix_drv_radeon
=no
4705 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4706 _vidix_drv_rage128
=no
4707 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4709 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4710 _vidix_drv_sh_veu
=no
4711 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4713 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4714 _vidix_drv_unichrome
=no
4715 if test "$_vidix" = auto
; then
4717 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4719 x86_64
&& ! linux
&& _vidix
=no
4720 (ppc || alpha
) && linux
&& _vidix
=yes
4724 if test "$_vidix" = yes ; then
4725 def_vidix
='#define CONFIG_VIDIX 1'
4726 _vomodules
="cvidix $_vomodules"
4727 # FIXME: ivtv driver temporarily disabled until we have a proper test
4728 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4729 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4731 # some vidix drivers are architecture and os specific, discard them elsewhere
4732 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4733 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4735 for driver
in $_vidix_drivers ; do
4736 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4737 eval _vidix_drv_
${driver}=yes
4738 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4741 echocheck
"VIDIX PCI device name database"
4742 echores
"$_vidix_pcidb"
4743 if test "$_vidix_pcidb" = yes ; then
4749 echocheck
"VIDIX dhahelper support"
4750 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4751 echores
"$_dhahelper"
4753 echocheck
"VIDIX svgalib_helper support"
4754 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4755 echores
"$_svgalib_helper"
4758 _novomodules
="cvidix $_novomodules"
4761 if test "$_vidix" = yes && win32
; then
4763 _vomodules
="winvidix $_vomodules"
4764 libs_mplayer
="$libs_mplayer -lgdi32"
4766 _novomodules
="winvidix $_novomodules"
4768 if test "$_vidix" = yes && test "$_x11" = yes; then
4770 _vomodules
="xvidix $_vomodules"
4772 _novomodules
="xvidix $_novomodules"
4775 echocheck
"/dev/mga_vid"
4776 if test "$_mga" = auto
; then
4778 test -c /dev
/mga_vid
&& _mga
=yes
4780 if test "$_mga" = yes ; then
4781 def_mga
='#define CONFIG_MGA 1'
4782 _vomodules
="mga $_vomodules"
4784 def_mga
='#undef CONFIG_MGA'
4785 _novomodules
="mga $_novomodules"
4790 if test "$_xmga" = auto
; then
4792 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4794 if test "$_xmga" = yes ; then
4795 def_xmga
='#define CONFIG_XMGA 1'
4796 _vomodules
="xmga $_vomodules"
4798 def_xmga
='#undef CONFIG_XMGA'
4799 _novomodules
="xmga $_novomodules"
4805 if test "$_ggi" = auto
; then
4807 #include <ggi/ggi.h>
4808 int main(void) { ggiInit(); return 0; }
4811 cc_check
-lggi && _ggi
=yes
4813 if test "$_ggi" = yes ; then
4814 def_ggi
='#define CONFIG_GGI 1'
4815 libs_mplayer
="$libs_mplayer -lggi"
4816 _vomodules
="ggi $_vomodules"
4818 def_ggi
='#undef CONFIG_GGI'
4819 _novomodules
="ggi $_novomodules"
4823 echocheck
"GGI extension: libggiwmh"
4824 if test "$_ggiwmh" = auto
; then
4827 #include <ggi/ggi.h>
4828 #include <ggi/wmh.h>
4829 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4831 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4833 # needed to get right output on obscure combination
4834 # like --disable-ggi --enable-ggiwmh
4835 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4836 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4837 libs_mplayer
="$libs_mplayer -lggiwmh"
4840 def_ggiwmh
='#undef CONFIG_GGIWMH'
4846 if test "$_aa" = auto
; then
4849 extern struct aa_hardware_params aa_defparams;
4850 extern struct aa_renderparams aa_defrenderparams;
4854 (void) aa_init(0, 0, 0);
4855 c = aa_autoinit(&aa_defparams);
4856 p = aa_getrenderparams();
4857 aa_autoinitkbd(c,0);
4861 for _ld_tmp
in "-laa" ; do
4862 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4865 if test "$_aa" = yes ; then
4866 def_aa
='#define CONFIG_AA 1'
4868 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4870 _vomodules
="aa $_vomodules"
4872 def_aa
='#undef CONFIG_AA'
4873 _novomodules
="aa $_novomodules"
4879 if test "$_caca" = auto
; then
4881 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4884 #ifdef CACA_API_VERSION_1
4887 int main(void) { (void) caca_init(); return 0; }
4889 cc_check $
(caca-config
--libs) && _caca
=yes
4892 if test "$_caca" = yes ; then
4893 def_caca
='#define CONFIG_CACA 1'
4894 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4895 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4896 _vomodules
="caca $_vomodules"
4898 def_caca
='#undef CONFIG_CACA'
4899 _novomodules
="caca $_novomodules"
4905 if test "$_svga" = auto
; then
4908 int main(void) { return 0; }
4911 cc_check
-lvga $_ld_lm && _svga
=yes
4913 if test "$_svga" = yes ; then
4914 def_svga
='#define CONFIG_SVGALIB 1'
4915 libs_mplayer
="$libs_mplayer -lvga"
4916 _vomodules
="svga $_vomodules"
4918 def_svga
='#undef CONFIG_SVGALIB'
4919 _novomodules
="svga $_novomodules"
4925 if test "$_fbdev" = auto
; then
4929 if test "$_fbdev" = yes ; then
4930 def_fbdev
='#define CONFIG_FBDEV 1'
4931 _vomodules
="fbdev $_vomodules"
4933 def_fbdev
='#undef CONFIG_FBDEV'
4934 _novomodules
="fbdev $_novomodules"
4941 if test "$_dvb" = auto
; then
4945 #include <sys/ioctl.h>
4949 #include <linux/dvb/dmx.h>
4950 #include <linux/dvb/frontend.h>
4951 #include <linux/dvb/video.h>
4952 #include <linux/dvb/audio.h>
4953 int main(void) {return 0;}
4955 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4956 cc_check
$_inc_tmp && _dvb
=yes && \
4957 extra_cflags
="$extra_cflags $_inc_tmp" && break
4961 if test "$_dvb" = yes ; then
4963 _inputmodules
="dvb $_inputmodules"
4964 def_dvb
='#define CONFIG_DVB 1'
4965 def_dvbin
='#define CONFIG_DVBIN 1'
4966 _aomodules
="mpegpes(dvb) $_aomodules"
4967 _vomodules
="mpegpes(dvb) $_vomodules"
4970 _noinputmodules
="dvb $_noinputmodules"
4971 def_dvb
='#undef CONFIG_DVB'
4972 def_dvbin
='#undef CONFIG_DVBIN '
4973 _aomodules
="mpegpes(file) $_aomodules"
4974 _vomodules
="mpegpes(file) $_vomodules"
4980 echocheck
"QuickTime"
4981 if test "$quicktime" = auto
; then
4983 #include <QuickTime/QuickTime.h>
4985 ImageDescription *desc;
4992 cc_check
-framework QuickTime
&& quicktime
=yes
4994 if test "$quicktime" = yes ; then
4995 extra_ldflags
="$extra_ldflags -framework QuickTime"
4996 def_quicktime
='#define CONFIG_QUICKTIME 1'
4998 def_quicktime
='#undef CONFIG_QUICKTIME'
5004 if test "$_quartz" = auto
; then
5006 #include <Carbon/Carbon.h>
5008 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
5013 cc_check
-framework Carbon
&& _quartz
=yes
5015 if test "$_quartz" = yes ; then
5016 libs_mplayer
="$libs_mplayer -framework Carbon"
5017 def_quartz
='#define CONFIG_QUARTZ 1'
5018 _vomodules
="quartz $_vomodules"
5020 def_quartz
='#undef CONFIG_QUARTZ'
5021 _novomodules
="quartz $_novomodules"
5025 echocheck
"CoreVideo"
5026 if test "$_corevideo" = auto
; then
5028 #include <Carbon/Carbon.h>
5029 #include <CoreServices/CoreServices.h>
5030 #include <OpenGL/OpenGL.h>
5031 #include <QuartzCore/CoreVideo.h>
5032 int main(void) { return 0; }
5035 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
5037 if test "$_corevideo" = yes ; then
5038 _vomodules
="corevideo $_vomodules"
5039 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
5040 def_corevideo
='#define CONFIG_COREVIDEO 1'
5042 _novomodules
="corevideo $_novomodules"
5043 def_corevideo
='#undef CONFIG_COREVIDEO'
5045 echores
"$_corevideo"
5050 # make sure this stays below CoreVideo to avoid issues due to namespace
5051 # conflicts between -lGL and -framework OpenGL
5053 #Note: this test is run even with --enable-gl since we autodetect linker flags
5054 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
5057 #include <windows.h>
5061 #include <X11/Xlib.h>
5067 wglCreateContext(dc);
5069 glXCreateContext(NULL, NULL, NULL, True);
5076 for _ld_tmp
in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5077 if cc_check
$_ld_tmp $_ld_lm ; then
5080 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
5084 if cc_check
-DGL_WIN32 -lopengl32 ; then
5087 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
5092 if test "$_gl" = yes ; then
5093 def_gl
='#define CONFIG_GL 1'
5094 _res_comment
="backends:"
5095 if test "$_gl_win32" = yes ; then
5096 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5097 _res_comment
="$_res_comment win32"
5099 if test "$_gl_x11" = yes ; then
5100 def_gl_x11
='#define CONFIG_GL_X11 1'
5101 _res_comment
="$_res_comment x11"
5103 _vomodules
="opengl $_vomodules"
5105 def_gl
='#undef CONFIG_GL'
5106 def_gl_win32
='#undef CONFIG_GL_WIN32'
5107 def_gl_x11
='#undef CONFIG_GL_X11'
5108 _novomodules
="opengl $_novomodules"
5113 echocheck
"MatrixView"
5114 if test "$_gl" = no
; then
5117 if test "$matrixview" = yes ; then
5118 _vomodules
="matrixview $_vomodules"
5119 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5121 _novomodules
="matrixview $_novomodules"
5122 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5124 echores
"$matrixview"
5127 echocheck
"PNG support"
5128 if test "$_png" = auto
; then
5131 # Don't check for -lpng on irix since it has its own libpng
5132 # incompatible with the GNU libpng
5133 _res_comment
="disabled on irix (not GNU libpng)"
5139 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
5140 printf("libpng: %s\n", png_libpng_ver);
5141 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
5144 cc_check
-lpng -lz $_ld_lm && _png
=yes
5148 if test "$_png" = yes ; then
5149 def_png
='#define CONFIG_PNG 1'
5150 extra_ldflags
="$extra_ldflags -lpng -lz"
5152 def_png
='#undef CONFIG_PNG'
5155 echocheck
"MNG support"
5156 if test "$_mng" = auto
; then
5161 const char * p_ver = mng_version_text();
5162 return !p_ver || p_ver[0] == 0;
5165 if cc_check
-lmng -lz $_ld_lm ; then
5170 if test "$_mng" = yes ; then
5171 def_mng
='#define CONFIG_MNG 1'
5172 extra_ldflags
="$extra_ldflags -lmng -lz"
5174 def_mng
='#undef CONFIG_MNG'
5177 echocheck
"JPEG support"
5178 if test "$_jpeg" = auto
; then
5185 #include <jpeglib.h>
5186 int main(void) { return 0; }
5188 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
5192 if test "$_jpeg" = yes ; then
5193 def_jpeg
='#define CONFIG_JPEG 1'
5194 _vomodules
="jpeg $_vomodules"
5195 extra_ldflags
="$extra_ldflags -ljpeg"
5197 def_jpeg
='#undef CONFIG_JPEG'
5198 _novomodules
="jpeg $_novomodules"
5202 echocheck
"OpenJPEG (JPEG2000) support"
5203 if test "$libopenjpeg" = auto
; then
5207 #include <openjpeg.h>
5208 int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
5210 cc_check
-lopenjpeg $_ld_lm && libopenjpeg
=yes
5212 echores
"$libopenjpeg"
5213 if test "$libopenjpeg" = yes ; then
5214 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 1'
5215 extra_ldflags
="$extra_ldflags -lopenjpeg"
5216 _libavdecoders
="$_libavdecoders LIBOPENJPEG_DECODER"
5217 _libavencoders
="$_libavencoders LIBOPENJPEG_ENCODER"
5218 _codecmodules
="OpenJPEG $_codecmodules"
5220 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 0'
5221 _nocodecmodules
="OpenJPEG $_nocodecmodules"
5225 echocheck
"PNM support"
5226 if test "$_pnm" = yes; then
5227 def_pnm
="#define CONFIG_PNM 1"
5228 _vomodules
="pnm $_vomodules"
5230 def_pnm
="#undef CONFIG_PNM"
5231 _novomodules
="pnm $_novomodules"
5237 echocheck
"GIF support"
5238 # This is to appease people who want to force gif support.
5239 # If it is forced to yes, then we still do checks to determine
5240 # which gif library to use.
5241 if test "$_gif" = yes ; then
5246 if test "$_gif" = auto
; then
5249 #include <gif_lib.h>
5250 int main(void) { return 0; }
5252 for _ld_gif
in "-lungif" "-lgif" ; do
5253 cc_check
$_ld_gif && _gif
=yes && break
5257 # If no library was found, and the user wants support forced,
5258 # then we force it on with libgif, as this is the safest
5259 # assumption IMHO. (libungif & libregif both create symbolic
5260 # links to libgif. We also assume that no x11 support is needed,
5261 # because if you are forcing this, then you _should_ know what
5262 # you are doing. [ Besides, package maintainers should never
5263 # have compiled x11 deps into libungif in the first place. ] )
5266 if test "$_force_gif" = yes && test "$_gif" = no
; then
5271 if test "$_gif" = yes ; then
5272 def_gif
='#define CONFIG_GIF 1'
5273 _codecmodules
="gif $_codecmodules"
5274 _vomodules
="gif89a $_vomodules"
5275 _res_comment
="old version, some encoding functions disabled"
5276 def_gif_4
='#undef CONFIG_GIF_4'
5277 extra_ldflags
="$extra_ldflags $_ld_gif"
5281 #include <gif_lib.h>
5282 void catch() { exit(1); }
5284 signal(SIGSEGV, catch); // catch segfault
5285 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5286 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5290 if cc_check
"$_ld_gif" ; then
5291 def_gif_4
='#define CONFIG_GIF_4 1'
5295 def_gif
='#undef CONFIG_GIF'
5296 def_gif_4
='#undef CONFIG_GIF_4'
5297 _novomodules
="gif89a $_novomodules"
5298 _nocodecmodules
="gif $_nocodecmodules"
5303 case "$_gif" in yes*)
5304 echocheck
"broken giflib workaround"
5305 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5308 #include <gif_lib.h>
5311 printf("UserData is at address %p\n", gif.UserData);
5315 if cc_check
"$_ld_gif" ; then
5316 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5325 echocheck
"VESA support"
5326 if test "$_vesa" = auto
; then
5329 int main(void) { vbeVersion(); return 0; }
5332 cc_check
-lvbe -llrmi && _vesa
=yes
5334 if test "$_vesa" = yes ; then
5335 def_vesa
='#define CONFIG_VESA 1'
5336 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5337 _vomodules
="vesa $_vomodules"
5339 def_vesa
='#undef CONFIG_VESA'
5340 _novomodules
="vesa $_novomodules"
5352 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5353 if test -z "$_sdlconfig" ; then
5354 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5355 _sdlconfig
="sdl-config"
5356 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5357 _sdlconfig
="sdl11-config"
5362 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5364 #ifdef CONFIG_SDL_SDL_H
5365 #include <SDL/SDL.h>
5370 // we allow SDL hacking our main() only on OSX
5373 int main(int argc, char *argv[]) {
5374 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5379 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
5380 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5382 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5386 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5387 _res_comment
="using $_sdlconfig"
5389 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5390 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5392 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5393 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5395 _inc_tmp
="$($_sdlconfig --cflags)"
5396 _ld_tmp
="$($_sdlconfig --libs)"
5398 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5403 if test "$_sdl" = yes ; then
5404 def_sdl
='#define CONFIG_SDL 1'
5405 extra_cflags
="$extra_cflags $_inc_tmp"
5406 libs_mplayer
="$libs_mplayer $_ld_tmp"
5407 _vomodules
="sdl $_vomodules"
5408 _aomodules
="sdl $_aomodules"
5410 def_sdl
='#undef CONFIG_SDL'
5411 _novomodules
="sdl $_novomodules"
5412 _noaomodules
="sdl $_noaomodules"
5418 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5419 if test "$_kva" = auto
; then
5423 int main( void ) { return 0; }
5426 cc_check
-lkva && _kva
=yes
5428 if test "$_kva" = yes ; then
5429 def_kva
='#define CONFIG_KVA 1'
5430 libs_mplayer
="$libs_mplayer -lkva"
5431 _vomodules
="kva $_vomodules"
5433 def_kva
='#undef CONFIG_KVA'
5434 _novomodules
="kva $_novomodules"
5442 echocheck
"Windows waveout"
5443 if test "$_win32waveout" = auto
; then
5445 #include <windows.h>
5446 #include <mmsystem.h>
5447 int main(void) { return 0; }
5450 cc_check
-lwinmm && _win32waveout
=yes
5452 if test "$_win32waveout" = yes ; then
5453 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5454 libs_mplayer
="$libs_mplayer -lwinmm"
5455 _aomodules
="win32 $_aomodules"
5457 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5458 _noaomodules
="win32 $_noaomodules"
5460 echores
"$_win32waveout"
5462 echocheck
"Direct3D"
5463 if test "$_direct3d" = auto
; then
5465 #include <windows.h>
5467 int main(void) { return 0; }
5470 cc_check
&& _direct3d
=yes
5472 if test "$_direct3d" = yes ; then
5473 def_direct3d
='#define CONFIG_DIRECT3D 1'
5474 _vomodules
="direct3d $_vomodules"
5476 def_direct3d
='#undef CONFIG_DIRECT3D'
5477 _novomodules
="direct3d $_novomodules"
5479 echores
"$_direct3d"
5482 if test "$_directx" = auto
; then
5484 #include <windows.h>
5487 int main(void) { return 0; }
5490 cc_check
-lgdi32 && _directx
=yes
5492 if test "$_directx" = yes ; then
5493 def_directx
='#define CONFIG_DIRECTX 1'
5494 libs_mplayer
="$libs_mplayer -lgdi32"
5495 _vomodules
="directx $_vomodules"
5496 _aomodules
="dsound $_aomodules"
5498 def_directx
='#undef CONFIG_DIRECTX'
5499 _novomodules
="directx $_novomodules"
5500 _noaomodules
="dsound $_noaomodules"
5508 if test "$_dxr2" = auto
; then
5511 #include <dxr2ioctl.h>
5512 int main(void) { return 0; }
5514 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5515 cc_check
$_inc_tmp && _dxr2
=yes && \
5516 extra_cflags
="$extra_cflags $_inc_tmp" && break
5519 if test "$_dxr2" = yes; then
5520 def_dxr2
='#define CONFIG_DXR2 1'
5521 _aomodules
="dxr2 $_aomodules"
5522 _vomodules
="dxr2 $_vomodules"
5524 def_dxr2
='#undef CONFIG_DXR2'
5525 _noaomodules
="dxr2 $_noaomodules"
5526 _novomodules
="dxr2 $_novomodules"
5531 if test "$_dxr3" = auto
; then
5533 #include <linux/em8300.h>
5534 int main(void) { return 0; }
5537 cc_check
&& _dxr3
=yes
5539 if test "$_dxr3" = yes ; then
5540 def_dxr3
='#define CONFIG_DXR3 1'
5541 _vomodules
="dxr3 $_vomodules"
5543 def_dxr3
='#undef CONFIG_DXR3'
5544 _novomodules
="dxr3 $_novomodules"
5549 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5550 if test "$_ivtv" = auto
; then
5553 #include <inttypes.h>
5554 #include <linux/types.h>
5555 #include <linux/videodev2.h>
5556 #include <linux/ivtv.h>
5557 #include <sys/ioctl.h>
5559 struct ivtv_cfg_stop_decode sd;
5560 struct ivtv_cfg_start_decode sd1;
5561 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5562 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5566 cc_check
&& _ivtv
=yes
5568 if test "$_ivtv" = yes ; then
5569 def_ivtv
='#define CONFIG_IVTV 1'
5570 _vomodules
="ivtv $_vomodules"
5571 _aomodules
="ivtv $_aomodules"
5573 def_ivtv
='#undef CONFIG_IVTV'
5574 _novomodules
="ivtv $_novomodules"
5575 _noaomodules
="ivtv $_noaomodules"
5580 echocheck
"V4L2 MPEG Decoder"
5581 if test "$_v4l2" = auto
; then
5584 #include <inttypes.h>
5585 #include <linux/types.h>
5586 #include <linux/videodev2.h>
5587 #include <linux/version.h>
5589 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5590 #error kernel headers too old, need 2.6.22
5592 struct v4l2_ext_controls ctrls;
5593 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5598 cc_check
&& _v4l2
=yes
5600 if test "$_v4l2" = yes ; then
5601 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5602 _vomodules
="v4l2 $_vomodules"
5603 _aomodules
="v4l2 $_aomodules"
5605 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5606 _novomodules
="v4l2 $_novomodules"
5607 _noaomodules
="v4l2 $_noaomodules"
5618 echocheck
"OSS Audio"
5619 if test "$_ossaudio" = auto
; then
5621 #include <sys/ioctl.h>
5622 #include <$_soundcard_header>
5623 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5626 cc_check
&& _ossaudio
=yes
5628 if test "$_ossaudio" = yes ; then
5629 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5630 _aomodules
="oss $_aomodules"
5631 if test "$_linux_devfs" = yes; then
5632 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5633 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5636 #include <sys/ioctl.h>
5637 #include <$_soundcard_header>
5638 #ifdef OPEN_SOUND_SYSTEM
5639 int main(void) { return 0; }
5641 #error Not the real thing
5645 cc_check
&& _real_ossaudio
=yes
5646 if test "$_real_ossaudio" = yes; then
5647 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5648 elif netbsd || openbsd
; then
5649 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5650 extra_ldflags
="$extra_ldflags -lossaudio"
5652 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5654 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5657 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5658 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5659 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5660 _noaomodules
="oss $_noaomodules"
5662 echores
"$_ossaudio"
5666 if test "$_arts" = auto
; then
5668 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5672 int main(void) { return 0; }
5674 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5679 if test "$_arts" = yes ; then
5680 def_arts
='#define CONFIG_ARTS 1'
5681 _aomodules
="arts $_aomodules"
5682 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5683 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5685 _noaomodules
="arts $_noaomodules"
5691 if test "$_esd" = auto
; then
5693 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5697 int main(void) { int fd = esd_open_sound("test"); return fd; }
5699 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5705 if test "$_esd" = yes ; then
5706 def_esd
='#define CONFIG_ESD 1'
5707 _aomodules
="esd $_aomodules"
5708 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5709 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5711 echocheck
"esd_get_latency()"
5714 int main(void) { return esd_get_latency(0); }
5716 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5717 echores
"$_esd_latency"
5719 def_esd
='#undef CONFIG_ESD'
5720 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5721 _noaomodules
="esd $_noaomodules"
5726 if test "$_nas" = auto
; then
5728 #include <audio/audiolib.h>
5729 int main(void) { return 0; }
5732 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5734 if test "$_nas" = yes ; then
5735 def_nas
='#define CONFIG_NAS 1'
5736 libs_mplayer
="$libs_mplayer -laudio -lXt"
5737 _aomodules
="nas $_aomodules"
5739 _noaomodules
="nas $_noaomodules"
5740 def_nas
='#undef CONFIG_NAS'
5746 if test "$_pulse" = auto
; then
5748 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5751 #include <pulse/pulseaudio.h>
5752 int main(void) { return 0; }
5754 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5760 if test "$_pulse" = yes ; then
5761 def_pulse
='#define CONFIG_PULSE 1'
5762 _aomodules
="pulse $_aomodules"
5763 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5764 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5766 def_pulse
='#undef CONFIG_PULSE'
5767 _noaomodules
="pulse $_noaomodules"
5772 if test "$_jack" = auto
; then
5776 #include <jack/jack.h>
5777 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5779 if cc_check
-ljack ; then
5780 libs_mplayer
="$libs_mplayer -ljack"
5781 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5782 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5783 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5789 if test "$_jack" = yes ; then
5790 def_jack
='#define CONFIG_JACK 1'
5791 _aomodules
="jack $_aomodules"
5793 _noaomodules
="jack $_noaomodules"
5798 if test "$_openal" = auto
; then
5802 #include <OpenAL/al.h>
5807 alSourceQueueBuffers(0, 0, 0);
5808 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5812 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5813 cc_check
$I && _openal
=yes && break
5814 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5816 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5818 if test "$_openal" = yes ; then
5819 def_openal
='#define CONFIG_OPENAL 1'
5820 _aomodules
="openal $_aomodules"
5822 _noaomodules
="openal $_noaomodules"
5826 echocheck
"ALSA audio"
5827 if test "$_alloca" != yes ; then
5829 _res_comment
="alloca missing"
5831 if test "$_alsa" != no
; then
5834 #include <sys/time.h>
5835 #include <sys/asoundlib.h>
5836 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5837 #error "alsa version != 0.5.x"
5839 int main(void) { return 0; }
5841 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5844 #include <sys/time.h>
5845 #include <sys/asoundlib.h>
5846 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5847 #error "alsa version != 0.9.x"
5849 int main(void) { return 0; }
5851 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5853 #include <sys/time.h>
5854 #include <alsa/asoundlib.h>
5855 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5856 #error "alsa version != 0.9.x"
5858 int main(void) { return 0; }
5860 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5863 #include <sys/time.h>
5864 #include <sys/asoundlib.h>
5865 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5866 #error "alsa version != 1.0.x"
5868 int main(void) { return 0; }
5870 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5872 #include <sys/time.h>
5873 #include <alsa/asoundlib.h>
5874 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5875 #error "alsa version != 1.0.x"
5877 int main(void) { return 0; }
5879 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5881 def_alsa
='#undef CONFIG_ALSA'
5882 def_alsa5
='#undef CONFIG_ALSA5'
5883 def_alsa9
='#undef CONFIG_ALSA9'
5884 def_alsa1x
='#undef CONFIG_ALSA1X'
5885 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5886 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5887 if test "$_alsaver" ; then
5889 if test "$_alsaver" = '0.5.x' ; then
5891 _aomodules
="alsa5 $_aomodules"
5892 def_alsa5
='#define CONFIG_ALSA5 1'
5893 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5894 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5895 elif test "$_alsaver" = '0.9.x-sys' ; then
5897 _aomodules
="alsa $_aomodules"
5898 def_alsa
='#define CONFIG_ALSA 1'
5899 def_alsa9
='#define CONFIG_ALSA9 1'
5900 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5901 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5902 elif test "$_alsaver" = '0.9.x-alsa' ; then
5904 _aomodules
="alsa $_aomodules"
5905 def_alsa
='#define CONFIG_ALSA 1'
5906 def_alsa9
='#define CONFIG_ALSA9 1'
5907 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5908 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5909 elif test "$_alsaver" = '1.0.x-sys' ; then
5911 _aomodules
="alsa $_aomodules"
5912 def_alsa
='#define CONFIG_ALSA 1'
5913 def_alsa1x
="#define CONFIG_ALSA1X 1"
5914 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5915 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5916 elif test "$_alsaver" = '1.0.x-alsa' ; then
5918 _aomodules
="alsa $_aomodules"
5919 def_alsa
='#define CONFIG_ALSA 1'
5920 def_alsa1x
="#define CONFIG_ALSA1X 1"
5921 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5922 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5925 _res_comment
="unknown version"
5927 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5929 _noaomodules
="alsa $_noaomodules"
5934 echocheck
"Sun audio"
5935 if test "$_sunaudio" = auto
; then
5937 #include <sys/types.h>
5938 #include <sys/audioio.h>
5939 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5942 cc_check
&& _sunaudio
=yes
5944 if test "$_sunaudio" = yes ; then
5945 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5946 _aomodules
="sun $_aomodules"
5948 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5949 _noaomodules
="sun $_noaomodules"
5951 echores
"$_sunaudio"
5954 def_mlib
='#define CONFIG_MLIB 0'
5956 echocheck
"Sun mediaLib"
5957 if test "$_mlib" = auto
; then
5961 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5963 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5970 echocheck
"CoreAudio"
5971 if test "$_coreaudio" = auto
; then
5973 #include <CoreAudio/CoreAudio.h>
5974 #include <AudioToolbox/AudioToolbox.h>
5975 #include <AudioUnit/AudioUnit.h>
5976 int main(void) { return 0; }
5979 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
5981 if test "$_coreaudio" = yes ; then
5982 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
5983 def_coreaudio
='#define CONFIG_COREAUDIO 1'
5984 _aomodules
="coreaudio $_aomodules"
5986 def_coreaudio
='#undef CONFIG_COREAUDIO'
5987 _noaomodules
="coreaudio $_noaomodules"
5994 echocheck
"SGI audio"
5995 if test "$_sgiaudio" = auto
; then
5996 # check for SGI audio
5998 #include <dmedia/audio.h>
5999 int main(void) { return 0; }
6002 cc_check
&& _sgiaudio
=yes
6004 if test "$_sgiaudio" = "yes" ; then
6005 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
6006 libs_mplayer
="$libs_mplayer -laudio"
6007 _aomodules
="sgi $_aomodules"
6009 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
6010 _noaomodules
="sgi $_noaomodules"
6012 echores
"$_sgiaudio"
6017 echocheck
"KAI (UNIAUD/DART)"
6018 if test "$_kai" = auto
; then
6022 int main(void) { return 0; }
6025 cc_check
-lkai && _kai
=yes
6027 if test "$_kai" = yes ; then
6028 def_kai
='#define CONFIG_KAI 1'
6029 libs_mplayer
="$libs_mplayer -lkai"
6030 _aomodules
="kai $_aomodules"
6032 def_kai
='#undef CONFIG_KAI'
6033 _noaomodules
="kai $_noaomodules"
6038 if test "$_dart" = auto
; then
6042 int main( void ) { return 0; }
6045 cc_check
-ldart && _dart
=yes
6047 if test "$_dart" = yes ; then
6048 def_dart
='#define CONFIG_DART 1'
6049 libs_mplayer
="$libs_mplayer -ldart"
6050 _aomodules
="dart $_aomodules"
6052 def_dart
='#undef CONFIG_DART'
6053 _noaomodules
="dart $_noaomodules"
6059 # set default CD/DVD devices
6060 if win32 || os2
; then
6061 default_cdrom_device
="D:"
6063 default_cdrom_device
="/dev/disk1"
6064 elif dragonfly
; then
6065 default_cdrom_device
="/dev/cd0"
6067 default_cdrom_device
="/dev/acd0"
6069 default_cdrom_device
="/dev/rcd0a"
6071 default_cdrom_device
="/vol/dev/aliases/cdrom0"
6072 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
6073 # file system and the volfs service.
6074 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
6076 default_cdrom_device
="a1ide.device:2"
6078 default_cdrom_device
="/dev/cdrom"
6081 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
6082 default_dvd_device
=$default_cdrom_device
6084 default_dvd_device
="/dev/rdiskN"
6086 default_dvd_device
="/dev/dvd"
6090 echocheck
"VCD support"
6091 if test "$_vcd" = auto
; then
6093 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
6097 #include <ddk/ntddcdrm.h>
6098 int main(void) { return 0; }
6100 cc_check
&& _vcd
=yes
6103 if test "$_vcd" = yes; then
6104 _inputmodules
="vcd $_inputmodules"
6105 def_vcd
='#define CONFIG_VCD 1'
6107 def_vcd
='#undef CONFIG_VCD'
6108 _noinputmodules
="vcd $_noinputmodules"
6109 _res_comment
="not supported on this OS"
6116 if test "$_dvdread_internal" = auto
; then
6117 _dvdread_internal
=no
6119 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
6120 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
6121 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
6122 || darwin || win32 || os2
; then
6123 _dvdread_internal
=yes
6125 extra_cflags
="-Ilibdvdread4 $extra_cflags"
6127 elif test "$_dvdread" = auto
; then
6129 if test "$_dl" = yes; then
6131 #include <inttypes.h>
6132 #include <dvdread/dvd_reader.h>
6133 #include <dvdread/ifo_types.h>
6134 #include <dvdread/ifo_read.h>
6135 #include <dvdread/nav_read.h>
6136 int main(void) { return 0; }
6138 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
6139 _dvdreadlibs
=$
($_dvdreadconfig --libs)
6140 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
6141 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
6143 extra_cflags
="$extra_cflags $_dvdreadcflags"
6144 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
6145 _res_comment
="external"
6150 if test "$_dvdread_internal" = yes; then
6151 def_dvdread
='#define CONFIG_DVDREAD 1'
6152 _inputmodules
="dvdread(internal) $_inputmodules"
6154 _res_comment
="internal"
6155 elif test "$_dvdread" = yes; then
6156 def_dvdread
='#define CONFIG_DVDREAD 1'
6158 extra_ldflags
="$extra_ldflags -ldvdread"
6159 _inputmodules
="dvdread(external) $_inputmodules"
6160 _res_comment
="external"
6162 def_dvdread
='#undef CONFIG_DVDREAD'
6163 _noinputmodules
="dvdread $_noinputmodules"
6168 echocheck
"internal libdvdcss"
6169 if test "$_libdvdcss_internal" = auto
; then
6170 _libdvdcss_internal
=no
6171 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
6172 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
6174 if test "$_libdvdcss_internal" = yes ; then
6175 if linux || netbsd || openbsd || bsdos
; then
6176 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
6177 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
6178 elif freebsd || dragonfly
; then
6179 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
6181 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
6182 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
6184 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
6186 cflags_libdvdcss
="-DSYS_BEOS"
6188 cflags_libdvdcss
="-DSYS_OS2"
6190 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
6191 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
6192 _inputmodules
="libdvdcss(internal) $_inputmodules"
6195 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
6197 echores
"$_libdvdcss_internal"
6200 echocheck
"cdparanoia"
6201 if test "$_cdparanoia" = auto
; then
6203 #include <cdda_interface.h>
6204 #include <cdda_paranoia.h>
6205 // This need a better test. How ?
6206 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
6209 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
6210 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
6211 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
6214 if test "$_cdparanoia" = yes ; then
6216 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
6217 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
6219 echores
"$_cdparanoia"
6223 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
6226 #include <cdio/version.h>
6227 #include <cdio/cdda.h>
6228 #include <cdio/paranoia.h>
6230 void *test = cdda_verbose_set;
6231 printf("%s\n", CDIO_VERSION);
6232 return test == (void *)1;
6236 for _ld_tmp
in "" "-lwinmm" ; do
6237 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
6238 cc_check
$_ld_tmp $_ld_lm \
6239 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6241 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
6242 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
6243 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
6244 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
6245 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6248 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
6250 def_libcdio
='#define CONFIG_LIBCDIO 1'
6251 def_havelibcdio
='yes'
6253 if test "$_cdparanoia" = yes ; then
6254 _res_comment
="using cdparanoia"
6256 def_libcdio
='#undef CONFIG_LIBCDIO'
6257 def_havelibcdio
='no'
6261 if test "$_cdda" = yes ; then
6262 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
6263 def_cdparanoia
='#define CONFIG_CDDA 1'
6264 _inputmodules
="cdda $_inputmodules"
6266 def_cdparanoia
='#undef CONFIG_CDDA'
6267 _noinputmodules
="cdda $_noinputmodules"
6270 if test "$_cddb" = yes ; then
6271 def_cddb
='#define CONFIG_CDDB 1'
6272 _inputmodules
="cddb $_inputmodules"
6275 def_cddb
='#undef CONFIG_CDDB'
6276 _noinputmodules
="cddb $_noinputmodules"
6279 echocheck
"bitmap font support"
6280 if test "$_bitmap_font" = yes ; then
6281 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6283 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6285 echores
"$_bitmap_font"
6288 echocheck
"freetype >= 2.0.9"
6290 # freetype depends on iconv
6291 if test "$_iconv" = no
; then
6293 _res_comment
="iconv support needed"
6296 if test "$_freetype" = auto
; then
6297 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6300 #include <ft2build.h>
6301 #include FT_FREETYPE_H
6302 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6303 #error "Need FreeType 2.0.9 or newer"
6307 FT_Int major=-1,minor=-1,patch=-1;
6308 int err=FT_Init_FreeType(&library);
6313 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6318 if test "$_freetype" = yes ; then
6319 def_freetype
='#define CONFIG_FREETYPE 1'
6320 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6321 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6323 def_freetype
='#undef CONFIG_FREETYPE'
6325 echores
"$_freetype"
6327 if test "$_freetype" = no
; then
6329 _res_comment
="FreeType support needed"
6331 echocheck
"fontconfig"
6332 if test "$_fontconfig" = auto
; then
6336 #include <fontconfig/fontconfig.h>
6337 #if FC_VERSION < 20402
6338 #error At least version 2.4.2 of fontconfig required
6342 if (err == FcFalse) {
6343 printf("Couldn't initialize fontconfig lib\n");
6350 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6351 _ld_tmp
="-lfontconfig $_ld_tmp"
6352 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6354 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6355 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6356 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6357 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6358 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6361 if test "$_fontconfig" = yes ; then
6362 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6364 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6366 echores
"$_fontconfig"
6369 echocheck
"SSA/ASS support"
6370 # libass depends on FreeType
6371 if test "$_freetype" = no
; then
6374 _res_comment
="FreeType support needed"
6377 if test "$_ass" = auto
; then
6379 #include <ft2build.h>
6380 #include FT_FREETYPE_H
6381 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 2) || ((FREETYPE_MINOR == 2) && (FREETYPE_PATCH < 1)))
6382 #error "Need FreeType 2.2.1 or newer"
6384 int main(void) { return 0; }
6387 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _ass
=yes
6388 if test "$_ass" = no
; then
6390 _res_comment
="FreeType >= 2.2.1 needed"
6391 elif test "$ass_internal" = no
; then
6392 _res_comment
="external"
6393 extra_ldflags
="$extra_ldflags -lass"
6396 if test "$_ass" = yes ; then
6397 def_ass
='#define CONFIG_ASS 1'
6399 def_ass
='#undef CONFIG_ASS'
6401 if test "$ass_internal" = yes ; then
6402 def_ass_internal
='#define CONFIG_ASS_INTERNAL 1'
6404 def_ass_internal
='#undef CONFIG_ASS_INTERNAL'
6409 echocheck
"fribidi with charsets"
6412 if test "$_fribidi" = auto
; then
6416 /* workaround for fribidi 0.10.4 and below */
6417 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6418 #include <fribidi/fribidi.h>
6420 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6421 printf("Fribidi headers are not consistents with the library!\n");
6430 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6431 if $_fribidiconfig --version > /dev
/null
2>&1 &&
6432 test "$_fribidi" = no
; then
6433 _inc_tmp
="$($_fribidiconfig --cflags)"
6434 _ld_tmp
="$($_fribidiconfig --libs)"
6435 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6438 if test "$_fribidi" = yes ; then
6439 def_fribidi
='#define CONFIG_FRIBIDI 1'
6440 extra_cflags
="$extra_cflags $_inc_tmp"
6441 extra_ldflags
="$extra_ldflags $_ld_tmp"
6443 def_fribidi
='#undef CONFIG_FRIBIDI'
6449 if test "$_enca" = auto
; then
6451 #include <sys/types.h>
6456 langs = enca_get_languages(&langcnt);
6461 cc_check
-lenca $_ld_lm && _enca
=yes
6463 if test "$_enca" = yes ; then
6464 def_enca
='#define CONFIG_ENCA 1'
6465 extra_ldflags
="$extra_ldflags -lenca"
6467 def_enca
='#undef CONFIG_ENCA'
6475 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6478 cc_check
-lz && _zlib
=yes
6479 if test "$_zlib" = yes ; then
6480 def_zlib
='#define CONFIG_ZLIB 1'
6481 extra_ldflags
="$extra_ldflags -lz"
6483 def_zlib
='#define CONFIG_ZLIB 0'
6484 _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
//)
6485 _libavencoders
=$
(echo $_libavencoders |
sed -e s
/FLASHSV_ENCODER
// -e s
/PNG_ENCODER
// -e s
/ZMBV_ENCODER
// -e s
/ZLIB_ENCODER
//)
6492 def_bzlib
='#define CONFIG_BZLIB 0'
6495 int main(void) { BZ2_bzlibVersion(); return 0; }
6497 cc_check
-lbz2 && bzlib
=yes
6498 if test "$bzlib" = yes ; then
6499 def_bzlib
='#define CONFIG_BZLIB 1'
6500 extra_ldflags
="$extra_ldflags -lbz2"
6506 if test "$_rtc" = auto
; then
6508 #include <sys/ioctl.h>
6510 #include <linux/rtc.h>
6513 #define RTC_PIE_ON RTCIO_PIE_ON
6515 int main(void) { return RTC_PIE_ON; }
6518 cc_check
&& _rtc
=yes
6521 if test "$_rtc" = yes ; then
6522 def_rtc
='#define HAVE_RTC 1'
6524 def_rtc
='#undef HAVE_RTC'
6529 echocheck
"liblzo2 support"
6530 if test "$_liblzo" = auto
; then
6533 #include <lzo/lzo1x.h>
6534 int main(void) { lzo_init();return 0; }
6536 cc_check
-llzo2 && _liblzo
=yes
6538 if test "$_liblzo" = yes ; then
6539 def_liblzo
='#define CONFIG_LIBLZO 1'
6540 extra_ldflags
="$extra_ldflags -llzo2"
6541 _codecmodules
="liblzo $_codecmodules"
6543 def_liblzo
='#undef CONFIG_LIBLZO'
6544 _nocodecmodules
="liblzo $_nocodecmodules"
6549 echocheck
"mad support"
6550 if test "$_mad" = auto
; then
6554 int main(void) { return 0; }
6556 cc_check
-lmad && _mad
=yes
6558 if test "$_mad" = yes ; then
6559 def_mad
='#define CONFIG_LIBMAD 1'
6560 extra_ldflags
="$extra_ldflags -lmad"
6561 _codecmodules
="libmad $_codecmodules"
6563 def_mad
='#undef CONFIG_LIBMAD'
6564 _nocodecmodules
="libmad $_nocodecmodules"
6569 if test "$_twolame" = auto
; then
6571 #include <twolame.h>
6572 int main(void) { twolame_init(); return 0; }
6575 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6577 if test "$_twolame" = yes ; then
6578 def_twolame
='#define CONFIG_TWOLAME 1'
6579 libs_mencoder
="$libs_mencoder -ltwolame"
6580 _codecmodules
="twolame $_codecmodules"
6582 def_twolame
='#undef CONFIG_TWOLAME'
6583 _nocodecmodules
="twolame $_nocodecmodules"
6588 if test "$_toolame" = auto
; then
6590 if test "$_twolame" = yes ; then
6591 _res_comment
="disabled by twolame"
6594 #include <toolame.h>
6595 int main(void) { toolame_init(); return 0; }
6597 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6600 if test "$_toolame" = yes ; then
6601 def_toolame
='#define CONFIG_TOOLAME 1'
6602 libs_mencoder
="$libs_mencoder -ltoolame"
6603 _codecmodules
="toolame $_codecmodules"
6605 def_toolame
='#undef CONFIG_TOOLAME'
6606 _nocodecmodules
="toolame $_nocodecmodules"
6608 if test "$_toolamedir" ; then
6609 _res_comment
="using $_toolamedir"
6613 echocheck
"OggVorbis support"
6614 if test "$_tremor_internal" = yes; then
6616 elif test "$_tremor" = auto
; then
6619 #include <tremor/ivorbiscodec.h>
6620 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6622 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6624 if test "$_libvorbis" = auto
; then
6627 #include <vorbis/codec.h>
6628 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6630 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6632 if test "$_tremor_internal" = yes ; then
6634 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6635 def_tremor
='#define CONFIG_TREMOR 1'
6636 _codecmodules
="tremor(internal) $_codecmodules"
6637 _res_comment
="internal Tremor"
6638 if test "$_tremor_low" = yes ; then
6639 cflags_tremor_low
="-D_LOW_ACCURACY_"
6640 _res_comment
="internal low accuracy Tremor"
6642 elif test "$_tremor" = yes ; then
6644 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6645 def_tremor
='#define CONFIG_TREMOR 1'
6646 _codecmodules
="tremor(external) $_codecmodules"
6647 _res_comment
="external Tremor"
6648 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6649 elif test "$_libvorbis" = yes ; then
6651 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6652 _codecmodules
="libvorbis $_codecmodules"
6653 _res_comment
="libvorbis"
6654 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6657 _nocodecmodules
="libvorbis $_nocodecmodules"
6661 echocheck
"libspeex (version >= 1.1 required)"
6662 if test "$_speex" = auto
; then
6665 #include <speex/speex.h>
6666 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6668 cc_check
-lspeex $_ld_lm && _speex
=yes
6670 if test "$_speex" = yes ; then
6671 def_speex
='#define CONFIG_SPEEX 1'
6672 extra_ldflags
="$extra_ldflags -lspeex"
6673 _codecmodules
="speex $_codecmodules"
6675 def_speex
='#undef CONFIG_SPEEX'
6676 _nocodecmodules
="speex $_nocodecmodules"
6680 echocheck
"OggTheora support"
6681 if test "$_theora" = auto
; then
6684 #include <theora/theora.h>
6687 /* Theora is in flux, make sure that all interface routines and datatypes
6688 * exist and work the way we expect it, so we don't break MPlayer. */
6697 theora_info_init(&inf);
6698 theora_comment_init(&tc);
6702 /* we don't want to execute this kind of nonsense; just for making sure
6703 * that compilation works... */
6704 memset(&op, 0, sizeof(op));
6705 r = theora_decode_header(&inf, &tc, &op);
6706 r = theora_decode_init(&st, &inf);
6707 t = theora_granule_time(&st, op.granulepos);
6708 r = theora_decode_packetin(&st, &op);
6709 r = theora_decode_YUVout(&st, &yuv);
6715 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6716 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6717 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6718 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6719 if test _theora
= no
; then
6720 _ld_theora
="-ltheora -logg"
6721 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6723 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6724 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6725 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6726 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6727 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6728 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6729 if test _theora
= no
; then
6730 _ld_theora
="-ltheora -logg"
6731 cc_check tremor
/bitwise.c
$_ld_theora &&
6732 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6736 if test "$_theora" = yes ; then
6737 def_theora
='#define CONFIG_OGGTHEORA 1'
6738 _codecmodules
="libtheora $_codecmodules"
6739 # when --enable-theora is forced, we'd better provide a probably sane
6740 # $_ld_theora than nothing
6741 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6743 def_theora
='#undef CONFIG_OGGTHEORA'
6744 _nocodecmodules
="libtheora $_nocodecmodules"
6748 echocheck
"internal mp3lib support"
6749 if test "$_mp3lib" = auto
; then
6750 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6752 if test "$_mp3lib" = yes ; then
6753 def_mp3lib
='#define CONFIG_MP3LIB 1'
6754 _codecmodules
="mp3lib(internal) $_codecmodules"
6756 def_mp3lib
='#undef CONFIG_MP3LIB'
6757 _nocodecmodules
="mp3lib(internal) $_nocodecmodules"
6761 echocheck
"liba52 support"
6762 if test "$_liba52_internal" = auto
; then
6763 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
6765 def_liba52
='#undef CONFIG_LIBA52'
6766 def_liba52_internal
="#undef CONFIG_LIBA52_INTERNAL"
6767 if test "$_liba52_internal" = yes ; then
6769 def_liba52_internal
="#define CONFIG_LIBA52_INTERNAL 1"
6770 _res_comment
="internal"
6771 elif test "$_liba52_internal" = no
&& test "$_liba52" = auto
; then
6774 #include <inttypes.h>
6775 #include <a52dec/a52.h>
6776 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6778 cc_check
-la52 && _liba52
=yes && _res_comment
="external" && extra_ldflags
="$extra_ldflags -la52"
6780 if test "$_liba52" = yes ; then
6781 def_liba52
='#define CONFIG_LIBA52 1'
6782 _codecmodules
="liba52($_res_comment) $_codecmodules"
6784 _nocodecmodules
="liba52 $_nocodecmodules"
6788 echocheck
"internal libmpeg2 support"
6789 if test "$_libmpeg2" = auto
; then
6791 if alpha
&& test cc_vendor
=gnu
; then
6793 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6795 _res_comment
="broken gcc"
6800 if test "$_libmpeg2" = yes ; then
6801 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6802 _codecmodules
="libmpeg2(internal) $_codecmodules"
6804 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6805 _nocodecmodules
="libmpeg2(internal) $_nocodecmodules"
6807 echores
"$_libmpeg2"
6809 echocheck
"libdca support"
6810 if test "$_libdca" = auto
; then
6813 #include <inttypes.h>
6815 int main(void) { dts_init(0); return 0; }
6817 for _ld_dca
in -ldca -ldts ; do
6818 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6819 && _libdca
=yes && break
6822 if test "$_libdca" = yes ; then
6823 def_libdca
='#define CONFIG_LIBDCA 1'
6824 _codecmodules
="libdca $_codecmodules"
6826 def_libdca
='#undef CONFIG_LIBDCA'
6827 _nocodecmodules
="libdca $_nocodecmodules"
6831 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6832 if test "$_musepack" = auto
; then
6836 #include <mpcdec/mpcdec.h>
6838 mpc_streaminfo info;
6839 mpc_decoder decoder;
6840 mpc_decoder_set_streaminfo(&decoder, &info);
6841 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6845 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6847 if test "$_musepack" = yes ; then
6848 def_musepack
='#define CONFIG_MUSEPACK 1'
6849 extra_ldflags
="$extra_ldflags -lmpcdec"
6850 _codecmodules
="musepack $_codecmodules"
6852 def_musepack
='#undef CONFIG_MUSEPACK'
6853 _nocodecmodules
="musepack $_nocodecmodules"
6855 echores
"$_musepack"
6858 echocheck
"FAAC support"
6859 if test "$_faac" = auto
; then
6861 #include <inttypes.h>
6863 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6866 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6867 cc_check
$_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6870 if test "$_faac" = yes ; then
6871 def_faac
="#define CONFIG_FAAC 1"
6872 test "$_faac_lavc" = auto
&& _faac_lavc
=yes
6873 if test "$_faac_lavc" = yes ; then
6874 def_faac_lavc
="#define CONFIG_LIBFAAC 1"
6875 libs_mplayer
="$libs_mplayer $_ld_faac"
6876 _libavencoders
="$_libavencoders LIBFAAC_ENCODER"
6878 _codecmodules
="faac $_codecmodules"
6881 def_faac
="#undef CONFIG_FAAC"
6882 def_faac_lavc
="#define CONFIG_LIBFAAC 0"
6883 _nocodecmodules
="faac $_nocodecmodules"
6885 _res_comment
="in libavcodec: $_faac_lavc"
6889 echocheck
"FAAD2 support"
6890 if test "$_faad_internal" = auto
; then
6891 if x86_32
&& test cc_vendor
=gnu
; then
6893 3.1*|
3.2) # ICE/insn with these versions
6895 _res_comment
="broken gcc"
6907 if test "$_faad" = auto
; then
6910 #ifndef FAAD_MIN_STREAMSIZE
6911 #error Too old version
6913 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6914 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6916 cc_check
-lfaad $_ld_lm && _faad
=yes
6919 def_faad
='#undef CONFIG_FAAD'
6920 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6921 if test "$_faad_internal" = yes ; then
6922 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6923 _res_comment
="internal floating-point"
6924 if test "$_faad_fixed" = yes ; then
6925 # The FIXED_POINT implementation of FAAD2 improves performance
6926 # on some platforms, especially for SBR files.
6927 cflags_faad_fixed
="-DFIXED_POINT"
6928 _res_comment
="internal fixed-point"
6930 elif test "$_faad" = yes ; then
6931 extra_ldflags
="$extra_ldflags -lfaad"
6934 if test "$_faad" = yes ; then
6935 def_faad
='#define CONFIG_FAAD 1'
6936 if test "$_faad_internal" = yes ; then
6937 _codecmodules
="faad2(internal) $_codecmodules"
6939 _codecmodules
="faad2 $_codecmodules"
6943 _nocodecmodules
="faad2 $_nocodecmodules"
6948 echocheck
"LADSPA plugin support"
6949 if test "$_ladspa" = auto
; then
6954 const LADSPA_Descriptor *ld = NULL;
6959 cc_check
&& _ladspa
=yes
6961 if test "$_ladspa" = yes; then
6962 def_ladspa
="#define CONFIG_LADSPA 1"
6964 def_ladspa
="#undef CONFIG_LADSPA"
6969 echocheck
"libbs2b audio filter support"
6970 if test "$_libbs2b" = auto
; then
6973 #if BS2B_VERSION_MAJOR < 3
6974 #error Please use libbs2b >= 3.0.0, older versions are not supported.
6984 if $_pkg_config --exists libbs2b
; then
6985 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
6986 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
6987 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
6988 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
6990 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
6991 -I/usr
/local
/include
/bs2b
; do
6992 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
6993 extra_ldflags
="$extra_ldflags -lbs2b"
6994 extra_cflags
="$extra_cflags $_inc_tmp"
7001 def_libbs2b
="#undef CONFIG_LIBBS2B"
7002 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
7006 if test -z "$_codecsdir" ; then
7007 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
7008 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
7009 if test -d "$dir" ; then
7015 # Fall back on default directory.
7016 if test -z "$_codecsdir" ; then
7017 _codecsdir
="$_libdir/codecs"
7018 mingw32 || os2
&& _codecsdir
="codecs"
7022 echocheck
"Win32 codecs"
7023 if test "$_win32dll" = auto
; then
7025 if x86_32
&& ! qnx
; then
7029 if test "$_win32dll" = yes ; then
7030 def_win32dll
='#define CONFIG_WIN32DLL 1'
7032 def_win32_loader
='#define WIN32_LOADER 1'
7033 _win32_emulation
=yes
7035 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
7036 _res_comment
="using native windows"
7038 _codecmodules
="win32 $_codecmodules"
7040 def_win32dll
='#undef CONFIG_WIN32DLL'
7041 def_win32_loader
='#undef WIN32_LOADER'
7042 _nocodecmodules
="win32 $_nocodecmodules"
7044 echores
"$_win32dll"
7047 echocheck
"XAnim codecs"
7048 if test "$_xanim" = auto
; then
7050 _res_comment
="dynamic loader support needed"
7051 if test "$_dl" = yes ; then
7055 if test "$_xanim" = yes ; then
7056 def_xanim
='#define CONFIG_XANIM 1'
7057 _codecmodules
="xanim $_codecmodules"
7059 def_xanim
='#undef CONFIG_XANIM'
7060 _nocodecmodules
="xanim $_nocodecmodules"
7065 echocheck
"RealPlayer codecs"
7066 if test "$_real" = auto
; then
7068 _res_comment
="dynamic loader support needed"
7069 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
7070 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
7074 if test "$_real" = yes ; then
7075 def_real
='#define CONFIG_REALCODECS 1'
7076 _codecmodules
="real $_codecmodules"
7078 def_real
='#undef CONFIG_REALCODECS'
7079 _nocodecmodules
="real $_nocodecmodules"
7084 echocheck
"QuickTime codecs"
7086 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
7087 if test "$_qtx" = auto
; then
7088 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
7090 if test "$_qtx" = yes ; then
7091 def_qtx
='#define CONFIG_QTX_CODECS 1'
7092 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
7093 _codecmodules
="qtx $_codecmodules"
7094 darwin || win32 || _qtx_emulation
=yes
7096 def_qtx
='#undef CONFIG_QTX_CODECS'
7097 _nocodecmodules
="qtx $_nocodecmodules"
7101 echocheck
"Nemesi Streaming Media libraries"
7102 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
7104 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
7105 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
7106 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
7110 if test "$_nemesi" = yes; then
7112 def_nemesi
='#define CONFIG_LIBNEMESI 1'
7113 _inputmodules
="nemesi $_inputmodules"
7115 _native_rtsp
="$_network"
7117 def_nemesi
='#undef CONFIG_LIBNEMESI'
7118 _noinputmodules
="nemesi $_noinputmodules"
7122 echocheck
"LIVE555 Streaming Media libraries"
7123 if test "$_live" = auto
&& test "$_network" = yes ; then
7124 cat > $TMPCPP << EOF
7125 #include <liveMedia.hh>
7126 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
7127 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
7129 int main(void) { return 0; }
7133 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
7134 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
7135 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
7136 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
7137 $_livelibdir/groupsock/libgroupsock.a \
7138 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
7139 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
7140 $extra_ldflags -lstdc++" \
7141 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
7142 -I$_livelibdir/UsageEnvironment/include \
7143 -I$_livelibdir/BasicUsageEnvironment/include \
7144 -I$_livelibdir/groupsock/include" && \
7147 if test "$_live" != yes ; then
7148 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
7149 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
7154 if test "$_live" = yes && test "$_network" = yes; then
7155 test $_livelibdir && _res_comment
="using $_livelibdir"
7156 def_live
='#define CONFIG_LIVE555 1'
7157 _inputmodules
="live555 $_inputmodules"
7158 elif test "$_live_dist" = yes && test "$_network" = yes; then
7159 _res_comment
="using distribution version"
7161 def_live
='#define CONFIG_LIVE555 1'
7162 extra_ldflags
="$extra_ldflags $ld_tmp"
7163 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
7164 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
7165 _inputmodules
="live555 $_inputmodules"
7168 def_live
='#undef CONFIG_LIVE555'
7169 _noinputmodules
="live555 $_noinputmodules"
7174 echocheck
"FFmpeg libavutil"
7175 if test "$_libavutil_a" = auto
; then
7176 if test -d libavutil
; then
7178 _res_comment
="static"
7180 die
"MPlayer will not compile without libavutil in the source tree."
7182 elif test "$_libavutil_so" = auto
; then
7185 #include <libavutil/common.h>
7186 int main(void) { av_clip(1, 1, 1); return 0; }
7188 if $_pkg_config --exists libavutil
; then
7189 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
7190 _ld_tmp
=$
($_pkg_config --libs libavutil
)
7191 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7192 && _libavutil_so
=yes
7193 elif cc_check
-lavutil $_ld_lm ; then
7194 extra_ldflags
="$extra_ldflags -lavutil"
7196 _res_comment
="using libavutil.so, but static libavutil is recommended"
7200 def_libavutil
='#undef CONFIG_LIBAVUTIL'
7201 def_libavutil_a
='#undef CONFIG_LIBAVUTIL_A'
7202 def_libavutil_so
='#undef CONFIG_LIBAVUTIL_SO'
7203 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
7204 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
7205 test "$_libavutil_a" = yes && def_libavutil_a
='#define CONFIG_LIBAVUTIL_A 1'
7206 test "$_libavutil_so" = yes && def_libavutil_so
='#define CONFIG_LIBAVUTIL_SO 1'
7207 # neither static nor shared libavutil is available, but it is mandatory ...
7208 if test "$_libavutil" = no
; then
7209 die
"You need static or shared libavutil, MPlayer will not compile without!"
7211 echores
"$_libavutil"
7213 echocheck
"FFmpeg libavcodec"
7214 if test "$_libavcodec_a" = auto
; then
7216 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
7218 _res_comment
="static"
7220 elif test "$_libavcodec_so" = auto
; then
7222 _res_comment
="libavcodec.so is discouraged over static libavcodec"
7224 #include <libavcodec/avcodec.h>
7225 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
7227 if $_pkg_config --exists libavcodec
; then
7228 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
7229 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
7230 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7231 && _libavcodec_so
=yes
7232 elif cc_check
-lavcodec $_ld_lm ; then
7233 extra_ldflags
="$extra_ldflags -lavcodec"
7235 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
7239 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
7240 def_libavcodec_a
='#undef CONFIG_LIBAVCODEC_A'
7241 def_libavcodec_so
='#undef CONFIG_LIBAVCODEC_SO'
7242 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
7243 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
7244 test "$_libavcodec_a" = yes && def_libavcodec_a
='#define CONFIG_LIBAVCODEC_A 1'
7245 test "$_libavcodec_so" = yes && def_libavcodec_so
='#define CONFIG_LIBAVCODEC_SO 1'
7246 test "$_libavcodec_mpegaudio_hp" = yes \
7247 && def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1' \
7248 && mak_libavcodec_mpegaudio_hp
='CONFIG_MPEGAUDIO_HP = yes'
7249 if test "$_libavcodec_a" = yes ; then
7250 _codecmodules
="libavcodec(internal) $_codecmodules"
7251 elif test "$_libavcodec_so" = yes ; then
7252 _codecmodules
="libavcodec.so $_codecmodules"
7254 _nocodecmodules
="libavcodec $_nocodecmodules"
7256 echores
"$_libavcodec"
7258 echocheck
"FFmpeg libavformat"
7259 if test "$_libavformat_a" = auto
; then
7261 if test -d libavformat
&& test -f libavformat
/utils.c
; then
7263 _res_comment
="static"
7265 elif test "$_libavformat_so" = auto
; then
7268 #include <libavformat/avformat.h>
7269 #include <libavcodec/opt.h>
7270 int main(void) { av_alloc_format_context(); return 0; }
7272 if $_pkg_config --exists libavformat
; then
7273 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
7274 _ld_tmp
=$
($_pkg_config --libs libavformat
)
7275 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7276 && _libavformat_so
=yes
7277 elif cc_check
$_ld_lm -lavformat ; then
7278 extra_ldflags
="$extra_ldflags -lavformat"
7280 _res_comment
="using libavformat.so, but static libavformat is recommended"
7284 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
7285 def_libavformat_a
='#undef CONFIG_LIBAVFORMAT_A'
7286 def_libavformat_so
='#undef CONFIG_LIBAVFORMAT_SO'
7287 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
7288 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
7289 test "$_libavformat_a" = yes && def_libavformat_a
='#define CONFIG_LIBAVFORMAT_A 1'
7290 test "$_libavformat_so" = yes \
7291 && def_libavformat_so
='#define CONFIG_LIBAVFORMAT_SO 1'
7292 echores
"$_libavformat"
7294 echocheck
"FFmpeg libpostproc"
7295 if test "$_libpostproc_a" = auto
; then
7297 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
7298 _libpostproc_a
='yes'
7299 _res_comment
="static"
7301 elif test "$_libpostproc_so" = auto
; then
7304 #include <inttypes.h>
7305 #include <libpostproc/postprocess.h>
7306 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
7308 if cc_check
-lpostproc $_ld_lm ; then
7309 extra_ldflags
="$extra_ldflags -lpostproc"
7311 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
7315 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
7316 def_libpostproc_a
='#undef CONFIG_LIBPOSTPROC_A'
7317 def_libpostproc_so
='#undef CONFIG_LIBPOSTPROC_SO'
7318 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
7319 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
7320 test "$_libpostproc_a" = yes && def_libpostproc_a
='#define CONFIG_LIBPOSTPROC_A 1'
7321 test "$_libpostproc_so" = yes \
7322 && def_libpostproc_so
='#define CONFIG_LIBPOSTPROC_SO 1'
7323 echores
"$_libpostproc"
7325 echocheck
"FFmpeg libswscale"
7326 if test "$_libswscale_a" = auto
; then
7328 if test -d libswscale
&& test -f libswscale
/swscale.h
; then
7330 _res_comment
="static"
7332 elif test "$_libswscale_so" = auto
; then
7334 _res_comment
="using libswscale.so, but static libswscale is recommended"
7336 #include <libswscale/swscale.h>
7337 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
7339 if $_pkg_config --exists libswscale
; then
7340 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
7341 _ld_tmp
=$
($_pkg_config --libs libswscale
)
7342 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7343 && _libswscale_so
=yes
7344 elif cc_check
-lswscale ; then
7345 extra_ldflags
="$extra_ldflags -lswscale"
7350 def_libswscale
='#undef CONFIG_LIBSWSCALE'
7351 def_libswscale_a
='#undef CONFIG_LIBSWSCALE_A'
7352 def_libswscale_so
='#undef CONFIG_LIBSWSCALE_SO'
7353 test "$_libswscale_a" = yes ||
test "$_libswscale_so" = yes && _libswscale
=yes
7354 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
7355 test "$_libswscale_a" = yes && def_libswscale_a
='#define CONFIG_LIBSWSCALE_A 1'
7356 test "$_libswscale_so" = yes \
7357 && def_libswscale_so
='#define CONFIG_LIBSWSCALE_SO 1'
7358 echores
"$_libswscale"
7360 echocheck
"libopencore_amr narrowband"
7361 if test "$_libopencore_amrnb" = auto
; then
7362 _libopencore_amrnb
=no
7364 #include <opencore-amrnb/interf_dec.h>
7365 int main(void) { Decoder_Interface_init(); return 0; }
7367 cc_check
-lopencore-amrnb && _libopencore_amrnb
=yes
7368 if test "$_libavcodec_a" != yes ; then
7369 _libopencore_amrnb
=no
7370 _res_comment
="libavcodec (static) is required by libopencore_amrnb, sorry"
7373 if test "$_libopencore_amrnb" = yes ; then
7374 _libopencore_amr
=yes
7375 extra_ldflags
="$extra_ldflags -lopencore-amrnb"
7376 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 1'
7377 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
7378 _libavencoders
="$_libavencoders LIBOPENCORE_AMRNB_ENCODER"
7379 _codecmodules
="libopencore_amrnb $_codecmodules"
7381 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 0'
7382 _nocodecmodules
="libopencore_amrnb $_nocodecmodules"
7384 echores
"$_libopencore_amrnb"
7387 echocheck
"libopencore_amr wideband"
7388 if test "$_libopencore_amrwb" = auto
; then
7389 _libopencore_amrwb
=no
7391 #include <opencore-amrwb/dec_if.h>
7392 int main(void) { D_IF_init(); return 0; }
7394 cc_check
-lopencore-amrwb && _libopencore_amrwb
=yes
7395 if test "$_libavcodec_a" != yes ; then
7396 _libopencore_amrwb
=no
7397 _res_comment
="libavcodec (static) is required by libopencore_amrwb, sorry"
7400 if test "$_libopencore_amrwb" = yes ; then
7401 _libopencore_amr
=yes
7402 extra_ldflags
="$extra_ldflags -lopencore-amrwb"
7403 def_libopencore_amrwb
='#define CONFIG_LIBOPENCORE_AMRWB 1'
7404 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
7405 _libavencoders
="$_libavencoders LIBOPENCORE_AMRWB_DECODER"
7406 _codecmodules
="libopencore_amrwb $_codecmodules"
7408 def_libopencore_amrwb
='#define LIBOPENCORE_AMRWB 0'
7409 _nocodecmodules
="libopencore_amrwb $_nocodecmodules"
7411 echores
"$_libopencore_amrwb"
7413 echocheck
"libdv-0.9.5+"
7414 if test "$_libdv" = auto
; then
7417 #include <libdv/dv.h>
7418 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7420 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7422 if test "$_libdv" = yes ; then
7423 def_libdv
='#define CONFIG_LIBDV095 1'
7424 extra_ldflags
="$extra_ldflags -ldv"
7425 _codecmodules
="libdv $_codecmodules"
7427 def_libdv
='#undef CONFIG_LIBDV095'
7428 _nocodecmodules
="libdv $_nocodecmodules"
7434 if test "$_xvid" = auto
; then
7438 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7440 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7441 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7445 if test "$_xvid" = yes ; then
7446 def_xvid
='#define CONFIG_XVID4 1'
7447 _codecmodules
="xvid $_codecmodules"
7449 def_xvid
='#undef CONFIG_XVID4'
7450 _nocodecmodules
="xvid $_nocodecmodules"
7454 echocheck
"Xvid two pass plugin"
7455 if test "$_xvid" = yes && test "$_xvid_lavc" = auto
; then
7458 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
7460 cc_check
&& _xvid_lavc
=yes
7462 if test "$_xvid_lavc" = yes ; then
7463 def_xvid_lavc
='#define CONFIG_LIBXVID 1'
7464 _libavencoders
="$_libavencoders LIBXVID_ENCODER"
7467 def_xvid_lavc
='#define CONFIG_LIBXVID 0'
7469 echores
"$_xvid_lavc"
7473 if test "$_x264" = auto
; then
7475 #include <inttypes.h>
7478 #error We do not support old versions of x264. Get the latest from git.
7480 int main(void) { x264_encoder_open((void*)0); return 0; }
7483 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7484 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7488 if test "$_x264" = yes ; then
7489 def_x264
='#define CONFIG_X264 1'
7490 _codecmodules
="x264 $_codecmodules"
7491 test "$_x264_lavc" = auto
&& _x264_lavc
=yes
7492 if test "$_x264_lavc" = yes ; then
7493 def_x264_lavc
='#define CONFIG_LIBX264 1'
7494 libs_mplayer
="$libs_mplayer $_ld_x264"
7495 _libavencoders
="$_libavencoders LIBX264_ENCODER"
7499 def_x264
='#undef CONFIG_X264'
7500 def_x264_lavc
='#define CONFIG_LIBX264 0'
7501 _nocodecmodules
="x264 $_nocodecmodules"
7503 _res_comment
="in libavcodec: $_x264_lavc"
7507 echocheck
"libdirac"
7508 if test "$_libdirac_lavc" = auto
; then
7510 if test "$_libavcodec_a" != yes; then
7511 _res_comment
="libavcodec (static) is required by libdirac, sorry"
7514 #include <libdirac_encoder/dirac_encoder.h>
7515 #include <libdirac_decoder/dirac_parser.h>
7518 dirac_encoder_context_t enc_ctx;
7519 dirac_decoder_t *dec_handle;
7520 dirac_encoder_context_init(&enc_ctx, VIDEO_FORMAT_SD_576I50);
7521 dec_handle = dirac_decoder_init(0);
7523 dirac_decoder_close(dec_handle);
7527 if $_pkg_config --exists dirac
; then
7528 _inc_dirac
=$
($_pkg_config --silence-errors --cflags dirac
)
7529 _ld_dirac
=$
($_pkg_config --silence-errors --libs dirac
)
7530 cc_check
$_inc_dirac $_ld_dirac &&
7531 _libdirac_lavc
=yes &&
7532 extra_cflags
="$extra_cflags $_inc_dirac" &&
7533 extra_ldflags
="$extra_ldflags $_ld_dirac"
7537 if test "$_libdirac_lavc" = yes ; then
7538 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 1'
7539 _libavencoders
="$_libavencoders LIBDIRAC_ENCODER"
7540 _libavdecoders
="$_libavdecoders LIBDIRAC_DECODER"
7541 _codecmodules
="libdirac $_codecmodules"
7543 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 0'
7544 _nocodecmodules
="libdirac $_nocodecmodules"
7546 echores
"$_libdirac_lavc"
7549 echocheck
"libschroedinger"
7550 if test "$_libschroedinger_lavc" = auto
; then
7551 _libschroedinger_lavc
=no
7552 if test "$_libavcodec_a" != yes; then
7553 _res_comment
="libavcodec (static) is required by libschroedinger, sorry"
7556 #include <schroedinger/schro.h>
7557 int main(void) { schro_init(); return 0; }
7559 if $_pkg_config --exists schroedinger-1.0
; then
7560 _inc_schroedinger
=$
($_pkg_config --silence-errors --cflags schroedinger-1.0
)
7561 _ld_schroedinger
=$
($_pkg_config --silence-errors --libs schroedinger-1.0
)
7562 cc_check
$_inc_schroedinger $_ld_schroedinger &&
7563 _libschroedinger_lavc
=yes &&
7564 extra_cflags
="$extra_cflags $_inc_schroedinger" &&
7565 extra_ldflags
="$extra_ldflags $_ld_schroedinger"
7569 if test "$_libschroedinger_lavc" = yes ; then
7570 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 1'
7571 _libavencoders
="$_libavencoders LIBSCHROEDINGER_ENCODER"
7572 _libavdecoders
="$_libavdecoders LIBSCHROEDINGER_DECODER"
7573 _codecmodules
="libschroedinger $_codecmodules"
7575 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 0'
7576 _nocodecmodules
="libschroedinger $_nocodecmodules"
7578 echores
"$_libschroedinger_lavc"
7581 if test "$_libnut" = auto
; then
7585 #include <inttypes.h>
7587 nut_context_tt * nut;
7588 int main(void) { (void)nut_error(0); return 0; }
7591 cc_check
-lnut && _libnut
=yes
7594 if test "$_libnut" = yes ; then
7595 def_libnut
='#define CONFIG_LIBNUT 1'
7596 extra_ldflags
="$extra_ldflags -lnut"
7598 def_libnut
='#undef CONFIG_LIBNUT'
7602 #check must be done after libavcodec one
7604 if test "$_zr" = auto
; then
7605 #36067's seem to identify themselves as 36057PQC's, so the line
7606 #below should work for 36067's and 36057's.
7607 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7613 if test "$_zr" = yes ; then
7614 if test "$_libavcodec_a" = yes ; then
7615 def_zr
='#define CONFIG_ZR 1'
7616 _vomodules
="zr zr2 $_vomodules"
7618 _res_comment
="libavcodec (static) is required by zr, sorry"
7619 _novomodules
="zr $_novomodules"
7620 def_zr
='#undef CONFIG_ZR'
7623 def_zr
='#undef CONFIG_ZR'
7624 _novomodules
="zr zr2 $_novomodules"
7628 # mencoder requires (optional) those libs: libmp3lame
7629 if test "$_mencoder" != no
; then
7631 echocheck
"libmp3lame"
7632 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7633 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7634 if test "$_mp3lame" = auto
; then
7637 #include <lame/lame.h>
7638 int main(void) { lame_version_t lv; (void) lame_init();
7639 get_lame_version_numerical(&lv);
7642 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7644 if test "$_mp3lame" = yes ; then
7645 def_mp3lame
="#define CONFIG_MP3LAME 1"
7646 _ld_mp3lame
=-lmp3lame
7647 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7649 #include <lame/lame.h>
7650 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7652 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7654 #include <lame/lame.h>
7655 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7657 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7658 test "$_mp3lame_lavc" = auto
&& _mp3lame_lavc
=yes
7659 if test "$_mp3lame_lavc" = yes ; then
7660 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 1"
7661 _libavencoders
="$_libavencoders LIBMP3LAME_ENCODER"
7662 libs_mplayer
="$libs_mplayer $_ld_mp3lame"
7666 def_mp3lame
='#undef CONFIG_MP3LAME'
7667 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 0"
7669 _res_comment
="in libavcodec: $_mp3lame_lavc"
7672 fi # test "$_mencoder" != no
7674 echocheck
"mencoder"
7675 if test "$_mencoder" = yes ; then
7676 def_muxers
='#define CONFIG_MUXERS 1'
7678 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint, png for vf_screenshot
7679 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
7680 test "$_zlib" = yes && _libavencoders
="$_libavencoders PNG_ENCODER"
7682 def_muxers
='#define CONFIG_MUXERS 0'
7684 echores
"$_mencoder"
7687 echocheck
"UnRAR executable"
7688 if test "$_unrar_exec" = auto
; then
7690 mingw32
&& _unrar_exec
="no"
7692 if test "$_unrar_exec" = yes ; then
7693 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7695 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7697 echores
"$_unrar_exec"
7699 echocheck
"TV interface"
7700 if test "$_tv" = yes ; then
7701 def_tv
='#define CONFIG_TV 1'
7702 _inputmodules
="tv $_inputmodules"
7704 _noinputmodules
="tv $_noinputmodules"
7705 def_tv
='#undef CONFIG_TV'
7710 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7711 echocheck
"*BSD BT848 bt8xx header"
7713 for file in "machine/ioctl_bt848.h" \
7714 "dev/bktr/ioctl_bt848.h" \
7715 "dev/video/bktr/ioctl_bt848.h" \
7716 "dev/ic/bt8xx.h" ; do
7718 #include <sys/types.h>
7719 #include <sys/ioctl.h>
7721 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7725 _ioctl_bt848_h_name
="$file"
7729 if test "$_ioctl_bt848_h" = yes ; then
7730 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7731 _res_comment
="using $_ioctl_bt848_h_name"
7733 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7735 echores
"$_ioctl_bt848_h"
7737 echocheck
"*BSD ioctl_meteor.h"
7739 for file in "machine/ioctl_meteor.h" \
7740 "dev/bktr/ioctl_meteor.h" \
7741 "dev/video/bktr/ioctl_meteor.h" ; do
7743 #include <sys/types.h>
7745 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7749 _ioctl_meteor_h_name
="$file"
7753 if test "$_ioctl_meteor_h" = yes ; then
7754 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7755 _res_comment
="using $_ioctl_meteor_h_name"
7757 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7759 echores
"$_ioctl_meteor_h"
7761 echocheck
"*BSD BrookTree 848 TV interface"
7762 if test "$_tv_bsdbt848" = auto
; then
7764 if test "$_tv" = yes ; then
7766 #include <sys/types.h>
7767 $def_ioctl_meteor_h_name
7768 $def_ioctl_bt848_h_name
7769 #ifdef IOCTL_METEOR_H_NAME
7770 #include IOCTL_METEOR_H_NAME
7772 #ifdef IOCTL_BT848_H_NAME
7773 #include IOCTL_BT848_H_NAME
7776 ioctl(0, METEORSINPUT, 0);
7777 ioctl(0, TVTUNER_GETFREQ, 0);
7781 cc_check
&& _tv_bsdbt848
=yes
7784 if test "$_tv_bsdbt848" = yes ; then
7785 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7786 _inputmodules
="tv-bsdbt848 $_inputmodules"
7788 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7789 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7791 echores
"$_tv_bsdbt848"
7792 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7795 echocheck
"DirectShow TV interface"
7796 if test "$_tv_dshow" = auto
; then
7798 if test "$_tv" = yes && win32
; then
7803 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7807 cc_check
-lole32 -luuid && _tv_dshow
=yes
7810 if test "$_tv_dshow" = yes ; then
7811 _inputmodules
="tv-dshow $_inputmodules"
7812 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7813 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7815 _noinputmodules
="tv-dshow $_noinputmodules"
7816 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7818 echores
"$_tv_dshow"
7821 echocheck
"Video 4 Linux TV interface"
7822 if test "$_tv_v4l1" = auto
; then
7824 if test "$_tv" = yes && linux
; then
7827 #include <linux/videodev.h>
7828 int main(void) { return 0; }
7830 cc_check
&& _tv_v4l1
=yes
7833 if test "$_tv_v4l1" = yes ; then
7836 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7837 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7838 _inputmodules
="tv-v4l $_inputmodules"
7840 _noinputmodules
="tv-v4l1 $_noinputmodules"
7841 def_tv_v4l
='#undef CONFIG_TV_V4L'
7846 echocheck
"Video 4 Linux 2 TV interface"
7847 if test "$_tv_v4l2" = auto
; then
7849 if test "$_tv" = yes && linux
; then
7852 #include <linux/types.h>
7853 #include <linux/videodev2.h>
7854 int main(void) { return 0; }
7856 cc_check
&& _tv_v4l2
=yes
7859 if test "$_tv_v4l2" = yes ; then
7862 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7863 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7864 _inputmodules
="tv-v4l2 $_inputmodules"
7866 _noinputmodules
="tv-v4l2 $_noinputmodules"
7867 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7872 echocheck
"Radio interface"
7873 if test "$_radio" = yes ; then
7874 def_radio
='#define CONFIG_RADIO 1'
7875 _inputmodules
="radio $_inputmodules"
7876 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7879 if test "$_radio_capture" = yes ; then
7881 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7883 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7886 _noinputmodules
="radio $_noinputmodules"
7887 def_radio
='#undef CONFIG_RADIO'
7888 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7892 echocheck
"Capture for Radio interface"
7893 echores
"$_radio_capture"
7895 echocheck
"Video 4 Linux 2 Radio interface"
7896 if test "$_radio_v4l2" = auto
; then
7898 if test "$_radio" = yes && linux
; then
7901 #include <linux/types.h>
7902 #include <linux/videodev2.h>
7903 int main(void) { return 0; }
7905 cc_check
&& _radio_v4l2
=yes
7908 if test "$_radio_v4l2" = yes ; then
7909 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7911 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7913 echores
"$_radio_v4l2"
7915 echocheck
"Video 4 Linux Radio interface"
7916 if test "$_radio_v4l" = auto
; then
7918 if test "$_radio" = yes && linux
; then
7921 #include <linux/videodev.h>
7922 int main(void) { return 0; }
7924 cc_check
&& _radio_v4l
=yes
7927 if test "$_radio_v4l" = yes ; then
7928 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7930 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7932 echores
"$_radio_v4l"
7934 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7935 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7936 echocheck
"*BSD BrookTree 848 Radio interface"
7939 #include <sys/types.h>
7940 $def_ioctl_bt848_h_name
7941 #ifdef IOCTL_BT848_H_NAME
7942 #include IOCTL_BT848_H_NAME
7944 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7946 cc_check
&& _radio_bsdbt848
=yes
7947 echores
"$_radio_bsdbt848"
7948 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7950 if test "$_radio_bsdbt848" = yes ; then
7951 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7953 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7956 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7957 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7958 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7961 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7962 if test "$_pvr" = auto
; then
7964 if test "$_tv_v4l2" = yes && linux
; then
7967 #include <inttypes.h>
7968 #include <linux/types.h>
7969 #include <linux/videodev2.h>
7970 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7972 cc_check
&& _pvr
=yes
7975 if test "$_pvr" = yes ; then
7976 def_pvr
='#define CONFIG_PVR 1'
7977 _inputmodules
="pvr $_inputmodules"
7979 _noinputmodules
="pvr $_noinputmodules"
7980 def_pvr
='#undef CONFIG_PVR'
7986 if ! beos
&& test "$_ftp" = yes ; then
7987 def_ftp
='#define CONFIG_FTP 1'
7988 _inputmodules
="ftp $_inputmodules"
7990 _noinputmodules
="ftp $_noinputmodules"
7991 def_ftp
='#undef CONFIG_FTP'
7995 echocheck
"vstream client"
7996 if test "$_vstream" = auto
; then
7999 #include <vstream-client.h>
8000 void vstream_error(const char *format, ... ) {}
8001 int main(void) { vstream_start(); return 0; }
8003 cc_check
-lvstream-client && _vstream
=yes
8005 if test "$_vstream" = yes ; then
8006 def_vstream
='#define CONFIG_VSTREAM 1'
8007 _inputmodules
="vstream $_inputmodules"
8008 extra_ldflags
="$extra_ldflags -lvstream-client"
8010 _noinputmodules
="vstream $_noinputmodules"
8011 def_vstream
='#undef CONFIG_VSTREAM'
8016 echocheck
"OSD menu"
8017 if test "$_menu" = yes ; then
8018 def_menu
='#define CONFIG_MENU 1'
8019 test $_dvbin = "yes" && _menu_dvbin
=yes
8021 def_menu
='#undef CONFIG_MENU'
8027 echocheck
"Subtitles sorting"
8028 if test "$_sortsub" = yes ; then
8029 def_sortsub
='#define CONFIG_SORTSUB 1'
8031 def_sortsub
='#undef CONFIG_SORTSUB'
8036 echocheck
"XMMS inputplugin support"
8037 if test "$_xmms" = yes ; then
8038 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
8039 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
8040 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
8042 _xmmsplugindir
=/usr
/lib
/xmms
/Input
8043 _xmmslibdir
=/usr
/lib
8046 def_xmms
='#define CONFIG_XMMS 1'
8048 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
8050 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
8053 def_xmms
='#undef CONFIG_XMMS'
8058 # --------------- GUI specific tests begin -------------------
8061 if test "$_gui" = yes ; then
8063 # Required libraries
8064 if test "$_libavcodec" != yes ||
8065 ! echo $_libavdecoders |
grep -q PNG_DECODER
; then
8066 die
"The GUI requires libavcodec with PNG support (needs zlib)."
8068 test "$_freetype" = no
&& test "$_bitmap_font" = no
&& \
8069 die
"The GUI requires either FreeType or bitmap font support."
8072 test "$_x11" != yes && die
"X11 support required for GUI compilation."
8074 echocheck
"XShape extension"
8075 if test "$_xshape" = auto
; then
8078 #include <X11/Xlib.h>
8079 #include <X11/Xproto.h>
8080 #include <X11/Xutil.h>
8081 #include <X11/extensions/shape.h>
8084 char *name = ":0.0";
8087 int eventbase, errorbase;
8088 if (getenv("DISPLAY"))
8089 name=getenv("DISPLAY");
8090 wsDisplay=XOpenDisplay(name);
8091 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
8093 XCloseDisplay(wsDisplay);
8097 cc_check
-lXext && _xshape
=yes
8099 if test "$_xshape" = yes ; then
8100 def_xshape
='#define CONFIG_XSHAPE 1'
8102 die
"The GUI requires the X11 extension XShape (which was not found)."
8107 if test "$_gtk1" = no
; then
8109 echocheck
"GTK+ version"
8111 if $_pkg_config gtk
+-2.0
--exists ; then
8112 _gtk
=$
($_pkg_config gtk
+-2.0
--modversion 2>/dev
/null
)
8113 extra_cflags
="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)"
8114 libs_mplayer
="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)"
8118 if $_pkg_config glib-2.0
--exists ; then
8119 echocheck
"glib version"
8120 _glib
=$
($_pkg_config glib-2.0
--modversion 2>/dev
/null
)
8121 libs_mplayer
="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)"
8124 def_gui
='#define CONFIG_GUI 1'
8125 def_gtk2
='#define CONFIG_GTK2 1'
8128 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
8131 echo "GTK-2 devel packages were not found, trying GTK 1.2"
8136 if test "$_gtk1" = yes ; then
8137 # Check for old GTK (1.2.x)
8138 echocheck
"GTK version"
8139 if test -z "$_gtkconfig" ; then
8140 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
8141 _gtkconfig
="gtk-config"
8142 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
8143 _gtkconfig
="gtk12-config"
8145 die
"The GUI requires GTK devel packages (which were not found)."
8148 _gtk
=$
($_gtkconfig --version 2>&1)
8149 extra_cflags
="$extra_cflags $($_gtkconfig --cflags 2>&1)"
8150 libs_mplayer
="$libs_mplayer $($_gtkconfig --libs 2>&1)"
8151 echores
"$_gtk (using $_gtkconfig)"
8154 echocheck
"glib version"
8155 if test -z "$_glibconfig" ; then
8156 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
8157 _glibconfig
="glib-config"
8158 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
8159 _glibconfig
="glib12-config"
8161 die
"The GUI requires GLIB devel packages (which were not found)"
8164 _glib
=$
($_glibconfig --version 2>&1)
8165 libs_mplayer
="$libs_mplayer $($_glibconfig --libs 2>&1)"
8166 echores
"$_glib (using $_glibconfig)"
8168 def_gui
='#define CONFIG_GUI 1'
8169 def_gtk2
='#undef CONFIG_GTK2'
8174 libs_mplayer
="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
8175 def_gui
='#define CONFIG_GUI 1'
8176 def_gtk2
='#undef CONFIG_GTK2'
8179 else #if test "$_gui"
8180 def_gui
='#undef CONFIG_GUI'
8181 def_gtk2
='#undef CONFIG_GTK2'
8183 # --------------- GUI specific tests end -------------------
8186 if test "$_charset" != "noconv" ; then
8187 def_charset
="#define MSG_CHARSET \"$_charset\""
8189 def_charset
="#undef MSG_CHARSET"
8193 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
8194 echocheck
"iconv program"
8195 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
8196 if test "$?" -ne 0 ; then
8198 echo "No working iconv program found, use "
8199 echo "--charset=UTF-8 to continue anyway."
8200 echo "If you also have problems with iconv library functions use --charset=noconv."
8201 echo "Messages in the GTK-2 interface will be broken then."
8208 #############################################################################
8210 echocheck
"automatic gdb attach"
8211 if test "$_crash_debug" = yes ; then
8212 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
8214 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
8217 echores
"$_crash_debug"
8219 echocheck
"compiler support for noexecstack"
8221 int main(void) { return 0; }
8223 if cc_check
-Wl,-z,noexecstack
; then
8224 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
8230 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
8231 if cc_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
8232 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
8239 # Dynamic linking flags
8240 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
8242 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
8243 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
8244 _ld_dl_dynamic
='-rdynamic'
8247 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
8248 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
8249 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
8251 def_debug
='#undef MP_DEBUG'
8252 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
8255 echocheck
"joystick"
8256 def_joystick
='#undef CONFIG_JOYSTICK'
8257 if test "$_joystick" = yes ; then
8259 # TODO add some check
8260 def_joystick
='#define CONFIG_JOYSTICK 1'
8263 _res_comment
="unsupported under $system_name"
8266 echores
"$_joystick"
8269 if test "$_lirc" = auto
; then
8272 #include <lirc/lirc_client.h>
8273 int main(void) { return 0; }
8275 cc_check
-llirc_client && _lirc
=yes
8277 if test "$_lirc" = yes ; then
8278 def_lirc
='#define CONFIG_LIRC 1'
8279 libs_mplayer
="$libs_mplayer -llirc_client"
8281 def_lirc
='#undef CONFIG_LIRC'
8286 if test "$_lircc" = auto
; then
8289 #include <lirc/lircc.h>
8290 int main(void) { return 0; }
8292 cc_check
-llircc && _lircc
=yes
8294 if test "$_lircc" = yes ; then
8295 def_lircc
='#define CONFIG_LIRCC 1'
8296 libs_mplayer
="$libs_mplayer -llircc"
8298 def_lircc
='#undef CONFIG_LIRCC'
8303 # Detect maemo development platform libraries availability (http://www.maemo.org),
8304 # they are used when run on Nokia 770|8x0
8305 echocheck
"maemo (Nokia 770|8x0)"
8306 if test "$_maemo" = auto
; then
8309 #include <libosso.h>
8310 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
8312 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
8314 if test "$_maemo" = yes ; then
8315 def_maemo
='#define CONFIG_MAEMO 1'
8316 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
8317 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
8319 def_maemo
='#undef CONFIG_MAEMO'
8324 #############################################################################
8326 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
8327 # the OMF format needs to come after the 'extern symbol prefix' check, which
8330 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
8333 # linker paths should be the same for mencoder and mplayer
8335 for I
in $libs_mplayer ; do
8336 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
8337 if test -z "$_tmp" ; then
8338 extra_ldflags
="$extra_ldflags $I"
8340 _ld_tmp
="$_ld_tmp $I"
8343 libs_mplayer
=$_ld_tmp
8346 #############################################################################
8347 # 64 bit file offsets?
8348 if test "$_largefiles" = yes || freebsd
; then
8349 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8350 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
8351 # dvdread support requires this (for off64_t)
8352 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
8356 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
8358 # This must be the last test to be performed. Any other tests following it
8359 # could fail due to linker errors. libdvdnavmini is intentionally not linked
8360 # against libdvdread (to permit MPlayer to use its own copy of the library).
8361 # So any compilation using the flags added here but not linking against
8362 # libdvdread can fail.
8363 echocheck
"DVD support (libdvdnav)"
8365 if test "$_dvdnav" = auto
; then
8366 if test "$_dvdread_internal" = yes ; then
8369 _res_comment
="internal"
8371 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
8374 if test "$_dvdnav" = auto
; then
8376 #include <inttypes.h>
8377 #include <dvdnav/dvdnav.h>
8378 int main(void) { dvdnav_t *dvd=0; return 0; }
8381 _dvdnavdir
=$
($_dvdnavconfig --cflags)
8382 _dvdnavlibs
=$
($_dvdnavconfig --libs)
8383 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
8385 if test "$_dvdnav" = yes ; then
8387 def_dvdnav
='#define CONFIG_DVDNAV 1'
8388 if test "$dvdnav_internal" = yes ; then
8389 cflags_libdvdnav
="-Ilibdvdnav"
8390 _inputmodules
="dvdnav(internal) $_inputmodules"
8392 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
8393 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
8394 _inputmodules
="dvdnav $_inputmodules"
8397 def_dvdnav
='#undef CONFIG_DVDNAV'
8398 _noinputmodules
="dvdnav $_noinputmodules"
8402 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
8403 # Read dvdnav comment above.
8406 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8407 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8409 for part
in $list; do
8410 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8411 echo "${nprefix}_$part = yes"
8416 #############################################################################
8417 echo "Creating config.mak"
8418 cat > config.mak
<< EOF
8419 # -------- Generated by configure -----------
8421 # Ensure that locale settings do not interfere with shell commands.
8424 CONFIGURATION = $_configuration
8427 DOC_LANGS = $language_doc
8428 DOC_LANG_ALL = $doc_lang_all
8429 MAN_LANGS = $language_man
8430 MAN_LANG_ALL = $man_lang_all
8432 prefix = \$(DESTDIR)$_prefix
8433 BINDIR = \$(DESTDIR)$_bindir
8434 DATADIR = \$(DESTDIR)$_datadir
8435 LIBDIR = \$(DESTDIR)$_libdir
8436 MANDIR = \$(DESTDIR)$_mandir
8437 CONFDIR = \$(DESTDIR)$_confdir
8445 INSTALLSTRIP = $_install_strip
8448 CFLAGS = $CFLAGS $extra_cflags
8449 ASFLAGS = \$(CFLAGS)
8450 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
8452 CFLAGS_DHAHELPER = $cflags_dhahelper
8453 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
8454 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
8455 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
8456 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
8457 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
8458 CFLAGS_STACKREALIGN = $cflags_stackrealign
8459 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
8460 CFLAGS_TREMOR_LOW = $cflags_tremor_low
8462 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
8463 EXTRALIBS_MPLAYER = $libs_mplayer
8464 EXTRALIBS_MENCODER = $libs_mencoder
8467 HELP_FILE = $_mp_help
8474 $(mak_enable "$arch_all" "$arch" ARCH)
8475 $(mak_enable "$subarch_all" "$subarch" ARCH)
8476 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
8478 MENCODER = $_mencoder
8481 NEED_GETTIMEOFDAY = $_need_gettimeofday
8482 NEED_GLOB = $_need_glob
8483 NEED_MMAP = $_need_mmap
8484 NEED_SETENV = $_need_setenv
8485 NEED_SHMEM = $_need_shmem
8486 NEED_STRSEP = $_need_strsep
8487 NEED_SWAB = $_need_swab
8488 NEED_VSSCANF = $_need_vsscanf
8496 APPLE_IR = $_apple_ir
8497 APPLE_REMOTE = $_apple_remote
8499 AUDIO_INPUT = $_audio_input
8500 BITMAP_FONT = $_bitmap_font
8505 COREAUDIO = $_coreaudio
8506 COREVIDEO = $_corevideo
8510 DIRECT3D = $_direct3d
8511 DIRECTFB = $_directfb
8515 DVDNAV_INTERNAL = $dvdnav_internal
8517 DVDREAD_INTERNAL = $_dvdread_internal
8523 FAAD_INTERNAL = $_faad_internal
8524 FASTMEMCPY = $_fastmemcpy
8526 FREETYPE = $_freetype
8531 GL_WIN32 = $_gl_win32
8533 MATRIXVIEW = $matrixview
8536 GUI_WIN32 = $_gui_win32
8537 HAVE_POSIX_SELECT = $_posix_select
8538 HAVE_SYS_MMAN_H = $_mman
8541 JOYSTICK = $_joystick
8547 LIBA52_INTERNAL = $_liba52_internal
8549 LIBASS_INTERNAL = $ass_internal
8553 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
8557 LIBMENU_DVBIN = $_menu_dvbin
8558 LIBMPEG2 = $_libmpeg2
8559 LIBNEMESI = $_nemesi
8561 LIBSMBCLIENT = $_smb
8562 LIBTHEORA = $_theora
8565 MACOSX_FINDER = $_macosx_finder
8571 MUSEPACK = $_musepack
8573 NATIVE_RTSP = $_native_rtsp
8577 PE_EXECUTABLE = $_pe_executable
8580 PRIORITY = $_priority
8584 QTX_CODECS_WIN32 = $_qtx_codecs_win32
8585 QTX_EMULATION = $_qtx_emulation
8588 RADIO_CAPTURE=$_radio_capture
8589 REAL_CODECS = $_real
8593 STREAM_CACHE = $_stream_cache
8594 SGIAUDIO = $_sgiaudio
8595 SUNAUDIO = $_sunaudio
8601 TREMOR_INTERNAL = $_tremor_internal
8603 TV_BSDBT848 = $_tv_bsdbt848
8604 TV_DSHOW = $_tv_dshow
8609 UNRAR_EXEC = $_unrar_exec
8615 VIDIX_PCIDB = $_vidix_pcidb_val
8616 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
8617 VIDIX_IVTV=$_vidix_drv_ivtv
8618 VIDIX_MACH64=$_vidix_drv_mach64
8619 VIDIX_MGA=$_vidix_drv_mga
8620 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
8621 VIDIX_NVIDIA=$_vidix_drv_nvidia
8622 VIDIX_PM2=$_vidix_drv_pm2
8623 VIDIX_PM3=$_vidix_drv_pm3
8624 VIDIX_RADEON=$_vidix_drv_radeon
8625 VIDIX_RAGE128=$_vidix_drv_rage128
8626 VIDIX_S3=$_vidix_drv_s3
8627 VIDIX_SH_VEU=$_vidix_drv_sh_veu
8628 VIDIX_SIS=$_vidix_drv_sis
8629 VIDIX_UNICHROME=$_vidix_drv_unichrome
8633 WIN32DLL = $_win32dll
8634 WIN32WAVEOUT = $_win32waveout
8635 WIN32_EMULATION = $_win32_emulation
8636 WINVIDIX = $winvidix
8639 XANIM_CODECS = $_xanim
8641 XMMS_PLUGINS = $_xmms
8647 YUV4MPEG = $_yuv4mpeg
8651 LIBAVUTIL = $_libavutil
8652 LIBAVUTIL_A = $_libavutil_a
8653 LIBAVUTIL_SO = $_libavutil_so
8654 LIBAVCODEC = $_libavcodec
8655 LIBAVCODEC_A = $_libavcodec_a
8656 LIBAVCODEC_SO = $_libavcodec_so
8657 LIBAVFORMAT = $_libavformat
8658 LIBAVFORMAT_A = $_libavformat_a
8659 LIBAVFORMAT_SO = $_libavformat_so
8660 LIBPOSTPROC = $_libpostproc
8661 LIBPOSTPROC_A = $_libpostproc_a
8662 LIBPOSTPROC_SO = $_libpostproc_so
8663 LIBSWSCALE = $_libswscale
8664 LIBSWSCALE_A = $_libswscale_a
8665 LIBSWSCALE_SO = $_libswscale_so
8667 HOSTCC = \$(HOST_CC)
8668 HOSTCFLAGS = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3
8674 YASMFLAGS = $YASMFLAGS
8681 LIBNAME = \$(LIBPREF)\$(NAME)\$(LIBSUF)
8682 FULLNAME = \$(NAME)\$(BUILDSUF)
8684 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8690 CONFIG_H264DSP = yes
8696 $mak_hardcoded_tables
8697 $mak_libavcodec_mpegaudio_hp
8698 !CONFIG_LIBRTMP = yes
8700 CONFIG_BZLIB = $bzlib
8701 CONFIG_ENCODERS = yes
8703 CONFIG_LIBDIRAC_DECODER = $_libdirac_lavc
8704 CONFIG_LIBDIRAC_ENCODER = $_libdirac_lavc
8705 CONFIG_LIBFAAC_ENCODER = $_faac_lavc
8706 CONFIG_LIBMP3LAME_ENCODER = $_mp3lame_lavc
8707 CONFIG_LIBOPENCORE_AMRNB_DECODER = $_libopencore_amrnb
8708 CONFIG_LIBOPENCORE_AMRNB_ENCODER = $_libopencore_amrnb
8709 CONFIG_LIBOPENCORE_AMRWB_DECODER = $_libopencore_amrwb
8710 OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
8711 OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
8712 CONFIG_LIBSCHROEDINGER_DECODER = $_libschroedinger_lavc
8713 CONFIG_LIBSCHROEDINGER_ENCODER = $_libschroedinger_lavc
8714 CONFIG_LIBVORBIS_ENCODER = $_libvorbis
8715 CONFIG_LIBX264_ENCODER = $_x264_lavc
8716 CONFIG_LIBXVID_ENCODER = $_xvid_lavc
8717 CONFIG_MLIB = $_mlib
8718 CONFIG_MUXERS = $_mencoder
8719 CONFIG_POSTPROC = yes
8720 CONFIG_VDPAU = $_vdpau
8721 CONFIG_XVMC = $_xvmc
8722 CONFIG_ZLIB = $_zlib
8724 HAVE_PTHREADS = $_pthreads
8726 HAVE_W32THREADS = $_w32threads
8727 HAVE_YASM = $have_yasm
8729 $(echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8730 $(echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8731 $(echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8732 $(echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8733 $(echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8734 $(echo $_libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8735 $(echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8736 $(echo $_libavhwaccels | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8739 #############################################################################
8741 ff_config_enable
() {
8742 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8743 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8745 test -z "$_nprefix" && _nprefix
='CONFIG'
8746 for part
in $list; do
8747 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8748 echo "#define ${_nprefix}_$part 1"
8750 echo "#define ${_nprefix}_$part 0"
8755 echo "Creating config.h"
8757 /*----------------------------------------------------------------------------
8758 ** This file has been automatically generated by configure any changes in it
8759 ** will be lost when you run configure again.
8760 ** Instead of modifying definitions here, use the --enable/--disable options
8761 ** of the configure script! See ./configure --help for details.
8762 *---------------------------------------------------------------------------*/
8764 #ifndef MPLAYER_CONFIG_H
8765 #define MPLAYER_CONFIG_H
8767 /* Undefine this if you do not want to select mono audio (left or right)
8768 with a stereo MPEG layer 2/3 audio stream. The command line option
8769 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8770 right-only), with 0 being the default.
8772 #define CONFIG_FAKE_MONO 1
8774 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
8775 #define MAX_OUTBURST 65536
8777 /* set up audio OUTBURST. Do not change this! */
8778 #define OUTBURST 512
8780 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8782 #undef FAST_OSD_TABLE
8784 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8785 #define MPEG12_POSTPROC 1
8786 #define ATTRIBUTE_ALIGNED_MAX 16
8790 #define CONFIGURATION "$_configuration"
8792 #define MPLAYER_DATADIR "$_datadir"
8793 #define MPLAYER_CONFDIR "$_confdir"
8794 #define MPLAYER_LIBDIR "$_libdir"
8796 /* definitions needed by included libraries */
8797 #define HAVE_INTTYPES_H 1
8798 /* libmpeg2 + FFmpeg */
8801 #define HAVE_ERRNO_H 1
8802 /* libdvdcss + libdvdread */
8803 #define HAVE_LIMITS_H 1
8804 /* libdvdcss + libfaad2 */
8805 #define HAVE_UNISTD_H 1
8806 /* libfaad2 + libdvdread */
8807 #define STDC_HEADERS 1
8808 #define HAVE_MEMCPY 1
8810 #define HAVE_STRING_H 1
8811 #define HAVE_STRINGS_H 1
8812 #define HAVE_SYS_STAT_H 1
8813 #define HAVE_SYS_TYPES_H 1
8815 #define READ_CACHE_TRACE 0
8817 #define HAVE_DLFCN_H 1
8821 /* system headers */
8823 $def_alsa_asoundlib_h
8827 $def_mman_has_map_failed
8829 $def_sys_asoundlib_h
8830 $def_sys_soundcard_h
8837 /* system functions */
8860 /* system-specific features */
8875 $def_restrict_keyword
8880 /* configurable options */
8884 $def_dynamic_plugins
8887 $def_runtime_cpudetection
8895 #define __CPU__ $iproc
8898 $(ff_config_enable "$arch_all" "$arch" "ARCH")
8899 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
8900 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
8904 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8905 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8925 /* codec libraries */
8930 $def_liba52_internal
8938 $def_mp3lame_preset_medium
8962 #define BINARY_CODECS_PATH "$_codecsdir"
8963 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8972 /* Audio output drivers */
8988 $def_ossaudio_devdsp
8989 $def_ossaudio_devmixer
9002 $def_ioctl_bt848_h_name
9003 $def_ioctl_meteor_h_name
9042 $def_struct_ipv6_mreq
9043 $def_struct_sockaddr_in6
9044 $def_struct_sockaddr_sa_len
9048 $def_sockaddr_storage
9063 $def_directfb_version
9099 $def_vidix_drv_cyberblade
9101 $def_vidix_drv_mach64
9103 $def_vidix_drv_mga_crtc2
9104 $def_vidix_drv_nvidia
9106 $def_vidix_drv_radeon
9107 $def_vidix_drv_rage128
9109 $def_vidix_drv_sh_veu
9111 $def_vidix_drv_unichrome
9145 #define CONFIG_DECODERS 1
9146 #define CONFIG_ENCODERS 1
9147 #define CONFIG_DEMUXERS 1
9158 $def_hardcoded_tables
9159 $def_libavcodec_mpegaudio_hp
9161 $def_local_aligned_8
9162 $def_local_aligned_16
9179 #define CONFIG_FASTDIV 0
9180 #define CONFIG_FFSERVER 0
9181 #define CONFIG_GPL 1
9182 #define CONFIG_GRAY 0
9183 #define CONFIG_LIBRTMP 0
9184 #define CONFIG_LIBVORBIS 0
9185 #define CONFIG_POWERPC_PERF 0
9186 #define CONFIG_SMALL 0
9187 #define CONFIG_SWSCALE_ALPHA 1
9189 #if defined(HAVE_AF_INET6) && (!defined(_WIN32) || defined(__CYGWIN__))
9190 #define CONFIG_IPV6 1
9192 #define CONFIG_IPV6 0
9195 #define HAVE_ATTRIBUTE_MAY_ALIAS 1
9196 #define av_alias __attribute__((may_alias))
9197 #define HAVE_ATTRIBUTE_PACKED 1
9198 #define HAVE_GETHRTIME 0
9199 #define HAVE_INLINE_ASM 1
9200 #define HAVE_LDBRX 0
9201 #define HAVE_POLL_H 1
9202 #define HAVE_PPC4XX 0
9203 #define HAVE_STRERROR_R 0
9204 #define HAVE_SYS_SELECT_H 0
9205 #define HAVE_VFP_ARGS 1
9206 #define HAVE_VIRTUALALLOC 0
9208 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
9209 #define CONFIG_AANDCT 1
9210 #define CONFIG_DCT 1
9211 #define CONFIG_DWT 1
9212 #define CONFIG_FFT 1
9213 #define CONFIG_GOLOMB 1
9214 #define CONFIG_H264DSP 1
9215 #define CONFIG_LPC 1
9216 #define CONFIG_MDCT 1
9217 #define CONFIG_RDFT 1
9219 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
9222 #define HAVE_EBP_AVAILABLE 1
9224 #define HAVE_EBP_AVAILABLE 0
9227 #define FFMPEG_CONFIGURATION "--enable-gpl --enable-postproc"
9228 #define FFMPEG_LICENSE "GPL version 2 or later"
9230 /* External libraries used through libavcodec. */
9233 $def_libopencore_amrnb
9234 $def_libopencore_amrwb
9236 $def_libschroedinger_lavc
9241 $(ff_config_enable "$_libavdecoders_all" "$_libavdecoders")
9242 $(ff_config_enable "$_libavencoders_all" "$_libavencoders")
9243 $(ff_config_enable "$_libavparsers_all" "$_libavparsers")
9244 $(ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers")
9245 $(ff_config_enable "$_libavmuxers_all" "$_libavmuxers")
9246 $(ff_config_enable "$_libavprotocols_all" "$_libavprotocols")
9247 $(ff_config_enable "$_libavbsfs_all" "$_libavbsfs")
9248 $(ff_config_enable "$_libavhwaccels_all" "$_libavhwaccels")
9250 #endif /* MPLAYER_CONFIG_H */
9253 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
9254 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
9256 ############################################################################
9258 # Create avconfig.h for FFmpeg.
9259 cat > "$TMPH" << EOF
9260 /* Generated by mpconfigure */
9261 #ifndef AVUTIL_AVCONFIG_H
9262 #define AVUTIL_AVCONFIG_H
9264 #endif /* AVUTIL_AVCONFIG_H */
9267 # Do not overwrite an unchanged avconfig.h to avoid superfluous rebuilds.
9268 cmp -s "$TMPH" libavutil
/avconfig.h ||
mv -f "$TMPH" libavutil
/avconfig.h
9270 #############################################################################
9274 Config files successfully generated by ./configure $_configuration !
9276 Install prefix: $_prefix
9277 Data directory: $_datadir
9278 Config direct.: $_confdir
9280 Byte order: $_byte_order
9281 Optimizing for: $_optimizing
9284 Messages/GUI: $language_msg
9285 Manual pages: $language_man
9286 Documentation: $language_doc
9288 Enabled optional drivers:
9289 Input: $_inputmodules
9290 Codecs: $_codecmodules
9291 Audio output: $_aomodules
9292 Video output: $_vomodules
9294 Disabled optional drivers:
9295 Input: $_noinputmodules
9296 Codecs: $_nocodecmodules
9297 Audio output: $_noaomodules
9298 Video output: $_novomodules
9300 'config.h' and 'config.mak' contain your configuration options.
9301 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
9302 compile *** DO NOT REPORT BUGS if you tweak these files ***
9304 'make' will now compile MPlayer and 'make install' will install it.
9305 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
9310 if test "$_mtrr" = yes ; then
9311 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
9317 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
9318 operating system ($system_name). You may encounter a few files that cannot
9319 be played due to missing open source video/audio codec support.
9326 Check $TMPLOG if you wonder why an autodetection failed (make sure
9327 development headers/packages are installed).
9329 NOTE: The --enable-* parameters unconditionally force options on, completely
9330 skipping autodetection. This behavior is unlike what you may be used to from
9331 autoconf-based configure scripts that can decide to override you. This greater
9332 level of control comes at a price. You may have to provide the correct compiler
9333 and linker flags yourself.
9334 If you used one of these options (except --enable-menu and similar ones that
9335 turn on internal features) and experience a compilation or linking failure,
9336 make sure you have passed the necessary compiler/linker flags to configure.
9338 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
9342 if test "$_warn_CFLAGS" = yes; then
9345 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
9348 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
9350 It is strongly recommended to let MPlayer choose the correct CFLAGS!
9351 To do so, execute 'CFLAGS= ./configure <options>'
9357 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"