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 --disable-libmpeg2 disable builtin libmpeg2 [autodetect]
339 --disable-musepack disable musepack support [autodetect]
340 --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect]
341 --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect]
342 --disable-libopenjpeg disable OpenJPEG (JPEG2000) input/output support [autodetect]
343 --disable-decoder=DECODER disable specified FFmpeg decoder
344 --enable-decoder=DECODER enable specified FFmpeg decoder
345 --disable-encoder=ENCODER disable specified FFmpeg encoder
346 --enable-encoder=ENCODER enable specified FFmpeg encoder
347 --disable-parser=PARSER disable specified FFmpeg parser
348 --enable-parser=PARSER enable specified FFmpeg parser
349 --disable-protocol=PROTO disable specified FFmpeg protocol
350 --enable-protocol=PROTO enable specified FFmpeg protocol
351 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
352 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
353 --disable-muxer=MUXER disable specified FFmpeg muxer
354 --enable-muxer=MUXER enable specified FFmpeg muxer
357 --disable-vidix disable VIDIX [for x86 *nix]
358 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
359 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
360 nvidia,pm2,pm3,radeon,rage128,s3,sis,unichrome
361 --disable-vidix-pcidb disable VIDIX PCI device name database
362 --enable-dhahelper enable VIDIX dhahelper support
363 --enable-svgalib_helper enable VIDIX svgalib_helper support
364 --enable-gl enable OpenGL video output [autodetect]
365 --disable-matrixview disable OpenGL MatrixView video output [autodetect]
366 --enable-dga2 enable DGA 2 support [autodetect]
367 --enable-dga1 enable DGA 1 support [autodetect]
368 --enable-vesa enable VESA video output [autodetect]
369 --enable-svga enable SVGAlib video output [autodetect]
370 --enable-sdl enable SDL video output [autodetect]
371 --enable-kva enable KVA video output [autodetect]
372 --enable-aa enable AAlib video output [autodetect]
373 --enable-caca enable CACA video output [autodetect]
374 --enable-ggi enable GGI video output [autodetect]
375 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
376 --enable-direct3d enable Direct3D video output [autodetect]
377 --enable-directx enable DirectX video output [autodetect]
378 --enable-dxr2 enable DXR2 video output [autodetect]
379 --enable-dxr3 enable DXR3/H+ video output [autodetect]
380 --enable-ivtv enable IVTV TV-Out video output [autodetect]
381 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
382 --enable-dvb enable DVB video output [autodetect]
383 --enable-mga enable mga_vid video output [autodetect]
384 --enable-xmga enable mga_vid X11 video output [autodetect]
385 --enable-xv enable Xv video output [autodetect]
386 --enable-xvmc enable XvMC acceleration [disable]
387 --enable-vdpau enable VDPAU acceleration [autodetect]
388 --enable-vm enable XF86VidMode support [autodetect]
389 --enable-xinerama enable Xinerama support [autodetect]
390 --enable-x11 enable X11 video output [autodetect]
391 --enable-xshape enable XShape support [autodetect]
392 --disable-xss disable screensaver support via xss [autodetect]
393 --enable-fbdev enable FBDev video output [autodetect]
394 --enable-mlib enable mediaLib video output (Solaris) [disable]
395 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
396 --enable-tdfxfb enable tdfxfb video output [disable]
397 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
398 --enable-wii enable Nintendo Wii/GameCube video output [disable]
399 --enable-directfb enable DirectFB video output [autodetect]
400 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
401 --enable-bl enable Blinkenlights video output [disable]
402 --enable-tdfxvid enable tdfx_vid video output [disable]
403 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
404 --disable-tga disable Targa video output [enable]
405 --disable-pnm disable PNM video output [enable]
406 --disable-md5sum disable md5sum video output [enable]
407 --disable-yuv4mpeg disable yuv4mpeg video output [enable]
408 --disable-corevideo disable CoreVideo video output [autodetect]
409 --disable-quartz disable Quartz video output [autodetect]
412 --disable-alsa disable ALSA audio output [autodetect]
413 --disable-ossaudio disable OSS audio output [autodetect]
414 --disable-arts disable aRts audio output [autodetect]
415 --disable-esd disable esd audio output [autodetect]
416 --disable-pulse disable Pulseaudio audio output [autodetect]
417 --disable-jack disable JACK audio output [autodetect]
418 --disable-openal disable OpenAL audio output [autodetect]
419 --disable-nas disable NAS audio output [autodetect]
420 --disable-sgiaudio disable SGI audio output [autodetect]
421 --disable-sunaudio disable Sun audio output [autodetect]
422 --disable-kai disable KAI audio output [autodetect]
423 --disable-dart disable DART audio output [autodetect]
424 --disable-win32waveout disable Windows waveout audio output [autodetect]
425 --disable-coreaudio disable CoreAudio audio output [autodetect]
426 --disable-select disable using select() on the audio device [enable]
429 --charset=charset convert the console messages to this character set
430 --language-doc=lang language to use for the documentation [en]
431 --language-man=lang language to use for the man pages [en]
432 --language-msg=lang language to use for the messages and the GUI [en]
433 --language=lang default language to use [en]
434 Specific options override --language. You can pass a list of languages separated
435 by whitespace or commas instead of a single language. Nonexisting translations
436 will be dropped from each list. All documentation and man page translations
437 available in the list will be installed, for the messages the first available
438 translation will be used. The value "all" will activate all translations. The
439 LINGUAS environment variable is honored. In all cases the fallback is English.
440 Available values are: all $msg_lang_all
442 Miscellaneous options:
443 --enable-runtime-cpudetection enable runtime CPU detection [disable]
444 --enable-cross-compile enable cross-compilation [autodetect]
445 --cc=COMPILER C compiler to build MPlayer [gcc]
446 --host-cc=COMPILER C compiler for tools needed while building [gcc]
447 --as=ASSEMBLER assembler to build MPlayer [as]
448 --nm=NM nm tool to build MPlayer [nm]
449 --yasm=YASM Yasm assembler to build MPlayer [yasm]
450 --ar=AR librarian to build MPlayer [ar]
451 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
452 --windres=WINDRES windres to build MPlayer [windres]
453 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
454 --enable-static build a statically linked binary
455 --with-install=PATH path to a custom install program
458 --enable-mmx enable MMX [autodetect]
459 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
460 --enable-3dnow enable 3DNow! [autodetect]
461 --enable-3dnowext enable extended 3DNow! [autodetect]
462 --enable-sse enable SSE [autodetect]
463 --enable-sse2 enable SSE2 [autodetect]
464 --enable-ssse3 enable SSSE3 [autodetect]
465 --enable-shm enable shm [autodetect]
466 --enable-altivec enable AltiVec (PowerPC) [autodetect]
467 --enable-armv5te enable DSP extensions (ARM) [autodetect]
468 --enable-armv6 enable ARMv6 (ARM) [autodetect]
469 --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
470 --enable-armvfp enable ARM VFP (ARM) [autodetect]
471 --enable-neon enable NEON (ARM) [autodetect]
472 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
473 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
474 --enable-hardcoded-tables put tables in binary instead of calculating them at startup [disable]
475 --enable-big-endian force byte order to big-endian [autodetect]
476 --enable-debug[=1-3] compile-in debugging information [disable]
477 --enable-profile compile-in profiling information [disable]
478 --disable-sighandler disable sighandler for crashes [enable]
479 --enable-crash-debug enable automatic gdb attach on crash [disable]
480 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
482 Use these options if autodetection fails:
483 --extra-cflags=FLAGS extra CFLAGS
484 --extra-ldflags=FLAGS extra LDFLAGS
485 --extra-libs=FLAGS extra linker flags
486 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
487 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
488 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
490 --with-freetype-config=PATH path to freetype-config
491 --with-fribidi-config=PATH path to fribidi-config
492 --with-glib-config=PATH path to glib*-config
493 --with-gtk-config=PATH path to gtk*-config
494 --with-sdl-config=PATH path to sdl*-config
495 --with-dvdnav-config=PATH path to dvdnav-config
496 --with-dvdread-config=PATH path to dvdread-config
498 This configure script is NOT autoconf-based, even though its output is similar.
499 It will try to autodetect all configuration options. If you --enable an option
500 it will be forcefully turned on, skipping autodetection. This can break
501 compilation, so you need to know what you are doing.
506 # GOTCHA: the variables below defines the default behavior for autodetection
507 # and have - unless stated otherwise - at least 2 states : yes no
508 # If autodetection is available then the third state is: auto
532 test "$CC" && _cc
="$CC"
536 _runtime_cpudetection
=no
542 _libopencore_amrnb
=auto
543 _libopencore_amrwb
=auto
545 _libavdecoders_all
=$
(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
546 _libavdecoders
=$
(echo $_libavdecoders_all |
sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s
/MPEG4AAC_DECODER
//)
547 _libavencoders_all
=$
(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
548 _libavencoders
=$
(echo $_libavencoders_all |
sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s
/AAC_ENCODER
//)
549 _libavparsers_all
=$
(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
550 _libavparsers
=$_libavparsers_all
551 _libavbsfs_all
=$
(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
552 _libavbsfs
=$_libavbsfs_all
553 _libavhwaccels_all
=$
(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
554 # Disable all hardware accelerators for now.
556 _libavdemuxers_all
=$
(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
557 _libavdemuxers
=$
(echo $_libavdemuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s
/REDIR_DEMUXER
// -e s
/AVISYNTH_DEMUXER
//)
558 _libavmuxers_all
=$
(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
559 _libavmuxers
=$
(echo $_libavmuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s
/RTP_MUXER
// -e s
/RTSP_MUXER
//)
560 _libavprotocols_all
=$
(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
561 _libavprotocols
=$_libavprotocols_all
569 _libavcodec_mpegaudio_hp
=yes
578 _xvmc
=no
#auto when complete
645 _dvdnavconfig
=dvdnav-config
646 _dvdreadconfig
=dvdread-config
648 _dvdread_internal
=auto
649 _libdvdcss_internal
=auto
660 _mlib
=no
#broken, thus disabled
682 _struct_addrinfo
=auto
684 _struct_sockaddr_storage
=auto
696 _libschroedinger_lavc
=auto
741 _freetypeconfig
='freetype-config'
743 _fribidiconfig
='fribidi-config'
758 def_dos_paths
="#define HAVE_DOS_PATHS 0"
759 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
760 def_priority
="#undef CONFIG_PRIORITY"
761 def_pthread_cache
="#undef PTHREAD_CACHE"
769 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
772 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
775 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
778 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
781 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
784 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
787 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
791 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
794 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
798 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
800 --with-freetype-config=*)
801 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
803 --with-fribidi-config=*)
804 _fribidiconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
807 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
809 --with-glib-config=*)
810 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
812 --with-dvdnav-config=*)
813 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
815 --with-dvdread-config=*)
816 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
820 extra_cflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
823 extra_ldflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
826 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
828 --extra-libs-mplayer=*)
829 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
831 --extra-libs-mencoder=*)
832 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
836 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
839 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
842 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
845 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
848 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
851 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
854 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
857 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
860 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
863 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
866 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
869 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
872 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
875 language
=$
(echo $ac_option | cut
-d '=' -f 2)
894 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
899 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
900 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
901 --enable-cross-compile) _cross_compile
=yes ;;
902 --disable-cross-compile) _cross_compile
=no
;;
903 --enable-mencoder) _mencoder
=yes ;;
904 --disable-mencoder) _mencoder
=no
;;
905 --enable-mplayer) _mplayer
=yes ;;
906 --disable-mplayer) _mplayer
=no
;;
907 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
908 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
909 --enable-x11) _x11
=yes ;;
910 --disable-x11) _x11
=no
;;
911 --enable-xshape) _xshape
=yes ;;
912 --disable-xshape) _xshape
=no
;;
913 --enable-xss) _xss
=yes ;;
914 --disable-xss) _xss
=no
;;
915 --enable-xv) _xv
=yes ;;
916 --disable-xv) _xv
=no
;;
917 --enable-xvmc) _xvmc
=yes ;;
918 --disable-xvmc) _xvmc
=no
;;
919 --enable-vdpau) _vdpau
=yes ;;
920 --disable-vdpau) _vdpau
=no
;;
921 --enable-sdl) _sdl
=yes ;;
922 --disable-sdl) _sdl
=no
;;
923 --enable-kva) _kva
=yes ;;
924 --disable-kva) _kva
=no
;;
925 --enable-direct3d) _direct3d
=yes ;;
926 --disable-direct3d) _direct3d
=no
;;
927 --enable-directx) _directx
=yes ;;
928 --disable-directx) _directx
=no
;;
929 --enable-win32waveout) _win32waveout
=yes ;;
930 --disable-win32waveout) _win32waveout
=no
;;
931 --enable-nas) _nas
=yes ;;
932 --disable-nas) _nas
=no
;;
933 --enable-png) _png
=yes ;;
934 --disable-png) _png
=no
;;
935 --enable-mng) _mng
=yes ;;
936 --disable-mng) _mng
=no
;;
937 --enable-jpeg) _jpeg
=yes ;;
938 --disable-jpeg) _jpeg
=no
;;
939 --enable-libopenjpeg) libopenjpeg
=yes ;;
940 --disable-libopenjpeg)libopenjpeg
=no
;;
941 --enable-pnm) _pnm
=yes ;;
942 --disable-pnm) _pnm
=no
;;
943 --enable-md5sum) _md5sum
=yes ;;
944 --disable-md5sum) _md5sum
=no
;;
945 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
946 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
947 --enable-gif) _gif
=yes ;;
948 --disable-gif) _gif
=no
;;
949 --enable-gl) _gl
=yes ;;
950 --disable-gl) _gl
=no
;;
951 --enable-matrixview) matrixview
=yes ;;
952 --disable-matrixview) matrixview
=no
;;
953 --enable-ggi) _ggi
=yes ;;
954 --disable-ggi) _ggi
=no
;;
955 --enable-ggiwmh) _ggiwmh
=yes ;;
956 --disable-ggiwmh) _ggiwmh
=no
;;
957 --enable-aa) _aa
=yes ;;
958 --disable-aa) _aa
=no
;;
959 --enable-caca) _caca
=yes ;;
960 --disable-caca) _caca
=no
;;
961 --enable-svga) _svga
=yes ;;
962 --disable-svga) _svga
=no
;;
963 --enable-vesa) _vesa
=yes ;;
964 --disable-vesa) _vesa
=no
;;
965 --enable-fbdev) _fbdev
=yes ;;
966 --disable-fbdev) _fbdev
=no
;;
967 --enable-dvb) _dvb
=yes ;;
968 --disable-dvb) _dvb
=no
;;
969 --enable-dxr2) _dxr2
=yes ;;
970 --disable-dxr2) _dxr2
=no
;;
971 --enable-dxr3) _dxr3
=yes ;;
972 --disable-dxr3) _dxr3
=no
;;
973 --enable-ivtv) _ivtv
=yes ;;
974 --disable-ivtv) _ivtv
=no
;;
975 --enable-v4l2) _v4l2
=yes ;;
976 --disable-v4l2) _v4l2
=no
;;
977 --enable-iconv) _iconv
=yes ;;
978 --disable-iconv) _iconv
=no
;;
979 --enable-langinfo) _langinfo
=yes ;;
980 --disable-langinfo) _langinfo
=no
;;
981 --enable-rtc) _rtc
=yes ;;
982 --disable-rtc) _rtc
=no
;;
983 --enable-libdv) _libdv
=yes ;;
984 --disable-libdv) _libdv
=no
;;
985 --enable-ossaudio) _ossaudio
=yes ;;
986 --disable-ossaudio) _ossaudio
=no
;;
987 --enable-arts) _arts
=yes ;;
988 --disable-arts) _arts
=no
;;
989 --enable-esd) _esd
=yes ;;
990 --disable-esd) _esd
=no
;;
991 --enable-pulse) _pulse
=yes ;;
992 --disable-pulse) _pulse
=no
;;
993 --enable-jack) _jack
=yes ;;
994 --disable-jack) _jack
=no
;;
995 --enable-openal) _openal
=yes ;;
996 --disable-openal) _openal
=no
;;
997 --enable-kai) _kai
=yes ;;
998 --disable-kai) _kai
=no
;;
999 --enable-dart) _dart
=yes ;;
1000 --disable-dart) _dart
=no
;;
1001 --enable-mad) _mad
=yes ;;
1002 --disable-mad) _mad
=no
;;
1003 --enable-mp3lame) _mp3lame
=yes ;;
1004 --disable-mp3lame) _mp3lame
=no
;;
1005 --enable-mp3lame-lavc) _mp3lame_lavc
=yes ;;
1006 --disable-mp3lame-lavc) _mp3lame_lavc
=no
;;
1007 --enable-toolame) _toolame
=yes ;;
1008 --disable-toolame) _toolame
=no
;;
1009 --enable-twolame) _twolame
=yes ;;
1010 --disable-twolame) _twolame
=no
;;
1011 --enable-libcdio) _libcdio
=yes ;;
1012 --disable-libcdio) _libcdio
=no
;;
1013 --enable-liblzo) _liblzo
=yes ;;
1014 --disable-liblzo) _liblzo
=no
;;
1015 --enable-libvorbis) _libvorbis
=yes ;;
1016 --disable-libvorbis) _libvorbis
=no
;;
1017 --enable-speex) _speex
=yes ;;
1018 --disable-speex) _speex
=no
;;
1019 --enable-tremor) _tremor
=yes ;;
1020 --disable-tremor) _tremor
=no
;;
1021 --enable-tremor-internal) _tremor_internal
=yes ;;
1022 --disable-tremor-internal) _tremor_internal
=no
;;
1023 --enable-tremor-low) _tremor_low
=yes ;;
1024 --disable-tremor-low) _tremor_low
=no
;;
1025 --enable-theora) _theora
=yes ;;
1026 --disable-theora) _theora
=no
;;
1027 --enable-mp3lib) _mp3lib
=yes ;;
1028 --disable-mp3lib) _mp3lib
=no
;;
1029 --enable-liba52) _liba52
=yes ;;
1030 --disable-liba52) _liba52
=no
;;
1031 --enable-libdca) _libdca
=yes ;;
1032 --disable-libdca) _libdca
=no
;;
1033 --enable-libmpeg2) _libmpeg2
=yes ;;
1034 --disable-libmpeg2) _libmpeg2
=no
;;
1035 --enable-musepack) _musepack
=yes ;;
1036 --disable-musepack) _musepack
=no
;;
1037 --enable-faad) _faad
=yes ;;
1038 --disable-faad) _faad
=no
;;
1039 --enable-faad-internal) _faad_internal
=yes ;;
1040 --disable-faad-internal) _faad_internal
=no
;;
1041 --enable-faad-fixed) _faad_fixed
=yes ;;
1042 --disable-faad-fixed) _faad_fixed
=no
;;
1043 --enable-faac) _faac
=yes ;;
1044 --disable-faac) _faac
=no
;;
1045 --enable-faac-lavc) _faac_lavc
=yes ;;
1046 --disable-faac-lavc) _faac_lavc
=no
;;
1047 --enable-ladspa) _ladspa
=yes ;;
1048 --disable-ladspa) _ladspa
=no
;;
1049 --enable-libbs2b) _libbs2b
=yes ;;
1050 --disable-libbs2b) _libbs2b
=no
;;
1051 --enable-xmms) _xmms
=yes ;;
1052 --disable-xmms) _xmms
=no
;;
1053 --enable-vcd) _vcd
=yes ;;
1054 --disable-vcd) _vcd
=no
;;
1055 --enable-dvdread) _dvdread
=yes ;;
1056 --disable-dvdread) _dvdread
=no
;;
1057 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1058 --disable-dvdread-internal) _dvdread_internal
=no
;;
1059 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1060 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1061 --enable-dvdnav) _dvdnav
=yes ;;
1062 --disable-dvdnav) _dvdnav
=no
;;
1063 --enable-xanim) _xanim
=yes ;;
1064 --disable-xanim) _xanim
=no
;;
1065 --enable-real) _real
=yes ;;
1066 --disable-real) _real
=no
;;
1067 --enable-live) _live
=yes ;;
1068 --disable-live) _live
=no
;;
1069 --enable-nemesi) _nemesi
=yes ;;
1070 --disable-nemesi) _nemesi
=no
;;
1071 --enable-xinerama) _xinerama
=yes ;;
1072 --disable-xinerama) _xinerama
=no
;;
1073 --enable-mga) _mga
=yes ;;
1074 --disable-mga) _mga
=no
;;
1075 --enable-xmga) _xmga
=yes ;;
1076 --disable-xmga) _xmga
=no
;;
1077 --enable-vm) _vm
=yes ;;
1078 --disable-vm) _vm
=no
;;
1079 --enable-xf86keysym) _xf86keysym
=yes ;;
1080 --disable-xf86keysym) _xf86keysym
=no
;;
1081 --enable-mlib) _mlib
=yes ;;
1082 --disable-mlib) _mlib
=no
;;
1083 --enable-sunaudio) _sunaudio
=yes ;;
1084 --disable-sunaudio) _sunaudio
=no
;;
1085 --enable-sgiaudio) _sgiaudio
=yes ;;
1086 --disable-sgiaudio) _sgiaudio
=no
;;
1087 --enable-alsa) _alsa
=yes ;;
1088 --disable-alsa) _alsa
=no
;;
1089 --enable-tv) _tv
=yes ;;
1090 --disable-tv) _tv
=no
;;
1091 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1092 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1093 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1094 --disable-tv-v4l1) _tv_v4l1
=no
;;
1095 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1096 --disable-tv-v4l2) _tv_v4l2
=no
;;
1097 --enable-tv-dshow) _tv_dshow
=yes ;;
1098 --disable-tv-dshow) _tv_dshow
=no
;;
1099 --enable-radio) _radio
=yes ;;
1100 --enable-radio-capture) _radio_capture
=yes ;;
1101 --disable-radio-capture) _radio_capture
=no
;;
1102 --disable-radio) _radio
=no
;;
1103 --enable-radio-v4l) _radio_v4l
=yes ;;
1104 --disable-radio-v4l) _radio_v4l
=no
;;
1105 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1106 --disable-radio-v4l2) _radio_v4l2
=no
;;
1107 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1108 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1109 --enable-pvr) _pvr
=yes ;;
1110 --disable-pvr) _pvr
=no
;;
1111 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1112 --disable-fastmemcpy) _fastmemcpy
=no
;;
1113 --enable-hardcoded-tables) hardcoded_tables
=yes ;;
1114 --disable-hardcoded-tables) hardcoded_tables
=no
;;
1115 --enable-network) _network
=yes ;;
1116 --disable-network) _network
=no
;;
1117 --enable-winsock2_h) _winsock2_h
=yes ;;
1118 --disable-winsock2_h) _winsock2_h
=no
;;
1119 --enable-smb) _smb
=yes ;;
1120 --disable-smb) _smb
=no
;;
1121 --enable-vidix) _vidix
=yes ;;
1122 --disable-vidix) _vidix
=no
;;
1123 --with-vidix-drivers=*)
1124 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1126 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1127 --enable-dhahelper) _dhahelper
=yes ;;
1128 --disable-dhahelper) _dhahelper
=no
;;
1129 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1130 --disable-svgalib_helper) _svgalib_helper
=no
;;
1131 --enable-joystick) _joystick
=yes ;;
1132 --disable-joystick) _joystick
=no
;;
1133 --enable-xvid) _xvid
=yes ;;
1134 --disable-xvid) _xvid
=no
;;
1135 --enable-xvid-lavc) _xvid_lavc
=yes ;;
1136 --disable-xvid-lavc) _xvid_lavc
=no
;;
1137 --enable-x264) _x264
=yes ;;
1138 --disable-x264) _x264
=no
;;
1139 --enable-x264-lavc) _x264_lavc
=yes ;;
1140 --disable-x264-lavc) _x264_lavc
=no
;;
1141 --enable-libdirac-lavc) _libdirac_lavc
=yes ;;
1142 --disable-libdirac-lavc) _libdirac_lavc
=no
;;
1143 --enable-libschroedinger-lavc) _libschroedinger_lavc
=yes ;;
1144 --disable-libschroedinger-lavc) _libschroedinger_lavc
=no
;;
1145 --enable-libnut) _libnut
=yes ;;
1146 --disable-libnut) _libnut
=no
;;
1147 --enable-libavutil_a) _libavutil_a
=yes ;;
1148 --disable-libavutil_a) _libavutil_a
=no
;;
1149 --enable-libavutil_so) _libavutil_so
=yes ;;
1150 --disable-libavutil_so) _libavutil_so
=no
;;
1151 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1152 --disable-libavcodec_a) _libavcodec_a
=no
;;
1153 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1154 --disable-libavcodec_so) _libavcodec_so
=no
;;
1155 --enable-libopencore_amrnb) _libopencore_amrnb
=yes ;;
1156 --disable-libopencore_amrnb) _libopencore_amrnb
=no
;;
1157 --enable-libopencore_amrwb) _libopencore_amrwb
=yes ;;
1158 --disable-libopencore_amrwb) _libopencore_amrwb
=no
;;
1159 --enable-decoder=*) _libavdecoders
="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1160 --disable-decoder=*) _libavdecoders
=$
(echo $_libavdecoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1161 --enable-encoder=*) _libavencoders
="$_libavencoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1162 --disable-encoder=*) _libavencoders
=$
(echo $_libavencoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1163 --enable-parser=*) _libavparsers
="$_libavparsers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1164 --disable-parser=*) _libavparsers
=$
(echo $_libavparsers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1165 --enable-protocol=*) _libavprotocols
="$_libavprotocols $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1166 --disable-protocol=*) _libavprotocols
=$
(echo $_libavprotocols |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1167 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1168 --disable-demuxer=*) _libavdemuxers
=$
(echo $_libavdemuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1169 --enable-muxer=*) _libavmuxers
="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1170 --disable-muxer=*) _libavmuxers
=$
(echo $_libavmuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1171 --enable-libavformat_a) _libavformat_a
=yes ;;
1172 --disable-libavformat_a) _libavformat_a
=no
;;
1173 --enable-libavformat_so) _libavformat_so
=yes ;;
1174 --disable-libavformat_so) _libavformat_so
=no
;;
1175 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1176 --disable-libpostproc_a) _libpostproc_a
=no
;;
1177 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1178 --disable-libpostproc_so) _libpostproc_so
=no
;;
1179 --enable-libswscale_a) _libswscale_a
=yes ;;
1180 --disable-libswscale_a) _libswscale_a
=no
;;
1181 --enable-libswscale_so) _libswscale_so
=yes ;;
1182 --disable-libswscale_so) _libswscale_so
=no
;;
1183 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1184 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1186 --enable-lirc) _lirc
=yes ;;
1187 --disable-lirc) _lirc
=no
;;
1188 --enable-lircc) _lircc
=yes ;;
1189 --disable-lircc) _lircc
=no
;;
1190 --enable-apple-remote) _apple_remote
=yes ;;
1191 --disable-apple-remote) _apple_remote
=no
;;
1192 --enable-apple-ir) _apple_ir
=yes ;;
1193 --disable-apple-ir) _apple_ir
=no
;;
1194 --enable-gui) _gui
=yes ;;
1195 --disable-gui) _gui
=no
;;
1196 --enable-gtk1) _gtk1
=yes ;;
1197 --disable-gtk1) _gtk1
=no
;;
1198 --enable-termcap) _termcap
=yes ;;
1199 --disable-termcap) _termcap
=no
;;
1200 --enable-termios) _termios
=yes ;;
1201 --disable-termios) _termios
=no
;;
1202 --enable-3dfx) _3dfx
=yes ;;
1203 --disable-3dfx) _3dfx
=no
;;
1204 --enable-s3fb) _s3fb
=yes ;;
1205 --disable-s3fb) _s3fb
=no
;;
1206 --enable-wii) _wii
=yes ;;
1207 --disable-wii) _wii
=no
;;
1208 --enable-tdfxfb) _tdfxfb
=yes ;;
1209 --disable-tdfxfb) _tdfxfb
=no
;;
1210 --disable-tdfxvid) _tdfxvid
=no
;;
1211 --enable-tdfxvid) _tdfxvid
=yes ;;
1212 --disable-xvr100) _xvr100
=no
;;
1213 --enable-xvr100) _xvr100
=yes ;;
1214 --disable-tga) _tga
=no
;;
1215 --enable-tga) _tga
=yes ;;
1216 --enable-directfb) _directfb
=yes ;;
1217 --disable-directfb) _directfb
=no
;;
1218 --enable-zr) _zr
=yes ;;
1219 --disable-zr) _zr
=no
;;
1220 --enable-bl) _bl
=yes ;;
1221 --disable-bl) _bl
=no
;;
1222 --enable-mtrr) _mtrr
=yes ;;
1223 --disable-mtrr) _mtrr
=no
;;
1224 --enable-largefiles) _largefiles
=yes ;;
1225 --disable-largefiles) _largefiles
=no
;;
1226 --enable-shm) _shm
=yes ;;
1227 --disable-shm) _shm
=no
;;
1228 --enable-select) _select
=yes ;;
1229 --disable-select) _select
=no
;;
1230 --enable-linux-devfs) _linux_devfs
=yes ;;
1231 --disable-linux-devfs) _linux_devfs
=no
;;
1232 --enable-cdparanoia) _cdparanoia
=yes ;;
1233 --disable-cdparanoia) _cdparanoia
=no
;;
1234 --enable-cddb) _cddb
=yes ;;
1235 --disable-cddb) _cddb
=no
;;
1236 --enable-big-endian) _big_endian
=yes ;;
1237 --disable-big-endian) _big_endian
=no
;;
1238 --enable-bitmap-font) _bitmap_font
=yes ;;
1239 --disable-bitmap-font) _bitmap_font
=no
;;
1240 --enable-freetype) _freetype
=yes ;;
1241 --disable-freetype) _freetype
=no
;;
1242 --enable-fontconfig) _fontconfig
=yes ;;
1243 --disable-fontconfig) _fontconfig
=no
;;
1244 --enable-unrarexec) _unrar_exec
=yes ;;
1245 --disable-unrarexec) _unrar_exec
=no
;;
1246 --enable-ftp) _ftp
=yes ;;
1247 --disable-ftp) _ftp
=no
;;
1248 --enable-vstream) _vstream
=yes ;;
1249 --disable-vstream) _vstream
=no
;;
1250 --enable-pthreads) _pthreads
=yes ;;
1251 --disable-pthreads) _pthreads
=no
;;
1252 --enable-w32threads) _w32threads
=yes ;;
1253 --disable-w32threads) _w32threads
=no
;;
1254 --enable-ass) _ass
=yes ;;
1255 --disable-ass) _ass
=no
;;
1256 --enable-ass-internal) ass_internal
=yes ;;
1257 --disable-ass-internal) ass_internal
=no
;;
1258 --enable-rpath) _rpath
=yes ;;
1259 --disable-rpath) _rpath
=no
;;
1261 --enable-fribidi) _fribidi
=yes ;;
1262 --disable-fribidi) _fribidi
=no
;;
1264 --enable-enca) _enca
=yes ;;
1265 --disable-enca) _enca
=no
;;
1267 --enable-inet6) _inet6
=yes ;;
1268 --disable-inet6) _inet6
=no
;;
1270 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1271 --disable-gethostbyname2) _gethostbyname2
=no
;;
1273 --enable-dga1) _dga1
=yes ;;
1274 --disable-dga1) _dga1
=no
;;
1275 --enable-dga2) _dga2
=yes ;;
1276 --disable-dga2) _dga2
=no
;;
1278 --enable-menu) _menu
=yes ;;
1279 --disable-menu) _menu
=no
;;
1281 --enable-qtx) _qtx
=yes ;;
1282 --disable-qtx) _qtx
=no
;;
1284 --enable-coreaudio) _coreaudio
=yes ;;
1285 --disable-coreaudio) _coreaudio
=no
;;
1286 --enable-corevideo) _corevideo
=yes ;;
1287 --disable-corevideo) _corevideo
=no
;;
1288 --enable-quartz) _quartz
=yes ;;
1289 --disable-quartz) _quartz
=no
;;
1290 --enable-macosx-finder) _macosx_finder
=yes ;;
1291 --disable-macosx-finder) _macosx_finder
=no
;;
1292 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1293 --disable-macosx-bundle) _macosx_bundle
=no
;;
1295 --enable-maemo) _maemo
=yes ;;
1296 --disable-maemo) _maemo
=no
;;
1298 --enable-sortsub) _sortsub
=yes ;;
1299 --disable-sortsub) _sortsub
=no
;;
1301 --enable-crash-debug) _crash_debug
=yes ;;
1302 --disable-crash-debug) _crash_debug
=no
;;
1303 --enable-sighandler) _sighandler
=yes ;;
1304 --disable-sighandler) _sighandler
=no
;;
1305 --enable-win32dll) _win32dll
=yes ;;
1306 --disable-win32dll) _win32dll
=no
;;
1308 --enable-sse) _sse
=yes ;;
1309 --disable-sse) _sse
=no
;;
1310 --enable-sse2) _sse2
=yes ;;
1311 --disable-sse2) _sse2
=no
;;
1312 --enable-ssse3) _ssse3
=yes ;;
1313 --disable-ssse3) _ssse3
=no
;;
1314 --enable-mmxext) _mmxext
=yes ;;
1315 --disable-mmxext) _mmxext
=no
;;
1316 --enable-3dnow) _3dnow
=yes ;;
1317 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1318 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1319 --disable-3dnowext) _3dnowext
=no
;;
1320 --enable-cmov) _cmov
=yes ;;
1321 --disable-cmov) _cmov
=no
;;
1322 --enable-fast-cmov) _fast_cmov
=yes ;;
1323 --disable-fast-cmov) _fast_cmov
=no
;;
1324 --enable-fast-clz) _fast_clz
=yes ;;
1325 --disable-fast-clz) _fast_clz
=no
;;
1326 --enable-altivec) _altivec
=yes ;;
1327 --disable-altivec) _altivec
=no
;;
1328 --enable-armv5te) _armv5te
=yes ;;
1329 --disable-armv5te) _armv5te
=no
;;
1330 --enable-armv6) _armv6
=yes ;;
1331 --disable-armv6) _armv6
=no
;;
1332 --enable-armv6t2) _armv6t2
=yes ;;
1333 --disable-armv6t2) _armv6t2
=no
;;
1334 --enable-armvfp) _armvfp
=yes ;;
1335 --disable-armvfp) _armvfp
=no
;;
1336 --enable-neon) neon
=yes ;;
1337 --disable-neon) neon
=no
;;
1338 --enable-iwmmxt) _iwmmxt
=yes ;;
1339 --disable-iwmmxt) _iwmmxt
=no
;;
1340 --enable-mmx) _mmx
=yes ;;
1341 --disable-mmx) # 3Dnow! and MMX2 require MMX
1342 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1345 echo "Unknown parameter: $ac_option"
1352 # Atmos: moved this here, to be correct, if --prefix is specified
1353 test -z "$_bindir" && _bindir
="$_prefix/bin"
1354 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1355 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1356 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1357 test -z "$_libdir" && _libdir
="$_prefix/lib"
1359 # Determine our OS name and CPU architecture
1360 if test -z "$_target" ; then
1362 system_name
=$
(uname
-s 2>&1)
1363 case "$system_name" in
1364 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1378 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1388 system_name
="$system_name-UNKNOWN"
1393 # host's CPU/instruction set
1394 host_arch
=$
(uname
-p 2>&1)
1395 case "$host_arch" in
1396 i386|sparc|ppc|alpha|arm|mips|vax
)
1398 powerpc
) # Darwin returns 'powerpc'
1401 *) # uname -p on Linux returns 'unknown' for the processor type,
1402 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1404 # Maybe uname -m (machine hardware name) returns something we
1407 # x86/x86pc is used by QNX
1408 case "$(uname -m 2>&1)" in
1409 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
;;
1410 ia64
) host_arch
=ia64
;;
1411 macppc|ppc
) host_arch
=ppc
;;
1412 ppc64
) host_arch
=ppc64
;;
1413 alpha
) host_arch
=alpha
;;
1414 sparc
) host_arch
=sparc
;;
1415 sparc64
) host_arch
=sparc64
;;
1416 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1417 arm
*|zaurus|cats
) host_arch
=arm
;;
1418 sh3|sh4|sh4a
) host_arch
=sh
;;
1419 s390
) host_arch
=s390
;;
1420 s390x
) host_arch
=s390x
;;
1421 *mips
*) host_arch
=mips
;;
1422 vax
) host_arch
=vax
;;
1423 xtensa
*) host_arch
=xtensa
;;
1424 *) host_arch
=UNKNOWN
;;
1428 else # if test -z "$_target"
1429 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1430 case "$(echo $system_name | tr A-Z a-z)" in
1431 linux
) system_name
=Linux
;;
1432 freebsd
) system_name
=FreeBSD
;;
1433 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1434 netbsd
) system_name
=NetBSD
;;
1435 bsd
/os
) system_name
=BSD
/OS
;;
1436 openbsd
) system_name
=OpenBSD
;;
1437 dragonfly
) system_name
=DragonFly
;;
1438 sunos
) system_name
=SunOS
;;
1439 qnx
) system_name
=QNX
;;
1440 morphos
) system_name
=MorphOS
;;
1441 amigaos
) system_name
=AmigaOS
;;
1442 mingw32
*) system_name
=MINGW32
;;
1444 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1445 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1446 if test $
(echo $host_arch) != "x86_64" ; then
1447 host_arch
=$
(echo $host_arch |
tr '_' '-')
1451 extra_cflags
="-I. $extra_cflags"
1452 _timer
=timer-linux.c
1455 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1456 extra_cflags
="$extra_cflags -I/usr/local/include"
1459 if netbsd || dragonfly
; then
1460 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1461 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1465 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1466 _timer
=timer-darwin.c
1470 extra_ldflags
="$extra_ldflags -lC"
1481 extra_cflags
="$extra_cflags -fno-common"
1482 # -lwinmm is always needed for osdep/timer-win2.c
1483 extra_ldflags
="$extra_ldflags -lwinmm"
1487 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1488 def_priority
="#define CONFIG_PRIORITY 1"
1500 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1501 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1505 extra_ldflags
="$extra_ldflags -lph"
1513 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1514 def_priority
="#define CONFIG_PRIORITY 1"
1517 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1522 TMPLOG
="configure.log"
1523 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1524 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1525 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1526 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1527 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1530 echo configuration
: $_configuration > "$TMPLOG"
1534 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1535 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1539 # Checking CC version...
1540 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1541 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1542 echocheck
"$_cc version"
1544 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1545 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1546 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1547 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1548 # TODO verify older icc/ecc compatibility
1551 cc_version
="v. ?.??, bad"
1555 cc_version
="$cc_version, ok"
1558 cc_version
="$cc_version, bad"
1562 echores
"$cc_version"
1564 for _cc
in "$_cc" gcc cc
; do
1565 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1566 if test "$cc_name_tmp" = "gcc"; then
1567 cc_name
=$cc_name_tmp
1568 echocheck
"$_cc version"
1570 cc_version
=$
($_cc -dumpversion 2>&1)
1576 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1577 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1578 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1581 echores
"$cc_version"
1584 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1585 if test "$cc_name_tmp" = "Sun C"; then
1586 echocheck
"$_cc version"
1588 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1589 res_comment
="experimental support only"
1590 echores
"Sun C $cc_version"
1595 test "$cc_fail" = yes && die
"unsupported compiler version"
1597 if test -z "$_target" && x86
; then
1600 int test[(int)sizeof(char *)-7];
1604 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1607 echo "Detected operating system: $system_name"
1608 echo "Detected host architecture: $host_arch"
1611 test "$_host_cc" || _host_cc
=$_cc
1614 echocheck
"cross compilation"
1615 if test $_cross_compile = auto
; then
1617 int main(void) { return 0; }
1620 cc_check
&& "$TMPEXE" && _cross_compile
=no
1622 echores
$_cross_compile
1624 if test $_cross_compile = yes; then
1632 # now that we know what compiler should be used for compilation, try to find
1633 # out which assembler is used by the $_cc compiler
1634 if test "$_as" = auto
; then
1635 _as
=$
($_cc -print-prog-name=as
)
1636 test -z "$_as" && _as
=as
1639 if test "$_nm" = auto
; then
1640 _nm
=$
($_cc -print-prog-name=nm
)
1641 test -z "$_nm" && _nm
=nm
1644 # XXX: this should be ok..
1647 if test "$_runtime_cpudetection" = no
; then
1649 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1650 # FIXME: Remove the cygwin check once AMD CPUs are supported
1651 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1652 # Linux with /proc mounted, extract CPU information from it
1653 _cpuinfo
="cat /proc/cpuinfo"
1654 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1655 # FreeBSD with Linux emulation /proc mounted,
1656 # extract CPU information from it
1657 # Don't use it on x86 though, it never reports 3Dnow
1658 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1659 elif darwin
&& ! x86
; then
1660 # use hostinfo on Darwin
1663 # use 'lsattr' on AIX
1664 _cpuinfo
="lsattr -E -l proc0 -a type"
1666 # all other OSes try to extract CPU information from a small helper
1667 # program cpuinfo instead
1668 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1669 _cpuinfo
="./cpuinfo$_exesuf"
1672 if [ "$cc_vendor" = "gnu" ] && [ "$_cc_major" = 2 ] ; then
1673 test $_sse = auto
&& _sse
=no
1674 test $_win32dll = auto
&& _win32dll
=no
1679 # gather more CPU information
1680 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1681 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1682 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1683 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1684 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1686 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1688 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1689 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1691 for ext
in $pparam ; do
1692 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1695 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1696 test $_sse = kernel_check
&& _mmxext
=kernel_check
1698 echocheck
"CPU vendor"
1699 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1701 echocheck
"CPU type"
1705 fi # test "$_runtime_cpudetection" = no
1707 if x86
&& test "$_runtime_cpudetection" = no
; then
1709 if test "$1" = kernel_check
; then
1710 echocheck
"kernel support of $2"
1714 void catch() { exit(1); }
1716 signal(SIGILL, catch);
1717 __asm__ volatile ("$3":::"memory"); return 0;
1721 if cc_check
&& tmp_run
; then
1724 _optimizing
="$_optimizing $2"
1729 echo "It seems that your kernel does not correctly support $2."
1730 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1737 extcheck
$_mmx "mmx" "emms"
1738 extcheck
$_mmxext "mmxext" "sfence"
1739 extcheck
$_3dnow "3dnow" "femms"
1740 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1741 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1742 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1743 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1744 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1746 echocheck
"mtrr support"
1747 if test "$_mtrr" = kernel_check
; then
1749 _optimizing
="$_optimizing mtrr"
1753 if test "$_gcc3_ext" != ""; then
1754 # if we had to disable sse/sse2 because the active kernel does not
1755 # support this instruction set extension, we also have to tell
1756 # gcc3 to not generate sse/sse2 instructions for normal C code
1758 int main(void) { return 0; }
1760 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1766 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1767 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1768 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 0'
1769 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 0'
1770 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1771 subarch_all
='X86_32 X86_64 PPC64'
1772 case "$host_arch" in
1773 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1776 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1777 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
1778 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
1783 if test "$_runtime_cpudetection" = no
; then
1787 3) proc
=i386 iproc
=386 ;;
1788 4) proc
=i486 iproc
=486 ;;
1789 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1790 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1791 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1793 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1795 elif test "$pmodel" -ge 8; then
1797 elif test "$pmodel" -ge 6; then
1804 # It's a bit difficult to determine the correct type of Family 6
1805 # AMD CPUs just from their signature. Instead, we check directly
1806 # whether it supports SSE.
1807 if test "$_sse" = yes; then
1808 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1811 # Again, gcc treats athlon and athlon-tbird similarly.
1816 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1817 # caught and remedied in the optimization tests below.
1821 *) proc
=amdfam10 iproc
=686
1822 test $_fast_clz = "auto" && _fast_clz
=yes
1828 3) proc
=i386 iproc
=386 ;;
1829 4) proc
=i486 iproc
=486 ;;
1831 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1832 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1838 if test "$pmodel" -ge 15; then
1840 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1842 elif test "$pmodel" -ge 7; then
1844 elif test "$pmodel" -ge 3; then
1849 test $_fast_clz = "auto" && _fast_clz
=yes
1852 # A nocona in 32-bit mode has no more capabilities than a prescott.
1853 if test "$pmodel" -ge 3; then
1857 test $_fast_clz = "auto" && _fast_clz
=yes
1859 test $_fast_cmov = "auto" && _fast_cmov
=no
1861 *) proc
=prescott iproc
=686 ;;
1867 if test "$pmodel" -ge 8; then
1869 elif test "$pmodel" -ge 4; then
1876 if test "$pmodel" -ge 9; then
1883 *) proc
=i686 iproc
=i686
;;
1888 3) proc
=i386 iproc
=386 ;;
1889 4) proc
=i486 iproc
=486 ;;
1890 *) proc
=i586 iproc
=586 ;;
1894 proc
=i586 iproc
=586 ;;
1896 test $_fast_clz = "auto" && _fast_clz
=no
1897 fi # test "$_runtime_cpudetection" = no
1900 # check that gcc supports our CPU, if not, fall back to earlier ones
1901 # LGB: check -mcpu and -march swithing step by step with enabling
1902 # to fall back till 386.
1904 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1906 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1912 echocheck
"GCC & CPU optimization abilities"
1914 int main(void) { return 0; }
1916 if test "$_runtime_cpudetection" = no
; then
1917 if test $cc_vendor != "intel" ; then
1918 cc_check
-march=native
&& proc
=native
1920 if test "$proc" = "k8"; then
1921 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1923 if test "$proc" = "athlon-xp"; then
1924 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1926 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1927 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1929 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1930 if ! cc_check
-march=$proc $cpuopt=$proc; then
1931 if cc_check
-march=i586
$cpuopt=i686
; then
1938 if test "$proc" = "prescott" ; then
1939 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1941 if test "$proc" = "core2" ; then
1942 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1944 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
1945 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1947 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1948 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1950 if test "$proc" = "i586"; then
1951 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1953 if test "$proc" = "i486" ; then
1954 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1956 if test "$proc" = "i386" ; then
1957 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1959 if test "$proc" = "error" ; then
1960 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1964 elif test "$proc" = "i586-i686"; then
1965 _march
="-march=i586"
1966 _mcpu
="$cpuopt=i686"
1969 _march
="-march=$proc"
1970 _mcpu
="$cpuopt=$proc"
1973 else # if test "$_runtime_cpudetection" = no
1974 _mcpu
="$cpuopt=generic"
1975 # at least i486 required, for bswap instruction
1976 _march
="-march=i486"
1977 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1978 cc_check
$_mcpu || _mcpu
=""
1979 cc_check
$_march $_mcpu || _march
=""
1982 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1983 ## autodetected mcpu/march parameters
1984 if test "$_target" ; then
1985 # TODO: it may be a good idea to check GCC and fall back in all cases
1986 if test "$host_arch" = "i586-i686"; then
1987 _march
="-march=i586"
1988 _mcpu
="$cpuopt=i686"
1990 _march
="-march=$host_arch"
1991 _mcpu
="$cpuopt=$host_arch"
1999 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
2000 i686|athlon
*|pentium
*) iproc
=686 ;;
2005 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
2010 test $_fast_clz = "auto" && _fast_clz
=yes
2017 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2024 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2025 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2028 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
2029 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
2034 if test "$_runtime_cpudetection" = no
; then
2039 test $_fast_clz = "auto" && _fast_clz
=no
2048 # 64-bit prescotts exist, but as far as GCC is concerned they
2049 # have the same capabilities as a nocona.
2051 test $_fast_cmov = "auto" && _fast_cmov
=no
2052 test $_fast_clz = "auto" && _fast_clz
=no
2059 fi # test "$_runtime_cpudetection" = no
2061 echocheck
"GCC & CPU optimization abilities"
2063 int main(void) { return 0; }
2065 # This is a stripped-down version of the i386 fallback.
2066 if test "$_runtime_cpudetection" = no
; then
2067 if test $cc_vendor != "intel" ; then
2068 cc_check
-march=native
&& proc
=native
2070 # --- AMD processors ---
2071 if test "$proc" = "k8"; then
2072 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2074 # This will fail if gcc version < 3.3, which is ok because earlier
2075 # versions don't really support 64-bit on amd64.
2076 # Is this a valid assumption? -Corey
2077 if test "$proc" = "athlon-xp"; then
2078 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2080 # --- Intel processors ---
2081 if test "$proc" = "core2"; then
2082 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2084 if test "$proc" = "x86-64"; then
2085 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2087 if test "$proc" = "nocona"; then
2088 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2090 if test "$proc" = "pentium4"; then
2091 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2094 _march
="-march=$proc"
2095 _mcpu
="$cpuopt=$proc"
2096 if test "$proc" = "error" ; then
2097 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2101 else # if test "$_runtime_cpudetection" = no
2102 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2103 _march
="-march=x86-64"
2104 _mcpu
="$cpuopt=generic"
2105 cc_check
$_mcpu || _mcpu
="x86-64"
2106 cc_check
$_mcpu || _mcpu
=""
2107 cc_check
$_march $_mcpu || _march
=""
2111 test $_fast_cmov = "auto" && _fast_cmov
=yes
2112 test $_fast_clz = "auto" && _fast_clz
=yes
2120 if test "$host_arch" = "sparc64" ; then
2123 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2125 echocheck
"CPU type"
2127 case "$(echo $karch)" in
2132 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2151 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2153 test $_fast_clz = "auto" && _fast_clz
=yes
2161 ppc|ppc64|powerpc|powerpc64
)
2163 def_dcbzl
='#define HAVE_DCBZL 0'
2164 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2165 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
2166 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
2169 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2171 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2173 echocheck
"CPU type"
2174 case $system_name in
2176 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2177 if test -n "$($_cpuinfo | grep altivec)"; then
2178 test $_altivec = auto
&& _altivec
=yes
2182 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2183 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2184 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2185 test $_altivec = auto
&& _altivec
=yes
2189 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2191 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2194 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2195 test $_altivec = auto
&& _altivec
=yes
2201 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2204 if test "$_altivec" = yes; then
2205 echores
"$proc altivec"
2211 echocheck
"GCC & CPU optimization abilities"
2213 if test -n "$proc"; then
2215 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2216 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2217 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2218 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2219 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2220 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2221 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2222 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2223 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2226 # gcc 3.1(.1) and up supports 7400 and 7450
2227 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2229 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2230 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2234 # gcc 3.2 and up supports 970
2235 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2237 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2238 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2242 # gcc 3.3 and up supports POWER4
2243 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2245 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2249 # gcc 3.4 and up supports 440*
2250 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2252 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2253 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2257 # gcc 4.0 and up supports POWER5
2258 if test "$_cc_major" -ge "4"; then
2260 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2266 if test -n "$_mcpu"; then
2267 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2268 echores
"$_optimizing"
2273 test $_fast_clz = "auto" && _fast_clz
=yes
2281 echocheck
"CPU type"
2284 unsigned long ver, mask;
2285 __asm__ ("implver %0" : "=r" (ver));
2286 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2287 printf("%ld-%x\n", ver, ~mask);
2291 $_cc -o "$TMPEXE" "$TMPC"
2292 case $
("$TMPEXE") in
2294 0-0) proc
="ev4"; _mvi
="0";;
2295 1-0) proc
="ev5"; _mvi
="0";;
2296 1-1) proc
="ev56"; _mvi
="0";;
2297 1-101) proc
="pca56"; _mvi
="1";;
2298 2-303) proc
="ev6"; _mvi
="1";;
2299 2-307) proc
="ev67"; _mvi
="1";;
2300 2-1307) proc
="ev68"; _mvi
="1";;
2304 echocheck
"GCC & CPU optimization abilities"
2305 if test "$proc" = "ev68" ; then
2306 cc_check
-mcpu=$proc || proc
=ev67
2308 if test "$proc" = "ev67" ; then
2309 cc_check
-mcpu=$proc || proc
=ev6
2314 test $_fast_clz = "auto" && _fast_clz
=yes
2324 echocheck
"CPU type"
2325 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2326 case "$(echo $proc)" in
2327 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2328 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2329 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2330 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2331 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2332 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2334 # gcc < 3.x does not support -mtune.
2335 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2341 test $_fast_clz = "auto" && _fast_clz
=yes
2375 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2376 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2377 die
"unsupported architecture $host_arch"
2379 esac # case "$host_arch" in
2381 if test "$_runtime_cpudetection" = yes ; then
2383 test "$_cmov" != no
&& _cmov
=yes
2385 test "$_mmx" != no
&& _mmx
=yes
2386 test "$_3dnow" != no
&& _3dnow
=yes
2387 test "$_3dnowext" != no
&& _3dnowext
=yes
2388 test "$_mmxext" != no
&& _mmxext
=yes
2389 test "$_sse" != no
&& _sse
=yes
2390 test "$_sse2" != no
&& _sse2
=yes
2391 test "$_ssse3" != no
&& _ssse3
=yes
2392 test "$_mtrr" != no
&& _mtrr
=yes
2401 echocheck
"byte order"
2402 if test "$_big_endian" = auto
; then
2404 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2405 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2406 int main(void) { return (int)ascii_name; }
2409 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2415 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2418 if test "$_big_endian" = yes ; then
2419 _byte_order
='big-endian'
2420 def_words_endian
='#define WORDS_BIGENDIAN 1'
2421 def_bigendian
='#define HAVE_BIGENDIAN 1'
2422 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 1'
2424 _byte_order
='little-endian'
2425 def_words_endian
='#undef WORDS_BIGENDIAN'
2426 def_bigendian
='#define HAVE_BIGENDIAN 0'
2427 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 0'
2429 echores
"$_byte_order"
2432 echocheck
"extern symbol prefix"
2436 cc_check
-c || die
"Symbol mangling check failed."
2437 sym
=$
($_nm -P -g $TMPEXE)
2438 extern_prefix
=${sym%%ff_extern*}
2439 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2440 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2441 echores
$extern_prefix
2444 echocheck
"assembler support of -pipe option"
2446 int main(void) { return 0; }
2448 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2449 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2452 echocheck
"compiler support of named assembler arguments"
2454 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2455 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2456 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2458 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2460 echores
$_named_asm_args
2463 if darwin
&& test "$cc_vendor" = "gnu" ; then
2464 echocheck
"GCC support of -mstackrealign"
2465 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2466 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2467 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2468 # wrong code with this flag, but this can be worked around by adding
2469 # -fno-unit-at-a-time as described in the blog post at
2470 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2472 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2473 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2475 cc_check
-O4 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2476 test -z "$cflags_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2477 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2478 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2479 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2482 # Checking for CFLAGS
2484 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2485 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2487 elif test -z "$CFLAGS" ; then
2488 if test "$cc_vendor" = "intel" ; then
2489 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2490 elif test "$cc_vendor" = "sun" ; then
2491 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2492 elif test "$cc_vendor" != "gnu" ; then
2493 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2495 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2496 extra_ldflags
="$extra_ldflags -ffast-math"
2503 int main(void) { return 0; }
2505 if test "$cc_vendor" = "gnu" ; then
2506 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2507 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
2508 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2509 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2510 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2511 cc_check
-Wmissing-prototypes && CFLAGS
="-Wmissing-prototypes $CFLAGS"
2512 cc_check
-Wstrict-prototypes && CFLAGS
="-Wstrict-prototypes $CFLAGS"
2514 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2517 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2518 cc_check
-MD -MP && CFLAGS
="-MD -MP $CFLAGS"
2521 if test -n "$LDFLAGS" ; then
2522 extra_ldflags
="$extra_ldflags $LDFLAGS"
2524 elif test "$cc_vendor" = "intel" ; then
2525 extra_ldflags
="$extra_ldflags -i-static"
2527 if test -n "$CPPFLAGS" ; then
2528 extra_cflags
="$extra_cflags $CPPFLAGS"
2535 # Checking assembler (_as) compatibility...
2536 # Added workaround for older as that reads from stdin by default - atmos
2537 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2538 echocheck
"assembler ($_as $as_version)"
2540 _pref_as_version
='2.9.1'
2542 if test "$_mmx" = yes ; then
2543 echo 'emms' >> $TMPS
2545 if test "$_3dnow" = yes ; then
2546 _pref_as_version
='2.10.1'
2547 echo 'femms' >> $TMPS
2549 if test "$_3dnowext" = yes ; then
2550 _pref_as_version
='2.10.1'
2551 echo 'pswapd %mm0, %mm0' >> $TMPS
2553 if test "$_mmxext" = yes ; then
2554 _pref_as_version
='2.10.1'
2555 echo 'movntq %mm0, (%eax)' >> $TMPS
2557 if test "$_sse" = yes ; then
2558 _pref_as_version
='2.10.1'
2559 echo 'xorps %xmm0, %xmm0' >> $TMPS
2561 #if test "$_sse2" = yes ; then
2562 # _pref_as_version='2.11'
2563 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2565 if test "$_cmov" = yes ; then
2566 _pref_as_version
='2.10.1'
2567 echo 'cmovb %eax, %ebx' >> $TMPS
2569 if test "$_ssse3" = yes ; then
2570 _pref_as_version
='2.16.92'
2571 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2573 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2575 if test "$as_verc_fail" != yes ; then
2578 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2580 die
"obsolete binutils version"
2585 echocheck
".align is a power of two"
2586 if test "$_asmalign_pot" = auto
; then
2589 int main(void) { __asm__ (".align 3"); return 0; }
2591 cc_check
&& _asmalign_pot
=yes
2593 if test "$_asmalign_pot" = "yes" ; then
2594 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2596 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2598 echores
$_asmalign_pot
2601 echocheck
"10 assembler operands"
2603 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2609 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2614 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2615 echores
$ten_operands
2617 echocheck
"ebx availability"
2619 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2626 // just adding ebx to clobber list seems unreliable with some
2627 // compilers, e.g. Haiku's gcc 2.95
2629 // and the above check does not work for OSX 64 bit...
2630 __asm__ volatile("":::"%ebx");
2634 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2635 echores
$ebx_available
2641 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2642 #error PIC not enabled
2647 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2651 if test -z "$YASMFLAGS" ; then
2653 x86_64
&& objformat
="macho64" || objformat
="macho"
2659 # currently tested for Linux x86, x86_64
2660 YASMFLAGS
="-f $objformat"
2661 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2662 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2663 case "$objformat" in
2664 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2665 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2671 echo "pabsw xmm0, xmm0" > $TMPS
2672 yasm_check || _yasm
=""
2673 if test $_yasm ; then
2674 def_yasm
='#define HAVE_YASM 1'
2678 def_yasm
='#define HAVE_YASM 0'
2684 def_bswap
='#define HAVE_BSWAP 0'
2685 echo 'bswap %eax' > $TMPS
2686 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2691 #FIXME: This should happen before the check for CFLAGS..
2692 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2693 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2695 # check if AltiVec is supported by the compiler, and how to enable it
2696 echocheck
"GCC AltiVec flags"
2698 int main(void) { return 0; }
2700 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2701 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2702 # check if <altivec.h> should be included
2704 #include <altivec.h>
2705 int main(void) { return 0; }
2707 if $
(cc_check
$_altivec_gcc_flags) ; then
2708 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2709 inc_altivec_h
='#include <altivec.h>'
2712 int main(void) { return 0; }
2714 if $
(cc_check
-faltivec) ; then
2715 _altivec_gcc_flags
="-faltivec"
2718 _altivec_gcc_flags
="none, AltiVec disabled"
2722 echores
"$_altivec_gcc_flags"
2724 # check if the compiler supports braces for vector declarations
2727 int main(void) { (vector int) {1}; return 0; }
2729 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2731 # Disable runtime cpudetection if we cannot generate AltiVec code or
2732 # AltiVec is disabled by the user.
2733 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2734 && _runtime_cpudetection
=no
2736 # Show that we are optimizing for AltiVec (if enabled and supported).
2737 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2738 && _optimizing
="$_optimizing altivec"
2740 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2741 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2745 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2747 echocheck
"XFORM ASM support"
2749 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2751 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2752 echores
"$xform_asm"
2756 echocheck
"ARM pld instruction"
2758 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2764 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2765 if test $_armv5te = "auto" ; then
2767 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2770 cc_check
&& _armv5te
=yes
2774 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2776 echocheck
"ARMv6 (SIMD instructions)"
2777 if test $_armv6 = "auto" ; then
2779 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2782 cc_check
&& _armv6
=yes
2786 echocheck
"ARMv6t2 (SIMD instructions)"
2787 if test $_armv6t2 = "auto" ; then
2789 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2792 cc_check
&& _armv6t2
=yes
2797 if test $_armvfp = "auto" ; then
2799 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2802 cc_check
&& _armvfp
=yes
2806 echocheck
"ARM NEON"
2807 if test $neon = "auto" ; then
2809 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2812 cc_check
&& neon
=yes
2816 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2817 if test $_iwmmxt = "auto" ; then
2819 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2822 cc_check
&& _iwmmxt
=yes
2827 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'
2828 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2829 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2830 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2831 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2832 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2833 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2834 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2835 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2836 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2837 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2838 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2839 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2840 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2841 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2842 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2843 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2844 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2845 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2846 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2847 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2849 # Checking kernel version...
2850 if x86_32
&& linux
; then
2852 kernel_version
=$
(uname
-r 2>&1)
2853 echocheck
"$system_name kernel version"
2854 case "$kernel_version" in
2855 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2856 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2857 _k_verc_problem
=yes;;
2859 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2862 if test "$_k_verc_fail" ; then
2863 echores
"$kernel_version, fail"
2864 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2865 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2866 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2867 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2868 echo "2.2.x you must upgrade it to get SSE support!"
2869 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2871 echores
"$kernel_version, ok"
2875 ######################
2876 # MAIN TESTS GO HERE #
2877 ######################
2882 int main(void) { return 0; }
2884 if cc_check
-lposix ; then
2885 extra_ldflags
="$extra_ldflags -lposix"
2893 int main(void) { return 0; }
2895 if cc_check
-lm ; then
2904 echocheck
"langinfo"
2905 if test "$_langinfo" = auto
; then
2907 #include <langinfo.h>
2908 int main(void) { nl_langinfo(CODESET); return 0; }
2911 cc_check
&& _langinfo
=yes
2913 if test "$_langinfo" = yes ; then
2914 def_langinfo
='#define HAVE_LANGINFO 1'
2916 def_langinfo
='#undef HAVE_LANGINFO'
2918 echores
"$_langinfo"
2921 echocheck
"language"
2922 # Set preferred languages, "all" uses English as main language.
2923 test -z "$language" && language
=$LINGUAS
2924 test -z "$language_doc" && language_doc
=$language
2925 test -z "$language_man" && language_man
=$language
2926 test -z "$language_msg" && language_msg
=$language
2927 language_doc
=$
(echo $language_doc |
tr , " ")
2928 language_man
=$
(echo $language_man |
tr , " ")
2929 language_msg
=$
(echo $language_msg |
tr , " ")
2931 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2932 test "$language_man" = "all" && language_man
=$man_lang_all
2933 test "$language_msg" = "all" && language_msg
=en
2935 # Prune non-existing translations from language lists.
2936 # Set message translation to the first available language.
2937 # Fall back on English.
2938 for lang
in $language_doc ; do
2939 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2941 language_doc
=$tmp_language_doc
2942 test -z "$language_doc" && language_doc
=en
2944 for lang
in $language_man ; do
2945 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2947 language_man
=$tmp_language_man
2948 test -z "$language_man" && language_man
=en
2950 for lang
in $language_msg ; do
2951 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2953 language_msg
=$tmp_language_msg
2954 test -z "$language_msg" && language_msg
=en
2955 _mp_help
="help/help_mp-${language_msg}.h"
2956 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2959 echocheck
"enable sighandler"
2960 if test "$_sighandler" = yes ; then
2961 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2963 def_sighandler
='#undef CONFIG_SIGHANDLER'
2965 echores
"$_sighandler"
2967 echocheck
"runtime cpudetection"
2968 if test "$_runtime_cpudetection" = yes ; then
2969 _optimizing
="Runtime CPU-Detection enabled"
2970 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2972 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2974 echores
"$_runtime_cpudetection"
2977 echocheck
"restrict keyword"
2978 for restrict_keyword
in restrict __restrict __restrict__
; do
2979 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2981 def_restrict_keyword
=$restrict_keyword
2985 if [ -n "$def_restrict_keyword" ]; then
2986 echores
"$def_restrict_keyword"
2990 # Avoid infinite recursion loop ("#define restrict restrict")
2991 if [ "$def_restrict_keyword" != "restrict" ]; then
2992 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2994 def_restrict_keyword
=""
2998 echocheck
"__builtin_expect"
2999 # GCC branch prediction hint
3002 a = __builtin_expect(a, 10);
3003 return a == 10 ? 0 : 1;
3005 int main(void) { return foo(10) && foo(0); }
3008 cc_check
&& _builtin_expect
=yes
3009 if test "$_builtin_expect" = yes ; then
3010 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
3012 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
3014 echores
"$_builtin_expect"
3020 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
3023 cc_check
-lkstat && _kstat
=yes
3024 if test "$_kstat" = yes ; then
3025 def_kstat
="#define HAVE_LIBKSTAT 1"
3026 extra_ldflags
="$extra_ldflags -lkstat"
3028 def_kstat
="#undef HAVE_LIBKSTAT"
3034 # required for nanosleep on some systems
3037 int main(void) { (void) nanosleep(0, 0); return 0; }
3040 cc_check
-lposix4 && _posix4
=yes
3041 if test "$_posix4" = yes ; then
3042 extra_ldflags
="$extra_ldflags -lposix4"
3046 for func
in exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf truncf
; do
3050 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
3053 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
3054 if eval test "x\$_$func" = "xyes"; then
3055 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3058 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3067 int main(void) { char a; mkstemp(&a); return 0; }
3070 cc_check
&& _mkstemp
=yes
3071 if test "$_mkstemp" = yes ; then
3072 def_mkstemp
='#define HAVE_MKSTEMP 1'
3074 def_mkstemp
='#undef HAVE_MKSTEMP'
3079 echocheck
"nanosleep"
3080 # also check for nanosleep
3083 int main(void) { (void) nanosleep(0, 0); return 0; }
3086 cc_check
&& _nanosleep
=yes
3087 if test "$_nanosleep" = yes ; then
3088 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3090 def_nanosleep
='#undef HAVE_NANOSLEEP'
3092 echores
"$_nanosleep"
3096 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3097 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3100 #include <sys/socket.h>
3101 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3104 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3105 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3107 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3108 if test $_winsock2_h = auto
; then
3111 #include <winsock2.h>
3112 int main(void) { (void) gethostbyname(0); return 0; }
3114 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3116 test "$_ld_sock" && res_comment
="using $_ld_sock"
3120 if test $_winsock2_h = yes ; then
3122 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3123 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=1'
3125 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3126 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=0'
3130 echocheck
"netdb.h, struct addrinfo"
3131 if test "$_struct_addrinfo" = auto
; then
3135 #include <winsock2.h>
3136 #include <ws2tcpip.h>
3138 #include <sys/types.h>
3139 #include <sys/socket.h>
3142 int main(void) { struct addrinfo ai; return 0; }
3144 cc_check
$cc_check_winsock2_h && _struct_addrinfo
=yes
3146 echores
"$_struct_addrinfo"
3148 if test "$_struct_addrinfo" = yes; then
3149 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 1"
3151 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 0"
3155 echocheck
"netdb.h, getaddrinfo()"
3156 if test "$_getaddrinfo" = auto
; then
3160 #include <winsock2.h>
3162 #include <sys/types.h>
3163 #include <sys/socket.h>
3166 int main(void) { (void) getaddrinfo(0, 0, 0, 0); return 0; }
3168 cc_check
$cc_check_winsock2_h && _getaddrinfo
=yes
3170 echores
"$_getaddrinfo"
3172 if test "$_getaddrinfo" = yes; then
3173 def_getaddrinfo
="#define HAVE_GETADDRINFO 1"
3175 def_getaddrinfo
="#define HAVE_GETADDRINFO 0"
3179 echocheck
"sockaddr_storage"
3180 if test "$_struct_sockaddr_storage" = auto
; then
3181 _struct_sockaddr_storage
=no
3184 #include <winsock2.h>
3186 #include <sys/socket.h>
3188 int main(void) { struct sockaddr_storage sas; return 0; }
3190 cc_check
$cc_check_winsock2_h && _struct_sockaddr_storage
=yes
3192 echores
"$_struct_sockaddr_storage"
3194 if test "$_struct_sockaddr_storage" = yes; then
3195 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
3197 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
3201 echocheck
"struct ipv6_mreq"
3202 _struct_ipv6_mreq
=no
3203 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 0"
3204 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3207 int main(void) { struct ipv6_mreq mreq6; return 0; }
3209 cc_check
&& _struct_ipv6_mreq
=yes && \
3210 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 1" && break
3212 echores
"$_struct_ipv6_mreq"
3215 echocheck
"struct sockaddr_in6"
3216 _struct_sockaddr_in6
=no
3217 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 0"
3218 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3221 int main(void) { struct sockaddr_in6 addr; return 0; }
3223 cc_check
&& _struct_sockaddr_in6
=yes && \
3224 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 1" && break
3226 echores
"$_struct_sockaddr_in6"
3229 echocheck
"struct sockaddr sa_len"
3230 _struct_sockaddr_sa_len
=no
3231 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 0"
3234 #include <winsock2.h>
3236 #include <sys/types.h>
3237 #include <sys/socket.h>
3239 int main(void) { const void *p = &((struct sockaddr *)0)->sa_len; return 0; }
3241 cc_check
$cc_check_winsock2_h && _struct_sockaddr_sa_len
=yes && \
3242 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 1"
3243 echores
"$_struct_sockaddr_sa_len"
3246 echocheck
"arpa/inet.h"
3248 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3250 #include <arpa/inet.h>
3251 int main(void) { return 0; }
3253 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3254 echores
"$arpa_inet_h"
3257 echocheck
"inet_pton()"
3258 def_inet_pton
='#define HAVE_INET_PTON 0'
3261 #include <sys/types.h>
3262 #include <sys/socket.h>
3263 #include <arpa/inet.h>
3264 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3266 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3267 cc_check
$_ld_tmp && inet_pton
=yes && break
3269 if test $inet_pton = yes ; then
3270 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3271 def_inet_pton
='#define HAVE_INET_PTON 1'
3273 echores
"$inet_pton"
3276 echocheck
"inet_aton()"
3277 def_inet_aton
='#define HAVE_INET_ATON 0'
3280 #include <sys/types.h>
3281 #include <sys/socket.h>
3282 #include <arpa/inet.h>
3283 int main(void) { (void) inet_aton(0, 0); return 0; }
3285 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3286 cc_check
$_ld_tmp && inet_aton
=yes && break
3288 if test $inet_aton = yes ; then
3289 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3290 def_inet_aton
='#define HAVE_INET_ATON 1'
3292 echores
"$inet_aton"
3295 echocheck
"socklen_t"
3297 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3300 int main(void) { socklen_t v = 0; return v; }
3302 cc_check
&& _socklen_t
=yes && break
3304 if test "$_socklen_t" = yes ; then
3305 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3307 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3309 echores
"$_socklen_t"
3312 echocheck
"closesocket()"
3315 #include <winsock2.h>
3316 int main(void) { closesocket(~0); return 0; }
3318 cc_check
$_ld_sock && _closesocket
=yes
3319 if test "$_closesocket" = yes ; then
3320 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3322 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3324 echores
"$_closesocket"
3328 test $_winsock2_h = no
&& test $inet_pton = no
&&
3329 test $inet_aton = no
&& _network
=no
3330 if test "$_network" = yes ; then
3331 def_network
='#define CONFIG_NETWORK 1'
3332 extra_ldflags
="$extra_ldflags $_ld_sock"
3333 inputmodules
="network $inputmodules"
3335 _noinputmodules
="network $_noinputmodules"
3336 def_network
='#undef CONFIG_NETWORK'
3338 _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
//)
3339 _libavdemuxers
=$
(echo $_libavdemuxers |
sed -e s
/RTSP_DEMUXER
// -e s
/SDP_DEMUXER
//)
3345 if test "$_inet6" = auto
; then
3347 #include <sys/types.h>
3348 #if !defined(_WIN32) || defined(__CYGWIN__)
3349 #include <sys/socket.h>
3350 #include <netinet/in.h>
3352 #include <ws2tcpip.h>
3354 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3357 if cc_check
$_ld_sock ; then
3361 if test "$_inet6" = yes ; then
3362 def_inet6
='#define HAVE_AF_INET6 1'
3364 def_inet6
='#undef HAVE_AF_INET6'
3369 echocheck
"gethostbyname2"
3370 if test "$_gethostbyname2" = auto
; then
3372 #include <sys/types.h>
3373 #include <sys/socket.h>
3375 int main(void) { gethostbyname2("", AF_INET); return 0; }
3382 if test "$_gethostbyname2" = yes ; then
3383 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3385 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3387 echores
"$_gethostbyname2"
3390 echocheck
"inttypes.h (required)"
3392 #include <inttypes.h>
3393 int main(void) { return 0; }
3396 cc_check
&& _inttypes
=yes
3397 echores
"$_inttypes"
3399 if test "$_inttypes" = no
; then
3400 echocheck
"bitypes.h (inttypes.h predecessor)"
3402 #include <sys/bitypes.h>
3403 int main(void) { return 0; }
3405 cc_check
&& _inttypes
=yes
3406 if test "$_inttypes" = yes ; then
3407 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."
3409 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3414 echocheck
"int_fastXY_t in inttypes.h"
3416 #include <inttypes.h>
3418 volatile int_fast16_t v= 0;
3422 cc_check
&& _fast_inttypes
=yes
3423 if test "$_fast_inttypes" = no
; then
3425 typedef signed char int_fast8_t;
3426 typedef signed int int_fast16_t;
3427 typedef signed int int_fast32_t;
3428 typedef signed long long int_fast64_t;
3429 typedef unsigned char uint_fast8_t;
3430 typedef unsigned int uint_fast16_t;
3431 typedef unsigned int uint_fast32_t;
3432 typedef unsigned long long uint_fast64_t;'
3434 echores
"$_fast_inttypes"
3437 echocheck
"malloc.h"
3440 int main(void) { (void) malloc(0); return 0; }
3443 cc_check
&& _malloc
=yes
3444 if test "$_malloc" = yes ; then
3445 def_malloc_h
='#define HAVE_MALLOC_H 1'
3447 def_malloc_h
='#define HAVE_MALLOC_H 0'
3452 echocheck
"memalign()"
3453 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3454 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3457 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3460 cc_check
&& _memalign
=yes
3461 if test "$_memalign" = yes ; then
3462 def_memalign
='#define HAVE_MEMALIGN 1'
3464 def_memalign
='#define HAVE_MEMALIGN 0'
3465 def_map_memalign
='#define memalign(a,b) malloc(b)'
3466 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3468 echores
"$_memalign"
3471 echocheck
"posix_memalign()"
3473 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3475 #define _XOPEN_SOURCE 600
3477 int main(void) { posix_memalign(NULL, 0, 0); }
3479 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3480 echores
"$posix_memalign"
3483 echocheck
"alloca.h"
3486 int main(void) { (void) alloca(0); return 0; }
3489 cc_check
&& _alloca
=yes
3491 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3493 def_alloca_h
='#undef HAVE_ALLOCA_H'
3498 echocheck
"fastmemcpy"
3499 if test "$_fastmemcpy" = yes ; then
3500 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3502 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3504 echores
"$_fastmemcpy"
3507 echocheck
"hard-coded tables"
3508 if test "$hardcoded_tables" = yes ; then
3509 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 1'
3510 mak_hardcoded_tables
='CONFIG_HARDCODED_TABLES = yes'
3512 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 0'
3514 echores
"$hardcoded_tables"
3519 #include <sys/types.h>
3520 #include <sys/mman.h>
3521 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3524 cc_check
&& _mman
=yes
3525 if test "$_mman" = yes ; then
3526 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3528 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3529 os2
&& _need_mmap
=yes
3534 #include <sys/types.h>
3535 #include <sys/mman.h>
3536 int main(void) { void *p = MAP_FAILED; return 0; }
3538 _mman_has_map_failed
=no
3539 cc_check
&& _mman_has_map_failed
=yes
3540 if test "$_mman_has_map_failed" = yes ; then
3541 def_mman_has_map_failed
=''
3543 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3546 echocheck
"dynamic loader"
3550 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3553 for _ld_tmp
in "" "-ldl" ; do
3554 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3556 if test "$_dl" = yes ; then
3557 def_dl
='#define HAVE_LIBDL 1'
3559 def_dl
='#undef HAVE_LIBDL'
3564 echocheck
"dynamic a/v plugins support"
3565 if test "$_dl" = no
; then
3568 if test "$_dynamic_plugins" = yes ; then
3569 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3571 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3573 echores
"$_dynamic_plugins"
3576 def_threads
='#define HAVE_THREADS 0'
3580 THREAD_CFLAGS
=-D_REENTRANT
3581 elif freebsd || netbsd || openbsd || bsdos
; then
3582 THREAD_CFLAGS
=-D_THREAD_SAFE
3584 if test "$_pthreads" = auto
; then
3586 #include <pthread.h>
3587 void* func(void *arg) { return arg; }
3588 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3592 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3593 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3594 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3598 if test "$_pthreads" = yes ; then
3599 test $_ld_pthread && res_comment
="using $_ld_pthread"
3600 def_pthreads
='#define HAVE_PTHREADS 1'
3601 def_threads
='#define HAVE_THREADS 1'
3602 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3604 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3605 def_pthreads
='#undef HAVE_PTHREADS'
3606 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3607 mingw32 || _win32dll
=no
3609 echores
"$_pthreads"
3612 if test "$_pthreads" = yes ; then
3613 def_pthread_cache
="#define PTHREAD_CACHE 1"
3616 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3620 echocheck
"w32threads"
3621 if test "$_pthreads" = yes ; then
3622 res_comment
="using pthread instead"
3625 if test "$_w32threads" = auto
; then
3627 mingw32
&& _w32threads
=yes
3629 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3630 echores
"$_w32threads"
3634 if test "$_rpath" = yes ; then
3635 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3636 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3643 if test "$_iconv" = auto
; then
3648 #define INBUFSIZE 1024
3649 #define OUTBUFSIZE 4096
3651 char inbuffer[INBUFSIZE];
3652 char outbuffer[OUTBUFSIZE];
3657 char *tocode="UTF-8";
3658 char *fromcode="cp1250";
3659 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3660 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3661 char *iptr=inbuffer;
3662 char *optr=outbuffer;
3663 size_t inleft=numread;
3664 size_t outleft=OUTBUFSIZE;
3665 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3667 write(1, outbuffer, OUTBUFSIZE - outleft);
3670 if (iconv_close(icdsc) == -1)
3677 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3678 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3682 if test "$_iconv" = yes ; then
3683 def_iconv
='#define CONFIG_ICONV 1'
3685 def_iconv
='#undef CONFIG_ICONV'
3690 echocheck
"soundcard.h"
3692 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3693 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3694 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3696 #include <$_soundcard_header>
3697 int main(void) { return 0; }
3699 cc_check
&& _soundcard_h
=yes && res_comment
="$_soundcard_header" && break
3702 if test "$_soundcard_h" = yes ; then
3703 if test $_soundcard_header = "sys/soundcard.h"; then
3704 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3706 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3709 echores
"$_soundcard_h"
3712 echocheck
"sys/dvdio.h"
3715 #include <sys/dvdio.h>
3716 int main(void) { return 0; }
3719 cc_check
&& _dvdio
=yes
3720 if test "$_dvdio" = yes ; then
3721 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3723 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3728 echocheck
"sys/cdio.h"
3731 #include <sys/cdio.h>
3732 int main(void) { return 0; }
3735 cc_check
&& _cdio
=yes
3736 if test "$_cdio" = yes ; then
3737 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3739 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3744 echocheck
"linux/cdrom.h"
3746 #include <sys/types.h>
3747 #include <linux/cdrom.h>
3748 int main(void) { return 0; }
3751 cc_check
&& _cdrom
=yes
3752 if test "$_cdrom" = yes ; then
3753 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3755 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3763 int main(void) { return 0; }
3766 cc_check
&& _dvd
=yes
3767 if test "$_dvd" = yes ; then
3768 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3770 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3776 echocheck
"BSDI dvd.h"
3779 int main(void) { return 0; }
3782 cc_check
&& _bsdi_dvd
=yes
3783 if test "$_bsdi_dvd" = yes ; then
3784 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3786 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3788 echores
"$_bsdi_dvd"
3793 # also used by AIX, but AIX does not support VCD and/or libdvdread
3794 echocheck
"HP-UX SCSI header"
3796 #include <sys/scsi.h>
3797 int main(void) { return 0; }
3800 cc_check
&& _hpux_scsi_h
=yes
3801 if test "$_hpux_scsi_h" = yes ; then
3802 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3804 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3806 echores
"$_hpux_scsi_h"
3811 echocheck
"userspace SCSI headers (Solaris)"
3814 #include <stropts.h>
3815 #include <sys/scsi/scsi_types.h>
3816 #include <sys/scsi/impl/uscsi.h>
3817 int main(void) { return 0; }
3820 cc_check
&& _sol_scsi_h
=yes
3821 if test "$_sol_scsi_h" = yes ; then
3822 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3824 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3826 echores
"$_sol_scsi_h"
3831 if test "$_termcap" = auto
; then
3835 int main(void) { tgetent(NULL, NULL); return 0; }
3838 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3839 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3840 && _termcap
=yes && break
3843 if test "$_termcap" = yes ; then
3844 def_termcap
='#define HAVE_TERMCAP 1'
3845 test $_ld_tmp && res_comment
="using $_ld_tmp"
3847 def_termcap
='#undef HAVE_TERMCAP'
3853 def_termios
='#undef HAVE_TERMIOS'
3854 def_termios_h
='#undef HAVE_TERMIOS_H'
3855 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3856 if test "$_termios" = auto
; then
3858 for _termios_header
in "termios.h" "sys/termios.h"; do
3860 #include <$_termios_header>
3861 int main(void) { return 0; }
3863 cc_check
&& _termios
=yes && res_comment
="using $_termios_header" && break
3867 if test "$_termios" = yes ; then
3868 def_termios
='#define HAVE_TERMIOS 1'
3869 if test "$_termios_header" = "termios.h" ; then
3870 def_termios_h
='#define HAVE_TERMIOS_H 1'
3872 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3879 if test "$_shm" = auto
; then
3881 #include <sys/types.h>
3882 #include <sys/shm.h>
3883 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3886 cc_check
&& _shm
=yes
3888 if test "$_shm" = yes ; then
3889 def_shm
='#define HAVE_SHM 1'
3891 def_shm
='#undef HAVE_SHM'
3896 echocheck
"strsep()"
3899 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3902 cc_check
&& _strsep
=yes
3903 if test "$_strsep" = yes ; then
3904 def_strsep
='#define HAVE_STRSEP 1'
3907 def_strsep
='#undef HAVE_STRSEP'
3913 echocheck
"vsscanf()"
3915 #define _ISOC99_SOURCE
3918 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3921 cc_check
&& _vsscanf
=yes
3922 if test "$_vsscanf" = yes ; then
3923 def_vsscanf
='#define HAVE_VSSCANF 1'
3926 def_vsscanf
='#undef HAVE_VSSCANF'
3934 #define _XOPEN_SOURCE 600
3936 int main(void) { swab(0, 0, 0); return 0; }
3939 cc_check
&& _swab
=yes
3940 if test "$_swab" = yes ; then
3941 def_swab
='#define HAVE_SWAB 1'
3944 def_swab
='#undef HAVE_SWAB'
3949 echocheck
"POSIX select()"
3953 #include <sys/types.h>
3955 #include <sys/time.h>
3957 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3960 def_posix_select
='#undef HAVE_POSIX_SELECT'
3961 #select() of kLIBC (OS/2) supports socket only
3962 ! os2
&& cc_check
&& _posix_select
=yes \
3963 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3964 echores
"$_posix_select"
3967 echocheck
"audio select()"
3968 if test "$_select" = no
; then
3969 def_select
='#undef HAVE_AUDIO_SELECT'
3970 elif test "$_select" = yes ; then
3971 def_select
='#define HAVE_AUDIO_SELECT 1'
3976 echocheck
"gettimeofday()"
3979 #include <sys/time.h>
3980 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3983 cc_check
&& _gettimeofday
=yes
3984 if test "$_gettimeofday" = yes ; then
3985 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3986 _need_gettimeofday
=no
3988 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3989 _need_gettimeofday
=yes
3991 echores
"$_gettimeofday"
3998 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
4001 cc_check
&& _glob
=yes
4002 if test "$_glob" = yes ; then
4003 def_glob
='#define HAVE_GLOB 1'
4006 def_glob
='#undef HAVE_GLOB'
4012 echocheck
"setenv()"
4015 int main(void) { setenv("","",0); return 0; }
4018 cc_check
&& _setenv
=yes
4019 if test "$_setenv" = yes ; then
4020 def_setenv
='#define HAVE_SETENV 1'
4023 def_setenv
='#undef HAVE_SETENV'
4029 echocheck
"setmode()"
4031 def_setmode
='#define HAVE_SETMODE 0'
4034 int main(void) { setmode(0, 0); return 0; }
4036 cc_check
&& _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
4041 echocheck
"sysi86()"
4043 #include <sys/sysi86.h>
4044 int main(void) { sysi86(0); return 0; }
4047 cc_check
&& _sysi86
=yes
4048 if test "$_sysi86" = yes ; then
4049 def_sysi86
='#define HAVE_SYSI86 1'
4051 #include <sys/sysi86.h>
4052 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
4054 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
4056 def_sysi86
='#undef HAVE_SYSI86'
4062 echocheck
"sys/sysinfo.h"
4064 #include <sys/sysinfo.h>
4066 struct sysinfo s_info;
4072 cc_check
&& _sys_sysinfo
=yes
4073 if test "$_sys_sysinfo" = yes ; then
4074 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
4076 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
4078 echores
"$_sys_sysinfo"
4083 echocheck
"Mac OS X Finder Support"
4084 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
4085 if test "$_macosx_finder" = yes ; then
4086 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
4087 extra_ldflags
="$extra_ldflags -framework Carbon"
4089 echores
"$_macosx_finder"
4091 echocheck
"Mac OS X Bundle file locations"
4092 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
4093 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
4094 if test "$_macosx_bundle" = yes ; then
4095 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
4096 extra_ldflags
="$extra_ldflags -framework Carbon"
4098 echores
"$_macosx_bundle"
4100 echocheck
"Apple Remote"
4101 if test "$_apple_remote" = auto
; then
4105 #include <IOKit/IOCFPlugIn.h>
4107 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
4108 CFMutableDictionaryRef hidMatchDictionary;
4109 IOReturn ioReturnValue;
4111 // Set up a matching dictionary to search the I/O Registry by class.
4112 // name for all HID class devices
4113 hidMatchDictionary = IOServiceMatching("AppleIRController");
4115 // Now search I/O Registry for matching devices.
4116 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
4117 hidMatchDictionary, &hidObjectIterator);
4119 // If search is unsuccessful, return nonzero.
4120 if (ioReturnValue != kIOReturnSuccess ||
4121 !IOIteratorIsValid(hidObjectIterator)) {
4127 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
4129 if test "$_apple_remote" = yes ; then
4130 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
4131 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
4133 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
4135 echores
"$_apple_remote"
4141 echocheck
"Apple IR"
4142 if test "$_apple_ir" = auto
; then
4145 #include <linux/types.h>
4146 #include <linux/input.h>
4148 struct input_event ev;
4153 cc_check
&& _apple_ir
=yes
4155 if test "$_apple_ir" = yes ; then
4156 def_apple_ir
='#define CONFIG_APPLE_IR 1'
4158 def_apple_ir
='#undef CONFIG_APPLE_IR'
4160 echores
"$_apple_ir"
4163 echocheck
"pkg-config"
4164 _pkg_config
=pkg-config
4165 if $
($_pkg_config --version > /dev
/null
2>&1); then
4166 if test "$_ld_static"; then
4167 _pkg_config
="$_pkg_config --static"
4176 echocheck
"Samba support (libsmbclient)"
4177 if test "$_smb" = yes; then
4178 extra_ldflags
="$extra_ldflags -lsmbclient"
4180 if test "$_smb" = auto
; then
4183 #include <libsmbclient.h>
4184 int main(void) { smbc_opendir("smb://"); return 0; }
4186 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
4187 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
4192 if test "$_smb" = yes; then
4193 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
4194 inputmodules
="smb $inputmodules"
4196 def_smb
="#undef CONFIG_LIBSMBCLIENT"
4197 _noinputmodules
="smb $_noinputmodules"
4208 if test "$_tdfxfb" = yes ; then
4209 def_tdfxfb
='#define CONFIG_TDFXFB 1'
4210 vomodules
="tdfxfb $vomodules"
4212 def_tdfxfb
='#undef CONFIG_TDFXFB'
4213 novomodules
="tdfxfb $novomodules"
4218 if test "$_s3fb" = yes ; then
4219 def_s3fb
='#define CONFIG_S3FB 1'
4220 vomodules
="s3fb $vomodules"
4222 def_s3fb
='#undef CONFIG_S3FB'
4223 novomodules
="s3fb $novomodules"
4228 if test "$_wii" = yes ; then
4229 def_wii
='#define CONFIG_WII 1'
4230 vomodules
="wii $vomodules"
4232 def_wii
='#undef CONFIG_WII'
4233 novomodules
="wii $novomodules"
4238 if test "$_tdfxvid" = yes ; then
4239 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
4240 vomodules
="tdfx_vid $vomodules"
4242 def_tdfxvid
='#undef CONFIG_TDFX_VID'
4243 novomodules
="tdfx_vid $novomodules"
4248 if test "$_xvr100" = auto
; then
4251 #include <sys/fbio.h>
4252 #include <sys/visual_io.h>
4254 struct vis_identifier ident;
4255 struct fbgattr attr;
4256 ioctl(0, VIS_GETIDENTIFIER, &ident);
4257 ioctl(0, FBIOGATTR, &attr);
4262 cc_check
&& _xvr100
=yes
4264 if test "$_xvr100" = yes ; then
4265 def_xvr100
='#define CONFIG_XVR100 1'
4266 vomodules
="xvr100 $vomodules"
4268 def_tdfxvid
='#undef CONFIG_XVR100'
4269 novomodules
="xvr100 $novomodules"
4274 if test "$_tga" = yes ; then
4275 def_tga
='#define CONFIG_TGA 1'
4276 vomodules
="tga $vomodules"
4278 def_tga
='#undef CONFIG_TGA'
4279 novomodules
="tga $novomodules"
4284 echocheck
"md5sum support"
4285 if test "$_md5sum" = yes; then
4286 def_md5sum
="#define CONFIG_MD5SUM 1"
4287 vomodules
="md5sum $vomodules"
4289 def_md5sum
="#undef CONFIG_MD5SUM"
4290 novomodules
="md5sum $novomodules"
4295 echocheck
"yuv4mpeg support"
4296 if test "$_yuv4mpeg" = yes; then
4297 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4298 vomodules
="yuv4mpeg $vomodules"
4300 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4301 novomodules
="yuv4mpeg $novomodules"
4303 echores
"$_yuv4mpeg"
4307 if test "$_bl" = yes ; then
4308 def_bl
='#define CONFIG_BL 1'
4309 vomodules
="bl $vomodules"
4311 def_bl
='#undef CONFIG_BL'
4312 novomodules
="bl $novomodules"
4317 echocheck
"DirectFB"
4318 if test "$_directfb" = auto
; then
4321 #include <directfb.h>
4322 int main(void) { DirectFBInit(0, 0); return 0; }
4324 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4325 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4326 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4327 extra_cflags
="$extra_cflags $_inc_tmp" && break
4332 expr $1 \
* 65536 + $2 \
* 256 + $3
4335 if test "$_directfb" = yes; then
4337 #include <directfb_version.h>
4339 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4342 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4343 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4344 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4345 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4346 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4347 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4348 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4349 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4350 res_comment
="$_directfb_version"
4351 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4353 def_directfb_version
='#undef DIRECTFBVERSION'
4355 res_comment
="version >=0.9.13 required"
4359 res_comment
="failed to get version"
4362 echores
"$_directfb"
4364 if test "$_directfb" = yes ; then
4365 def_directfb
='#define CONFIG_DIRECTFB 1'
4366 vomodules
="directfb $vomodules"
4367 libs_mplayer
="$libs_mplayer -ldirectfb"
4369 def_directfb
='#undef CONFIG_DIRECTFB'
4370 novomodules
="directfb $novomodules"
4372 if test "$_dfbmga" = yes; then
4373 vomodules
="dfbmga $vomodules"
4374 def_dfbmga
='#define CONFIG_DFBMGA 1'
4376 novomodules
="dfbmga $novomodules"
4377 def_dfbmga
='#undef CONFIG_DFBMGA'
4381 echocheck
"X11 headers presence"
4383 res_comment
="check if the dev(el) packages are installed"
4384 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4385 if test -f "$I/X11/Xlib.h" ; then
4391 if test $_cross_compile = no
; then
4392 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4393 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4394 if test -f "$I/X11/Xlib.h" ; then
4395 extra_cflags
="$extra_cflags -I$I"
4397 res_comment
="using $I"
4402 echores
"$_x11_headers"
4406 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4408 #include <X11/Xlib.h>
4409 #include <X11/Xutil.h>
4410 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4412 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4413 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4416 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4418 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4420 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4421 && _x11
=yes && break
4424 if test "$_x11" = yes ; then
4425 def_x11
='#define CONFIG_X11 1'
4426 vomodules
="x11 xover $vomodules"
4429 def_x11
='#undef CONFIG_X11'
4430 novomodules
="x11 $novomodules"
4431 res_comment
="check if the dev(el) packages are installed"
4432 # disable stuff that depends on X
4433 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4437 echocheck
"Xss screensaver extensions"
4438 if test "$_xss" = auto
; then
4440 #include <X11/Xlib.h>
4441 #include <X11/extensions/scrnsaver.h>
4442 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4445 cc_check
-lXss && _xss
=yes
4447 if test "$_xss" = yes ; then
4448 def_xss
='#define CONFIG_XSS 1'
4449 libs_mplayer
="$libs_mplayer -lXss"
4451 def_xss
='#undef CONFIG_XSS'
4458 if test "$_x11" = yes ; then
4460 #include <X11/Xmd.h>
4461 #include <X11/Xlib.h>
4462 #include <X11/Xutil.h>
4463 #include <X11/Xatom.h>
4464 #include <X11/extensions/dpms.h>
4465 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4467 cc_check
-lXdpms && _xdpms3
=yes
4469 #include <X11/Xlib.h>
4470 #include <X11/extensions/dpms.h>
4471 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4473 cc_check
-lXext && _xdpms4
=yes
4475 if test "$_xdpms4" = yes ; then
4476 def_xdpms
='#define CONFIG_XDPMS 1'
4477 res_comment
="using Xdpms 4"
4479 elif test "$_xdpms3" = yes ; then
4480 def_xdpms
='#define CONFIG_XDPMS 1'
4481 libs_mplayer
="$libs_mplayer -lXdpms"
4482 res_comment
="using Xdpms 3"
4485 def_xdpms
='#undef CONFIG_XDPMS'
4491 if test "$_xv" = auto
; then
4493 #include <X11/Xlib.h>
4494 #include <X11/extensions/Xvlib.h>
4496 (void) XvGetPortAttribute(0, 0, 0, 0);
4497 (void) XvQueryPortAttributes(0, 0, 0);
4501 cc_check
-lXv && _xv
=yes
4504 if test "$_xv" = yes ; then
4505 def_xv
='#define CONFIG_XV 1'
4506 libs_mplayer
="$libs_mplayer -lXv"
4507 vomodules
="xv $vomodules"
4509 def_xv
='#undef CONFIG_XV'
4510 novomodules
="xv $novomodules"
4516 if test "$_xv" = yes && test "$_xvmc" != no
; then
4519 #include <X11/Xlib.h>
4520 #include <X11/extensions/Xvlib.h>
4521 #include <X11/extensions/XvMClib.h>
4523 (void) XvMCQueryExtension(0,0,0);
4524 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4527 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4528 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4531 if test "$_xvmc" = yes ; then
4532 def_xvmc
='#define CONFIG_XVMC 1'
4533 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4534 vomodules
="xvmc $vomodules"
4535 res_comment
="using $_xvmclib"
4537 def_xvmc
='#define CONFIG_XVMC 0'
4538 novomodules
="xvmc $novomodules"
4539 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_XVMC_DECODER
//)
4545 if test "$_vdpau" = auto
; then
4547 if test "$_dl" = yes ; then
4549 #include <vdpau/vdpau_x11.h>
4551 (void) vdp_device_create_x11(0, 0, 0, 0);
4552 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4554 cc_check
-lvdpau && _vdpau
=yes
4557 if test "$_vdpau" = yes ; then
4558 def_vdpau
='#define CONFIG_VDPAU 1'
4559 libs_mplayer
="$libs_mplayer -lvdpau"
4560 vomodules
="vdpau $vomodules"
4562 def_vdpau
='#define CONFIG_VDPAU 0'
4563 novomodules
="vdpau $novomodules"
4564 _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
//)
4569 echocheck
"Xinerama"
4570 if test "$_xinerama" = auto
; then
4572 #include <X11/Xlib.h>
4573 #include <X11/extensions/Xinerama.h>
4574 int main(void) { (void) XineramaIsActive(0); return 0; }
4577 cc_check
-lXinerama && _xinerama
=yes
4580 if test "$_xinerama" = yes ; then
4581 def_xinerama
='#define CONFIG_XINERAMA 1'
4582 libs_mplayer
="$libs_mplayer -lXinerama"
4584 def_xinerama
='#undef CONFIG_XINERAMA'
4586 echores
"$_xinerama"
4589 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4590 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4591 # named 'X extensions' or something similar.
4592 # This check may be useful for future mplayer versions (to change resolution)
4593 # If you run into problems, remove '-lXxf86vm'.
4595 if test "$_vm" = auto
; then
4597 #include <X11/Xlib.h>
4598 #include <X11/extensions/xf86vmode.h>
4599 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4602 cc_check
-lXxf86vm && _vm
=yes
4604 if test "$_vm" = yes ; then
4605 def_vm
='#define CONFIG_XF86VM 1'
4606 libs_mplayer
="$libs_mplayer -lXxf86vm"
4608 def_vm
='#undef CONFIG_XF86VM'
4612 # Check for the presence of special keycodes, like audio control buttons
4613 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4614 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4615 # have these new keycodes.
4616 echocheck
"XF86keysym"
4617 if test "$_xf86keysym" = auto
; then
4620 #include <X11/Xlib.h>
4621 #include <X11/XF86keysym.h>
4622 int main(void) { return XF86XK_AudioPause; }
4624 cc_check
&& _xf86keysym
=yes
4626 if test "$_xf86keysym" = yes ; then
4627 def_xf86keysym
='#define CONFIG_XF86XK 1'
4629 def_xf86keysym
='#undef CONFIG_XF86XK'
4631 echores
"$_xf86keysym"
4634 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4636 #include <X11/Xlib.h>
4637 #include <X11/extensions/xf86dga.h>
4638 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4641 cc_check
-lXxf86dga && _dga2
=yes
4643 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4645 #include <X11/Xlib.h>
4646 #include <X11/extensions/xf86dga.h>
4647 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4650 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4654 def_dga
='#undef CONFIG_DGA'
4655 def_dga1
='#undef CONFIG_DGA1'
4656 def_dga2
='#undef CONFIG_DGA2'
4657 if test "$_dga1" = yes ; then
4659 def_dga1
='#define CONFIG_DGA1 1'
4660 res_comment
="using DGA 1.0"
4661 elif test "$_dga2" = yes ; then
4663 def_dga2
='#define CONFIG_DGA2 1'
4664 res_comment
="using DGA 2.0"
4666 if test "$_dga" = yes ; then
4667 def_dga
='#define CONFIG_DGA 1'
4668 libs_mplayer
="$libs_mplayer -lXxf86dga"
4669 vomodules
="dga $vomodules"
4671 novomodules
="dga $novomodules"
4677 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4678 def_3dfx
='#define CONFIG_3DFX 1'
4679 vomodules
="3dfx $vomodules"
4681 def_3dfx
='#undef CONFIG_3DFX'
4682 novomodules
="3dfx $novomodules"
4688 def_vidix
='#undef CONFIG_VIDIX'
4689 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4690 _vidix_drv_cyberblade
=no
4691 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4693 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4694 _vidix_drv_mach64
=no
4695 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4697 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4698 _vidix_drv_mga_crtc2
=no
4699 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4700 _vidix_drv_nvidia
=no
4701 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4703 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4705 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4706 _vidix_drv_radeon
=no
4707 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4708 _vidix_drv_rage128
=no
4709 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4711 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4712 _vidix_drv_sh_veu
=no
4713 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4715 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4716 _vidix_drv_unichrome
=no
4717 if test "$_vidix" = auto
; then
4719 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4721 x86_64
&& ! linux
&& _vidix
=no
4722 (ppc || alpha
) && linux
&& _vidix
=yes
4726 if test "$_vidix" = yes ; then
4727 def_vidix
='#define CONFIG_VIDIX 1'
4728 vomodules
="cvidix $vomodules"
4729 # FIXME: ivtv driver temporarily disabled until we have a proper test
4730 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4731 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4733 # some vidix drivers are architecture and os specific, discard them elsewhere
4734 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4735 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4737 for driver
in $_vidix_drivers ; do
4738 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4739 eval _vidix_drv_
${driver}=yes
4740 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4743 echocheck
"VIDIX PCI device name database"
4744 echores
"$_vidix_pcidb"
4745 if test "$_vidix_pcidb" = yes ; then
4751 echocheck
"VIDIX dhahelper support"
4752 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4753 echores
"$_dhahelper"
4755 echocheck
"VIDIX svgalib_helper support"
4756 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4757 echores
"$_svgalib_helper"
4760 novomodules
="cvidix $novomodules"
4763 if test "$_vidix" = yes && win32
; then
4765 vomodules
="winvidix $vomodules"
4766 libs_mplayer
="$libs_mplayer -lgdi32"
4768 novomodules
="winvidix $novomodules"
4770 if test "$_vidix" = yes && test "$_x11" = yes; then
4772 vomodules
="xvidix $vomodules"
4774 novomodules
="xvidix $novomodules"
4777 echocheck
"/dev/mga_vid"
4778 if test "$_mga" = auto
; then
4780 test -c /dev
/mga_vid
&& _mga
=yes
4782 if test "$_mga" = yes ; then
4783 def_mga
='#define CONFIG_MGA 1'
4784 vomodules
="mga $vomodules"
4786 def_mga
='#undef CONFIG_MGA'
4787 novomodules
="mga $novomodules"
4792 if test "$_xmga" = auto
; then
4794 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4796 if test "$_xmga" = yes ; then
4797 def_xmga
='#define CONFIG_XMGA 1'
4798 vomodules
="xmga $vomodules"
4800 def_xmga
='#undef CONFIG_XMGA'
4801 novomodules
="xmga $novomodules"
4807 if test "$_ggi" = auto
; then
4809 #include <ggi/ggi.h>
4810 int main(void) { ggiInit(); return 0; }
4813 cc_check
-lggi && _ggi
=yes
4815 if test "$_ggi" = yes ; then
4816 def_ggi
='#define CONFIG_GGI 1'
4817 libs_mplayer
="$libs_mplayer -lggi"
4818 vomodules
="ggi $vomodules"
4820 def_ggi
='#undef CONFIG_GGI'
4821 novomodules
="ggi $novomodules"
4825 echocheck
"GGI extension: libggiwmh"
4826 if test "$_ggiwmh" = auto
; then
4829 #include <ggi/ggi.h>
4830 #include <ggi/wmh.h>
4831 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4833 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4835 # needed to get right output on obscure combination
4836 # like --disable-ggi --enable-ggiwmh
4837 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4838 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4839 libs_mplayer
="$libs_mplayer -lggiwmh"
4842 def_ggiwmh
='#undef CONFIG_GGIWMH'
4848 if test "$_aa" = auto
; then
4851 extern struct aa_hardware_params aa_defparams;
4852 extern struct aa_renderparams aa_defrenderparams;
4856 (void) aa_init(0, 0, 0);
4857 c = aa_autoinit(&aa_defparams);
4858 p = aa_getrenderparams();
4859 aa_autoinitkbd(c,0);
4863 for _ld_tmp
in "-laa" ; do
4864 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4867 if test "$_aa" = yes ; then
4868 def_aa
='#define CONFIG_AA 1'
4870 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4872 vomodules
="aa $vomodules"
4874 def_aa
='#undef CONFIG_AA'
4875 novomodules
="aa $novomodules"
4881 if test "$_caca" = auto
; then
4883 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4886 #ifdef CACA_API_VERSION_1
4889 int main(void) { (void) caca_init(); return 0; }
4891 cc_check $
(caca-config
--libs) && _caca
=yes
4894 if test "$_caca" = yes ; then
4895 def_caca
='#define CONFIG_CACA 1'
4896 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4897 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4898 vomodules
="caca $vomodules"
4900 def_caca
='#undef CONFIG_CACA'
4901 novomodules
="caca $novomodules"
4907 if test "$_svga" = auto
; then
4910 int main(void) { return 0; }
4913 cc_check
-lvga $_ld_lm && _svga
=yes
4915 if test "$_svga" = yes ; then
4916 def_svga
='#define CONFIG_SVGALIB 1'
4917 libs_mplayer
="$libs_mplayer -lvga"
4918 vomodules
="svga $vomodules"
4920 def_svga
='#undef CONFIG_SVGALIB'
4921 novomodules
="svga $novomodules"
4927 if test "$_fbdev" = auto
; then
4931 if test "$_fbdev" = yes ; then
4932 def_fbdev
='#define CONFIG_FBDEV 1'
4933 vomodules
="fbdev $vomodules"
4935 def_fbdev
='#undef CONFIG_FBDEV'
4936 novomodules
="fbdev $novomodules"
4943 if test "$_dvb" = auto
; then
4947 #include <sys/ioctl.h>
4951 #include <linux/dvb/dmx.h>
4952 #include <linux/dvb/frontend.h>
4953 #include <linux/dvb/video.h>
4954 #include <linux/dvb/audio.h>
4955 int main(void) {return 0;}
4957 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4958 cc_check
$_inc_tmp && _dvb
=yes && \
4959 extra_cflags
="$extra_cflags $_inc_tmp" && break
4963 if test "$_dvb" = yes ; then
4965 inputmodules
="dvb $inputmodules"
4966 def_dvb
='#define CONFIG_DVB 1'
4967 def_dvbin
='#define CONFIG_DVBIN 1'
4968 aomodules
="mpegpes(dvb) $aomodules"
4969 vomodules
="mpegpes(dvb) $vomodules"
4972 _noinputmodules
="dvb $_noinputmodules"
4973 def_dvb
='#undef CONFIG_DVB'
4974 def_dvbin
='#undef CONFIG_DVBIN '
4975 aomodules
="mpegpes(file) $aomodules"
4976 vomodules
="mpegpes(file) $vomodules"
4982 echocheck
"QuickTime"
4983 if test "$quicktime" = auto
; then
4985 #include <QuickTime/QuickTime.h>
4987 ImageDescription *desc;
4994 cc_check
-framework QuickTime
&& quicktime
=yes
4996 if test "$quicktime" = yes ; then
4997 extra_ldflags
="$extra_ldflags -framework QuickTime"
4998 def_quicktime
='#define CONFIG_QUICKTIME 1'
5000 def_quicktime
='#undef CONFIG_QUICKTIME'
5006 if test "$_quartz" = auto
; then
5008 #include <Carbon/Carbon.h>
5010 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
5015 cc_check
-framework Carbon
&& _quartz
=yes
5017 if test "$_quartz" = yes ; then
5018 libs_mplayer
="$libs_mplayer -framework Carbon"
5019 def_quartz
='#define CONFIG_QUARTZ 1'
5020 vomodules
="quartz $vomodules"
5022 def_quartz
='#undef CONFIG_QUARTZ'
5023 novomodules
="quartz $novomodules"
5027 echocheck
"CoreVideo"
5028 if test "$_corevideo" = auto
; then
5030 #include <Carbon/Carbon.h>
5031 #include <CoreServices/CoreServices.h>
5032 #include <OpenGL/OpenGL.h>
5033 #include <QuartzCore/CoreVideo.h>
5034 int main(void) { return 0; }
5037 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
5039 if test "$_corevideo" = yes ; then
5040 vomodules
="corevideo $vomodules"
5041 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
5042 def_corevideo
='#define CONFIG_COREVIDEO 1'
5044 novomodules
="corevideo $novomodules"
5045 def_corevideo
='#undef CONFIG_COREVIDEO'
5047 echores
"$_corevideo"
5052 echocheck
"PNG support"
5053 if test "$_png" = auto
; then
5056 # Don't check for -lpng on irix since it has its own libpng
5057 # incompatible with the GNU libpng
5058 res_comment
="disabled on irix (not GNU libpng)"
5064 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
5065 printf("libpng: %s\n", png_libpng_ver);
5066 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
5069 cc_check
-lpng -lz $_ld_lm && _png
=yes
5073 if test "$_png" = yes ; then
5074 def_png
='#define CONFIG_PNG 1'
5075 extra_ldflags
="$extra_ldflags -lpng -lz"
5077 def_png
='#undef CONFIG_PNG'
5080 echocheck
"MNG support"
5081 if test "$_mng" = auto
; then
5086 const char * p_ver = mng_version_text();
5087 return !p_ver || p_ver[0] == 0;
5090 if cc_check
-lmng -lz $_ld_lm ; then
5095 if test "$_mng" = yes ; then
5096 def_mng
='#define CONFIG_MNG 1'
5097 extra_ldflags
="$extra_ldflags -lmng -lz"
5099 def_mng
='#undef CONFIG_MNG'
5102 echocheck
"JPEG support"
5103 if test "$_jpeg" = auto
; then
5110 #include <jpeglib.h>
5111 int main(void) { return 0; }
5113 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
5117 if test "$_jpeg" = yes ; then
5118 def_jpeg
='#define CONFIG_JPEG 1'
5119 vomodules
="jpeg $vomodules"
5120 extra_ldflags
="$extra_ldflags -ljpeg"
5122 def_jpeg
='#undef CONFIG_JPEG'
5123 novomodules
="jpeg $novomodules"
5127 echocheck
"OpenJPEG (JPEG2000) support"
5128 if test "$libopenjpeg" = auto
; then
5132 #include <openjpeg.h>
5133 int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
5135 cc_check
-lopenjpeg $_ld_lm && libopenjpeg
=yes
5137 echores
"$libopenjpeg"
5138 if test "$libopenjpeg" = yes ; then
5139 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 1'
5140 extra_ldflags
="$extra_ldflags -lopenjpeg"
5141 _libavdecoders
="$_libavdecoders LIBOPENJPEG_DECODER"
5142 _libavencoders
="$_libavencoders LIBOPENJPEG_ENCODER"
5143 codecmodules
="OpenJPEG $codecmodules"
5145 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 0'
5146 nocodecmodules
="OpenJPEG $nocodecmodules"
5150 echocheck
"PNM support"
5151 if test "$_pnm" = yes; then
5152 def_pnm
="#define CONFIG_PNM 1"
5153 vomodules
="pnm $vomodules"
5155 def_pnm
="#undef CONFIG_PNM"
5156 novomodules
="pnm $novomodules"
5162 echocheck
"GIF support"
5163 # This is to appease people who want to force gif support.
5164 # If it is forced to yes, then we still do checks to determine
5165 # which gif library to use.
5166 if test "$_gif" = yes ; then
5171 if test "$_gif" = auto
; then
5174 #include <gif_lib.h>
5175 int main(void) { return 0; }
5177 for _ld_gif
in "-lungif" "-lgif" ; do
5178 cc_check
$_ld_gif && _gif
=yes && break
5182 # If no library was found, and the user wants support forced,
5183 # then we force it on with libgif, as this is the safest
5184 # assumption IMHO. (libungif & libregif both create symbolic
5185 # links to libgif. We also assume that no x11 support is needed,
5186 # because if you are forcing this, then you _should_ know what
5187 # you are doing. [ Besides, package maintainers should never
5188 # have compiled x11 deps into libungif in the first place. ] )
5191 if test "$_force_gif" = yes && test "$_gif" = no
; then
5196 if test "$_gif" = yes ; then
5197 def_gif
='#define CONFIG_GIF 1'
5198 codecmodules
="gif $codecmodules"
5199 vomodules
="gif89a $vomodules"
5200 res_comment
="old version, some encoding functions disabled"
5201 def_gif_4
='#undef CONFIG_GIF_4'
5202 extra_ldflags
="$extra_ldflags $_ld_gif"
5206 #include <gif_lib.h>
5207 void catch() { exit(1); }
5209 signal(SIGSEGV, catch); // catch segfault
5210 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5211 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5215 if cc_check
"$_ld_gif" ; then
5216 def_gif_4
='#define CONFIG_GIF_4 1'
5220 def_gif
='#undef CONFIG_GIF'
5221 def_gif_4
='#undef CONFIG_GIF_4'
5222 novomodules
="gif89a $novomodules"
5223 nocodecmodules
="gif $nocodecmodules"
5228 case "$_gif" in yes*)
5229 echocheck
"broken giflib workaround"
5230 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5233 #include <gif_lib.h>
5236 printf("UserData is at address %p\n", gif.UserData);
5240 if cc_check
"$_ld_gif" ; then
5241 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5250 echocheck
"VESA support"
5251 if test "$_vesa" = auto
; then
5254 int main(void) { vbeVersion(); return 0; }
5257 cc_check
-lvbe -llrmi && _vesa
=yes
5259 if test "$_vesa" = yes ; then
5260 def_vesa
='#define CONFIG_VESA 1'
5261 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5262 vomodules
="vesa $vomodules"
5264 def_vesa
='#undef CONFIG_VESA'
5265 novomodules
="vesa $novomodules"
5277 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5278 if test -z "$_sdlconfig" ; then
5279 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5280 _sdlconfig
="sdl-config"
5281 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5282 _sdlconfig
="sdl11-config"
5287 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5289 #ifdef CONFIG_SDL_SDL_H
5290 #include <SDL/SDL.h>
5295 // we allow SDL hacking our main() only on OSX
5298 int main(int argc, char *argv[]) {
5299 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5304 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
5305 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5307 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5311 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5312 res_comment
="using $_sdlconfig"
5314 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5315 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5317 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5318 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5320 _inc_tmp
="$($_sdlconfig --cflags)"
5321 _ld_tmp
="$($_sdlconfig --libs)"
5323 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5328 if test "$_sdl" = yes ; then
5329 def_sdl
='#define CONFIG_SDL 1'
5330 extra_cflags
="$extra_cflags $_inc_tmp"
5331 libs_mplayer
="$libs_mplayer $_ld_tmp"
5332 vomodules
="sdl $vomodules"
5333 aomodules
="sdl $aomodules"
5335 def_sdl
='#undef CONFIG_SDL'
5336 novomodules
="sdl $novomodules"
5337 noaomodules
="sdl $noaomodules"
5342 # make sure this stays below CoreVideo to avoid issues due to namespace
5343 # conflicts between -lGL and -framework OpenGL
5345 #Note: this test is run even with --enable-gl since we autodetect linker flags
5346 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
5349 #include <windows.h>
5351 #elif defined(GL_SDL)
5353 #ifdef CONFIG_SDL_SDL_H
5354 #include <SDL/SDL.h>
5359 // we allow SDL hacking our main() only on OSX
5364 #include <X11/Xlib.h>
5370 wglCreateContext(dc);
5371 #elif defined(GL_SDL)
5372 SDL_GL_SwapBuffers();
5374 glXCreateContext(NULL, NULL, NULL, True);
5381 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5382 if cc_check
$_ld_tmp $_ld_lm ; then
5385 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
5389 if cc_check
-DGL_WIN32 -lopengl32 ; then
5392 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
5394 # last so it can reuse any linker etc. flags detected before
5395 if test "$_sdl" = yes ; then
5396 if cc_check
-DGL_SDL ||
5397 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
5400 elif cc_check
-DGL_SDL -lGL ||
5401 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
5404 libs_mplayer
="$libs_mplayer -lGL"
5410 if test "$_gl" = yes ; then
5411 def_gl
='#define CONFIG_GL 1'
5412 res_comment
="backends:"
5413 if test "$_gl_win32" = yes ; then
5414 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5415 res_comment
="$res_comment win32"
5417 if test "$_gl_x11" = yes ; then
5418 def_gl_x11
='#define CONFIG_GL_X11 1'
5419 res_comment
="$res_comment x11"
5421 if test "$_gl_sdl" = yes ; then
5422 def_gl_sdl
='#define CONFIG_GL_SDL 1'
5423 res_comment
="$res_comment sdl"
5425 vomodules
="opengl $vomodules"
5427 def_gl
='#undef CONFIG_GL'
5428 def_gl_win32
='#undef CONFIG_GL_WIN32'
5429 def_gl_x11
='#undef CONFIG_GL_X11'
5430 def_gl_sdl
='#undef CONFIG_GL_SDL'
5431 novomodules
="opengl $novomodules"
5436 echocheck
"MatrixView"
5437 if test "$_gl" = no
; then
5440 if test "$matrixview" = yes ; then
5441 vomodules
="matrixview $vomodules"
5442 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5444 novomodules
="matrixview $novomodules"
5445 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5447 echores
"$matrixview"
5451 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5452 if test "$_kva" = auto
; then
5456 int main( void ) { return 0; }
5459 cc_check
-lkva && _kva
=yes
5461 if test "$_kva" = yes ; then
5462 def_kva
='#define CONFIG_KVA 1'
5463 libs_mplayer
="$libs_mplayer -lkva"
5464 vomodules
="kva $vomodules"
5466 def_kva
='#undef CONFIG_KVA'
5467 novomodules
="kva $novomodules"
5475 echocheck
"Windows waveout"
5476 if test "$_win32waveout" = auto
; then
5478 #include <windows.h>
5479 #include <mmsystem.h>
5480 int main(void) { return 0; }
5483 cc_check
-lwinmm && _win32waveout
=yes
5485 if test "$_win32waveout" = yes ; then
5486 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5487 libs_mplayer
="$libs_mplayer -lwinmm"
5488 aomodules
="win32 $aomodules"
5490 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5491 noaomodules
="win32 $noaomodules"
5493 echores
"$_win32waveout"
5495 echocheck
"Direct3D"
5496 if test "$_direct3d" = auto
; then
5498 #include <windows.h>
5500 int main(void) { return 0; }
5503 cc_check
&& _direct3d
=yes
5505 if test "$_direct3d" = yes ; then
5506 def_direct3d
='#define CONFIG_DIRECT3D 1'
5507 vomodules
="direct3d $vomodules"
5509 def_direct3d
='#undef CONFIG_DIRECT3D'
5510 novomodules
="direct3d $novomodules"
5512 echores
"$_direct3d"
5515 if test "$_directx" = auto
; then
5517 #include <windows.h>
5520 int main(void) { return 0; }
5523 cc_check
-lgdi32 && _directx
=yes
5525 if test "$_directx" = yes ; then
5526 def_directx
='#define CONFIG_DIRECTX 1'
5527 libs_mplayer
="$libs_mplayer -lgdi32"
5528 vomodules
="directx $vomodules"
5529 aomodules
="dsound $aomodules"
5531 def_directx
='#undef CONFIG_DIRECTX'
5532 novomodules
="directx $novomodules"
5533 noaomodules
="dsound $noaomodules"
5541 if test "$_dxr2" = auto
; then
5544 #include <dxr2ioctl.h>
5545 int main(void) { return 0; }
5547 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5548 cc_check
$_inc_tmp && _dxr2
=yes && \
5549 extra_cflags
="$extra_cflags $_inc_tmp" && break
5552 if test "$_dxr2" = yes; then
5553 def_dxr2
='#define CONFIG_DXR2 1'
5554 aomodules
="dxr2 $aomodules"
5555 vomodules
="dxr2 $vomodules"
5557 def_dxr2
='#undef CONFIG_DXR2'
5558 noaomodules
="dxr2 $noaomodules"
5559 novomodules
="dxr2 $novomodules"
5564 if test "$_dxr3" = auto
; then
5566 #include <linux/em8300.h>
5567 int main(void) { return 0; }
5570 cc_check
&& _dxr3
=yes
5572 if test "$_dxr3" = yes ; then
5573 def_dxr3
='#define CONFIG_DXR3 1'
5574 vomodules
="dxr3 $vomodules"
5576 def_dxr3
='#undef CONFIG_DXR3'
5577 novomodules
="dxr3 $novomodules"
5582 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5583 if test "$_ivtv" = auto
; then
5586 #include <inttypes.h>
5587 #include <linux/types.h>
5588 #include <linux/videodev2.h>
5589 #include <linux/ivtv.h>
5590 #include <sys/ioctl.h>
5592 struct ivtv_cfg_stop_decode sd;
5593 struct ivtv_cfg_start_decode sd1;
5594 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5595 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5599 cc_check
&& _ivtv
=yes
5601 if test "$_ivtv" = yes ; then
5602 def_ivtv
='#define CONFIG_IVTV 1'
5603 vomodules
="ivtv $vomodules"
5604 aomodules
="ivtv $aomodules"
5606 def_ivtv
='#undef CONFIG_IVTV'
5607 novomodules
="ivtv $novomodules"
5608 noaomodules
="ivtv $noaomodules"
5613 echocheck
"V4L2 MPEG Decoder"
5614 if test "$_v4l2" = auto
; then
5617 #include <inttypes.h>
5618 #include <linux/types.h>
5619 #include <linux/videodev2.h>
5620 #include <linux/version.h>
5622 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5623 #error kernel headers too old, need 2.6.22
5625 struct v4l2_ext_controls ctrls;
5626 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5631 cc_check
&& _v4l2
=yes
5633 if test "$_v4l2" = yes ; then
5634 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5635 vomodules
="v4l2 $vomodules"
5636 aomodules
="v4l2 $aomodules"
5638 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5639 novomodules
="v4l2 $novomodules"
5640 noaomodules
="v4l2 $noaomodules"
5651 echocheck
"OSS Audio"
5652 if test "$_ossaudio" = auto
; then
5654 #include <sys/ioctl.h>
5655 #include <$_soundcard_header>
5656 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5659 cc_check
&& _ossaudio
=yes
5661 if test "$_ossaudio" = yes ; then
5662 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5663 aomodules
="oss $aomodules"
5664 if test "$_linux_devfs" = yes; then
5665 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5666 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5669 #include <sys/ioctl.h>
5670 #include <$_soundcard_header>
5671 #ifdef OPEN_SOUND_SYSTEM
5672 int main(void) { return 0; }
5674 #error Not the real thing
5678 cc_check
&& _real_ossaudio
=yes
5679 if test "$_real_ossaudio" = yes; then
5680 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5681 elif netbsd || openbsd
; then
5682 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5683 extra_ldflags
="$extra_ldflags -lossaudio"
5685 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5687 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5690 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5691 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5692 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5693 noaomodules
="oss $noaomodules"
5695 echores
"$_ossaudio"
5699 if test "$_arts" = auto
; then
5701 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5705 int main(void) { return 0; }
5707 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5712 if test "$_arts" = yes ; then
5713 def_arts
='#define CONFIG_ARTS 1'
5714 aomodules
="arts $aomodules"
5715 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5716 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5718 noaomodules
="arts $noaomodules"
5724 if test "$_esd" = auto
; then
5726 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5730 int main(void) { int fd = esd_open_sound("test"); return fd; }
5732 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5738 if test "$_esd" = yes ; then
5739 def_esd
='#define CONFIG_ESD 1'
5740 aomodules
="esd $aomodules"
5741 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5742 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5744 echocheck
"esd_get_latency()"
5747 int main(void) { return esd_get_latency(0); }
5749 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5750 echores
"$_esd_latency"
5752 def_esd
='#undef CONFIG_ESD'
5753 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5754 noaomodules
="esd $noaomodules"
5759 if test "$_nas" = auto
; then
5761 #include <audio/audiolib.h>
5762 int main(void) { return 0; }
5765 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5767 if test "$_nas" = yes ; then
5768 def_nas
='#define CONFIG_NAS 1'
5769 libs_mplayer
="$libs_mplayer -laudio -lXt"
5770 aomodules
="nas $aomodules"
5772 noaomodules
="nas $noaomodules"
5773 def_nas
='#undef CONFIG_NAS'
5779 if test "$_pulse" = auto
; then
5781 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5784 #include <pulse/pulseaudio.h>
5785 int main(void) { return 0; }
5787 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5793 if test "$_pulse" = yes ; then
5794 def_pulse
='#define CONFIG_PULSE 1'
5795 aomodules
="pulse $aomodules"
5796 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5797 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5799 def_pulse
='#undef CONFIG_PULSE'
5800 noaomodules
="pulse $noaomodules"
5805 if test "$_jack" = auto
; then
5809 #include <jack/jack.h>
5810 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5812 if cc_check
-ljack ; then
5813 libs_mplayer
="$libs_mplayer -ljack"
5814 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5815 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5816 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5822 if test "$_jack" = yes ; then
5823 def_jack
='#define CONFIG_JACK 1'
5824 aomodules
="jack $aomodules"
5826 noaomodules
="jack $noaomodules"
5831 if test "$_openal" = auto
; then
5835 #include <OpenAL/al.h>
5840 alSourceQueueBuffers(0, 0, 0);
5841 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5845 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5846 cc_check
$I && _openal
=yes && break
5847 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5849 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5851 if test "$_openal" = yes ; then
5852 def_openal
='#define CONFIG_OPENAL 1'
5853 aomodules
="openal $aomodules"
5855 noaomodules
="openal $noaomodules"
5859 echocheck
"ALSA audio"
5860 if test "$_alloca" != yes ; then
5862 res_comment
="alloca missing"
5864 if test "$_alsa" != no
; then
5867 #include <sys/time.h>
5868 #include <sys/asoundlib.h>
5869 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5870 #error "alsa version != 0.5.x"
5872 int main(void) { return 0; }
5874 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5877 #include <sys/time.h>
5878 #include <sys/asoundlib.h>
5879 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5880 #error "alsa version != 0.9.x"
5882 int main(void) { return 0; }
5884 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5886 #include <sys/time.h>
5887 #include <alsa/asoundlib.h>
5888 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5889 #error "alsa version != 0.9.x"
5891 int main(void) { return 0; }
5893 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5896 #include <sys/time.h>
5897 #include <sys/asoundlib.h>
5898 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5899 #error "alsa version != 1.0.x"
5901 int main(void) { return 0; }
5903 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5905 #include <sys/time.h>
5906 #include <alsa/asoundlib.h>
5907 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5908 #error "alsa version != 1.0.x"
5910 int main(void) { return 0; }
5912 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5914 def_alsa
='#undef CONFIG_ALSA'
5915 def_alsa5
='#undef CONFIG_ALSA5'
5916 def_alsa9
='#undef CONFIG_ALSA9'
5917 def_alsa1x
='#undef CONFIG_ALSA1X'
5918 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5919 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5920 if test "$_alsaver" ; then
5922 if test "$_alsaver" = '0.5.x' ; then
5924 aomodules
="alsa5 $aomodules"
5925 def_alsa5
='#define CONFIG_ALSA5 1'
5926 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5927 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5928 elif test "$_alsaver" = '0.9.x-sys' ; then
5930 aomodules
="alsa $aomodules"
5931 def_alsa
='#define CONFIG_ALSA 1'
5932 def_alsa9
='#define CONFIG_ALSA9 1'
5933 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5934 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5935 elif test "$_alsaver" = '0.9.x-alsa' ; then
5937 aomodules
="alsa $aomodules"
5938 def_alsa
='#define CONFIG_ALSA 1'
5939 def_alsa9
='#define CONFIG_ALSA9 1'
5940 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5941 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5942 elif test "$_alsaver" = '1.0.x-sys' ; then
5944 aomodules
="alsa $aomodules"
5945 def_alsa
='#define CONFIG_ALSA 1'
5946 def_alsa1x
="#define CONFIG_ALSA1X 1"
5947 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5948 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5949 elif test "$_alsaver" = '1.0.x-alsa' ; then
5951 aomodules
="alsa $aomodules"
5952 def_alsa
='#define CONFIG_ALSA 1'
5953 def_alsa1x
="#define CONFIG_ALSA1X 1"
5954 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5955 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5958 res_comment
="unknown version"
5960 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5962 noaomodules
="alsa $noaomodules"
5967 echocheck
"Sun audio"
5968 if test "$_sunaudio" = auto
; then
5970 #include <sys/types.h>
5971 #include <sys/audioio.h>
5972 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5975 cc_check
&& _sunaudio
=yes
5977 if test "$_sunaudio" = yes ; then
5978 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5979 aomodules
="sun $aomodules"
5981 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5982 noaomodules
="sun $noaomodules"
5984 echores
"$_sunaudio"
5987 def_mlib
='#define CONFIG_MLIB 0'
5989 echocheck
"Sun mediaLib"
5990 if test "$_mlib" = auto
; then
5994 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5996 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
6003 echocheck
"CoreAudio"
6004 if test "$_coreaudio" = auto
; then
6006 #include <CoreAudio/CoreAudio.h>
6007 #include <AudioToolbox/AudioToolbox.h>
6008 #include <AudioUnit/AudioUnit.h>
6009 int main(void) { return 0; }
6012 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
6014 if test "$_coreaudio" = yes ; then
6015 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
6016 def_coreaudio
='#define CONFIG_COREAUDIO 1'
6017 aomodules
="coreaudio $aomodules"
6019 def_coreaudio
='#undef CONFIG_COREAUDIO'
6020 noaomodules
="coreaudio $noaomodules"
6027 echocheck
"SGI audio"
6028 if test "$_sgiaudio" = auto
; then
6029 # check for SGI audio
6031 #include <dmedia/audio.h>
6032 int main(void) { return 0; }
6035 cc_check
&& _sgiaudio
=yes
6037 if test "$_sgiaudio" = "yes" ; then
6038 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
6039 libs_mplayer
="$libs_mplayer -laudio"
6040 aomodules
="sgi $aomodules"
6042 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
6043 noaomodules
="sgi $noaomodules"
6045 echores
"$_sgiaudio"
6050 echocheck
"KAI (UNIAUD/DART)"
6051 if test "$_kai" = auto
; then
6055 int main(void) { return 0; }
6058 cc_check
-lkai && _kai
=yes
6060 if test "$_kai" = yes ; then
6061 def_kai
='#define CONFIG_KAI 1'
6062 libs_mplayer
="$libs_mplayer -lkai"
6063 aomodules
="kai $aomodules"
6065 def_kai
='#undef CONFIG_KAI'
6066 noaomodules
="kai $noaomodules"
6071 if test "$_dart" = auto
; then
6075 int main( void ) { return 0; }
6078 cc_check
-ldart && _dart
=yes
6080 if test "$_dart" = yes ; then
6081 def_dart
='#define CONFIG_DART 1'
6082 libs_mplayer
="$libs_mplayer -ldart"
6083 aomodules
="dart $aomodules"
6085 def_dart
='#undef CONFIG_DART'
6086 noaomodules
="dart $noaomodules"
6092 # set default CD/DVD devices
6093 if win32 || os2
; then
6094 default_cdrom_device
="D:"
6096 default_cdrom_device
="/dev/disk1"
6097 elif dragonfly
; then
6098 default_cdrom_device
="/dev/cd0"
6100 default_cdrom_device
="/dev/acd0"
6102 default_cdrom_device
="/dev/rcd0a"
6104 default_cdrom_device
="/vol/dev/aliases/cdrom0"
6105 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
6106 # file system and the volfs service.
6107 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
6109 default_cdrom_device
="a1ide.device:2"
6111 default_cdrom_device
="/dev/cdrom"
6114 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
6115 default_dvd_device
=$default_cdrom_device
6117 default_dvd_device
="/dev/rdiskN"
6119 default_dvd_device
="/dev/dvd"
6123 echocheck
"VCD support"
6124 if test "$_vcd" = auto
; then
6126 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
6130 #include <ddk/ntddcdrm.h>
6131 int main(void) { return 0; }
6133 cc_check
&& _vcd
=yes
6136 if test "$_vcd" = yes; then
6137 inputmodules
="vcd $inputmodules"
6138 def_vcd
='#define CONFIG_VCD 1'
6140 def_vcd
='#undef CONFIG_VCD'
6141 _noinputmodules
="vcd $_noinputmodules"
6142 res_comment
="not supported on this OS"
6149 if test "$_dvdread_internal" = auto
; then
6150 _dvdread_internal
=no
6152 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
6153 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
6154 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
6155 || darwin || win32 || os2
; then
6156 _dvdread_internal
=yes
6158 extra_cflags
="-Ilibdvdread4 $extra_cflags"
6160 elif test "$_dvdread" = auto
; then
6162 if test "$_dl" = yes; then
6164 #include <inttypes.h>
6165 #include <dvdread/dvd_reader.h>
6166 #include <dvdread/ifo_types.h>
6167 #include <dvdread/ifo_read.h>
6168 #include <dvdread/nav_read.h>
6169 int main(void) { return 0; }
6171 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
6172 _dvdreadlibs
=$
($_dvdreadconfig --libs)
6173 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
6174 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
6176 extra_cflags
="$extra_cflags $_dvdreadcflags"
6177 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
6178 res_comment
="external"
6183 if test "$_dvdread_internal" = yes; then
6184 def_dvdread
='#define CONFIG_DVDREAD 1'
6185 inputmodules
="dvdread(internal) $inputmodules"
6187 res_comment
="internal"
6188 elif test "$_dvdread" = yes; then
6189 def_dvdread
='#define CONFIG_DVDREAD 1'
6191 extra_ldflags
="$extra_ldflags -ldvdread"
6192 inputmodules
="dvdread(external) $inputmodules"
6193 res_comment
="external"
6195 def_dvdread
='#undef CONFIG_DVDREAD'
6196 _noinputmodules
="dvdread $_noinputmodules"
6201 echocheck
"internal libdvdcss"
6202 if test "$_libdvdcss_internal" = auto
; then
6203 _libdvdcss_internal
=no
6204 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
6205 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
6207 if test "$_libdvdcss_internal" = yes ; then
6208 if linux || netbsd || openbsd || bsdos
; then
6209 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
6210 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
6211 elif freebsd || dragonfly
; then
6212 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
6214 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
6215 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
6217 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
6219 cflags_libdvdcss
="-DSYS_BEOS"
6221 cflags_libdvdcss
="-DSYS_OS2"
6223 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
6224 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
6225 inputmodules
="libdvdcss(internal) $inputmodules"
6228 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
6230 echores
"$_libdvdcss_internal"
6233 echocheck
"cdparanoia"
6234 if test "$_cdparanoia" = auto
; then
6236 #include <cdda_interface.h>
6237 #include <cdda_paranoia.h>
6238 // This need a better test. How ?
6239 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
6242 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
6243 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
6244 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
6247 if test "$_cdparanoia" = yes ; then
6249 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
6250 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
6252 echores
"$_cdparanoia"
6256 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
6259 #include <cdio/version.h>
6260 #include <cdio/cdda.h>
6261 #include <cdio/paranoia.h>
6263 void *test = cdda_verbose_set;
6264 printf("%s\n", CDIO_VERSION);
6265 return test == (void *)1;
6269 for _ld_tmp
in "" "-lwinmm" ; do
6270 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
6271 cc_check
$_ld_tmp $_ld_lm \
6272 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6274 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
6275 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
6276 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
6277 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
6278 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6281 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
6283 def_libcdio
='#define CONFIG_LIBCDIO 1'
6284 def_havelibcdio
='yes'
6286 if test "$_cdparanoia" = yes ; then
6287 res_comment
="using cdparanoia"
6289 def_libcdio
='#undef CONFIG_LIBCDIO'
6290 def_havelibcdio
='no'
6294 if test "$_cdda" = yes ; then
6295 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
6296 def_cdparanoia
='#define CONFIG_CDDA 1'
6297 inputmodules
="cdda $inputmodules"
6299 def_cdparanoia
='#undef CONFIG_CDDA'
6300 _noinputmodules
="cdda $_noinputmodules"
6303 if test "$_cddb" = yes ; then
6304 def_cddb
='#define CONFIG_CDDB 1'
6305 inputmodules
="cddb $inputmodules"
6308 def_cddb
='#undef CONFIG_CDDB'
6309 _noinputmodules
="cddb $_noinputmodules"
6312 echocheck
"bitmap font support"
6313 if test "$_bitmap_font" = yes ; then
6314 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6316 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6318 echores
"$_bitmap_font"
6321 echocheck
"freetype >= 2.0.9"
6323 # freetype depends on iconv
6324 if test "$_iconv" = no
; then
6326 res_comment
="iconv support needed"
6329 if test "$_freetype" = auto
; then
6330 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6333 #include <ft2build.h>
6334 #include FT_FREETYPE_H
6335 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6336 #error "Need FreeType 2.0.9 or newer"
6340 FT_Int major=-1,minor=-1,patch=-1;
6341 int err=FT_Init_FreeType(&library);
6346 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6351 if test "$_freetype" = yes ; then
6352 def_freetype
='#define CONFIG_FREETYPE 1'
6353 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6354 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6356 def_freetype
='#undef CONFIG_FREETYPE'
6358 echores
"$_freetype"
6360 if test "$_freetype" = no
; then
6362 res_comment
="FreeType support needed"
6364 echocheck
"fontconfig"
6365 if test "$_fontconfig" = auto
; then
6369 #include <fontconfig/fontconfig.h>
6370 #if FC_VERSION < 20402
6371 #error At least version 2.4.2 of fontconfig required
6375 if (err == FcFalse) {
6376 printf("Couldn't initialize fontconfig lib\n");
6383 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6384 _ld_tmp
="-lfontconfig $_ld_tmp"
6385 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6387 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6388 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6389 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6390 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6391 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6394 if test "$_fontconfig" = yes ; then
6395 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6397 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6399 echores
"$_fontconfig"
6402 echocheck
"SSA/ASS support"
6403 # libass depends on FreeType
6404 if test "$_freetype" = no
; then
6407 res_comment
="FreeType support needed"
6410 if test "$_ass" = auto
; then
6412 #include <ft2build.h>
6413 #include FT_FREETYPE_H
6414 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 2) || ((FREETYPE_MINOR == 2) && (FREETYPE_PATCH < 1)))
6415 #error "Need FreeType 2.2.1 or newer"
6417 int main(void) { return 0; }
6420 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _ass
=yes
6421 if test "$_ass" = no
; then
6423 res_comment
="FreeType >= 2.2.1 needed"
6424 elif test "$ass_internal" = no
; then
6425 res_comment
="external"
6426 extra_ldflags
="$extra_ldflags -lass"
6429 if test "$_ass" = yes ; then
6430 def_ass
='#define CONFIG_ASS 1'
6432 def_ass
='#undef CONFIG_ASS'
6434 if test "$ass_internal" = yes ; then
6435 def_ass_internal
='#define CONFIG_ASS_INTERNAL 1'
6437 def_ass_internal
='#undef CONFIG_ASS_INTERNAL'
6442 echocheck
"fribidi with charsets"
6445 if test "$_fribidi" = auto
; then
6449 /* workaround for fribidi 0.10.4 and below */
6450 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6451 #include <fribidi/fribidi.h>
6453 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6454 printf("Fribidi headers are not consistents with the library!\n");
6463 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6464 if $_fribidiconfig --version > /dev
/null
2>&1 &&
6465 test "$_fribidi" = no
; then
6466 _inc_tmp
="$($_fribidiconfig --cflags)"
6467 _ld_tmp
="$($_fribidiconfig --libs)"
6468 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6471 if test "$_fribidi" = yes ; then
6472 def_fribidi
='#define CONFIG_FRIBIDI 1'
6473 extra_cflags
="$extra_cflags $_inc_tmp"
6474 extra_ldflags
="$extra_ldflags $_ld_tmp"
6476 def_fribidi
='#undef CONFIG_FRIBIDI'
6482 if test "$_enca" = auto
; then
6484 #include <sys/types.h>
6489 langs = enca_get_languages(&langcnt);
6494 cc_check
-lenca $_ld_lm && _enca
=yes
6496 if test "$_enca" = yes ; then
6497 def_enca
='#define CONFIG_ENCA 1'
6498 extra_ldflags
="$extra_ldflags -lenca"
6500 def_enca
='#undef CONFIG_ENCA'
6508 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6511 cc_check
-lz && _zlib
=yes
6512 if test "$_zlib" = yes ; then
6513 def_zlib
='#define CONFIG_ZLIB 1'
6514 extra_ldflags
="$extra_ldflags -lz"
6516 def_zlib
='#define CONFIG_ZLIB 0'
6517 _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
//)
6518 _libavencoders
=$
(echo $_libavencoders |
sed -e s
/FLASHSV_ENCODER
// -e s
/PNG_ENCODER
// -e s
/ZMBV_ENCODER
// -e s
/ZLIB_ENCODER
//)
6525 def_bzlib
='#define CONFIG_BZLIB 0'
6528 int main(void) { BZ2_bzlibVersion(); return 0; }
6530 cc_check
-lbz2 && bzlib
=yes
6531 if test "$bzlib" = yes ; then
6532 def_bzlib
='#define CONFIG_BZLIB 1'
6533 extra_ldflags
="$extra_ldflags -lbz2"
6539 if test "$_rtc" = auto
; then
6541 #include <sys/ioctl.h>
6543 #include <linux/rtc.h>
6546 #define RTC_PIE_ON RTCIO_PIE_ON
6548 int main(void) { return RTC_PIE_ON; }
6551 cc_check
&& _rtc
=yes
6554 if test "$_rtc" = yes ; then
6555 def_rtc
='#define HAVE_RTC 1'
6557 def_rtc
='#undef HAVE_RTC'
6562 echocheck
"liblzo2 support"
6563 if test "$_liblzo" = auto
; then
6566 #include <lzo/lzo1x.h>
6567 int main(void) { lzo_init();return 0; }
6569 cc_check
-llzo2 && _liblzo
=yes
6571 if test "$_liblzo" = yes ; then
6572 def_liblzo
='#define CONFIG_LIBLZO 1'
6573 extra_ldflags
="$extra_ldflags -llzo2"
6574 codecmodules
="liblzo $codecmodules"
6576 def_liblzo
='#undef CONFIG_LIBLZO'
6577 nocodecmodules
="liblzo $nocodecmodules"
6582 echocheck
"mad support"
6583 if test "$_mad" = auto
; then
6587 int main(void) { return 0; }
6589 cc_check
-lmad && _mad
=yes
6591 if test "$_mad" = yes ; then
6592 def_mad
='#define CONFIG_LIBMAD 1'
6593 extra_ldflags
="$extra_ldflags -lmad"
6594 codecmodules
="libmad $codecmodules"
6596 def_mad
='#undef CONFIG_LIBMAD'
6597 nocodecmodules
="libmad $nocodecmodules"
6602 if test "$_twolame" = auto
; then
6604 #include <twolame.h>
6605 int main(void) { twolame_init(); return 0; }
6608 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6610 if test "$_twolame" = yes ; then
6611 def_twolame
='#define CONFIG_TWOLAME 1'
6612 libs_mencoder
="$libs_mencoder -ltwolame"
6613 codecmodules
="twolame $codecmodules"
6615 def_twolame
='#undef CONFIG_TWOLAME'
6616 nocodecmodules
="twolame $nocodecmodules"
6621 if test "$_toolame" = auto
; then
6623 if test "$_twolame" = yes ; then
6624 res_comment
="disabled by twolame"
6627 #include <toolame.h>
6628 int main(void) { toolame_init(); return 0; }
6630 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6633 if test "$_toolame" = yes ; then
6634 def_toolame
='#define CONFIG_TOOLAME 1'
6635 libs_mencoder
="$libs_mencoder -ltoolame"
6636 codecmodules
="toolame $codecmodules"
6638 def_toolame
='#undef CONFIG_TOOLAME'
6639 nocodecmodules
="toolame $nocodecmodules"
6641 if test "$_toolamedir" ; then
6642 res_comment
="using $_toolamedir"
6646 echocheck
"OggVorbis support"
6647 if test "$_tremor_internal" = yes; then
6649 elif test "$_tremor" = auto
; then
6652 #include <tremor/ivorbiscodec.h>
6653 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6655 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6657 if test "$_libvorbis" = auto
; then
6660 #include <vorbis/codec.h>
6661 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6663 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6665 if test "$_tremor_internal" = yes ; then
6667 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6668 def_tremor
='#define CONFIG_TREMOR 1'
6669 codecmodules
="tremor(internal) $codecmodules"
6670 res_comment
="internal Tremor"
6671 if test "$_tremor_low" = yes ; then
6672 cflags_tremor_low
="-D_LOW_ACCURACY_"
6673 res_comment
="internal low accuracy Tremor"
6675 elif test "$_tremor" = yes ; then
6677 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6678 def_tremor
='#define CONFIG_TREMOR 1'
6679 codecmodules
="tremor(external) $codecmodules"
6680 res_comment
="external Tremor"
6681 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6682 elif test "$_libvorbis" = yes ; then
6684 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6685 codecmodules
="libvorbis $codecmodules"
6686 res_comment
="libvorbis"
6687 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6690 nocodecmodules
="libvorbis $nocodecmodules"
6694 echocheck
"libspeex (version >= 1.1 required)"
6695 if test "$_speex" = auto
; then
6698 #include <speex/speex.h>
6699 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6701 cc_check
-lspeex $_ld_lm && _speex
=yes
6703 if test "$_speex" = yes ; then
6704 def_speex
='#define CONFIG_SPEEX 1'
6705 extra_ldflags
="$extra_ldflags -lspeex"
6706 codecmodules
="speex $codecmodules"
6708 def_speex
='#undef CONFIG_SPEEX'
6709 nocodecmodules
="speex $nocodecmodules"
6713 echocheck
"OggTheora support"
6714 if test "$_theora" = auto
; then
6717 #include <theora/theora.h>
6720 /* Theora is in flux, make sure that all interface routines and datatypes
6721 * exist and work the way we expect it, so we don't break MPlayer. */
6730 theora_info_init(&inf);
6731 theora_comment_init(&tc);
6735 /* we don't want to execute this kind of nonsense; just for making sure
6736 * that compilation works... */
6737 memset(&op, 0, sizeof(op));
6738 r = theora_decode_header(&inf, &tc, &op);
6739 r = theora_decode_init(&st, &inf);
6740 t = theora_granule_time(&st, op.granulepos);
6741 r = theora_decode_packetin(&st, &op);
6742 r = theora_decode_YUVout(&st, &yuv);
6748 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6749 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6750 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6751 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6752 if test _theora
= no
; then
6753 _ld_theora
="-ltheora -logg"
6754 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6756 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6757 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6758 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6759 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6760 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6761 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6762 if test _theora
= no
; then
6763 _ld_theora
="-ltheora -logg"
6764 cc_check tremor
/bitwise.c
$_ld_theora &&
6765 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6769 if test "$_theora" = yes ; then
6770 def_theora
='#define CONFIG_OGGTHEORA 1'
6771 codecmodules
="libtheora $codecmodules"
6772 # when --enable-theora is forced, we'd better provide a probably sane
6773 # $_ld_theora than nothing
6774 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6776 def_theora
='#undef CONFIG_OGGTHEORA'
6777 nocodecmodules
="libtheora $nocodecmodules"
6781 echocheck
"mp3lib support"
6782 if test "$_mp3lib" = auto
; then
6783 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6785 if test "$_mp3lib" = yes ; then
6786 def_mp3lib
='#define CONFIG_MP3LIB 1'
6787 codecmodules
="mp3lib(internal) $codecmodules"
6789 def_mp3lib
='#undef CONFIG_MP3LIB'
6790 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6794 echocheck
"liba52 support"
6795 def_liba52
='#undef CONFIG_LIBA52'
6796 if test "$_liba52" = auto
; then
6799 #include <inttypes.h>
6800 #include <a52dec/a52.h>
6801 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6803 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6805 if test "$_liba52" = yes ; then
6806 def_liba52
='#define CONFIG_LIBA52 1'
6807 codecmodules
="liba52 $codecmodules"
6809 nocodecmodules
="liba52 $nocodecmodules"
6813 echocheck
"internal libmpeg2 support"
6814 if test "$_libmpeg2" = auto
; then
6816 if alpha
&& test cc_vendor
=gnu
; then
6818 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6820 res_comment
="broken gcc"
6825 if test "$_libmpeg2" = yes ; then
6826 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6827 codecmodules
="libmpeg2(internal) $codecmodules"
6829 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6830 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6832 echores
"$_libmpeg2"
6834 echocheck
"libdca support"
6835 if test "$_libdca" = auto
; then
6838 #include <inttypes.h>
6840 int main(void) { dts_init(0); return 0; }
6842 for _ld_dca
in -ldca -ldts ; do
6843 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6844 && _libdca
=yes && break
6847 if test "$_libdca" = yes ; then
6848 def_libdca
='#define CONFIG_LIBDCA 1'
6849 codecmodules
="libdca $codecmodules"
6851 def_libdca
='#undef CONFIG_LIBDCA'
6852 nocodecmodules
="libdca $nocodecmodules"
6856 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6857 if test "$_musepack" = auto
; then
6861 #include <mpcdec/mpcdec.h>
6863 mpc_streaminfo info;
6864 mpc_decoder decoder;
6865 mpc_decoder_set_streaminfo(&decoder, &info);
6866 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6870 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6872 if test "$_musepack" = yes ; then
6873 def_musepack
='#define CONFIG_MUSEPACK 1'
6874 extra_ldflags
="$extra_ldflags -lmpcdec"
6875 codecmodules
="musepack $codecmodules"
6877 def_musepack
='#undef CONFIG_MUSEPACK'
6878 nocodecmodules
="musepack $nocodecmodules"
6880 echores
"$_musepack"
6883 echocheck
"FAAC support"
6884 if test "$_faac" = auto
; then
6886 #include <inttypes.h>
6888 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6891 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6892 cc_check
$_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6895 if test "$_faac" = yes ; then
6896 def_faac
="#define CONFIG_FAAC 1"
6897 test "$_faac_lavc" = auto
&& _faac_lavc
=yes
6898 if test "$_faac_lavc" = yes ; then
6899 def_faac_lavc
="#define CONFIG_LIBFAAC 1"
6900 libs_mplayer
="$libs_mplayer $_ld_faac"
6901 _libavencoders
="$_libavencoders LIBFAAC_ENCODER"
6903 codecmodules
="faac $codecmodules"
6906 def_faac
="#undef CONFIG_FAAC"
6907 def_faac_lavc
="#define CONFIG_LIBFAAC 0"
6908 nocodecmodules
="faac $nocodecmodules"
6910 res_comment
="in libavcodec: $_faac_lavc"
6914 echocheck
"FAAD2 support"
6915 if test "$_faad_internal" = auto
; then
6916 if x86_32
&& test cc_vendor
=gnu
; then
6918 3.1*|
3.2) # ICE/insn with these versions
6920 res_comment
="broken gcc"
6932 if test "$_faad" = auto
; then
6935 #ifndef FAAD_MIN_STREAMSIZE
6936 #error Too old version
6938 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6939 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6941 cc_check
-lfaad $_ld_lm && _faad
=yes
6944 def_faad
='#undef CONFIG_FAAD'
6945 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6946 if test "$_faad_internal" = yes ; then
6947 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6948 res_comment
="internal floating-point"
6949 if test "$_faad_fixed" = yes ; then
6950 # The FIXED_POINT implementation of FAAD2 improves performance
6951 # on some platforms, especially for SBR files.
6952 cflags_faad_fixed
="-DFIXED_POINT"
6953 res_comment
="internal fixed-point"
6955 elif test "$_faad" = yes ; then
6956 extra_ldflags
="$extra_ldflags -lfaad"
6959 if test "$_faad" = yes ; then
6960 def_faad
='#define CONFIG_FAAD 1'
6961 if test "$_faad_internal" = yes ; then
6962 codecmodules
="faad2(internal) $codecmodules"
6964 codecmodules
="faad2 $codecmodules"
6968 nocodecmodules
="faad2 $nocodecmodules"
6973 echocheck
"LADSPA plugin support"
6974 if test "$_ladspa" = auto
; then
6979 const LADSPA_Descriptor *ld = NULL;
6984 cc_check
&& _ladspa
=yes
6986 if test "$_ladspa" = yes; then
6987 def_ladspa
="#define CONFIG_LADSPA 1"
6989 def_ladspa
="#undef CONFIG_LADSPA"
6994 echocheck
"libbs2b audio filter support"
6995 if test "$_libbs2b" = auto
; then
6998 #if BS2B_VERSION_MAJOR < 3
6999 #error Please use libbs2b >= 3.0.0, older versions are not supported.
7009 if $_pkg_config --exists libbs2b
; then
7010 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
7011 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
7012 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
7013 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
7015 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
7016 -I/usr
/local
/include
/bs2b
; do
7017 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
7018 extra_ldflags
="$extra_ldflags -lbs2b"
7019 extra_cflags
="$extra_cflags $_inc_tmp"
7026 def_libbs2b
="#undef CONFIG_LIBBS2B"
7027 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
7031 if test -z "$_codecsdir" ; then
7032 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
7033 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
7034 if test -d "$dir" ; then
7040 # Fall back on default directory.
7041 if test -z "$_codecsdir" ; then
7042 _codecsdir
="$_libdir/codecs"
7043 mingw32 || os2
&& _codecsdir
="codecs"
7047 echocheck
"Win32 codecs"
7048 if test "$_win32dll" = auto
; then
7050 if x86_32
&& ! qnx
; then
7054 if test "$_win32dll" = yes ; then
7055 def_win32dll
='#define CONFIG_WIN32DLL 1'
7057 def_win32_loader
='#define WIN32_LOADER 1'
7058 _win32_emulation
=yes
7060 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
7061 res_comment
="using native windows"
7063 codecmodules
="win32 $codecmodules"
7065 def_win32dll
='#undef CONFIG_WIN32DLL'
7066 def_win32_loader
='#undef WIN32_LOADER'
7067 nocodecmodules
="win32 $nocodecmodules"
7069 echores
"$_win32dll"
7072 echocheck
"XAnim codecs"
7073 if test "$_xanim" = auto
; then
7075 res_comment
="dynamic loader support needed"
7076 if test "$_dl" = yes ; then
7080 if test "$_xanim" = yes ; then
7081 def_xanim
='#define CONFIG_XANIM 1'
7082 codecmodules
="xanim $codecmodules"
7084 def_xanim
='#undef CONFIG_XANIM'
7085 nocodecmodules
="xanim $nocodecmodules"
7090 echocheck
"RealPlayer codecs"
7091 if test "$_real" = auto
; then
7093 res_comment
="dynamic loader support needed"
7094 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
7095 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
7099 if test "$_real" = yes ; then
7100 def_real
='#define CONFIG_REALCODECS 1'
7101 codecmodules
="real $codecmodules"
7103 def_real
='#undef CONFIG_REALCODECS'
7104 nocodecmodules
="real $nocodecmodules"
7109 echocheck
"QuickTime codecs"
7111 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
7112 if test "$_qtx" = auto
; then
7113 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
7115 if test "$_qtx" = yes ; then
7116 def_qtx
='#define CONFIG_QTX_CODECS 1'
7117 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
7118 codecmodules
="qtx $codecmodules"
7119 darwin || win32 || _qtx_emulation
=yes
7121 def_qtx
='#undef CONFIG_QTX_CODECS'
7122 nocodecmodules
="qtx $nocodecmodules"
7126 echocheck
"Nemesi Streaming Media libraries"
7127 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
7129 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
7130 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
7131 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
7135 if test "$_nemesi" = yes; then
7137 def_nemesi
='#define CONFIG_LIBNEMESI 1'
7138 inputmodules
="nemesi $inputmodules"
7140 _native_rtsp
="$_network"
7142 def_nemesi
='#undef CONFIG_LIBNEMESI'
7143 _noinputmodules
="nemesi $_noinputmodules"
7147 echocheck
"LIVE555 Streaming Media libraries"
7148 if test "$_live" = auto
&& test "$_network" = yes ; then
7149 cat > $TMPCPP << EOF
7150 #include <liveMedia.hh>
7151 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
7152 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
7154 int main(void) { return 0; }
7158 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
7159 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
7160 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
7161 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
7162 $_livelibdir/groupsock/libgroupsock.a \
7163 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
7164 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
7165 $extra_ldflags -lstdc++" \
7166 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
7167 -I$_livelibdir/UsageEnvironment/include \
7168 -I$_livelibdir/BasicUsageEnvironment/include \
7169 -I$_livelibdir/groupsock/include" && \
7172 if test "$_live" != yes ; then
7173 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
7174 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
7179 if test "$_live" = yes && test "$_network" = yes; then
7180 test $_livelibdir && res_comment
="using $_livelibdir"
7181 def_live
='#define CONFIG_LIVE555 1'
7182 inputmodules
="live555 $inputmodules"
7183 elif test "$_live_dist" = yes && test "$_network" = yes; then
7184 res_comment
="using distribution version"
7186 def_live
='#define CONFIG_LIVE555 1'
7187 extra_ldflags
="$extra_ldflags $ld_tmp"
7188 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
7189 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
7190 inputmodules
="live555 $inputmodules"
7193 def_live
='#undef CONFIG_LIVE555'
7194 _noinputmodules
="live555 $_noinputmodules"
7199 echocheck
"FFmpeg libavutil"
7200 if test "$_libavutil_a" = auto
; then
7201 if test -d libavutil
; then
7203 res_comment
="static"
7205 die
"MPlayer will not compile without libavutil in the source tree."
7207 elif test "$_libavutil_so" = auto
; then
7210 #include <libavutil/common.h>
7211 int main(void) { av_clip(1, 1, 1); return 0; }
7213 if $_pkg_config --exists libavutil
; then
7214 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
7215 _ld_tmp
=$
($_pkg_config --libs libavutil
)
7216 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7217 && _libavutil_so
=yes
7218 elif cc_check
-lavutil $_ld_lm ; then
7219 extra_ldflags
="$extra_ldflags -lavutil"
7221 res_comment
="using libavutil.so, but static libavutil is recommended"
7225 def_libavutil
='#undef CONFIG_LIBAVUTIL'
7226 def_libavutil_a
='#undef CONFIG_LIBAVUTIL_A'
7227 def_libavutil_so
='#undef CONFIG_LIBAVUTIL_SO'
7228 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
7229 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
7230 test "$_libavutil_a" = yes && def_libavutil_a
='#define CONFIG_LIBAVUTIL_A 1'
7231 test "$_libavutil_so" = yes && def_libavutil_so
='#define CONFIG_LIBAVUTIL_SO 1'
7232 # neither static nor shared libavutil is available, but it is mandatory ...
7233 if test "$_libavutil" = no
; then
7234 die
"You need static or shared libavutil, MPlayer will not compile without!"
7236 echores
"$_libavutil"
7238 echocheck
"FFmpeg libavcodec"
7239 if test "$_libavcodec_a" = auto
; then
7241 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
7243 res_comment
="static"
7245 elif test "$_libavcodec_so" = auto
; then
7247 res_comment
="libavcodec.so is discouraged over static libavcodec"
7249 #include <libavcodec/avcodec.h>
7250 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
7252 if $_pkg_config --exists libavcodec
; then
7253 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
7254 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
7255 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7256 && _libavcodec_so
=yes
7257 elif cc_check
-lavcodec $_ld_lm ; then
7258 extra_ldflags
="$extra_ldflags -lavcodec"
7260 res_comment
="using libavcodec.so, but static libavcodec is recommended"
7264 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
7265 def_libavcodec_a
='#undef CONFIG_LIBAVCODEC_A'
7266 def_libavcodec_so
='#undef CONFIG_LIBAVCODEC_SO'
7267 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
7268 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
7269 test "$_libavcodec_a" = yes && def_libavcodec_a
='#define CONFIG_LIBAVCODEC_A 1'
7270 test "$_libavcodec_so" = yes && def_libavcodec_so
='#define CONFIG_LIBAVCODEC_SO 1'
7271 test "$_libavcodec_mpegaudio_hp" = yes \
7272 && def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1' \
7273 && mak_libavcodec_mpegaudio_hp
='CONFIG_MPEGAUDIO_HP = yes'
7274 if test "$_libavcodec_a" = yes ; then
7275 codecmodules
="libavcodec(internal) $codecmodules"
7276 elif test "$_libavcodec_so" = yes ; then
7277 codecmodules
="libavcodec.so $codecmodules"
7279 nocodecmodules
="libavcodec $nocodecmodules"
7281 echores
"$_libavcodec"
7283 echocheck
"FFmpeg libavformat"
7284 if test "$_libavformat_a" = auto
; then
7286 if test -d libavformat
&& test -f libavformat
/utils.c
; then
7288 res_comment
="static"
7290 elif test "$_libavformat_so" = auto
; then
7293 #include <libavformat/avformat.h>
7294 #include <libavcodec/opt.h>
7295 int main(void) { av_alloc_format_context(); return 0; }
7297 if $_pkg_config --exists libavformat
; then
7298 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
7299 _ld_tmp
=$
($_pkg_config --libs libavformat
)
7300 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7301 && _libavformat_so
=yes
7302 elif cc_check
$_ld_lm -lavformat ; then
7303 extra_ldflags
="$extra_ldflags -lavformat"
7305 res_comment
="using libavformat.so, but static libavformat is recommended"
7309 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
7310 def_libavformat_a
='#undef CONFIG_LIBAVFORMAT_A'
7311 def_libavformat_so
='#undef CONFIG_LIBAVFORMAT_SO'
7312 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
7313 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
7314 test "$_libavformat_a" = yes && def_libavformat_a
='#define CONFIG_LIBAVFORMAT_A 1'
7315 test "$_libavformat_so" = yes \
7316 && def_libavformat_so
='#define CONFIG_LIBAVFORMAT_SO 1'
7317 echores
"$_libavformat"
7319 echocheck
"FFmpeg libpostproc"
7320 if test "$_libpostproc_a" = auto
; then
7322 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
7323 _libpostproc_a
='yes'
7324 res_comment
="static"
7326 elif test "$_libpostproc_so" = auto
; then
7329 #include <inttypes.h>
7330 #include <libpostproc/postprocess.h>
7331 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
7333 if cc_check
-lpostproc $_ld_lm ; then
7334 extra_ldflags
="$extra_ldflags -lpostproc"
7336 res_comment
="using libpostproc.so, but static libpostproc is recommended"
7340 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
7341 def_libpostproc_a
='#undef CONFIG_LIBPOSTPROC_A'
7342 def_libpostproc_so
='#undef CONFIG_LIBPOSTPROC_SO'
7343 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
7344 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
7345 test "$_libpostproc_a" = yes && def_libpostproc_a
='#define CONFIG_LIBPOSTPROC_A 1'
7346 test "$_libpostproc_so" = yes \
7347 && def_libpostproc_so
='#define CONFIG_LIBPOSTPROC_SO 1'
7348 echores
"$_libpostproc"
7350 echocheck
"FFmpeg libswscale"
7351 if test "$_libswscale_a" = auto
; then
7353 if test -d libswscale
&& test -f libswscale
/swscale.h
; then
7355 res_comment
="static"
7357 elif test "$_libswscale_so" = auto
; then
7359 res_comment
="using libswscale.so, but static libswscale is recommended"
7361 #include <libswscale/swscale.h>
7362 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
7364 if $_pkg_config --exists libswscale
; then
7365 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
7366 _ld_tmp
=$
($_pkg_config --libs libswscale
)
7367 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7368 && _libswscale_so
=yes
7369 elif cc_check
-lswscale ; then
7370 extra_ldflags
="$extra_ldflags -lswscale"
7375 def_libswscale
='#undef CONFIG_LIBSWSCALE'
7376 def_libswscale_a
='#undef CONFIG_LIBSWSCALE_A'
7377 def_libswscale_so
='#undef CONFIG_LIBSWSCALE_SO'
7378 test "$_libswscale_a" = yes ||
test "$_libswscale_so" = yes && _libswscale
=yes
7379 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
7380 test "$_libswscale_a" = yes && def_libswscale_a
='#define CONFIG_LIBSWSCALE_A 1'
7381 test "$_libswscale_so" = yes \
7382 && def_libswscale_so
='#define CONFIG_LIBSWSCALE_SO 1'
7383 echores
"$_libswscale"
7385 echocheck
"libopencore_amr narrowband"
7386 if test "$_libopencore_amrnb" = auto
; then
7387 _libopencore_amrnb
=no
7389 #include <opencore-amrnb/interf_dec.h>
7390 int main(void) { Decoder_Interface_init(); return 0; }
7392 cc_check
-lopencore-amrnb && _libopencore_amrnb
=yes
7393 if test "$_libavcodec_a" != yes ; then
7394 _libopencore_amrnb
=no
7395 res_comment
="libavcodec (static) is required by libopencore_amrnb, sorry"
7398 if test "$_libopencore_amrnb" = yes ; then
7399 _libopencore_amr
=yes
7400 extra_ldflags
="$extra_ldflags -lopencore-amrnb"
7401 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 1'
7402 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
7403 _libavencoders
="$_libavencoders LIBOPENCORE_AMRNB_ENCODER"
7404 codecmodules
="libopencore_amrnb $codecmodules"
7406 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 0'
7407 nocodecmodules
="libopencore_amrnb $nocodecmodules"
7409 echores
"$_libopencore_amrnb"
7412 echocheck
"libopencore_amr wideband"
7413 if test "$_libopencore_amrwb" = auto
; then
7414 _libopencore_amrwb
=no
7416 #include <opencore-amrwb/dec_if.h>
7417 int main(void) { D_IF_init(); return 0; }
7419 cc_check
-lopencore-amrwb && _libopencore_amrwb
=yes
7420 if test "$_libavcodec_a" != yes ; then
7421 _libopencore_amrwb
=no
7422 res_comment
="libavcodec (static) is required by libopencore_amrwb, sorry"
7425 if test "$_libopencore_amrwb" = yes ; then
7426 _libopencore_amr
=yes
7427 extra_ldflags
="$extra_ldflags -lopencore-amrwb"
7428 def_libopencore_amrwb
='#define CONFIG_LIBOPENCORE_AMRWB 1'
7429 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
7430 codecmodules
="libopencore_amrwb $codecmodules"
7432 def_libopencore_amrwb
='#define LIBOPENCORE_AMRWB 0'
7433 nocodecmodules
="libopencore_amrwb $nocodecmodules"
7435 echores
"$_libopencore_amrwb"
7437 echocheck
"libdv-0.9.5+"
7438 if test "$_libdv" = auto
; then
7441 #include <libdv/dv.h>
7442 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7444 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7446 if test "$_libdv" = yes ; then
7447 def_libdv
='#define CONFIG_LIBDV095 1'
7448 extra_ldflags
="$extra_ldflags -ldv"
7449 codecmodules
="libdv $codecmodules"
7451 def_libdv
='#undef CONFIG_LIBDV095'
7452 nocodecmodules
="libdv $nocodecmodules"
7458 if test "$_xvid" = auto
; then
7462 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7464 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7465 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7469 if test "$_xvid" = yes ; then
7470 def_xvid
='#define CONFIG_XVID4 1'
7471 codecmodules
="xvid $codecmodules"
7473 def_xvid
='#undef CONFIG_XVID4'
7474 nocodecmodules
="xvid $nocodecmodules"
7478 echocheck
"Xvid two pass plugin"
7479 if test "$_xvid" = yes && test "$_xvid_lavc" = auto
; then
7482 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
7484 cc_check
&& _xvid_lavc
=yes
7486 if test "$_xvid_lavc" = yes ; then
7487 def_xvid_lavc
='#define CONFIG_LIBXVID 1'
7488 _libavencoders
="$_libavencoders LIBXVID_ENCODER"
7491 def_xvid_lavc
='#define CONFIG_LIBXVID 0'
7493 echores
"$_xvid_lavc"
7497 if test "$_x264" = auto
; then
7499 #include <inttypes.h>
7502 #error We do not support old versions of x264. Get the latest from git.
7504 int main(void) { x264_encoder_open((void*)0); return 0; }
7507 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7508 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7512 if test "$_x264" = yes ; then
7513 def_x264
='#define CONFIG_X264 1'
7514 codecmodules
="x264 $codecmodules"
7515 test "$_x264_lavc" = auto
&& _x264_lavc
=yes
7516 if test "$_x264_lavc" = yes ; then
7517 def_x264_lavc
='#define CONFIG_LIBX264 1'
7518 libs_mplayer
="$libs_mplayer $_ld_x264"
7519 _libavencoders
="$_libavencoders LIBX264_ENCODER"
7523 def_x264
='#undef CONFIG_X264'
7524 def_x264_lavc
='#define CONFIG_LIBX264 0'
7525 nocodecmodules
="x264 $nocodecmodules"
7527 res_comment
="in libavcodec: $_x264_lavc"
7531 echocheck
"libdirac"
7532 if test "$_libdirac_lavc" = auto
; then
7534 if test "$_libavcodec_a" != yes; then
7535 res_comment
="libavcodec (static) is required by libdirac, sorry"
7538 #include <libdirac_encoder/dirac_encoder.h>
7539 #include <libdirac_decoder/dirac_parser.h>
7542 dirac_encoder_context_t enc_ctx;
7543 dirac_decoder_t *dec_handle;
7544 dirac_encoder_context_init(&enc_ctx, VIDEO_FORMAT_SD_576I50);
7545 dec_handle = dirac_decoder_init(0);
7547 dirac_decoder_close(dec_handle);
7551 if $_pkg_config --exists dirac
; then
7552 _inc_dirac
=$
($_pkg_config --silence-errors --cflags dirac
)
7553 _ld_dirac
=$
($_pkg_config --silence-errors --libs dirac
)
7554 cc_check
$_inc_dirac $_ld_dirac &&
7555 _libdirac_lavc
=yes &&
7556 extra_cflags
="$extra_cflags $_inc_dirac" &&
7557 extra_ldflags
="$extra_ldflags $_ld_dirac"
7561 if test "$_libdirac_lavc" = yes ; then
7562 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 1'
7563 _libavencoders
="$_libavencoders LIBDIRAC_ENCODER"
7564 _libavdecoders
="$_libavdecoders LIBDIRAC_DECODER"
7565 codecmodules
="libdirac $codecmodules"
7567 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 0'
7568 nocodecmodules
="libdirac $nocodecmodules"
7570 echores
"$_libdirac_lavc"
7573 echocheck
"libschroedinger"
7574 if test "$_libschroedinger_lavc" = auto
; then
7575 _libschroedinger_lavc
=no
7576 if test "$_libavcodec_a" != yes; then
7577 res_comment
="libavcodec (static) is required by libschroedinger, sorry"
7580 #include <schroedinger/schro.h>
7581 int main(void) { schro_init(); return SCHRO_ENCODER_RATE_CONTROL_CONSTANT_QUALITY; }
7583 if $_pkg_config --exists schroedinger-1.0
; then
7584 _inc_schroedinger
=$
($_pkg_config --silence-errors --cflags schroedinger-1.0
)
7585 _ld_schroedinger
=$
($_pkg_config --silence-errors --libs schroedinger-1.0
)
7586 cc_check
$_inc_schroedinger $_ld_schroedinger &&
7587 _libschroedinger_lavc
=yes &&
7588 extra_cflags
="$extra_cflags $_inc_schroedinger" &&
7589 extra_ldflags
="$extra_ldflags $_ld_schroedinger"
7593 if test "$_libschroedinger_lavc" = yes ; then
7594 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 1'
7595 _libavencoders
="$_libavencoders LIBSCHROEDINGER_ENCODER"
7596 _libavdecoders
="$_libavdecoders LIBSCHROEDINGER_DECODER"
7597 codecmodules
="libschroedinger $codecmodules"
7599 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 0'
7600 nocodecmodules
="libschroedinger $nocodecmodules"
7602 echores
"$_libschroedinger_lavc"
7605 if test "$_libnut" = auto
; then
7609 #include <inttypes.h>
7611 nut_context_tt * nut;
7612 int main(void) { (void)nut_error(0); return 0; }
7615 cc_check
-lnut && _libnut
=yes
7618 if test "$_libnut" = yes ; then
7619 def_libnut
='#define CONFIG_LIBNUT 1'
7620 extra_ldflags
="$extra_ldflags -lnut"
7622 def_libnut
='#undef CONFIG_LIBNUT'
7626 #check must be done after libavcodec one
7628 if test "$_zr" = auto
; then
7629 #36067's seem to identify themselves as 36057PQC's, so the line
7630 #below should work for 36067's and 36057's.
7631 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7637 if test "$_zr" = yes ; then
7638 if test "$_libavcodec_a" = yes ; then
7639 def_zr
='#define CONFIG_ZR 1'
7640 vomodules
="zr zr2 $vomodules"
7642 res_comment
="libavcodec (static) is required by zr, sorry"
7643 novomodules
="zr $novomodules"
7644 def_zr
='#undef CONFIG_ZR'
7647 def_zr
='#undef CONFIG_ZR'
7648 novomodules
="zr zr2 $novomodules"
7652 # mencoder requires (optional) those libs: libmp3lame
7653 if test "$_mencoder" != no
; then
7655 echocheck
"libmp3lame"
7656 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7657 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7658 if test "$_mp3lame" = auto
; then
7661 #include <lame/lame.h>
7662 int main(void) { lame_version_t lv; (void) lame_init();
7663 get_lame_version_numerical(&lv);
7666 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7668 if test "$_mp3lame" = yes ; then
7669 def_mp3lame
="#define CONFIG_MP3LAME 1"
7670 _ld_mp3lame
=-lmp3lame
7671 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7673 #include <lame/lame.h>
7674 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7676 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7678 #include <lame/lame.h>
7679 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7681 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7682 test "$_mp3lame_lavc" = auto
&& _mp3lame_lavc
=yes
7683 if test "$_mp3lame_lavc" = yes ; then
7684 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 1"
7685 _libavencoders
="$_libavencoders LIBMP3LAME_ENCODER"
7686 libs_mplayer
="$libs_mplayer $_ld_mp3lame"
7690 def_mp3lame
='#undef CONFIG_MP3LAME'
7691 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 0"
7693 res_comment
="in libavcodec: $_mp3lame_lavc"
7696 fi # test "$_mencoder" != no
7698 echocheck
"mencoder"
7699 if test "$_mencoder" = yes ; then
7700 def_muxers
='#define CONFIG_MUXERS 1'
7702 # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint,
7703 # png for vf_screenshot, mjpeg for zr
7704 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
7705 test "$_zlib" = yes && _libavencoders
="$_libavencoders PNG_ENCODER"
7706 test "$_zr" = yes && _libavencoders
="$_libavencoders MJPEG_ENCODER"
7708 def_muxers
='#define CONFIG_MUXERS 0'
7710 echores
"$_mencoder"
7713 echocheck
"UnRAR executable"
7714 if test "$_unrar_exec" = auto
; then
7716 mingw32
&& _unrar_exec
="no"
7718 if test "$_unrar_exec" = yes ; then
7719 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7721 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7723 echores
"$_unrar_exec"
7725 echocheck
"TV interface"
7726 if test "$_tv" = yes ; then
7727 def_tv
='#define CONFIG_TV 1'
7728 inputmodules
="tv $inputmodules"
7730 _noinputmodules
="tv $_noinputmodules"
7731 def_tv
='#undef CONFIG_TV'
7736 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7737 echocheck
"*BSD BT848 bt8xx header"
7739 for file in "machine/ioctl_bt848.h" \
7740 "dev/bktr/ioctl_bt848.h" \
7741 "dev/video/bktr/ioctl_bt848.h" \
7742 "dev/ic/bt8xx.h" ; do
7744 #include <sys/types.h>
7745 #include <sys/ioctl.h>
7747 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7751 _ioctl_bt848_h_name
="$file"
7755 if test "$_ioctl_bt848_h" = yes ; then
7756 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7757 res_comment
="using $_ioctl_bt848_h_name"
7759 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7761 echores
"$_ioctl_bt848_h"
7763 echocheck
"*BSD ioctl_meteor.h"
7765 for file in "machine/ioctl_meteor.h" \
7766 "dev/bktr/ioctl_meteor.h" \
7767 "dev/video/bktr/ioctl_meteor.h" ; do
7769 #include <sys/types.h>
7771 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7775 _ioctl_meteor_h_name
="$file"
7779 if test "$_ioctl_meteor_h" = yes ; then
7780 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7781 res_comment
="using $_ioctl_meteor_h_name"
7783 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7785 echores
"$_ioctl_meteor_h"
7787 echocheck
"*BSD BrookTree 848 TV interface"
7788 if test "$_tv_bsdbt848" = auto
; then
7790 if test "$_tv" = yes ; then
7792 #include <sys/types.h>
7793 $def_ioctl_meteor_h_name
7794 $def_ioctl_bt848_h_name
7795 #ifdef IOCTL_METEOR_H_NAME
7796 #include IOCTL_METEOR_H_NAME
7798 #ifdef IOCTL_BT848_H_NAME
7799 #include IOCTL_BT848_H_NAME
7802 ioctl(0, METEORSINPUT, 0);
7803 ioctl(0, TVTUNER_GETFREQ, 0);
7807 cc_check
&& _tv_bsdbt848
=yes
7810 if test "$_tv_bsdbt848" = yes ; then
7811 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7812 inputmodules
="tv-bsdbt848 $inputmodules"
7814 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7815 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7817 echores
"$_tv_bsdbt848"
7818 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7821 echocheck
"DirectShow TV interface"
7822 if test "$_tv_dshow" = auto
; then
7824 if test "$_tv" = yes && win32
; then
7829 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7833 cc_check
-lole32 -luuid && _tv_dshow
=yes
7836 if test "$_tv_dshow" = yes ; then
7837 inputmodules
="tv-dshow $inputmodules"
7838 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7839 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7841 _noinputmodules
="tv-dshow $_noinputmodules"
7842 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7844 echores
"$_tv_dshow"
7847 echocheck
"Video 4 Linux TV interface"
7848 if test "$_tv_v4l1" = auto
; then
7850 if test "$_tv" = yes && linux
; then
7853 #include <linux/videodev.h>
7854 int main(void) { return 0; }
7856 cc_check
&& _tv_v4l1
=yes
7859 if test "$_tv_v4l1" = yes ; then
7862 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7863 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7864 inputmodules
="tv-v4l $inputmodules"
7866 _noinputmodules
="tv-v4l1 $_noinputmodules"
7867 def_tv_v4l
='#undef CONFIG_TV_V4L'
7872 echocheck
"Video 4 Linux 2 TV interface"
7873 if test "$_tv_v4l2" = auto
; then
7875 if test "$_tv" = yes && linux
; then
7878 #include <linux/types.h>
7879 #include <linux/videodev2.h>
7880 int main(void) { return 0; }
7882 cc_check
&& _tv_v4l2
=yes
7885 if test "$_tv_v4l2" = yes ; then
7888 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7889 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7890 inputmodules
="tv-v4l2 $inputmodules"
7892 _noinputmodules
="tv-v4l2 $_noinputmodules"
7893 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7898 echocheck
"Radio interface"
7899 if test "$_radio" = yes ; then
7900 def_radio
='#define CONFIG_RADIO 1'
7901 inputmodules
="radio $inputmodules"
7902 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7905 if test "$_radio_capture" = yes ; then
7907 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7909 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7912 _noinputmodules
="radio $_noinputmodules"
7913 def_radio
='#undef CONFIG_RADIO'
7914 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7918 echocheck
"Capture for Radio interface"
7919 echores
"$_radio_capture"
7921 echocheck
"Video 4 Linux 2 Radio interface"
7922 if test "$_radio_v4l2" = auto
; then
7924 if test "$_radio" = yes && linux
; then
7927 #include <linux/types.h>
7928 #include <linux/videodev2.h>
7929 int main(void) { return 0; }
7931 cc_check
&& _radio_v4l2
=yes
7934 if test "$_radio_v4l2" = yes ; then
7935 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7937 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7939 echores
"$_radio_v4l2"
7941 echocheck
"Video 4 Linux Radio interface"
7942 if test "$_radio_v4l" = auto
; then
7944 if test "$_radio" = yes && linux
; then
7947 #include <linux/videodev.h>
7948 int main(void) { return 0; }
7950 cc_check
&& _radio_v4l
=yes
7953 if test "$_radio_v4l" = yes ; then
7954 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7956 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7958 echores
"$_radio_v4l"
7960 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7961 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7962 echocheck
"*BSD BrookTree 848 Radio interface"
7965 #include <sys/types.h>
7966 $def_ioctl_bt848_h_name
7967 #ifdef IOCTL_BT848_H_NAME
7968 #include IOCTL_BT848_H_NAME
7970 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7972 cc_check
&& _radio_bsdbt848
=yes
7973 echores
"$_radio_bsdbt848"
7974 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7976 if test "$_radio_bsdbt848" = yes ; then
7977 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7979 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7982 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7983 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7984 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7987 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7988 if test "$_pvr" = auto
; then
7990 if test "$_tv_v4l2" = yes && linux
; then
7993 #include <inttypes.h>
7994 #include <linux/types.h>
7995 #include <linux/videodev2.h>
7996 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7998 cc_check
&& _pvr
=yes
8001 if test "$_pvr" = yes ; then
8002 def_pvr
='#define CONFIG_PVR 1'
8003 inputmodules
="pvr $inputmodules"
8005 _noinputmodules
="pvr $_noinputmodules"
8006 def_pvr
='#undef CONFIG_PVR'
8012 if ! beos
&& test "$_ftp" = yes ; then
8013 def_ftp
='#define CONFIG_FTP 1'
8014 inputmodules
="ftp $inputmodules"
8016 _noinputmodules
="ftp $_noinputmodules"
8017 def_ftp
='#undef CONFIG_FTP'
8021 echocheck
"vstream client"
8022 if test "$_vstream" = auto
; then
8025 #include <vstream-client.h>
8026 void vstream_error(const char *format, ... ) {}
8027 int main(void) { vstream_start(); return 0; }
8029 cc_check
-lvstream-client && _vstream
=yes
8031 if test "$_vstream" = yes ; then
8032 def_vstream
='#define CONFIG_VSTREAM 1'
8033 inputmodules
="vstream $inputmodules"
8034 extra_ldflags
="$extra_ldflags -lvstream-client"
8036 _noinputmodules
="vstream $_noinputmodules"
8037 def_vstream
='#undef CONFIG_VSTREAM'
8042 echocheck
"OSD menu"
8043 if test "$_menu" = yes ; then
8044 def_menu
='#define CONFIG_MENU 1'
8045 test $_dvbin = "yes" && _menu_dvbin
=yes
8047 def_menu
='#undef CONFIG_MENU'
8053 echocheck
"Subtitles sorting"
8054 if test "$_sortsub" = yes ; then
8055 def_sortsub
='#define CONFIG_SORTSUB 1'
8057 def_sortsub
='#undef CONFIG_SORTSUB'
8062 echocheck
"XMMS inputplugin support"
8063 if test "$_xmms" = yes ; then
8064 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
8065 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
8066 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
8068 _xmmsplugindir
=/usr
/lib
/xmms
/Input
8069 _xmmslibdir
=/usr
/lib
8072 def_xmms
='#define CONFIG_XMMS 1'
8074 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
8076 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
8079 def_xmms
='#undef CONFIG_XMMS'
8084 # --------------- GUI specific tests begin -------------------
8087 if test "$_gui" = yes ; then
8089 # Required libraries
8090 if test "$_libavcodec" != yes ||
8091 ! echo $_libavdecoders |
grep -q PNG_DECODER
; then
8092 die
"The GUI requires libavcodec with PNG support (needs zlib)."
8094 test "$_freetype" = no
&& test "$_bitmap_font" = no
&& \
8095 die
"The GUI requires either FreeType or bitmap font support."
8098 test "$_x11" != yes && die
"X11 support required for GUI compilation."
8100 echocheck
"XShape extension"
8101 if test "$_xshape" = auto
; then
8104 #include <X11/Xlib.h>
8105 #include <X11/Xproto.h>
8106 #include <X11/Xutil.h>
8107 #include <X11/extensions/shape.h>
8110 char *name = ":0.0";
8113 int eventbase, errorbase;
8114 if (getenv("DISPLAY"))
8115 name=getenv("DISPLAY");
8116 wsDisplay=XOpenDisplay(name);
8117 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
8119 XCloseDisplay(wsDisplay);
8123 cc_check
-lXext && _xshape
=yes
8125 if test "$_xshape" = yes ; then
8126 def_xshape
='#define CONFIG_XSHAPE 1'
8128 die
"The GUI requires the X11 extension XShape (which was not found)."
8133 if test "$_gtk1" = no
; then
8135 echocheck
"GTK+ version"
8137 if $_pkg_config gtk
+-2.0
--exists ; then
8138 _gtk
=$
($_pkg_config gtk
+-2.0
--modversion 2>/dev
/null
)
8139 extra_cflags
="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)"
8140 libs_mplayer
="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)"
8144 if $_pkg_config glib-2.0
--exists ; then
8145 echocheck
"glib version"
8146 _glib
=$
($_pkg_config glib-2.0
--modversion 2>/dev
/null
)
8147 libs_mplayer
="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)"
8150 def_gui
='#define CONFIG_GUI 1'
8151 def_gtk2
='#define CONFIG_GTK2 1'
8154 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
8157 echo "GTK-2 devel packages were not found, trying GTK 1.2"
8162 if test "$_gtk1" = yes ; then
8163 # Check for old GTK (1.2.x)
8164 echocheck
"GTK version"
8165 if test -z "$_gtkconfig" ; then
8166 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
8167 _gtkconfig
="gtk-config"
8168 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
8169 _gtkconfig
="gtk12-config"
8171 die
"The GUI requires GTK devel packages (which were not found)."
8174 _gtk
=$
($_gtkconfig --version 2>&1)
8175 extra_cflags
="$extra_cflags $($_gtkconfig --cflags 2>&1)"
8176 libs_mplayer
="$libs_mplayer $($_gtkconfig --libs 2>&1)"
8177 echores
"$_gtk (using $_gtkconfig)"
8180 echocheck
"glib version"
8181 if test -z "$_glibconfig" ; then
8182 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
8183 _glibconfig
="glib-config"
8184 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
8185 _glibconfig
="glib12-config"
8187 die
"The GUI requires GLIB devel packages (which were not found)"
8190 _glib
=$
($_glibconfig --version 2>&1)
8191 libs_mplayer
="$libs_mplayer $($_glibconfig --libs 2>&1)"
8192 echores
"$_glib (using $_glibconfig)"
8194 def_gui
='#define CONFIG_GUI 1'
8195 def_gtk2
='#undef CONFIG_GTK2'
8200 libs_mplayer
="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
8201 def_gui
='#define CONFIG_GUI 1'
8202 def_gtk2
='#undef CONFIG_GTK2'
8205 else #if test "$_gui"
8206 def_gui
='#undef CONFIG_GUI'
8207 def_gtk2
='#undef CONFIG_GTK2'
8209 # --------------- GUI specific tests end -------------------
8212 if test "$_charset" != "noconv" ; then
8213 def_charset
="#define MSG_CHARSET \"$_charset\""
8215 def_charset
="#undef MSG_CHARSET"
8219 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
8220 echocheck
"iconv program"
8221 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
8222 if test "$?" -ne 0 ; then
8224 echo "No working iconv program found, use "
8225 echo "--charset=UTF-8 to continue anyway."
8226 echo "If you also have problems with iconv library functions use --charset=noconv."
8227 echo "Messages in the GTK-2 interface will be broken then."
8234 #############################################################################
8236 echocheck
"automatic gdb attach"
8237 if test "$_crash_debug" = yes ; then
8238 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
8240 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
8243 echores
"$_crash_debug"
8245 echocheck
"compiler support for noexecstack"
8247 int main(void) { return 0; }
8249 if cc_check
-Wl,-z,noexecstack
; then
8250 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
8256 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
8257 if cc_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
8258 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
8265 # Dynamic linking flags
8266 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
8268 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
8269 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
8270 _ld_dl_dynamic
='-rdynamic'
8273 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
8274 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
8275 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
8277 def_debug
='#undef MP_DEBUG'
8278 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
8281 echocheck
"joystick"
8282 def_joystick
='#undef CONFIG_JOYSTICK'
8283 if test "$_joystick" = yes ; then
8285 # TODO add some check
8286 def_joystick
='#define CONFIG_JOYSTICK 1'
8289 res_comment
="unsupported under $system_name"
8292 echores
"$_joystick"
8295 if test "$_lirc" = auto
; then
8298 #include <lirc/lirc_client.h>
8299 int main(void) { return 0; }
8301 cc_check
-llirc_client && _lirc
=yes
8303 if test "$_lirc" = yes ; then
8304 def_lirc
='#define CONFIG_LIRC 1'
8305 libs_mplayer
="$libs_mplayer -llirc_client"
8307 def_lirc
='#undef CONFIG_LIRC'
8312 if test "$_lircc" = auto
; then
8315 #include <lirc/lircc.h>
8316 int main(void) { return 0; }
8318 cc_check
-llircc && _lircc
=yes
8320 if test "$_lircc" = yes ; then
8321 def_lircc
='#define CONFIG_LIRCC 1'
8322 libs_mplayer
="$libs_mplayer -llircc"
8324 def_lircc
='#undef CONFIG_LIRCC'
8329 # Detect maemo development platform libraries availability (http://www.maemo.org),
8330 # they are used when run on Nokia 770|8x0
8331 echocheck
"maemo (Nokia 770|8x0)"
8332 if test "$_maemo" = auto
; then
8335 #include <libosso.h>
8336 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
8338 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
8340 if test "$_maemo" = yes ; then
8341 def_maemo
='#define CONFIG_MAEMO 1'
8342 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
8343 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
8345 def_maemo
='#undef CONFIG_MAEMO'
8350 #############################################################################
8352 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
8353 # the OMF format needs to come after the 'extern symbol prefix' check, which
8356 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
8359 # linker paths should be the same for mencoder and mplayer
8361 for I
in $libs_mplayer ; do
8362 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
8363 if test -z "$_tmp" ; then
8364 extra_ldflags
="$extra_ldflags $I"
8366 _ld_tmp
="$_ld_tmp $I"
8369 libs_mplayer
=$_ld_tmp
8372 #############################################################################
8373 # 64 bit file offsets?
8374 if test "$_largefiles" = yes || freebsd
; then
8375 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8376 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
8377 # dvdread support requires this (for off64_t)
8378 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
8382 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
8384 # This must be the last test to be performed. Any other tests following it
8385 # could fail due to linker errors. libdvdnavmini is intentionally not linked
8386 # against libdvdread (to permit MPlayer to use its own copy of the library).
8387 # So any compilation using the flags added here but not linking against
8388 # libdvdread can fail.
8389 echocheck
"DVD support (libdvdnav)"
8391 if test "$_dvdnav" = auto
; then
8392 if test "$_dvdread_internal" = yes ; then
8395 res_comment
="internal"
8397 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
8400 if test "$_dvdnav" = auto
; then
8402 #include <inttypes.h>
8403 #include <dvdnav/dvdnav.h>
8404 int main(void) { dvdnav_t *dvd=0; return 0; }
8407 _dvdnavdir
=$
($_dvdnavconfig --cflags)
8408 _dvdnavlibs
=$
($_dvdnavconfig --libs)
8409 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
8411 if test "$_dvdnav" = yes ; then
8413 def_dvdnav
='#define CONFIG_DVDNAV 1'
8414 if test "$dvdnav_internal" = yes ; then
8415 cflags_libdvdnav
="-Ilibdvdnav"
8416 inputmodules
="dvdnav(internal) $inputmodules"
8418 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
8419 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
8420 inputmodules
="dvdnav $inputmodules"
8423 def_dvdnav
='#undef CONFIG_DVDNAV'
8424 _noinputmodules
="dvdnav $_noinputmodules"
8428 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
8429 # Read dvdnav comment above.
8432 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8433 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8435 for part
in $list; do
8436 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8437 echo "${nprefix}_$part = yes"
8442 #############################################################################
8443 echo "Creating config.mak"
8444 cat > config.mak
<< EOF
8445 # -------- Generated by configure -----------
8447 # Ensure that locale settings do not interfere with shell commands.
8450 CONFIGURATION = $_configuration
8453 DOC_LANGS = $language_doc
8454 DOC_LANG_ALL = $doc_lang_all
8455 MAN_LANGS = $language_man
8456 MAN_LANG_ALL = $man_lang_all
8458 prefix = \$(DESTDIR)$_prefix
8459 BINDIR = \$(DESTDIR)$_bindir
8460 DATADIR = \$(DESTDIR)$_datadir
8461 LIBDIR = \$(DESTDIR)$_libdir
8462 MANDIR = \$(DESTDIR)$_mandir
8463 CONFDIR = \$(DESTDIR)$_confdir
8471 INSTALLSTRIP = $_install_strip
8474 CFLAGS = $CFLAGS $extra_cflags
8475 ASFLAGS = \$(CFLAGS)
8476 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
8478 CFLAGS_DHAHELPER = $cflags_dhahelper
8479 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
8480 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
8481 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
8482 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
8483 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
8484 CFLAGS_STACKREALIGN = $cflags_stackrealign
8485 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
8486 CFLAGS_TREMOR_LOW = $cflags_tremor_low
8488 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
8489 EXTRALIBS_MPLAYER = $libs_mplayer
8490 EXTRALIBS_MENCODER = $libs_mencoder
8493 HELP_FILE = $_mp_help
8500 $(mak_enable "$arch_all" "$arch" ARCH)
8501 $(mak_enable "$subarch_all" "$subarch" ARCH)
8502 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
8504 MENCODER = $_mencoder
8507 NEED_GETTIMEOFDAY = $_need_gettimeofday
8508 NEED_GLOB = $_need_glob
8509 NEED_MMAP = $_need_mmap
8510 NEED_SETENV = $_need_setenv
8511 NEED_SHMEM = $_need_shmem
8512 NEED_STRSEP = $_need_strsep
8513 NEED_SWAB = $_need_swab
8514 NEED_VSSCANF = $_need_vsscanf
8522 APPLE_IR = $_apple_ir
8523 APPLE_REMOTE = $_apple_remote
8525 AUDIO_INPUT = $_audio_input
8526 BITMAP_FONT = $_bitmap_font
8531 COREAUDIO = $_coreaudio
8532 COREVIDEO = $_corevideo
8536 DIRECT3D = $_direct3d
8537 DIRECTFB = $_directfb
8541 DVDNAV_INTERNAL = $dvdnav_internal
8543 DVDREAD_INTERNAL = $_dvdread_internal
8549 FAAD_INTERNAL = $_faad_internal
8550 FASTMEMCPY = $_fastmemcpy
8552 FREETYPE = $_freetype
8557 GL_WIN32 = $_gl_win32
8560 MATRIXVIEW = $matrixview
8563 GUI_WIN32 = $_gui_win32
8564 HAVE_POSIX_SELECT = $_posix_select
8565 HAVE_SYS_MMAN_H = $_mman
8568 JOYSTICK = $_joystick
8575 LIBASS_INTERNAL = $ass_internal
8579 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
8583 LIBMENU_DVBIN = $_menu_dvbin
8584 LIBMPEG2 = $_libmpeg2
8585 LIBNEMESI = $_nemesi
8587 LIBSMBCLIENT = $_smb
8588 LIBTHEORA = $_theora
8591 MACOSX_FINDER = $_macosx_finder
8597 MUSEPACK = $_musepack
8599 NATIVE_RTSP = $_native_rtsp
8603 PE_EXECUTABLE = $_pe_executable
8606 PRIORITY = $_priority
8610 QTX_CODECS_WIN32 = $_qtx_codecs_win32
8611 QTX_EMULATION = $_qtx_emulation
8614 RADIO_CAPTURE=$_radio_capture
8615 REAL_CODECS = $_real
8619 STREAM_CACHE = $_stream_cache
8620 SGIAUDIO = $_sgiaudio
8621 SUNAUDIO = $_sunaudio
8627 TREMOR_INTERNAL = $_tremor_internal
8629 TV_BSDBT848 = $_tv_bsdbt848
8630 TV_DSHOW = $_tv_dshow
8635 UNRAR_EXEC = $_unrar_exec
8641 VIDIX_PCIDB = $_vidix_pcidb_val
8642 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
8643 VIDIX_IVTV=$_vidix_drv_ivtv
8644 VIDIX_MACH64=$_vidix_drv_mach64
8645 VIDIX_MGA=$_vidix_drv_mga
8646 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
8647 VIDIX_NVIDIA=$_vidix_drv_nvidia
8648 VIDIX_PM2=$_vidix_drv_pm2
8649 VIDIX_PM3=$_vidix_drv_pm3
8650 VIDIX_RADEON=$_vidix_drv_radeon
8651 VIDIX_RAGE128=$_vidix_drv_rage128
8652 VIDIX_S3=$_vidix_drv_s3
8653 VIDIX_SH_VEU=$_vidix_drv_sh_veu
8654 VIDIX_SIS=$_vidix_drv_sis
8655 VIDIX_UNICHROME=$_vidix_drv_unichrome
8659 WIN32DLL = $_win32dll
8660 WIN32WAVEOUT = $_win32waveout
8661 WIN32_EMULATION = $_win32_emulation
8662 WINVIDIX = $winvidix
8665 XANIM_CODECS = $_xanim
8667 XMMS_PLUGINS = $_xmms
8673 YUV4MPEG = $_yuv4mpeg
8677 LIBAVUTIL = $_libavutil
8678 LIBAVUTIL_A = $_libavutil_a
8679 LIBAVUTIL_SO = $_libavutil_so
8680 LIBAVCODEC = $_libavcodec
8681 LIBAVCODEC_A = $_libavcodec_a
8682 LIBAVCODEC_SO = $_libavcodec_so
8683 LIBAVFORMAT = $_libavformat
8684 LIBAVFORMAT_A = $_libavformat_a
8685 LIBAVFORMAT_SO = $_libavformat_so
8686 LIBPOSTPROC = $_libpostproc
8687 LIBPOSTPROC_A = $_libpostproc_a
8688 LIBPOSTPROC_SO = $_libpostproc_so
8689 LIBSWSCALE = $_libswscale
8690 LIBSWSCALE_A = $_libswscale_a
8691 LIBSWSCALE_SO = $_libswscale_so
8693 HOSTCC = \$(HOST_CC)
8694 HOSTCFLAGS = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3
8700 YASMFLAGS = $YASMFLAGS
8707 LIBNAME = \$(LIBPREF)\$(NAME)\$(LIBSUF)
8708 FULLNAME = \$(NAME)\$(BUILDSUF)
8710 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8716 CONFIG_H264DSP = yes
8722 $mak_hardcoded_tables
8723 $mak_libavcodec_mpegaudio_hp
8724 !CONFIG_LIBRTMP = yes
8726 CONFIG_BZLIB = $bzlib
8727 CONFIG_ENCODERS = yes
8729 CONFIG_LIBDIRAC_DECODER = $_libdirac_lavc
8730 CONFIG_LIBDIRAC_ENCODER = $_libdirac_lavc
8731 CONFIG_LIBFAAC_ENCODER = $_faac_lavc
8732 CONFIG_LIBMP3LAME_ENCODER = $_mp3lame_lavc
8733 CONFIG_LIBOPENCORE_AMRNB_DECODER = $_libopencore_amrnb
8734 CONFIG_LIBOPENCORE_AMRNB_ENCODER = $_libopencore_amrnb
8735 CONFIG_LIBOPENCORE_AMRWB_DECODER = $_libopencore_amrwb
8736 OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
8737 OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
8738 CONFIG_LIBSCHROEDINGER_DECODER = $_libschroedinger_lavc
8739 CONFIG_LIBSCHROEDINGER_ENCODER = $_libschroedinger_lavc
8740 CONFIG_LIBVORBIS_ENCODER = $_libvorbis
8741 CONFIG_LIBX264_ENCODER = $_x264_lavc
8742 CONFIG_LIBXVID_ENCODER = $_xvid_lavc
8743 CONFIG_MLIB = $_mlib
8744 CONFIG_MUXERS = $_mencoder
8745 CONFIG_POSTPROC = yes
8746 CONFIG_VDPAU = $_vdpau
8747 CONFIG_XVMC = $_xvmc
8748 CONFIG_ZLIB = $_zlib
8750 HAVE_PTHREADS = $_pthreads
8752 HAVE_W32THREADS = $_w32threads
8753 HAVE_YASM = $have_yasm
8755 $(echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8756 $(echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8757 $(echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8758 $(echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8759 $(echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8760 $(echo $_libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8761 $(echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8762 $(echo $_libavhwaccels | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8765 #############################################################################
8767 ff_config_enable
() {
8768 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8769 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8771 test -z "$_nprefix" && _nprefix
='CONFIG'
8772 for part
in $list; do
8773 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8774 echo "#define ${_nprefix}_$part 1"
8776 echo "#define ${_nprefix}_$part 0"
8781 echo "Creating config.h"
8783 /*----------------------------------------------------------------------------
8784 ** This file has been automatically generated by configure any changes in it
8785 ** will be lost when you run configure again.
8786 ** Instead of modifying definitions here, use the --enable/--disable options
8787 ** of the configure script! See ./configure --help for details.
8788 *---------------------------------------------------------------------------*/
8790 #ifndef MPLAYER_CONFIG_H
8791 #define MPLAYER_CONFIG_H
8793 /* Undefine this if you do not want to select mono audio (left or right)
8794 with a stereo MPEG layer 2/3 audio stream. The command line option
8795 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8796 right-only), with 0 being the default.
8798 #define CONFIG_FAKE_MONO 1
8800 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
8801 #define MAX_OUTBURST 65536
8803 /* set up audio OUTBURST. Do not change this! */
8804 #define OUTBURST 512
8806 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8808 #undef FAST_OSD_TABLE
8810 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8811 #define MPEG12_POSTPROC 1
8812 #define ATTRIBUTE_ALIGNED_MAX 16
8816 #define CONFIGURATION "$_configuration"
8818 #define MPLAYER_DATADIR "$_datadir"
8819 #define MPLAYER_CONFDIR "$_confdir"
8820 #define MPLAYER_LIBDIR "$_libdir"
8822 /* definitions needed by included libraries */
8823 #define HAVE_INTTYPES_H 1
8824 /* libmpeg2 + FFmpeg */
8827 #define HAVE_ERRNO_H 1
8828 /* libdvdcss + libdvdread */
8829 #define HAVE_LIMITS_H 1
8830 /* libdvdcss + libfaad2 */
8831 #define HAVE_UNISTD_H 1
8832 /* libfaad2 + libdvdread */
8833 #define STDC_HEADERS 1
8834 #define HAVE_MEMCPY 1
8836 #define HAVE_STRING_H 1
8837 #define HAVE_STRINGS_H 1
8838 #define HAVE_SYS_STAT_H 1
8839 #define HAVE_SYS_TYPES_H 1
8841 #define READ_CACHE_TRACE 0
8843 #define HAVE_DLFCN_H 1
8847 /* system headers */
8849 $def_alsa_asoundlib_h
8853 $def_mman_has_map_failed
8855 $def_sys_asoundlib_h
8856 $def_sys_soundcard_h
8863 /* system functions */
8886 /* system-specific features */
8901 $def_restrict_keyword
8906 /* configurable options */
8910 $def_dynamic_plugins
8913 $def_runtime_cpudetection
8921 #define __CPU__ $iproc
8924 $(ff_config_enable "$arch_all" "$arch" "ARCH")
8925 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
8926 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
8930 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8931 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8951 /* codec libraries */
8963 $def_mp3lame_preset_medium
8987 #define BINARY_CODECS_PATH "$_codecsdir"
8988 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8997 /* Audio output drivers */
9013 $def_ossaudio_devdsp
9014 $def_ossaudio_devmixer
9027 $def_ioctl_bt848_h_name
9028 $def_ioctl_meteor_h_name
9067 $def_struct_ipv6_mreq
9068 $def_struct_sockaddr_in6
9069 $def_struct_sockaddr_sa_len
9073 $def_sockaddr_storage
9088 $def_directfb_version
9125 $def_vidix_drv_cyberblade
9127 $def_vidix_drv_mach64
9129 $def_vidix_drv_mga_crtc2
9130 $def_vidix_drv_nvidia
9132 $def_vidix_drv_radeon
9133 $def_vidix_drv_rage128
9135 $def_vidix_drv_sh_veu
9137 $def_vidix_drv_unichrome
9171 #define CONFIG_DECODERS 1
9172 #define CONFIG_ENCODERS 1
9173 #define CONFIG_DEMUXERS 1
9184 $def_hardcoded_tables
9185 $def_libavcodec_mpegaudio_hp
9188 $def_local_aligned_8
9189 $def_local_aligned_16
9206 #define CONFIG_FASTDIV 0
9207 #define CONFIG_FFSERVER 0
9208 #define CONFIG_GPL 1
9209 #define CONFIG_GRAY 0
9210 #define CONFIG_LIBRTMP 0
9211 #define CONFIG_LIBVORBIS 0
9212 #define CONFIG_POWERPC_PERF 0
9213 #define CONFIG_SMALL 0
9214 #define CONFIG_SWSCALE_ALPHA 1
9216 #if defined(HAVE_AF_INET6) && (!defined(_WIN32) || defined(__CYGWIN__))
9217 #define CONFIG_IPV6 1
9219 #define CONFIG_IPV6 0
9222 #define HAVE_ATTRIBUTE_MAY_ALIAS 1
9223 #define av_alias __attribute__((may_alias))
9224 #define HAVE_ATTRIBUTE_PACKED 1
9225 #define HAVE_GETHRTIME 0
9226 #define HAVE_INLINE_ASM 1
9227 #define HAVE_LDBRX 0
9228 #define HAVE_POLL_H 1
9229 #define HAVE_PPC4XX 0
9230 #define HAVE_STRERROR_R 0
9231 #define HAVE_SYS_SELECT_H 0
9232 #define HAVE_VFP_ARGS 1
9233 #define HAVE_VIRTUALALLOC 0
9235 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
9236 #define CONFIG_AANDCT 1
9237 #define CONFIG_DCT 1
9238 #define CONFIG_DWT 1
9239 #define CONFIG_FFT 1
9240 #define CONFIG_GOLOMB 1
9241 #define CONFIG_H264DSP 1
9242 #define CONFIG_LPC 1
9243 #define CONFIG_MDCT 1
9244 #define CONFIG_RDFT 1
9246 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
9249 #define HAVE_EBP_AVAILABLE 1
9251 #define HAVE_EBP_AVAILABLE 0
9254 #define FFMPEG_CONFIGURATION "--enable-gpl --enable-postproc"
9255 #define FFMPEG_LICENSE "GPL version 2 or later"
9257 /* External libraries used through libavcodec. */
9260 $def_libopencore_amrnb
9261 $def_libopencore_amrwb
9263 $def_libschroedinger_lavc
9268 $(ff_config_enable "$_libavdecoders_all" "$_libavdecoders")
9269 $(ff_config_enable "$_libavencoders_all" "$_libavencoders")
9270 $(ff_config_enable "$_libavparsers_all" "$_libavparsers")
9271 $(ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers")
9272 $(ff_config_enable "$_libavmuxers_all" "$_libavmuxers")
9273 $(ff_config_enable "$_libavprotocols_all" "$_libavprotocols")
9274 $(ff_config_enable "$_libavbsfs_all" "$_libavbsfs")
9275 $(ff_config_enable "$_libavhwaccels_all" "$_libavhwaccels")
9277 #endif /* MPLAYER_CONFIG_H */
9280 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
9281 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
9283 ############################################################################
9285 # Create avconfig.h for FFmpeg.
9286 cat > "$TMPH" << EOF
9287 /* Generated by mpconfigure */
9288 #ifndef AVUTIL_AVCONFIG_H
9289 #define AVUTIL_AVCONFIG_H
9291 #endif /* AVUTIL_AVCONFIG_H */
9294 # Do not overwrite an unchanged avconfig.h to avoid superfluous rebuilds.
9295 cmp -s "$TMPH" libavutil
/avconfig.h ||
mv -f "$TMPH" libavutil
/avconfig.h
9297 #############################################################################
9301 Config files successfully generated by ./configure $_configuration !
9303 Install prefix: $_prefix
9304 Data directory: $_datadir
9305 Config direct.: $_confdir
9307 Byte order: $_byte_order
9308 Optimizing for: $_optimizing
9311 Messages/GUI: $language_msg
9312 Manual pages: $language_man
9313 Documentation: $language_doc
9315 Enabled optional drivers:
9316 Input: $inputmodules
9317 Codecs: $codecmodules
9318 Audio output: $aomodules
9319 Video output: $vomodules
9321 Disabled optional drivers:
9322 Input: $_noinputmodules
9323 Codecs: $nocodecmodules
9324 Audio output: $noaomodules
9325 Video output: $novomodules
9327 'config.h' and 'config.mak' contain your configuration options.
9328 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
9329 compile *** DO NOT REPORT BUGS if you tweak these files ***
9331 'make' will now compile MPlayer and 'make install' will install it.
9332 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
9337 if test "$_mtrr" = yes ; then
9338 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
9344 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
9345 operating system ($system_name). You may encounter a few files that cannot
9346 be played due to missing open source video/audio codec support.
9353 Check $TMPLOG if you wonder why an autodetection failed (make sure
9354 development headers/packages are installed).
9356 NOTE: The --enable-* parameters unconditionally force options on, completely
9357 skipping autodetection. This behavior is unlike what you may be used to from
9358 autoconf-based configure scripts that can decide to override you. This greater
9359 level of control comes at a price. You may have to provide the correct compiler
9360 and linker flags yourself.
9361 If you used one of these options (except --enable-menu and similar ones that
9362 turn on internal features) and experience a compilation or linking failure,
9363 make sure you have passed the necessary compiler/linker flags to configure.
9365 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
9369 if test "$_warn_CFLAGS" = yes; then
9372 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
9375 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
9377 It is strongly recommended to let MPlayer choose the correct CFLAGS!
9378 To do so, execute 'CFLAGS= ./configure <options>'
9384 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"