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-glib-config=PATH path to glib*-config
492 --with-gtk-config=PATH path to gtk*-config
493 --with-sdl-config=PATH path to sdl*-config
494 --with-dvdnav-config=PATH path to dvdnav-config
495 --with-dvdread-config=PATH path to dvdread-config
497 This configure script is NOT autoconf-based, even though its output is similar.
498 It will try to autodetect all configuration options. If you --enable an option
499 it will be forcefully turned on, skipping autodetection. This can break
500 compilation, so you need to know what you are doing.
505 # GOTCHA: the variables below defines the default behavior for autodetection
506 # and have - unless stated otherwise - at least 2 states : yes no
507 # If autodetection is available then the third state is: auto
531 test "$CC" && _cc
="$CC"
535 _runtime_cpudetection
=no
541 _libopencore_amrnb
=auto
542 _libopencore_amrwb
=auto
544 _libavdecoders_all
=$
(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
545 _libavdecoders
=$
(echo $_libavdecoders_all |
sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s
/MPEG4AAC_DECODER
//)
546 _libavencoders_all
=$
(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
547 _libavencoders
=$
(echo $_libavencoders_all |
sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g' -e s
/AAC_ENCODER
//)
548 _libavparsers_all
=$
(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
549 _libavparsers
=$_libavparsers_all
550 _libavbsfs_all
=$
(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
551 _libavbsfs
=$_libavbsfs_all
552 _libavhwaccels_all
=$
(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec
/allcodecs.c |
tr '[a-z]' '[A-Z]')
553 # Disable all hardware accelerators for now.
555 _libavdemuxers_all
=$
(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
556 _libavdemuxers
=$
(echo $_libavdemuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s
/REDIR_DEMUXER
// -e s
/AVISYNTH_DEMUXER
//)
557 _libavmuxers_all
=$
(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
558 _libavmuxers
=$
(echo $_libavmuxers_all |
sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s
/RTP_MUXER
// -e s
/RTSP_MUXER
//)
559 _libavprotocols_all
=$
(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat
/allformats.c |
tr '[a-z]' '[A-Z]')
560 _libavprotocols
=$_libavprotocols_all
568 _libavcodec_mpegaudio_hp
=yes
577 _xvmc
=no
#auto when complete
644 _dvdnavconfig
=dvdnav-config
645 _dvdreadconfig
=dvdread-config
647 _dvdread_internal
=auto
648 _libdvdcss_internal
=auto
659 _mlib
=no
#broken, thus disabled
681 _struct_addrinfo
=auto
683 _struct_sockaddr_storage
=auto
695 _libschroedinger_lavc
=auto
740 _freetypeconfig
='freetype-config'
756 def_dos_paths
="#define HAVE_DOS_PATHS 0"
757 def_stream_cache
="#define CONFIG_STREAM_CACHE 1"
758 def_priority
="#undef CONFIG_PRIORITY"
759 def_pthread_cache
="#undef PTHREAD_CACHE"
767 _prefix
=$
(echo $ac_option | cut
-d '=' -f 2)
770 _bindir
=$
(echo $ac_option | cut
-d '=' -f 2)
773 _datadir
=$
(echo $ac_option | cut
-d '=' -f 2)
776 _mandir
=$
(echo $ac_option | cut
-d '=' -f 2)
779 _confdir
=$
(echo $ac_option | cut
-d '=' -f 2)
782 _libdir
=$
(echo $ac_option | cut
-d '=' -f 2)
785 _codecsdir
=$
(echo $ac_option | cut
-d '=' -f 2)
789 _install
=$
(echo $ac_option | cut
-d '=' -f 2 )
792 _xvmclib
=$
(echo $ac_option | cut
-d '=' -f 2)
796 _sdlconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
798 --with-freetype-config=*)
799 _freetypeconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
802 _gtkconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
804 --with-glib-config=*)
805 _glibconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
807 --with-dvdnav-config=*)
808 _dvdnavconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
810 --with-dvdread-config=*)
811 _dvdreadconfig
=$
(echo $ac_option | cut
-d '=' -f 2)
815 extra_cflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
818 extra_ldflags
=$
(echo $ac_option | cut
-d '=' -f 2-)
821 extra_libs
=$
(echo $ac_option | cut
-d '=' -f 2)
823 --extra-libs-mplayer=*)
824 libs_mplayer
=$
(echo $ac_option | cut
-d '=' -f 2)
826 --extra-libs-mencoder=*)
827 libs_mencoder
=$
(echo $ac_option | cut
-d '=' -f 2)
831 _target
=$
(echo $ac_option | cut
-d '=' -f 2)
834 _cc
=$
(echo $ac_option | cut
-d '=' -f 2)
837 _host_cc
=$
(echo $ac_option | cut
-d '=' -f 2)
840 _as
=$
(echo $ac_option | cut
-d '=' -f 2)
843 _nm
=$
(echo $ac_option | cut
-d '=' -f 2)
846 _yasm
=$
(echo $ac_option | cut
-d '=' -f 2)
849 _ar
=$
(echo $ac_option | cut
-d '=' -f 2)
852 _ranlib
=$
(echo $ac_option | cut
-d '=' -f 2)
855 _windres
=$
(echo $ac_option | cut
-d '=' -f 2)
858 _charset
=$
(echo $ac_option | cut
-d '=' -f 2)
861 language_doc
=$
(echo $ac_option | cut
-d '=' -f 2)
864 language_man
=$
(echo $ac_option | cut
-d '=' -f 2)
867 language_msg
=$
(echo $ac_option | cut
-d '=' -f 2)
870 language
=$
(echo $ac_option | cut
-d '=' -f 2)
889 _debug
=$
(echo $_echo_n '-g'$_echo_c; echo $ac_option | cut
-d '=' -f 2)
894 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
895 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
896 --enable-cross-compile) _cross_compile
=yes ;;
897 --disable-cross-compile) _cross_compile
=no
;;
898 --enable-mencoder) _mencoder
=yes ;;
899 --disable-mencoder) _mencoder
=no
;;
900 --enable-mplayer) _mplayer
=yes ;;
901 --disable-mplayer) _mplayer
=no
;;
902 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
903 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
904 --enable-x11) _x11
=yes ;;
905 --disable-x11) _x11
=no
;;
906 --enable-xshape) _xshape
=yes ;;
907 --disable-xshape) _xshape
=no
;;
908 --enable-xss) _xss
=yes ;;
909 --disable-xss) _xss
=no
;;
910 --enable-xv) _xv
=yes ;;
911 --disable-xv) _xv
=no
;;
912 --enable-xvmc) _xvmc
=yes ;;
913 --disable-xvmc) _xvmc
=no
;;
914 --enable-vdpau) _vdpau
=yes ;;
915 --disable-vdpau) _vdpau
=no
;;
916 --enable-sdl) _sdl
=yes ;;
917 --disable-sdl) _sdl
=no
;;
918 --enable-kva) _kva
=yes ;;
919 --disable-kva) _kva
=no
;;
920 --enable-direct3d) _direct3d
=yes ;;
921 --disable-direct3d) _direct3d
=no
;;
922 --enable-directx) _directx
=yes ;;
923 --disable-directx) _directx
=no
;;
924 --enable-win32waveout) _win32waveout
=yes ;;
925 --disable-win32waveout) _win32waveout
=no
;;
926 --enable-nas) _nas
=yes ;;
927 --disable-nas) _nas
=no
;;
928 --enable-png) _png
=yes ;;
929 --disable-png) _png
=no
;;
930 --enable-mng) _mng
=yes ;;
931 --disable-mng) _mng
=no
;;
932 --enable-jpeg) _jpeg
=yes ;;
933 --disable-jpeg) _jpeg
=no
;;
934 --enable-libopenjpeg) libopenjpeg
=yes ;;
935 --disable-libopenjpeg)libopenjpeg
=no
;;
936 --enable-pnm) _pnm
=yes ;;
937 --disable-pnm) _pnm
=no
;;
938 --enable-md5sum) _md5sum
=yes ;;
939 --disable-md5sum) _md5sum
=no
;;
940 --enable-yuv4mpeg) _yuv4mpeg
=yes ;;
941 --disable-yuv4mpeg) _yuv4mpeg
=no
;;
942 --enable-gif) _gif
=yes ;;
943 --disable-gif) _gif
=no
;;
944 --enable-gl) _gl
=yes ;;
945 --disable-gl) _gl
=no
;;
946 --enable-matrixview) matrixview
=yes ;;
947 --disable-matrixview) matrixview
=no
;;
948 --enable-ggi) _ggi
=yes ;;
949 --disable-ggi) _ggi
=no
;;
950 --enable-ggiwmh) _ggiwmh
=yes ;;
951 --disable-ggiwmh) _ggiwmh
=no
;;
952 --enable-aa) _aa
=yes ;;
953 --disable-aa) _aa
=no
;;
954 --enable-caca) _caca
=yes ;;
955 --disable-caca) _caca
=no
;;
956 --enable-svga) _svga
=yes ;;
957 --disable-svga) _svga
=no
;;
958 --enable-vesa) _vesa
=yes ;;
959 --disable-vesa) _vesa
=no
;;
960 --enable-fbdev) _fbdev
=yes ;;
961 --disable-fbdev) _fbdev
=no
;;
962 --enable-dvb) _dvb
=yes ;;
963 --disable-dvb) _dvb
=no
;;
964 --enable-dxr2) _dxr2
=yes ;;
965 --disable-dxr2) _dxr2
=no
;;
966 --enable-dxr3) _dxr3
=yes ;;
967 --disable-dxr3) _dxr3
=no
;;
968 --enable-ivtv) _ivtv
=yes ;;
969 --disable-ivtv) _ivtv
=no
;;
970 --enable-v4l2) _v4l2
=yes ;;
971 --disable-v4l2) _v4l2
=no
;;
972 --enable-iconv) _iconv
=yes ;;
973 --disable-iconv) _iconv
=no
;;
974 --enable-langinfo) _langinfo
=yes ;;
975 --disable-langinfo) _langinfo
=no
;;
976 --enable-rtc) _rtc
=yes ;;
977 --disable-rtc) _rtc
=no
;;
978 --enable-libdv) _libdv
=yes ;;
979 --disable-libdv) _libdv
=no
;;
980 --enable-ossaudio) _ossaudio
=yes ;;
981 --disable-ossaudio) _ossaudio
=no
;;
982 --enable-arts) _arts
=yes ;;
983 --disable-arts) _arts
=no
;;
984 --enable-esd) _esd
=yes ;;
985 --disable-esd) _esd
=no
;;
986 --enable-pulse) _pulse
=yes ;;
987 --disable-pulse) _pulse
=no
;;
988 --enable-jack) _jack
=yes ;;
989 --disable-jack) _jack
=no
;;
990 --enable-openal) _openal
=yes ;;
991 --disable-openal) _openal
=no
;;
992 --enable-kai) _kai
=yes ;;
993 --disable-kai) _kai
=no
;;
994 --enable-dart) _dart
=yes ;;
995 --disable-dart) _dart
=no
;;
996 --enable-mad) _mad
=yes ;;
997 --disable-mad) _mad
=no
;;
998 --enable-mp3lame) _mp3lame
=yes ;;
999 --disable-mp3lame) _mp3lame
=no
;;
1000 --enable-mp3lame-lavc) _mp3lame_lavc
=yes ;;
1001 --disable-mp3lame-lavc) _mp3lame_lavc
=no
;;
1002 --enable-toolame) _toolame
=yes ;;
1003 --disable-toolame) _toolame
=no
;;
1004 --enable-twolame) _twolame
=yes ;;
1005 --disable-twolame) _twolame
=no
;;
1006 --enable-libcdio) _libcdio
=yes ;;
1007 --disable-libcdio) _libcdio
=no
;;
1008 --enable-liblzo) _liblzo
=yes ;;
1009 --disable-liblzo) _liblzo
=no
;;
1010 --enable-libvorbis) _libvorbis
=yes ;;
1011 --disable-libvorbis) _libvorbis
=no
;;
1012 --enable-speex) _speex
=yes ;;
1013 --disable-speex) _speex
=no
;;
1014 --enable-tremor) _tremor
=yes ;;
1015 --disable-tremor) _tremor
=no
;;
1016 --enable-tremor-internal) _tremor_internal
=yes ;;
1017 --disable-tremor-internal) _tremor_internal
=no
;;
1018 --enable-tremor-low) _tremor_low
=yes ;;
1019 --disable-tremor-low) _tremor_low
=no
;;
1020 --enable-theora) _theora
=yes ;;
1021 --disable-theora) _theora
=no
;;
1022 --enable-mp3lib) _mp3lib
=yes ;;
1023 --disable-mp3lib) _mp3lib
=no
;;
1024 --enable-liba52) _liba52
=yes ;;
1025 --disable-liba52) _liba52
=no
;;
1026 --enable-libdca) _libdca
=yes ;;
1027 --disable-libdca) _libdca
=no
;;
1028 --enable-libmpeg2) _libmpeg2
=yes ;;
1029 --disable-libmpeg2) _libmpeg2
=no
;;
1030 --enable-musepack) _musepack
=yes ;;
1031 --disable-musepack) _musepack
=no
;;
1032 --enable-faad) _faad
=yes ;;
1033 --disable-faad) _faad
=no
;;
1034 --enable-faad-internal) _faad_internal
=yes ;;
1035 --disable-faad-internal) _faad_internal
=no
;;
1036 --enable-faad-fixed) _faad_fixed
=yes ;;
1037 --disable-faad-fixed) _faad_fixed
=no
;;
1038 --enable-faac) _faac
=yes ;;
1039 --disable-faac) _faac
=no
;;
1040 --enable-faac-lavc) _faac_lavc
=yes ;;
1041 --disable-faac-lavc) _faac_lavc
=no
;;
1042 --enable-ladspa) _ladspa
=yes ;;
1043 --disable-ladspa) _ladspa
=no
;;
1044 --enable-libbs2b) _libbs2b
=yes ;;
1045 --disable-libbs2b) _libbs2b
=no
;;
1046 --enable-xmms) _xmms
=yes ;;
1047 --disable-xmms) _xmms
=no
;;
1048 --enable-vcd) _vcd
=yes ;;
1049 --disable-vcd) _vcd
=no
;;
1050 --enable-dvdread) _dvdread
=yes ;;
1051 --disable-dvdread) _dvdread
=no
;;
1052 --enable-dvdread-internal) _dvdread_internal
=yes ;;
1053 --disable-dvdread-internal) _dvdread_internal
=no
;;
1054 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
1055 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
1056 --enable-dvdnav) _dvdnav
=yes ;;
1057 --disable-dvdnav) _dvdnav
=no
;;
1058 --enable-xanim) _xanim
=yes ;;
1059 --disable-xanim) _xanim
=no
;;
1060 --enable-real) _real
=yes ;;
1061 --disable-real) _real
=no
;;
1062 --enable-live) _live
=yes ;;
1063 --disable-live) _live
=no
;;
1064 --enable-nemesi) _nemesi
=yes ;;
1065 --disable-nemesi) _nemesi
=no
;;
1066 --enable-xinerama) _xinerama
=yes ;;
1067 --disable-xinerama) _xinerama
=no
;;
1068 --enable-mga) _mga
=yes ;;
1069 --disable-mga) _mga
=no
;;
1070 --enable-xmga) _xmga
=yes ;;
1071 --disable-xmga) _xmga
=no
;;
1072 --enable-vm) _vm
=yes ;;
1073 --disable-vm) _vm
=no
;;
1074 --enable-xf86keysym) _xf86keysym
=yes ;;
1075 --disable-xf86keysym) _xf86keysym
=no
;;
1076 --enable-mlib) _mlib
=yes ;;
1077 --disable-mlib) _mlib
=no
;;
1078 --enable-sunaudio) _sunaudio
=yes ;;
1079 --disable-sunaudio) _sunaudio
=no
;;
1080 --enable-sgiaudio) _sgiaudio
=yes ;;
1081 --disable-sgiaudio) _sgiaudio
=no
;;
1082 --enable-alsa) _alsa
=yes ;;
1083 --disable-alsa) _alsa
=no
;;
1084 --enable-tv) _tv
=yes ;;
1085 --disable-tv) _tv
=no
;;
1086 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1087 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1088 --enable-tv-v4l1) _tv_v4l1
=yes ;;
1089 --disable-tv-v4l1) _tv_v4l1
=no
;;
1090 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1091 --disable-tv-v4l2) _tv_v4l2
=no
;;
1092 --enable-tv-dshow) _tv_dshow
=yes ;;
1093 --disable-tv-dshow) _tv_dshow
=no
;;
1094 --enable-radio) _radio
=yes ;;
1095 --enable-radio-capture) _radio_capture
=yes ;;
1096 --disable-radio-capture) _radio_capture
=no
;;
1097 --disable-radio) _radio
=no
;;
1098 --enable-radio-v4l) _radio_v4l
=yes ;;
1099 --disable-radio-v4l) _radio_v4l
=no
;;
1100 --enable-radio-v4l2) _radio_v4l2
=yes ;;
1101 --disable-radio-v4l2) _radio_v4l2
=no
;;
1102 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
1103 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
1104 --enable-pvr) _pvr
=yes ;;
1105 --disable-pvr) _pvr
=no
;;
1106 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1107 --disable-fastmemcpy) _fastmemcpy
=no
;;
1108 --enable-hardcoded-tables) hardcoded_tables
=yes ;;
1109 --disable-hardcoded-tables) hardcoded_tables
=no
;;
1110 --enable-network) _network
=yes ;;
1111 --disable-network) _network
=no
;;
1112 --enable-winsock2_h) _winsock2_h
=yes ;;
1113 --disable-winsock2_h) _winsock2_h
=no
;;
1114 --enable-smb) _smb
=yes ;;
1115 --disable-smb) _smb
=no
;;
1116 --enable-vidix) _vidix
=yes ;;
1117 --disable-vidix) _vidix
=no
;;
1118 --with-vidix-drivers=*)
1119 _vidix_drivers
=$
(echo $ac_option | cut
-d '=' -f 2)
1121 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1122 --enable-dhahelper) _dhahelper
=yes ;;
1123 --disable-dhahelper) _dhahelper
=no
;;
1124 --enable-svgalib_helper) _svgalib_helper
=yes ;;
1125 --disable-svgalib_helper) _svgalib_helper
=no
;;
1126 --enable-joystick) _joystick
=yes ;;
1127 --disable-joystick) _joystick
=no
;;
1128 --enable-xvid) _xvid
=yes ;;
1129 --disable-xvid) _xvid
=no
;;
1130 --enable-xvid-lavc) _xvid_lavc
=yes ;;
1131 --disable-xvid-lavc) _xvid_lavc
=no
;;
1132 --enable-x264) _x264
=yes ;;
1133 --disable-x264) _x264
=no
;;
1134 --enable-x264-lavc) _x264_lavc
=yes ;;
1135 --disable-x264-lavc) _x264_lavc
=no
;;
1136 --enable-libdirac-lavc) _libdirac_lavc
=yes ;;
1137 --disable-libdirac-lavc) _libdirac_lavc
=no
;;
1138 --enable-libschroedinger-lavc) _libschroedinger_lavc
=yes ;;
1139 --disable-libschroedinger-lavc) _libschroedinger_lavc
=no
;;
1140 --enable-libnut) _libnut
=yes ;;
1141 --disable-libnut) _libnut
=no
;;
1142 --enable-libavutil_a) _libavutil_a
=yes ;;
1143 --disable-libavutil_a) _libavutil_a
=no
;;
1144 --enable-libavutil_so) _libavutil_so
=yes ;;
1145 --disable-libavutil_so) _libavutil_so
=no
;;
1146 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1147 --disable-libavcodec_a) _libavcodec_a
=no
;;
1148 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1149 --disable-libavcodec_so) _libavcodec_so
=no
;;
1150 --enable-libopencore_amrnb) _libopencore_amrnb
=yes ;;
1151 --disable-libopencore_amrnb) _libopencore_amrnb
=no
;;
1152 --enable-libopencore_amrwb) _libopencore_amrwb
=yes ;;
1153 --disable-libopencore_amrwb) _libopencore_amrwb
=no
;;
1154 --enable-decoder=*) _libavdecoders
="$_libavdecoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1155 --disable-decoder=*) _libavdecoders
=$
(echo $_libavdecoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1156 --enable-encoder=*) _libavencoders
="$_libavencoders $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1157 --disable-encoder=*) _libavencoders
=$
(echo $_libavencoders |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1158 --enable-parser=*) _libavparsers
="$_libavparsers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1159 --disable-parser=*) _libavparsers
=$
(echo $_libavparsers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1160 --enable-protocol=*) _libavprotocols
="$_libavprotocols $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1161 --disable-protocol=*) _libavprotocols
=$
(echo $_libavprotocols |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1162 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1163 --disable-demuxer=*) _libavdemuxers
=$
(echo $_libavdemuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1164 --enable-muxer=*) _libavmuxers
="$_libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;;
1165 --disable-muxer=*) _libavmuxers
=$
(echo $_libavmuxers |
sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;;
1166 --enable-libavformat_a) _libavformat_a
=yes ;;
1167 --disable-libavformat_a) _libavformat_a
=no
;;
1168 --enable-libavformat_so) _libavformat_so
=yes ;;
1169 --disable-libavformat_so) _libavformat_so
=no
;;
1170 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1171 --disable-libpostproc_a) _libpostproc_a
=no
;;
1172 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1173 --disable-libpostproc_so) _libpostproc_so
=no
;;
1174 --enable-libswscale_a) _libswscale_a
=yes ;;
1175 --disable-libswscale_a) _libswscale_a
=no
;;
1176 --enable-libswscale_so) _libswscale_so
=yes ;;
1177 --disable-libswscale_so) _libswscale_so
=no
;;
1178 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1179 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1181 --enable-lirc) _lirc
=yes ;;
1182 --disable-lirc) _lirc
=no
;;
1183 --enable-lircc) _lircc
=yes ;;
1184 --disable-lircc) _lircc
=no
;;
1185 --enable-apple-remote) _apple_remote
=yes ;;
1186 --disable-apple-remote) _apple_remote
=no
;;
1187 --enable-apple-ir) _apple_ir
=yes ;;
1188 --disable-apple-ir) _apple_ir
=no
;;
1189 --enable-gui) _gui
=yes ;;
1190 --disable-gui) _gui
=no
;;
1191 --enable-gtk1) _gtk1
=yes ;;
1192 --disable-gtk1) _gtk1
=no
;;
1193 --enable-termcap) _termcap
=yes ;;
1194 --disable-termcap) _termcap
=no
;;
1195 --enable-termios) _termios
=yes ;;
1196 --disable-termios) _termios
=no
;;
1197 --enable-3dfx) _3dfx
=yes ;;
1198 --disable-3dfx) _3dfx
=no
;;
1199 --enable-s3fb) _s3fb
=yes ;;
1200 --disable-s3fb) _s3fb
=no
;;
1201 --enable-wii) _wii
=yes ;;
1202 --disable-wii) _wii
=no
;;
1203 --enable-tdfxfb) _tdfxfb
=yes ;;
1204 --disable-tdfxfb) _tdfxfb
=no
;;
1205 --disable-tdfxvid) _tdfxvid
=no
;;
1206 --enable-tdfxvid) _tdfxvid
=yes ;;
1207 --disable-xvr100) _xvr100
=no
;;
1208 --enable-xvr100) _xvr100
=yes ;;
1209 --disable-tga) _tga
=no
;;
1210 --enable-tga) _tga
=yes ;;
1211 --enable-directfb) _directfb
=yes ;;
1212 --disable-directfb) _directfb
=no
;;
1213 --enable-zr) _zr
=yes ;;
1214 --disable-zr) _zr
=no
;;
1215 --enable-bl) _bl
=yes ;;
1216 --disable-bl) _bl
=no
;;
1217 --enable-mtrr) _mtrr
=yes ;;
1218 --disable-mtrr) _mtrr
=no
;;
1219 --enable-largefiles) _largefiles
=yes ;;
1220 --disable-largefiles) _largefiles
=no
;;
1221 --enable-shm) _shm
=yes ;;
1222 --disable-shm) _shm
=no
;;
1223 --enable-select) _select
=yes ;;
1224 --disable-select) _select
=no
;;
1225 --enable-linux-devfs) _linux_devfs
=yes ;;
1226 --disable-linux-devfs) _linux_devfs
=no
;;
1227 --enable-cdparanoia) _cdparanoia
=yes ;;
1228 --disable-cdparanoia) _cdparanoia
=no
;;
1229 --enable-cddb) _cddb
=yes ;;
1230 --disable-cddb) _cddb
=no
;;
1231 --enable-big-endian) _big_endian
=yes ;;
1232 --disable-big-endian) _big_endian
=no
;;
1233 --enable-bitmap-font) _bitmap_font
=yes ;;
1234 --disable-bitmap-font) _bitmap_font
=no
;;
1235 --enable-freetype) _freetype
=yes ;;
1236 --disable-freetype) _freetype
=no
;;
1237 --enable-fontconfig) _fontconfig
=yes ;;
1238 --disable-fontconfig) _fontconfig
=no
;;
1239 --enable-unrarexec) _unrar_exec
=yes ;;
1240 --disable-unrarexec) _unrar_exec
=no
;;
1241 --enable-ftp) _ftp
=yes ;;
1242 --disable-ftp) _ftp
=no
;;
1243 --enable-vstream) _vstream
=yes ;;
1244 --disable-vstream) _vstream
=no
;;
1245 --enable-pthreads) _pthreads
=yes ;;
1246 --disable-pthreads) _pthreads
=no
;;
1247 --enable-w32threads) _w32threads
=yes ;;
1248 --disable-w32threads) _w32threads
=no
;;
1249 --enable-ass) _ass
=yes ;;
1250 --disable-ass) _ass
=no
;;
1251 --enable-ass-internal) ass_internal
=yes ;;
1252 --disable-ass-internal) ass_internal
=no
;;
1253 --enable-rpath) _rpath
=yes ;;
1254 --disable-rpath) _rpath
=no
;;
1256 --enable-fribidi) _fribidi
=yes ;;
1257 --disable-fribidi) _fribidi
=no
;;
1259 --enable-enca) _enca
=yes ;;
1260 --disable-enca) _enca
=no
;;
1262 --enable-inet6) _inet6
=yes ;;
1263 --disable-inet6) _inet6
=no
;;
1265 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1266 --disable-gethostbyname2) _gethostbyname2
=no
;;
1268 --enable-dga1) _dga1
=yes ;;
1269 --disable-dga1) _dga1
=no
;;
1270 --enable-dga2) _dga2
=yes ;;
1271 --disable-dga2) _dga2
=no
;;
1273 --enable-menu) _menu
=yes ;;
1274 --disable-menu) _menu
=no
;;
1276 --enable-qtx) _qtx
=yes ;;
1277 --disable-qtx) _qtx
=no
;;
1279 --enable-coreaudio) _coreaudio
=yes ;;
1280 --disable-coreaudio) _coreaudio
=no
;;
1281 --enable-corevideo) _corevideo
=yes ;;
1282 --disable-corevideo) _corevideo
=no
;;
1283 --enable-quartz) _quartz
=yes ;;
1284 --disable-quartz) _quartz
=no
;;
1285 --enable-macosx-finder) _macosx_finder
=yes ;;
1286 --disable-macosx-finder) _macosx_finder
=no
;;
1287 --enable-macosx-bundle) _macosx_bundle
=yes ;;
1288 --disable-macosx-bundle) _macosx_bundle
=no
;;
1290 --enable-maemo) _maemo
=yes ;;
1291 --disable-maemo) _maemo
=no
;;
1293 --enable-sortsub) _sortsub
=yes ;;
1294 --disable-sortsub) _sortsub
=no
;;
1296 --enable-crash-debug) _crash_debug
=yes ;;
1297 --disable-crash-debug) _crash_debug
=no
;;
1298 --enable-sighandler) _sighandler
=yes ;;
1299 --disable-sighandler) _sighandler
=no
;;
1300 --enable-win32dll) _win32dll
=yes ;;
1301 --disable-win32dll) _win32dll
=no
;;
1303 --enable-sse) _sse
=yes ;;
1304 --disable-sse) _sse
=no
;;
1305 --enable-sse2) _sse2
=yes ;;
1306 --disable-sse2) _sse2
=no
;;
1307 --enable-ssse3) _ssse3
=yes ;;
1308 --disable-ssse3) _ssse3
=no
;;
1309 --enable-mmxext) _mmxext
=yes ;;
1310 --disable-mmxext) _mmxext
=no
;;
1311 --enable-3dnow) _3dnow
=yes ;;
1312 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1313 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1314 --disable-3dnowext) _3dnowext
=no
;;
1315 --enable-cmov) _cmov
=yes ;;
1316 --disable-cmov) _cmov
=no
;;
1317 --enable-fast-cmov) _fast_cmov
=yes ;;
1318 --disable-fast-cmov) _fast_cmov
=no
;;
1319 --enable-fast-clz) _fast_clz
=yes ;;
1320 --disable-fast-clz) _fast_clz
=no
;;
1321 --enable-altivec) _altivec
=yes ;;
1322 --disable-altivec) _altivec
=no
;;
1323 --enable-armv5te) _armv5te
=yes ;;
1324 --disable-armv5te) _armv5te
=no
;;
1325 --enable-armv6) _armv6
=yes ;;
1326 --disable-armv6) _armv6
=no
;;
1327 --enable-armv6t2) _armv6t2
=yes ;;
1328 --disable-armv6t2) _armv6t2
=no
;;
1329 --enable-armvfp) _armvfp
=yes ;;
1330 --disable-armvfp) _armvfp
=no
;;
1331 --enable-neon) neon
=yes ;;
1332 --disable-neon) neon
=no
;;
1333 --enable-iwmmxt) _iwmmxt
=yes ;;
1334 --disable-iwmmxt) _iwmmxt
=no
;;
1335 --enable-mmx) _mmx
=yes ;;
1336 --disable-mmx) # 3Dnow! and MMX2 require MMX
1337 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1340 echo "Unknown parameter: $ac_option"
1347 # Atmos: moved this here, to be correct, if --prefix is specified
1348 test -z "$_bindir" && _bindir
="$_prefix/bin"
1349 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1350 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1351 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1352 test -z "$_libdir" && _libdir
="$_prefix/lib"
1354 # Determine our OS name and CPU architecture
1355 if test -z "$_target" ; then
1357 system_name
=$
(uname
-s 2>&1)
1358 case "$system_name" in
1359 Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD
/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1373 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1383 system_name
="$system_name-UNKNOWN"
1388 # host's CPU/instruction set
1389 host_arch
=$
(uname
-p 2>&1)
1390 case "$host_arch" in
1391 i386|sparc|ppc|alpha|arm|mips|vax
)
1393 powerpc
) # Darwin returns 'powerpc'
1396 *) # uname -p on Linux returns 'unknown' for the processor type,
1397 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1399 # Maybe uname -m (machine hardware name) returns something we
1402 # x86/x86pc is used by QNX
1403 case "$(uname -m 2>&1)" in
1404 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
;;
1405 ia64
) host_arch
=ia64
;;
1406 macppc|ppc
) host_arch
=ppc
;;
1407 ppc64
) host_arch
=ppc64
;;
1408 alpha
) host_arch
=alpha
;;
1409 sparc
) host_arch
=sparc
;;
1410 sparc64
) host_arch
=sparc64
;;
1411 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1412 arm
*|zaurus|cats
) host_arch
=arm
;;
1413 sh3|sh4|sh4a
) host_arch
=sh
;;
1414 s390
) host_arch
=s390
;;
1415 s390x
) host_arch
=s390x
;;
1416 *mips
*) host_arch
=mips
;;
1417 vax
) host_arch
=vax
;;
1418 xtensa
*) host_arch
=xtensa
;;
1419 *) host_arch
=UNKNOWN
;;
1423 else # if test -z "$_target"
1424 system_name
=$
(echo $_target | cut
-d '-' -f 2)
1425 case "$(echo $system_name | tr A-Z a-z)" in
1426 linux
) system_name
=Linux
;;
1427 freebsd
) system_name
=FreeBSD
;;
1428 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1429 netbsd
) system_name
=NetBSD
;;
1430 bsd
/os
) system_name
=BSD
/OS
;;
1431 openbsd
) system_name
=OpenBSD
;;
1432 dragonfly
) system_name
=DragonFly
;;
1433 sunos
) system_name
=SunOS
;;
1434 qnx
) system_name
=QNX
;;
1435 morphos
) system_name
=MorphOS
;;
1436 amigaos
) system_name
=AmigaOS
;;
1437 mingw32
*) system_name
=MINGW32
;;
1439 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1440 host_arch
=$
(echo $_target | cut
-d '-' -f 1)
1441 if test $
(echo $host_arch) != "x86_64" ; then
1442 host_arch
=$
(echo $host_arch |
tr '_' '-')
1446 extra_cflags
="-I. $extra_cflags"
1447 _timer
=timer-linux.c
1450 extra_ldflags
="$extra_ldflags -L/usr/local/lib"
1451 extra_cflags
="$extra_cflags -I/usr/local/include"
1454 if netbsd || dragonfly
; then
1455 extra_ldflags
="$extra_ldflags -L/usr/pkg/lib"
1456 extra_cflags
="$extra_cflags -I/usr/pkg/include"
1460 extra_cflags
="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
1461 _timer
=timer-darwin.c
1465 extra_ldflags
="$extra_ldflags -lC"
1476 extra_cflags
="$extra_cflags -fno-common"
1477 # -lwinmm is always needed for osdep/timer-win2.c
1478 extra_ldflags
="$extra_ldflags -lwinmm"
1482 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1483 def_priority
="#define CONFIG_PRIORITY 1"
1495 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
1496 extra_cflags
="-DNEWLIB -D__USE_INLINE__ $extra_cflags"
1500 extra_ldflags
="$extra_ldflags -lph"
1508 def_dos_paths
="#define HAVE_DOS_PATHS 1"
1509 def_priority
="#define CONFIG_PRIORITY 1"
1512 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1517 TMPLOG
="configure.log"
1518 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1519 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1520 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1521 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1522 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1525 echo configuration
: $_configuration > "$TMPLOG"
1529 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1530 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1534 # Checking CC version...
1535 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1536 if test "$(basename $_cc)" = "icc" ||
test "$(basename $_cc)" = "ecc"; then
1537 echocheck
"$_cc version"
1539 cc_name
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 1)
1540 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ',' -f 2 | cut
-d ' ' -f 3)
1541 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1542 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1543 # TODO verify older icc/ecc compatibility
1546 cc_version
="v. ?.??, bad"
1550 cc_version
="$cc_version, ok"
1553 cc_version
="$cc_version, bad"
1557 echores
"$cc_version"
1559 for _cc
in "$_cc" gcc cc
; do
1560 cc_name_tmp
=$
($_cc -v 2>&1 |
tail -n 1 | cut
-d ' ' -f 1)
1561 if test "$cc_name_tmp" = "gcc"; then
1562 cc_name
=$cc_name_tmp
1563 echocheck
"$_cc version"
1565 cc_version
=$
($_cc -dumpversion 2>&1)
1571 _cc_major
=$
(echo $cc_version | cut
-d '.' -f 1)
1572 _cc_minor
=$
(echo $cc_version | cut
-d '.' -f 2)
1573 _cc_mini
=$
(echo $cc_version | cut
-d '.' -f 3)
1576 echores
"$cc_version"
1579 cc_name_tmp
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 2,3)
1580 if test "$cc_name_tmp" = "Sun C"; then
1581 echocheck
"$_cc version"
1583 cc_version
=$
($_cc -V 2>&1 |
head -n 1 | cut
-d ' ' -f 4)
1584 res_comment
="experimental support only"
1585 echores
"Sun C $cc_version"
1590 test "$cc_fail" = yes && die
"unsupported compiler version"
1592 if test -z "$_target" && x86
; then
1595 int test[(int)sizeof(char *)-7];
1599 cc_check
&& host_arch
=x86_64 || host_arch
=i386
1602 echo "Detected operating system: $system_name"
1603 echo "Detected host architecture: $host_arch"
1606 test "$_host_cc" || _host_cc
=$_cc
1609 echocheck
"cross compilation"
1610 if test $_cross_compile = auto
; then
1612 int main(void) { return 0; }
1615 cc_check
&& "$TMPEXE" && _cross_compile
=no
1617 echores
$_cross_compile
1619 if test $_cross_compile = yes; then
1627 # now that we know what compiler should be used for compilation, try to find
1628 # out which assembler is used by the $_cc compiler
1629 if test "$_as" = auto
; then
1630 _as
=$
($_cc -print-prog-name=as
)
1631 test -z "$_as" && _as
=as
1634 if test "$_nm" = auto
; then
1635 _nm
=$
($_cc -print-prog-name=nm
)
1636 test -z "$_nm" && _nm
=nm
1639 # XXX: this should be ok..
1642 if test "$_runtime_cpudetection" = no
; then
1644 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1645 # FIXME: Remove the cygwin check once AMD CPUs are supported
1646 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1647 # Linux with /proc mounted, extract CPU information from it
1648 _cpuinfo
="cat /proc/cpuinfo"
1649 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86
; then
1650 # FreeBSD with Linux emulation /proc mounted,
1651 # extract CPU information from it
1652 # Don't use it on x86 though, it never reports 3Dnow
1653 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1654 elif darwin
&& ! x86
; then
1655 # use hostinfo on Darwin
1658 # use 'lsattr' on AIX
1659 _cpuinfo
="lsattr -E -l proc0 -a type"
1661 # all other OSes try to extract CPU information from a small helper
1662 # program cpuinfo instead
1663 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1664 _cpuinfo
="./cpuinfo$_exesuf"
1667 if [ "$cc_vendor" = "gnu" ] && [ "$_cc_major" = 2 ] ; then
1668 test $_sse = auto
&& _sse
=no
1669 test $_win32dll = auto
&& _win32dll
=no
1674 # gather more CPU information
1675 pname
=$
($_cpuinfo |
grep 'model name' | cut
-d ':' -f 2 |
head -n 1)
1676 pvendor
=$
($_cpuinfo |
grep 'vendor_id' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1677 pfamily
=$
($_cpuinfo |
grep 'cpu family' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1678 pmodel
=$
($_cpuinfo |
grep -v 'model name' |
grep 'model' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1679 pstepping
=$
($_cpuinfo |
grep 'stepping' | cut
-d ':' -f 2 | cut
-d ' ' -f 2 |
head -n 1)
1681 exts
=$
($_cpuinfo |
egrep 'features|flags' | cut
-d ':' -f 2 |
head -n 1)
1683 pparam
=$
(echo $exts |
sed -e s
/k6_mtrr
/mtrr
/ -e s
/cyrix_arr
/mtrr
/ -e s
/centaur_mcr
/mtrr
/ \
1684 -e s
/xmm
/sse
/ -e s
/kni
/sse
/)
1686 for ext
in $pparam ; do
1687 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1690 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1691 test $_sse = kernel_check
&& _mmxext
=kernel_check
1693 echocheck
"CPU vendor"
1694 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1696 echocheck
"CPU type"
1700 fi # test "$_runtime_cpudetection" = no
1702 if x86
&& test "$_runtime_cpudetection" = no
; then
1704 if test "$1" = kernel_check
; then
1705 echocheck
"kernel support of $2"
1709 void catch() { exit(1); }
1711 signal(SIGILL, catch);
1712 __asm__ volatile ("$3":::"memory"); return 0;
1716 if cc_check
&& tmp_run
; then
1719 _optimizing
="$_optimizing $2"
1724 echo "It seems that your kernel does not correctly support $2."
1725 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1732 extcheck
$_mmx "mmx" "emms"
1733 extcheck
$_mmxext "mmxext" "sfence"
1734 extcheck
$_3dnow "3dnow" "femms"
1735 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1736 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1737 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1738 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1739 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1741 echocheck
"mtrr support"
1742 if test "$_mtrr" = kernel_check
; then
1744 _optimizing
="$_optimizing mtrr"
1748 if test "$_gcc3_ext" != ""; then
1749 # if we had to disable sse/sse2 because the active kernel does not
1750 # support this instruction set extension, we also have to tell
1751 # gcc3 to not generate sse/sse2 instructions for normal C code
1753 int main(void) { return 0; }
1755 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1761 def_fast_64bit
='#define HAVE_FAST_64BIT 0'
1762 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 0'
1763 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 0'
1764 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 0'
1765 arch_all
='X86 IA64 SPARC ARM AVR32 SH4 PPC ALPHA MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
1766 subarch_all
='X86_32 X86_64 PPC64'
1767 case "$host_arch" in
1768 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1771 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1772 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
1773 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
1778 if test "$_runtime_cpudetection" = no
; then
1782 3) proc
=i386 iproc
=386 ;;
1783 4) proc
=i486 iproc
=486 ;;
1784 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1785 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1786 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1788 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1790 elif test "$pmodel" -ge 8; then
1792 elif test "$pmodel" -ge 6; then
1799 # It's a bit difficult to determine the correct type of Family 6
1800 # AMD CPUs just from their signature. Instead, we check directly
1801 # whether it supports SSE.
1802 if test "$_sse" = yes; then
1803 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1806 # Again, gcc treats athlon and athlon-tbird similarly.
1811 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1812 # caught and remedied in the optimization tests below.
1816 *) proc
=amdfam10 iproc
=686
1817 test $_fast_clz = "auto" && _fast_clz
=yes
1823 3) proc
=i386 iproc
=386 ;;
1824 4) proc
=i486 iproc
=486 ;;
1826 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1827 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1833 if test "$pmodel" -ge 15; then
1835 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1837 elif test "$pmodel" -ge 7; then
1839 elif test "$pmodel" -ge 3; then
1844 test $_fast_clz = "auto" && _fast_clz
=yes
1847 # A nocona in 32-bit mode has no more capabilities than a prescott.
1848 if test "$pmodel" -ge 3; then
1852 test $_fast_clz = "auto" && _fast_clz
=yes
1854 test $_fast_cmov = "auto" && _fast_cmov
=no
1856 *) proc
=prescott iproc
=686 ;;
1862 if test "$pmodel" -ge 8; then
1864 elif test "$pmodel" -ge 4; then
1871 if test "$pmodel" -ge 9; then
1878 *) proc
=i686 iproc
=i686
;;
1883 3) proc
=i386 iproc
=386 ;;
1884 4) proc
=i486 iproc
=486 ;;
1885 *) proc
=i586 iproc
=586 ;;
1889 proc
=i586 iproc
=586 ;;
1891 test $_fast_clz = "auto" && _fast_clz
=no
1892 fi # test "$_runtime_cpudetection" = no
1895 # check that gcc supports our CPU, if not, fall back to earlier ones
1896 # LGB: check -mcpu and -march swithing step by step with enabling
1897 # to fall back till 386.
1899 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1901 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1907 echocheck
"GCC & CPU optimization abilities"
1909 int main(void) { return 0; }
1911 if test "$_runtime_cpudetection" = no
; then
1912 if test $cc_vendor != "intel" ; then
1913 cc_check
-march=native
&& proc
=native
1915 if test "$proc" = "k8"; then
1916 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1918 if test "$proc" = "athlon-xp"; then
1919 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1921 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1922 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1924 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1925 if ! cc_check
-march=$proc $cpuopt=$proc; then
1926 if cc_check
-march=i586
$cpuopt=i686
; then
1933 if test "$proc" = "prescott" ; then
1934 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1936 if test "$proc" = "core2" ; then
1937 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1939 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
1940 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1942 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1943 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1945 if test "$proc" = "i586"; then
1946 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1948 if test "$proc" = "i486" ; then
1949 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1951 if test "$proc" = "i386" ; then
1952 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1954 if test "$proc" = "error" ; then
1955 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1959 elif test "$proc" = "i586-i686"; then
1960 _march
="-march=i586"
1961 _mcpu
="$cpuopt=i686"
1964 _march
="-march=$proc"
1965 _mcpu
="$cpuopt=$proc"
1968 else # if test "$_runtime_cpudetection" = no
1969 _mcpu
="$cpuopt=generic"
1970 # at least i486 required, for bswap instruction
1971 _march
="-march=i486"
1972 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1973 cc_check
$_mcpu || _mcpu
=""
1974 cc_check
$_march $_mcpu || _march
=""
1977 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1978 ## autodetected mcpu/march parameters
1979 if test "$_target" ; then
1980 # TODO: it may be a good idea to check GCC and fall back in all cases
1981 if test "$host_arch" = "i586-i686"; then
1982 _march
="-march=i586"
1983 _mcpu
="$cpuopt=i686"
1985 _march
="-march=$host_arch"
1986 _mcpu
="$cpuopt=$host_arch"
1994 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1995 i686|athlon
*|pentium
*) iproc
=686 ;;
2000 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
2005 test $_fast_clz = "auto" && _fast_clz
=yes
2012 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2019 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2020 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2023 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
2024 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
2029 if test "$_runtime_cpudetection" = no
; then
2034 test $_fast_clz = "auto" && _fast_clz
=no
2043 # 64-bit prescotts exist, but as far as GCC is concerned they
2044 # have the same capabilities as a nocona.
2046 test $_fast_cmov = "auto" && _fast_cmov
=no
2047 test $_fast_clz = "auto" && _fast_clz
=no
2054 fi # test "$_runtime_cpudetection" = no
2056 echocheck
"GCC & CPU optimization abilities"
2058 int main(void) { return 0; }
2060 # This is a stripped-down version of the i386 fallback.
2061 if test "$_runtime_cpudetection" = no
; then
2062 if test $cc_vendor != "intel" ; then
2063 cc_check
-march=native
&& proc
=native
2065 # --- AMD processors ---
2066 if test "$proc" = "k8"; then
2067 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
2069 # This will fail if gcc version < 3.3, which is ok because earlier
2070 # versions don't really support 64-bit on amd64.
2071 # Is this a valid assumption? -Corey
2072 if test "$proc" = "athlon-xp"; then
2073 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2075 # --- Intel processors ---
2076 if test "$proc" = "core2"; then
2077 cc_check
-march=$proc $cpuopt=$proc || proc
=x86-64
2079 if test "$proc" = "x86-64"; then
2080 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
2082 if test "$proc" = "nocona"; then
2083 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
2085 if test "$proc" = "pentium4"; then
2086 cc_check
-march=$proc $cpuopt=$proc || proc
=error
2089 _march
="-march=$proc"
2090 _mcpu
="$cpuopt=$proc"
2091 if test "$proc" = "error" ; then
2092 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
2096 else # if test "$_runtime_cpudetection" = no
2097 # x86-64 is an undocumented option, an intersection of k8 and nocona.
2098 _march
="-march=x86-64"
2099 _mcpu
="$cpuopt=generic"
2100 cc_check
$_mcpu || _mcpu
="x86-64"
2101 cc_check
$_mcpu || _mcpu
=""
2102 cc_check
$_march $_mcpu || _march
=""
2106 test $_fast_cmov = "auto" && _fast_cmov
=yes
2107 test $_fast_clz = "auto" && _fast_clz
=yes
2115 if test "$host_arch" = "sparc64" ; then
2118 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2120 echocheck
"CPU type"
2122 case "$(echo $karch)" in
2127 sun4u
) proc
=ultrasparc _vis
='yes' ;;
2146 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2148 test $_fast_clz = "auto" && _fast_clz
=yes
2156 ppc|ppc64|powerpc|powerpc64
)
2158 def_dcbzl
='#define HAVE_DCBZL 0'
2159 def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
2160 def_local_aligned_8
='#define HAVE_LOCAL_ALIGNED_8 1'
2161 def_local_aligned_16
='#define HAVE_LOCAL_ALIGNED_16 1'
2164 if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
2166 def_fast_64bit
='#define HAVE_FAST_64BIT 1'
2168 echocheck
"CPU type"
2169 case $system_name in
2171 proc
=$
($_cpuinfo |
grep 'cpu' | cut
-d ':' -f 2 | cut
-d ',' -f 1 | cut
-b 2- |
head -n 1)
2172 if test -n "$($_cpuinfo | grep altivec)"; then
2173 test $_altivec = auto
&& _altivec
=yes
2177 proc
=$
($_cpuinfo |
grep "Processor type" | cut
-f 3 -d ' ' |
sed 's/ppc//')
2178 if [ $
(sysctl
-n hw.vectorunit
) -eq 1 -o \
2179 "$(sysctl -n hw.optional.altivec 2> /dev/null)" = "1" ]; then
2180 test $_altivec = auto
&& _altivec
=yes
2184 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2186 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2189 if [ $
(sysctl
-n machdep.altivec
) -eq 1 ]; then
2190 test $_altivec = auto
&& _altivec
=yes
2196 proc
=$
($_cpuinfo |
grep 'type' | cut
-f 2 -d ' ' |
sed 's/PowerPC_//')
2199 if test "$_altivec" = yes; then
2200 echores
"$proc altivec"
2206 echocheck
"GCC & CPU optimization abilities"
2208 if test -n "$proc"; then
2210 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2211 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2212 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2213 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2214 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2215 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2216 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2217 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2218 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2221 # gcc 3.1(.1) and up supports 7400 and 7450
2222 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2224 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2225 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2229 # gcc 3.2 and up supports 970
2230 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2232 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2233 def_dcbzl
='#define HAVE_DCBZL 1' ;;
2237 # gcc 3.3 and up supports POWER4
2238 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2240 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2244 # gcc 3.4 and up supports 440*
2245 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2247 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2248 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2252 # gcc 4.0 and up supports POWER5
2253 if test "$_cc_major" -ge "4"; then
2255 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2261 if test -n "$_mcpu"; then
2262 _optimizing
=$
(echo $_mcpu | cut
-c 8-)
2263 echores
"$_optimizing"
2268 test $_fast_clz = "auto" && _fast_clz
=yes
2276 echocheck
"CPU type"
2279 unsigned long ver, mask;
2280 __asm__ ("implver %0" : "=r" (ver));
2281 __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1));
2282 printf("%ld-%x\n", ver, ~mask);
2286 $_cc -o "$TMPEXE" "$TMPC"
2287 case $
("$TMPEXE") in
2289 0-0) proc
="ev4"; _mvi
="0";;
2290 1-0) proc
="ev5"; _mvi
="0";;
2291 1-1) proc
="ev56"; _mvi
="0";;
2292 1-101) proc
="pca56"; _mvi
="1";;
2293 2-303) proc
="ev6"; _mvi
="1";;
2294 2-307) proc
="ev67"; _mvi
="1";;
2295 2-1307) proc
="ev68"; _mvi
="1";;
2299 echocheck
"GCC & CPU optimization abilities"
2300 if test "$proc" = "ev68" ; then
2301 cc_check
-mcpu=$proc || proc
=ev67
2303 if test "$proc" = "ev67" ; then
2304 cc_check
-mcpu=$proc || proc
=ev6
2309 test $_fast_clz = "auto" && _fast_clz
=yes
2319 echocheck
"CPU type"
2320 proc
=$
(hinv
-c processor |
grep CPU | cut
-d " " -f3)
2321 case "$(echo $proc)" in
2322 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2323 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2324 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2325 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2326 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2327 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2329 # gcc < 3.x does not support -mtune.
2330 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2336 test $_fast_clz = "auto" && _fast_clz
=yes
2370 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2371 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2372 die
"unsupported architecture $host_arch"
2374 esac # case "$host_arch" in
2376 if test "$_runtime_cpudetection" = yes ; then
2378 test "$_cmov" != no
&& _cmov
=yes
2380 test "$_mmx" != no
&& _mmx
=yes
2381 test "$_3dnow" != no
&& _3dnow
=yes
2382 test "$_3dnowext" != no
&& _3dnowext
=yes
2383 test "$_mmxext" != no
&& _mmxext
=yes
2384 test "$_sse" != no
&& _sse
=yes
2385 test "$_sse2" != no
&& _sse2
=yes
2386 test "$_ssse3" != no
&& _ssse3
=yes
2387 test "$_mtrr" != no
&& _mtrr
=yes
2396 echocheck
"byte order"
2397 if test "$_big_endian" = auto
; then
2399 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
2400 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
2401 int main(void) { return (int)ascii_name; }
2404 if strings $TMPEXE |
grep -q -l MPlayerBigEndian
; then
2410 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
2413 if test "$_big_endian" = yes ; then
2414 _byte_order
='big-endian'
2415 def_words_endian
='#define WORDS_BIGENDIAN 1'
2416 def_bigendian
='#define HAVE_BIGENDIAN 1'
2417 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 1'
2419 _byte_order
='little-endian'
2420 def_words_endian
='#undef WORDS_BIGENDIAN'
2421 def_bigendian
='#define HAVE_BIGENDIAN 0'
2422 def_av_bigendian
='#define AV_HAVE_BIGENDIAN 0'
2424 echores
"$_byte_order"
2427 echocheck
"extern symbol prefix"
2431 cc_check
-c || die
"Symbol mangling check failed."
2432 sym
=$
($_nm -P -g $TMPEXE)
2433 extern_prefix
=${sym%%ff_extern*}
2434 def_extern_asm
="#define EXTERN_ASM $extern_prefix"
2435 def_extern_prefix
="#define EXTERN_PREFIX \"$extern_prefix\""
2436 echores
$extern_prefix
2439 echocheck
"assembler support of -pipe option"
2441 int main(void) { return 0; }
2443 # -I. helps to detect compilers that just misunderstand -pipe like Sun C
2444 cc_check
-pipe -I.
&& _pipe
="-pipe" && echores
"yes" || echores
"no"
2447 echocheck
"compiler support of named assembler arguments"
2449 def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2450 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2451 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2453 def_named_asm_args
="#undef NAMED_ASM_ARGS"
2455 echores
$_named_asm_args
2458 if darwin
&& test "$cc_vendor" = "gnu" ; then
2459 echocheck
"GCC support of -mstackrealign"
2460 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2461 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2462 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2463 # wrong code with this flag, but this can be worked around by adding
2464 # -fno-unit-at-a-time as described in the blog post at
2465 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2467 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2468 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2470 cc_check
-O4 -mstackrealign && tmp_run
&& cflags_stackrealign
=-mstackrealign
2471 test -z "$cflags_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2472 && tmp_run
&& cflags_stackrealign
="-mstackrealign -fno-unit-at-a-time"
2473 test -n "$cflags_stackrealign" && echores
"yes" || echores
"no"
2474 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2477 # Checking for CFLAGS
2479 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2480 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2482 elif test -z "$CFLAGS" ; then
2483 if test "$cc_vendor" = "intel" ; then
2484 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2485 elif test "$cc_vendor" = "sun" ; then
2486 CFLAGS
="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
2487 elif test "$cc_vendor" != "gnu" ; then
2488 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2490 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2491 extra_ldflags
="$extra_ldflags -ffast-math"
2498 int main(void) { return 0; }
2500 if test "$cc_vendor" = "gnu" ; then
2501 cc_check
-std=gnu99
&& CFLAGS
="-std=gnu99 $CFLAGS"
2502 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
2503 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
2504 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
2505 cc_check
-Wundef && CFLAGS
="-Wundef $CFLAGS"
2506 cc_check
-Wmissing-prototypes && CFLAGS
="-Wmissing-prototypes $CFLAGS"
2507 cc_check
-Wstrict-prototypes && CFLAGS
="-Wstrict-prototypes $CFLAGS"
2509 CFLAGS
="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
2512 cc_check
-mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer
="-mno-omit-leaf-frame-pointer"
2513 cc_check
-MD -MP && CFLAGS
="-MD -MP $CFLAGS"
2516 if test -n "$LDFLAGS" ; then
2517 extra_ldflags
="$extra_ldflags $LDFLAGS"
2519 elif test "$cc_vendor" = "intel" ; then
2520 extra_ldflags
="$extra_ldflags -i-static"
2522 if test -n "$CPPFLAGS" ; then
2523 extra_cflags
="$extra_cflags $CPPFLAGS"
2530 # Checking assembler (_as) compatibility...
2531 # Added workaround for older as that reads from stdin by default - atmos
2532 as_version
=$
(echo '' |
$_as -version 2>&1 |
sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
2533 echocheck
"assembler ($_as $as_version)"
2535 _pref_as_version
='2.9.1'
2537 if test "$_mmx" = yes ; then
2538 echo 'emms' >> $TMPS
2540 if test "$_3dnow" = yes ; then
2541 _pref_as_version
='2.10.1'
2542 echo 'femms' >> $TMPS
2544 if test "$_3dnowext" = yes ; then
2545 _pref_as_version
='2.10.1'
2546 echo 'pswapd %mm0, %mm0' >> $TMPS
2548 if test "$_mmxext" = yes ; then
2549 _pref_as_version
='2.10.1'
2550 echo 'movntq %mm0, (%eax)' >> $TMPS
2552 if test "$_sse" = yes ; then
2553 _pref_as_version
='2.10.1'
2554 echo 'xorps %xmm0, %xmm0' >> $TMPS
2556 #if test "$_sse2" = yes ; then
2557 # _pref_as_version='2.11'
2558 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2560 if test "$_cmov" = yes ; then
2561 _pref_as_version
='2.10.1'
2562 echo 'cmovb %eax, %ebx' >> $TMPS
2564 if test "$_ssse3" = yes ; then
2565 _pref_as_version
='2.16.92'
2566 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2568 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2570 if test "$as_verc_fail" != yes ; then
2573 res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2575 die
"obsolete binutils version"
2580 echocheck
".align is a power of two"
2581 if test "$_asmalign_pot" = auto
; then
2584 int main(void) { __asm__ (".align 3"); return 0; }
2586 cc_check
&& _asmalign_pot
=yes
2588 if test "$_asmalign_pot" = "yes" ; then
2589 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2591 def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2593 echores
$_asmalign_pot
2596 echocheck
"10 assembler operands"
2598 def_ten_operands
='#define HAVE_TEN_OPERANDS 0'
2604 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2609 cc_check
&& ten_operands
=yes && def_ten_operands
='#define HAVE_TEN_OPERANDS 1'
2610 echores
$ten_operands
2612 echocheck
"ebx availability"
2614 def_ebx_available
='#define HAVE_EBX_AVAILABLE 0'
2621 // just adding ebx to clobber list seems unreliable with some
2622 // compilers, e.g. Haiku's gcc 2.95
2624 // and the above check does not work for OSX 64 bit...
2625 __asm__ volatile("":::"%ebx");
2629 cc_check
&& ebx_available
=yes && def_ebx_available
='#define HAVE_EBX_AVAILABLE 1'
2630 echores
$ebx_available
2636 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
2637 #error PIC not enabled
2642 cc_check
&& pic
=yes && extra_cflags
="$extra_cflags -DPIC"
2646 if test -z "$YASMFLAGS" ; then
2648 x86_64
&& objformat
="macho64" || objformat
="macho"
2654 # currently tested for Linux x86, x86_64
2655 YASMFLAGS
="-f $objformat"
2656 x86_64
&& YASMFLAGS
="$YASMFLAGS -DARCH_X86_64 -m amd64"
2657 test "$pic" = "yes" && YASMFLAGS
="$YASMFLAGS -DPIC"
2658 case "$objformat" in
2659 elf
) test $_debug && YASMFLAGS
="$YASMFLAGS -g dwarf2" ;;
2660 *) YASMFLAGS
="$YASMFLAGS -DPREFIX" ;;
2666 echo "pabsw xmm0, xmm0" > $TMPS
2667 yasm_check || _yasm
=""
2668 if test $_yasm ; then
2669 def_yasm
='#define HAVE_YASM 1'
2673 def_yasm
='#define HAVE_YASM 0'
2679 def_bswap
='#define HAVE_BSWAP 0'
2680 echo 'bswap %eax' > $TMPS
2681 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 && def_bswap
='#define HAVE_BSWAP 1' && bswap
=yes || bswap
=no
2686 #FIXME: This should happen before the check for CFLAGS..
2687 def_altivec_h
='#define HAVE_ALTIVEC_H 0'
2688 if ppc
&& ( test "$_altivec" = yes ||
test "$_runtime_cpudetection" = yes ) ; then
2690 # check if AltiVec is supported by the compiler, and how to enable it
2691 echocheck
"GCC AltiVec flags"
2693 int main(void) { return 0; }
2695 if $
(cc_check
-maltivec -mabi=altivec
) ; then
2696 _altivec_gcc_flags
="-maltivec -mabi=altivec"
2697 # check if <altivec.h> should be included
2699 #include <altivec.h>
2700 int main(void) { return 0; }
2702 if $
(cc_check
$_altivec_gcc_flags) ; then
2703 def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2704 inc_altivec_h
='#include <altivec.h>'
2707 int main(void) { return 0; }
2709 if $
(cc_check
-faltivec) ; then
2710 _altivec_gcc_flags
="-faltivec"
2713 _altivec_gcc_flags
="none, AltiVec disabled"
2717 echores
"$_altivec_gcc_flags"
2719 # check if the compiler supports braces for vector declarations
2722 int main(void) { (vector int) {1}; return 0; }
2724 cc_check
$_altivec_gcc_flags || die
"You need a compiler that supports {} in AltiVec vector declarations."
2726 # Disable runtime cpudetection if we cannot generate AltiVec code or
2727 # AltiVec is disabled by the user.
2728 test "$_runtime_cpudetection" = yes && test "$_altivec" = no \
2729 && _runtime_cpudetection
=no
2731 # Show that we are optimizing for AltiVec (if enabled and supported).
2732 test "$_runtime_cpudetection" = no
&& test "$_altivec" = yes \
2733 && _optimizing
="$_optimizing altivec"
2735 # If AltiVec is enabled, make sure the correct flags turn up in CFLAGS.
2736 test "$_altivec" = yes && CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2740 def_xform_asm
='#define HAVE_XFORM_ASM 0'
2742 echocheck
"XFORM ASM support"
2744 int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
2746 cc_check
&& xform_asm
=yes && def_xform_asm
='#define HAVE_XFORM_ASM 1'
2747 echores
"$xform_asm"
2751 echocheck
"ARM pld instruction"
2753 int main(void) { __asm__ volatile ("pld [r0]"); return 0; }
2759 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2760 if test $_armv5te = "auto" ; then
2762 int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; }
2765 cc_check
&& _armv5te
=yes
2769 test $_armv5te = "yes" && test $_fast_clz = "auto" && _fast_clz
=yes
2771 echocheck
"ARMv6 (SIMD instructions)"
2772 if test $_armv6 = "auto" ; then
2774 int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; }
2777 cc_check
&& _armv6
=yes
2781 echocheck
"ARMv6t2 (SIMD instructions)"
2782 if test $_armv6t2 = "auto" ; then
2784 int main(void) { __asm__ volatile ("movt r0, #0"); return 0; }
2787 cc_check
&& _armv6t2
=yes
2792 if test $_armvfp = "auto" ; then
2794 int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; }
2797 cc_check
&& _armvfp
=yes
2801 echocheck
"ARM NEON"
2802 if test $neon = "auto" ; then
2804 int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; }
2807 cc_check
&& neon
=yes
2811 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2812 if test $_iwmmxt = "auto" ; then
2814 int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; }
2817 cc_check
&& _iwmmxt
=yes
2822 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'
2823 test "$_altivec" = yes && cpuexts
="ALTIVEC $cpuexts"
2824 test "$_mmx" = yes && cpuexts
="MMX $cpuexts"
2825 test "$_mmxext" = yes && cpuexts
="MMX2 $cpuexts"
2826 test "$_3dnow" = yes && cpuexts
="AMD3DNOW $cpuexts"
2827 test "$_3dnowext" = yes && cpuexts
="AMD3DNOWEXT $cpuexts"
2828 test "$_sse" = yes && cpuexts
="SSE $cpuexts"
2829 test "$_sse2" = yes && cpuexts
="SSE2 $cpuexts"
2830 test "$_ssse3" = yes && cpuexts
="SSSE3 $cpuexts"
2831 test "$_cmov" = yes && cpuexts
="CMOV $cpuexts"
2832 test "$_fast_cmov" = yes && cpuexts
="FAST_CMOV $cpuexts"
2833 test "$_fast_clz" = yes && cpuexts
="FAST_CLZ $cpuexts"
2834 test "$pld" = yes && cpuexts
="PLD $cpuexts"
2835 test "$_armv5te" = yes && cpuexts
="ARMV5TE $cpuexts"
2836 test "$_armv6" = yes && cpuexts
="ARMV6 $cpuexts"
2837 test "$_armv6t2" = yes && cpuexts
="ARMV6T2 $cpuexts"
2838 test "$_armvfp" = yes && cpuexts
="ARMVFP $cpuexts"
2839 test "$neon" = yes && cpuexts
="NEON $cpuexts"
2840 test "$_iwmmxt" = yes && cpuexts
="IWMMXT $cpuexts"
2841 test "$_vis" = yes && cpuexts
="VIS $cpuexts"
2842 test "$_mvi" = yes && cpuexts
="MVI $cpuexts"
2844 # Checking kernel version...
2845 if x86_32
&& linux
; then
2847 kernel_version
=$
(uname
-r 2>&1)
2848 echocheck
"$system_name kernel version"
2849 case "$kernel_version" in
2850 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2851 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2852 _k_verc_problem
=yes;;
2854 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2857 if test "$_k_verc_fail" ; then
2858 echores
"$kernel_version, fail"
2859 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2860 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2861 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2862 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2863 echo "2.2.x you must upgrade it to get SSE support!"
2864 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2866 echores
"$kernel_version, ok"
2870 ######################
2871 # MAIN TESTS GO HERE #
2872 ######################
2877 int main(void) { return 0; }
2879 if cc_check
-lposix ; then
2880 extra_ldflags
="$extra_ldflags -lposix"
2888 int main(void) { return 0; }
2890 if cc_check
-lm ; then
2899 echocheck
"langinfo"
2900 if test "$_langinfo" = auto
; then
2902 #include <langinfo.h>
2903 int main(void) { nl_langinfo(CODESET); return 0; }
2906 cc_check
&& _langinfo
=yes
2908 if test "$_langinfo" = yes ; then
2909 def_langinfo
='#define HAVE_LANGINFO 1'
2911 def_langinfo
='#undef HAVE_LANGINFO'
2913 echores
"$_langinfo"
2916 echocheck
"language"
2917 # Set preferred languages, "all" uses English as main language.
2918 test -z "$language" && language
=$LINGUAS
2919 test -z "$language_doc" && language_doc
=$language
2920 test -z "$language_man" && language_man
=$language
2921 test -z "$language_msg" && language_msg
=$language
2922 language_doc
=$
(echo $language_doc |
tr , " ")
2923 language_man
=$
(echo $language_man |
tr , " ")
2924 language_msg
=$
(echo $language_msg |
tr , " ")
2926 test "$language_doc" = "all" && language_doc
=$doc_lang_all
2927 test "$language_man" = "all" && language_man
=$man_lang_all
2928 test "$language_msg" = "all" && language_msg
=en
2930 # Prune non-existing translations from language lists.
2931 # Set message translation to the first available language.
2932 # Fall back on English.
2933 for lang
in $language_doc ; do
2934 test -d DOCS
/xml
/$lang && tmp_language_doc
="$tmp_language_doc $lang"
2936 language_doc
=$tmp_language_doc
2937 test -z "$language_doc" && language_doc
=en
2939 for lang
in $language_man ; do
2940 test -d DOCS
/man
/$lang && tmp_language_man
="$tmp_language_man $lang"
2942 language_man
=$tmp_language_man
2943 test -z "$language_man" && language_man
=en
2945 for lang
in $language_msg ; do
2946 test -f "help/help_mp-${lang}.h" && tmp_language_msg
=$lang && break
2948 language_msg
=$tmp_language_msg
2949 test -z "$language_msg" && language_msg
=en
2950 _mp_help
="help/help_mp-${language_msg}.h"
2951 echores
"messages: $language_msg - man pages: $language_man - documentation: $language_doc"
2954 echocheck
"enable sighandler"
2955 if test "$_sighandler" = yes ; then
2956 def_sighandler
='#define CONFIG_SIGHANDLER 1'
2958 def_sighandler
='#undef CONFIG_SIGHANDLER'
2960 echores
"$_sighandler"
2962 echocheck
"runtime cpudetection"
2963 if test "$_runtime_cpudetection" = yes ; then
2964 _optimizing
="Runtime CPU-Detection enabled"
2965 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 1'
2967 def_runtime_cpudetection
='#define CONFIG_RUNTIME_CPUDETECT 0'
2969 echores
"$_runtime_cpudetection"
2972 echocheck
"restrict keyword"
2973 for restrict_keyword
in restrict __restrict __restrict__
; do
2974 echo "void foo(char * $restrict_keyword p); int main(void) { return 0; }" > $TMPC
2976 def_restrict_keyword
=$restrict_keyword
2980 if [ -n "$def_restrict_keyword" ]; then
2981 echores
"$def_restrict_keyword"
2985 # Avoid infinite recursion loop ("#define restrict restrict")
2986 if [ "$def_restrict_keyword" != "restrict" ]; then
2987 def_restrict_keyword
="#define restrict $def_restrict_keyword"
2989 def_restrict_keyword
=""
2993 echocheck
"__builtin_expect"
2994 # GCC branch prediction hint
2997 a = __builtin_expect(a, 10);
2998 return a == 10 ? 0 : 1;
3000 int main(void) { return foo(10) && foo(0); }
3003 cc_check
&& _builtin_expect
=yes
3004 if test "$_builtin_expect" = yes ; then
3005 def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
3007 def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
3009 echores
"$_builtin_expect"
3015 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
3018 cc_check
-lkstat && _kstat
=yes
3019 if test "$_kstat" = yes ; then
3020 def_kstat
="#define HAVE_LIBKSTAT 1"
3021 extra_ldflags
="$extra_ldflags -lkstat"
3023 def_kstat
="#undef HAVE_LIBKSTAT"
3029 # required for nanosleep on some systems
3032 int main(void) { (void) nanosleep(0, 0); return 0; }
3035 cc_check
-lposix4 && _posix4
=yes
3036 if test "$_posix4" = yes ; then
3037 extra_ldflags
="$extra_ldflags -lposix4"
3041 for func
in exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf truncf
; do
3045 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
3048 cc_check
-D_ISOC99_SOURCE $_ld_lm && eval _
$func=yes
3049 if eval test "x\$_$func" = "xyes"; then
3050 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3053 eval def_
$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3062 int main(void) { char a; mkstemp(&a); return 0; }
3065 cc_check
&& _mkstemp
=yes
3066 if test "$_mkstemp" = yes ; then
3067 def_mkstemp
='#define HAVE_MKSTEMP 1'
3069 def_mkstemp
='#undef HAVE_MKSTEMP'
3074 echocheck
"nanosleep"
3075 # also check for nanosleep
3078 int main(void) { (void) nanosleep(0, 0); return 0; }
3081 cc_check
&& _nanosleep
=yes
3082 if test "$_nanosleep" = yes ; then
3083 def_nanosleep
='#define HAVE_NANOSLEEP 1'
3085 def_nanosleep
='#undef HAVE_NANOSLEEP'
3087 echores
"$_nanosleep"
3091 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
3092 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
3095 #include <sys/socket.h>
3096 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
3099 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
3100 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
3102 test $_socklib = yes && test $_winsock2_h = auto
&& _winsock2_h
=no
3103 if test $_winsock2_h = auto
; then
3106 #include <winsock2.h>
3107 int main(void) { (void) gethostbyname(0); return 0; }
3109 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2_h
=yes
3111 test "$_ld_sock" && res_comment
="using $_ld_sock"
3115 if test $_winsock2_h = yes ; then
3117 def_winsock2_h
='#define HAVE_WINSOCK2_H 1'
3118 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=1'
3120 def_winsock2_h
='#define HAVE_WINSOCK2_H 0'
3121 cc_check_winsock2_h
='-DHAVE_WINSOCK2_H=0'
3125 echocheck
"netdb.h, struct addrinfo"
3126 if test "$_struct_addrinfo" = auto
; then
3130 #include <winsock2.h>
3131 #include <ws2tcpip.h>
3133 #include <sys/types.h>
3134 #include <sys/socket.h>
3137 int main(void) { struct addrinfo ai; return 0; }
3139 cc_check
$cc_check_winsock2_h && _struct_addrinfo
=yes
3141 echores
"$_struct_addrinfo"
3143 if test "$_struct_addrinfo" = yes; then
3144 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 1"
3146 def_addrinfo
="#define HAVE_STRUCT_ADDRINFO 0"
3150 echocheck
"netdb.h, getaddrinfo()"
3151 if test "$_getaddrinfo" = auto
; then
3155 #include <winsock2.h>
3157 #include <sys/types.h>
3158 #include <sys/socket.h>
3161 int main(void) { (void) getaddrinfo(0, 0, 0, 0); return 0; }
3163 cc_check
$cc_check_winsock2_h && _getaddrinfo
=yes
3165 echores
"$_getaddrinfo"
3167 if test "$_getaddrinfo" = yes; then
3168 def_getaddrinfo
="#define HAVE_GETADDRINFO 1"
3170 def_getaddrinfo
="#define HAVE_GETADDRINFO 0"
3174 echocheck
"sockaddr_storage"
3175 if test "$_struct_sockaddr_storage" = auto
; then
3176 _struct_sockaddr_storage
=no
3179 #include <winsock2.h>
3181 #include <sys/socket.h>
3183 int main(void) { struct sockaddr_storage sas; return 0; }
3185 cc_check
$cc_check_winsock2_h && _struct_sockaddr_storage
=yes
3187 echores
"$_struct_sockaddr_storage"
3189 if test "$_struct_sockaddr_storage" = yes; then
3190 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
3192 def_sockaddr_storage
="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
3196 echocheck
"struct ipv6_mreq"
3197 _struct_ipv6_mreq
=no
3198 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 0"
3199 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3202 int main(void) { struct ipv6_mreq mreq6; return 0; }
3204 cc_check
&& _struct_ipv6_mreq
=yes && \
3205 def_struct_ipv6_mreq
="#define HAVE_STRUCT_IPV6_MREQ 1" && break
3207 echores
"$_struct_ipv6_mreq"
3210 echocheck
"struct sockaddr_in6"
3211 _struct_sockaddr_in6
=no
3212 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 0"
3213 for header
in "netinet/in.h" "ws2tcpip.h" ; do
3216 int main(void) { struct sockaddr_in6 addr; return 0; }
3218 cc_check
&& _struct_sockaddr_in6
=yes && \
3219 def_struct_sockaddr_in6
="#define HAVE_STRUCT_SOCKADDR_IN6 1" && break
3221 echores
"$_struct_sockaddr_in6"
3224 echocheck
"struct sockaddr sa_len"
3225 _struct_sockaddr_sa_len
=no
3226 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 0"
3229 #include <winsock2.h>
3231 #include <sys/types.h>
3232 #include <sys/socket.h>
3234 int main(void) { const void *p = &((struct sockaddr *)0)->sa_len; return 0; }
3236 cc_check
$cc_check_winsock2_h && _struct_sockaddr_sa_len
=yes && \
3237 def_struct_sockaddr_sa_len
="#define HAVE_STRUCT_SOCKADDR_SA_LEN 1"
3238 echores
"$_struct_sockaddr_sa_len"
3241 echocheck
"arpa/inet.h"
3243 def_arpa_inet_h
='#define HAVE_ARPA_INET_H 0'
3245 #include <arpa/inet.h>
3246 int main(void) { return 0; }
3248 cc_check
&& arpa_inet_h
=yes && def_arpa_inet_h
='#define HAVE_ARPA_INET_H 1'
3249 echores
"$arpa_inet_h"
3252 echocheck
"inet_pton()"
3253 def_inet_pton
='#define HAVE_INET_PTON 0'
3256 #include <sys/types.h>
3257 #include <sys/socket.h>
3258 #include <arpa/inet.h>
3259 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
3261 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3262 cc_check
$_ld_tmp && inet_pton
=yes && break
3264 if test $inet_pton = yes ; then
3265 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3266 def_inet_pton
='#define HAVE_INET_PTON 1'
3268 echores
"$inet_pton"
3271 echocheck
"inet_aton()"
3272 def_inet_aton
='#define HAVE_INET_ATON 0'
3275 #include <sys/types.h>
3276 #include <sys/socket.h>
3277 #include <arpa/inet.h>
3278 int main(void) { (void) inet_aton(0, 0); return 0; }
3280 for _ld_tmp
in "$_ld_sock" "$_ld_sock -lresolv" ; do
3281 cc_check
$_ld_tmp && inet_aton
=yes && break
3283 if test $inet_aton = yes ; then
3284 test "$_ld_tmp" && res_comment
="using $_ld_tmp"
3285 def_inet_aton
='#define HAVE_INET_ATON 1'
3287 echores
"$inet_aton"
3290 echocheck
"socklen_t"
3292 for header
in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
3295 int main(void) { socklen_t v = 0; return v; }
3297 cc_check
&& _socklen_t
=yes && break
3299 if test "$_socklen_t" = yes ; then
3300 def_socklen_t
='#define HAVE_SOCKLEN_T 1'
3302 def_socklen_t
='#define HAVE_SOCKLEN_T 0'
3304 echores
"$_socklen_t"
3307 echocheck
"closesocket()"
3310 #include <winsock2.h>
3311 int main(void) { closesocket(~0); return 0; }
3313 cc_check
$_ld_sock && _closesocket
=yes
3314 if test "$_closesocket" = yes ; then
3315 def_closesocket
='#define HAVE_CLOSESOCKET 1'
3317 def_closesocket
='#define HAVE_CLOSESOCKET 0'
3319 echores
"$_closesocket"
3323 test $_winsock2_h = no
&& test $inet_pton = no
&&
3324 test $inet_aton = no
&& _network
=no
3325 if test "$_network" = yes ; then
3326 def_network
='#define CONFIG_NETWORK 1'
3327 extra_ldflags
="$extra_ldflags $_ld_sock"
3328 inputmodules
="network $inputmodules"
3330 _noinputmodules
="network $_noinputmodules"
3331 def_network
='#undef CONFIG_NETWORK'
3333 _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
//)
3334 _libavdemuxers
=$
(echo $_libavdemuxers |
sed -e s
/RTSP_DEMUXER
// -e s
/SDP_DEMUXER
//)
3340 if test "$_inet6" = auto
; then
3342 #include <sys/types.h>
3343 #if !defined(_WIN32) || defined(__CYGWIN__)
3344 #include <sys/socket.h>
3345 #include <netinet/in.h>
3347 #include <ws2tcpip.h>
3349 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; }
3352 if cc_check
$_ld_sock ; then
3356 if test "$_inet6" = yes ; then
3357 def_inet6
='#define HAVE_AF_INET6 1'
3359 def_inet6
='#undef HAVE_AF_INET6'
3364 echocheck
"gethostbyname2"
3365 if test "$_gethostbyname2" = auto
; then
3367 #include <sys/types.h>
3368 #include <sys/socket.h>
3370 int main(void) { gethostbyname2("", AF_INET); return 0; }
3377 if test "$_gethostbyname2" = yes ; then
3378 def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
3380 def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
3382 echores
"$_gethostbyname2"
3385 echocheck
"inttypes.h (required)"
3387 #include <inttypes.h>
3388 int main(void) { return 0; }
3391 cc_check
&& _inttypes
=yes
3392 echores
"$_inttypes"
3394 if test "$_inttypes" = no
; then
3395 echocheck
"bitypes.h (inttypes.h predecessor)"
3397 #include <sys/bitypes.h>
3398 int main(void) { return 0; }
3400 cc_check
&& _inttypes
=yes
3401 if test "$_inttypes" = yes ; then
3402 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."
3404 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
3409 echocheck
"int_fastXY_t in inttypes.h"
3411 #include <inttypes.h>
3413 volatile int_fast16_t v= 0;
3417 cc_check
&& _fast_inttypes
=yes
3418 if test "$_fast_inttypes" = no
; then
3420 typedef signed char int_fast8_t;
3421 typedef signed int int_fast16_t;
3422 typedef signed int int_fast32_t;
3423 typedef signed long long int_fast64_t;
3424 typedef unsigned char uint_fast8_t;
3425 typedef unsigned int uint_fast16_t;
3426 typedef unsigned int uint_fast32_t;
3427 typedef unsigned long long uint_fast64_t;'
3429 echores
"$_fast_inttypes"
3432 echocheck
"malloc.h"
3435 int main(void) { (void) malloc(0); return 0; }
3438 cc_check
&& _malloc
=yes
3439 if test "$_malloc" = yes ; then
3440 def_malloc_h
='#define HAVE_MALLOC_H 1'
3442 def_malloc_h
='#define HAVE_MALLOC_H 0'
3447 echocheck
"memalign()"
3448 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
3449 def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 0'
3452 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
3455 cc_check
&& _memalign
=yes
3456 if test "$_memalign" = yes ; then
3457 def_memalign
='#define HAVE_MEMALIGN 1'
3459 def_memalign
='#define HAVE_MEMALIGN 0'
3460 def_map_memalign
='#define memalign(a,b) malloc(b)'
3461 darwin || def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
3463 echores
"$_memalign"
3466 echocheck
"posix_memalign()"
3468 def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 0'
3470 #define _XOPEN_SOURCE 600
3472 int main(void) { posix_memalign(NULL, 0, 0); }
3474 cc_check
&& posix_memalign
=yes && def_posix_memalign
='#define HAVE_POSIX_MEMALIGN 1'
3475 echores
"$posix_memalign"
3478 echocheck
"alloca.h"
3481 int main(void) { (void) alloca(0); return 0; }
3484 cc_check
&& _alloca
=yes
3486 def_alloca_h
='#define HAVE_ALLOCA_H 1'
3488 def_alloca_h
='#undef HAVE_ALLOCA_H'
3493 echocheck
"fastmemcpy"
3494 if test "$_fastmemcpy" = yes ; then
3495 def_fastmemcpy
='#define CONFIG_FASTMEMCPY 1'
3497 def_fastmemcpy
='#undef CONFIG_FASTMEMCPY'
3499 echores
"$_fastmemcpy"
3502 echocheck
"hard-coded tables"
3503 if test "$hardcoded_tables" = yes ; then
3504 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 1'
3505 mak_hardcoded_tables
='CONFIG_HARDCODED_TABLES = yes'
3507 def_hardcoded_tables
='#define CONFIG_HARDCODED_TABLES 0'
3509 echores
"$hardcoded_tables"
3514 #include <sys/types.h>
3515 #include <sys/mman.h>
3516 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3519 cc_check
&& _mman
=yes
3520 if test "$_mman" = yes ; then
3521 def_mman_h
='#define HAVE_SYS_MMAN_H 1'
3523 def_mman_h
='#undef HAVE_SYS_MMAN_H'
3524 os2
&& _need_mmap
=yes
3529 #include <sys/types.h>
3530 #include <sys/mman.h>
3531 int main(void) { void *p = MAP_FAILED; return 0; }
3533 _mman_has_map_failed
=no
3534 cc_check
&& _mman_has_map_failed
=yes
3535 if test "$_mman_has_map_failed" = yes ; then
3536 def_mman_has_map_failed
=''
3538 def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3541 echocheck
"dynamic loader"
3545 int main(void) { dlopen("", 0); dlclose(NULL); dlsym(NULL, ""); return 0; }
3548 for _ld_tmp
in "" "-ldl" ; do
3549 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3551 if test "$_dl" = yes ; then
3552 def_dl
='#define HAVE_LIBDL 1'
3554 def_dl
='#undef HAVE_LIBDL'
3559 echocheck
"dynamic a/v plugins support"
3560 if test "$_dl" = no
; then
3563 if test "$_dynamic_plugins" = yes ; then
3564 def_dynamic_plugins
='#define CONFIG_DYNAMIC_PLUGINS 1'
3566 def_dynamic_plugins
='#undef CONFIG_DYNAMIC_PLUGINS'
3568 echores
"$_dynamic_plugins"
3571 def_threads
='#define HAVE_THREADS 0'
3575 THREAD_CFLAGS
=-D_REENTRANT
3576 elif freebsd || netbsd || openbsd || bsdos
; then
3577 THREAD_CFLAGS
=-D_THREAD_SAFE
3579 if test "$_pthreads" = auto
; then
3581 #include <pthread.h>
3582 void* func(void *arg) { return arg; }
3583 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3587 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3588 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3589 cc_check
$THREAD_CFLAGS $_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3593 if test "$_pthreads" = yes ; then
3594 test $_ld_pthread && res_comment
="using $_ld_pthread"
3595 def_pthreads
='#define HAVE_PTHREADS 1'
3596 def_threads
='#define HAVE_THREADS 1'
3597 extra_cflags
="$extra_cflags $THREAD_CFLAGS"
3599 res_comment
="v4l, v4l2, ao_nas, win32 loader disabled"
3600 def_pthreads
='#undef HAVE_PTHREADS'
3601 _nas
=no
; _tv_v4l1
=no
; _tv_v4l2
=no
3602 mingw32 || _win32dll
=no
3604 echores
"$_pthreads"
3607 if test "$_pthreads" = yes ; then
3608 def_pthread_cache
="#define PTHREAD_CACHE 1"
3611 def_stream_cache
="#undef CONFIG_STREAM_CACHE"
3615 echocheck
"w32threads"
3616 if test "$_pthreads" = yes ; then
3617 res_comment
="using pthread instead"
3620 if test "$_w32threads" = auto
; then
3622 mingw32
&& _w32threads
=yes
3624 test "$_w32threads" = yes && def_threads
='#define HAVE_THREADS 1'
3625 echores
"$_w32threads"
3629 if test "$_rpath" = yes ; then
3630 for I
in $
(echo $extra_ldflags |
sed 's/-L//g') ; do
3631 tmp
="$tmp $(echo $I | sed 's/.*/ -L& -Wl,-R&/')"
3638 if test "$_iconv" = auto
; then
3643 #define INBUFSIZE 1024
3644 #define OUTBUFSIZE 4096
3646 char inbuffer[INBUFSIZE];
3647 char outbuffer[OUTBUFSIZE];
3652 char *tocode="UTF-8";
3653 char *fromcode="cp1250";
3654 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3655 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3656 char *iptr=inbuffer;
3657 char *optr=outbuffer;
3658 size_t inleft=numread;
3659 size_t outleft=OUTBUFSIZE;
3660 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3662 write(1, outbuffer, OUTBUFSIZE - outleft);
3665 if (iconv_close(icdsc) == -1)
3672 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3673 cc_check
$_ld_lm $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
3677 if test "$_iconv" = yes ; then
3678 def_iconv
='#define CONFIG_ICONV 1'
3680 def_iconv
='#undef CONFIG_ICONV'
3685 echocheck
"soundcard.h"
3687 def_soundcard_h
='#undef HAVE_SOUNDCARD_H'
3688 def_sys_soundcard_h
='#undef HAVE_SYS_SOUNDCARD_H'
3689 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3691 #include <$_soundcard_header>
3692 int main(void) { return 0; }
3694 cc_check
&& _soundcard_h
=yes && res_comment
="$_soundcard_header" && break
3697 if test "$_soundcard_h" = yes ; then
3698 if test $_soundcard_header = "sys/soundcard.h"; then
3699 def_sys_soundcard_h
='#define HAVE_SYS_SOUNDCARD_H 1'
3701 def_soundcard_h
='#define HAVE_SOUNDCARD_H 1'
3704 echores
"$_soundcard_h"
3707 echocheck
"sys/dvdio.h"
3710 #include <sys/dvdio.h>
3711 int main(void) { return 0; }
3714 cc_check
&& _dvdio
=yes
3715 if test "$_dvdio" = yes ; then
3716 def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3718 def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3723 echocheck
"sys/cdio.h"
3726 #include <sys/cdio.h>
3727 int main(void) { return 0; }
3730 cc_check
&& _cdio
=yes
3731 if test "$_cdio" = yes ; then
3732 def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3734 def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3739 echocheck
"linux/cdrom.h"
3741 #include <sys/types.h>
3742 #include <linux/cdrom.h>
3743 int main(void) { return 0; }
3746 cc_check
&& _cdrom
=yes
3747 if test "$_cdrom" = yes ; then
3748 def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3750 def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3758 int main(void) { return 0; }
3761 cc_check
&& _dvd
=yes
3762 if test "$_dvd" = yes ; then
3763 def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3765 def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3771 echocheck
"BSDI dvd.h"
3774 int main(void) { return 0; }
3777 cc_check
&& _bsdi_dvd
=yes
3778 if test "$_bsdi_dvd" = yes ; then
3779 def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3781 def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3783 echores
"$_bsdi_dvd"
3788 # also used by AIX, but AIX does not support VCD and/or libdvdread
3789 echocheck
"HP-UX SCSI header"
3791 #include <sys/scsi.h>
3792 int main(void) { return 0; }
3795 cc_check
&& _hpux_scsi_h
=yes
3796 if test "$_hpux_scsi_h" = yes ; then
3797 def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3799 def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3801 echores
"$_hpux_scsi_h"
3806 echocheck
"userspace SCSI headers (Solaris)"
3809 #include <stropts.h>
3810 #include <sys/scsi/scsi_types.h>
3811 #include <sys/scsi/impl/uscsi.h>
3812 int main(void) { return 0; }
3815 cc_check
&& _sol_scsi_h
=yes
3816 if test "$_sol_scsi_h" = yes ; then
3817 def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3819 def_sol_scsi_h
='#undef SOLARIS_USCSI'
3821 echores
"$_sol_scsi_h"
3826 if test "$_termcap" = auto
; then
3830 int main(void) { tgetent(NULL, NULL); return 0; }
3833 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3834 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
3835 && _termcap
=yes && break
3838 if test "$_termcap" = yes ; then
3839 def_termcap
='#define HAVE_TERMCAP 1'
3840 test $_ld_tmp && res_comment
="using $_ld_tmp"
3842 def_termcap
='#undef HAVE_TERMCAP'
3848 def_termios
='#undef HAVE_TERMIOS'
3849 def_termios_h
='#undef HAVE_TERMIOS_H'
3850 def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3851 if test "$_termios" = auto
; then
3853 for _termios_header
in "termios.h" "sys/termios.h"; do
3855 #include <$_termios_header>
3856 int main(void) { return 0; }
3858 cc_check
&& _termios
=yes && res_comment
="using $_termios_header" && break
3862 if test "$_termios" = yes ; then
3863 def_termios
='#define HAVE_TERMIOS 1'
3864 if test "$_termios_header" = "termios.h" ; then
3865 def_termios_h
='#define HAVE_TERMIOS_H 1'
3867 def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3874 if test "$_shm" = auto
; then
3876 #include <sys/types.h>
3877 #include <sys/shm.h>
3878 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3881 cc_check
&& _shm
=yes
3883 if test "$_shm" = yes ; then
3884 def_shm
='#define HAVE_SHM 1'
3886 def_shm
='#undef HAVE_SHM'
3891 echocheck
"strsep()"
3894 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3897 cc_check
&& _strsep
=yes
3898 if test "$_strsep" = yes ; then
3899 def_strsep
='#define HAVE_STRSEP 1'
3902 def_strsep
='#undef HAVE_STRSEP'
3908 echocheck
"vsscanf()"
3910 #define _ISOC99_SOURCE
3913 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
3916 cc_check
&& _vsscanf
=yes
3917 if test "$_vsscanf" = yes ; then
3918 def_vsscanf
='#define HAVE_VSSCANF 1'
3921 def_vsscanf
='#undef HAVE_VSSCANF'
3929 #define _XOPEN_SOURCE 600
3931 int main(void) { swab(0, 0, 0); return 0; }
3934 cc_check
&& _swab
=yes
3935 if test "$_swab" = yes ; then
3936 def_swab
='#define HAVE_SWAB 1'
3939 def_swab
='#undef HAVE_SWAB'
3944 echocheck
"POSIX select()"
3948 #include <sys/types.h>
3950 #include <sys/time.h>
3952 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3955 def_posix_select
='#undef HAVE_POSIX_SELECT'
3956 #select() of kLIBC (OS/2) supports socket only
3957 ! os2
&& cc_check
&& _posix_select
=yes \
3958 && def_posix_select
='#define HAVE_POSIX_SELECT 1'
3959 echores
"$_posix_select"
3962 echocheck
"audio select()"
3963 if test "$_select" = no
; then
3964 def_select
='#undef HAVE_AUDIO_SELECT'
3965 elif test "$_select" = yes ; then
3966 def_select
='#define HAVE_AUDIO_SELECT 1'
3971 echocheck
"gettimeofday()"
3974 #include <sys/time.h>
3975 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3978 cc_check
&& _gettimeofday
=yes
3979 if test "$_gettimeofday" = yes ; then
3980 def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3981 _need_gettimeofday
=no
3983 def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3984 _need_gettimeofday
=yes
3986 echores
"$_gettimeofday"
3993 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3996 cc_check
&& _glob
=yes
3997 if test "$_glob" = yes ; then
3998 def_glob
='#define HAVE_GLOB 1'
4001 def_glob
='#undef HAVE_GLOB'
4007 echocheck
"setenv()"
4010 int main(void) { setenv("","",0); return 0; }
4013 cc_check
&& _setenv
=yes
4014 if test "$_setenv" = yes ; then
4015 def_setenv
='#define HAVE_SETENV 1'
4018 def_setenv
='#undef HAVE_SETENV'
4024 echocheck
"setmode()"
4026 def_setmode
='#define HAVE_SETMODE 0'
4029 int main(void) { setmode(0, 0); return 0; }
4031 cc_check
&& _setmode
=yes && def_setmode
='#define HAVE_SETMODE 1'
4036 echocheck
"sysi86()"
4038 #include <sys/sysi86.h>
4039 int main(void) { sysi86(0); return 0; }
4042 cc_check
&& _sysi86
=yes
4043 if test "$_sysi86" = yes ; then
4044 def_sysi86
='#define HAVE_SYSI86 1'
4046 #include <sys/sysi86.h>
4047 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
4049 cc_check
&& def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
4051 def_sysi86
='#undef HAVE_SYSI86'
4057 echocheck
"sys/sysinfo.h"
4059 #include <sys/sysinfo.h>
4061 struct sysinfo s_info;
4067 cc_check
&& _sys_sysinfo
=yes
4068 if test "$_sys_sysinfo" = yes ; then
4069 def_sys_sysinfo_h
='#define HAVE_SYS_SYSINFO_H 1'
4071 def_sys_sysinfo_h
='#undef HAVE_SYS_SYSINFO_H'
4073 echores
"$_sys_sysinfo"
4078 echocheck
"Mac OS X Finder Support"
4079 def_macosx_finder
='#undef CONFIG_MACOSX_FINDER'
4080 if test "$_macosx_finder" = yes ; then
4081 def_macosx_finder
='#define CONFIG_MACOSX_FINDER 1'
4082 extra_ldflags
="$extra_ldflags -framework Carbon"
4084 echores
"$_macosx_finder"
4086 echocheck
"Mac OS X Bundle file locations"
4087 def_macosx_bundle
='#undef CONFIG_MACOSX_BUNDLE'
4088 test "$_macosx_bundle" = auto
&& _macosx_bundle
=$_macosx_finder
4089 if test "$_macosx_bundle" = yes ; then
4090 def_macosx_bundle
='#define CONFIG_MACOSX_BUNDLE 1'
4091 extra_ldflags
="$extra_ldflags -framework Carbon"
4093 echores
"$_macosx_bundle"
4095 echocheck
"Apple Remote"
4096 if test "$_apple_remote" = auto
; then
4100 #include <IOKit/IOCFPlugIn.h>
4102 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
4103 CFMutableDictionaryRef hidMatchDictionary;
4104 IOReturn ioReturnValue;
4106 // Set up a matching dictionary to search the I/O Registry by class.
4107 // name for all HID class devices
4108 hidMatchDictionary = IOServiceMatching("AppleIRController");
4110 // Now search I/O Registry for matching devices.
4111 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
4112 hidMatchDictionary, &hidObjectIterator);
4114 // If search is unsuccessful, return nonzero.
4115 if (ioReturnValue != kIOReturnSuccess ||
4116 !IOIteratorIsValid(hidObjectIterator)) {
4122 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
4124 if test "$_apple_remote" = yes ; then
4125 def_apple_remote
='#define CONFIG_APPLE_REMOTE 1'
4126 libs_mplayer
="$libs_mplayer -framework IOKit -framework Cocoa"
4128 def_apple_remote
='#undef CONFIG_APPLE_REMOTE'
4130 echores
"$_apple_remote"
4136 echocheck
"Apple IR"
4137 if test "$_apple_ir" = auto
; then
4140 #include <linux/types.h>
4141 #include <linux/input.h>
4143 struct input_event ev;
4148 cc_check
&& _apple_ir
=yes
4150 if test "$_apple_ir" = yes ; then
4151 def_apple_ir
='#define CONFIG_APPLE_IR 1'
4153 def_apple_ir
='#undef CONFIG_APPLE_IR'
4155 echores
"$_apple_ir"
4158 echocheck
"pkg-config"
4159 _pkg_config
=pkg-config
4160 if $
($_pkg_config --version > /dev
/null
2>&1); then
4161 if test "$_ld_static"; then
4162 _pkg_config
="$_pkg_config --static"
4171 echocheck
"Samba support (libsmbclient)"
4172 if test "$_smb" = yes; then
4173 extra_ldflags
="$extra_ldflags -lsmbclient"
4175 if test "$_smb" = auto
; then
4178 #include <libsmbclient.h>
4179 int main(void) { smbc_opendir("smb://"); return 0; }
4181 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
4182 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && \
4187 if test "$_smb" = yes; then
4188 def_smb
="#define CONFIG_LIBSMBCLIENT 1"
4189 inputmodules
="smb $inputmodules"
4191 def_smb
="#undef CONFIG_LIBSMBCLIENT"
4192 _noinputmodules
="smb $_noinputmodules"
4203 if test "$_tdfxfb" = yes ; then
4204 def_tdfxfb
='#define CONFIG_TDFXFB 1'
4205 vomodules
="tdfxfb $vomodules"
4207 def_tdfxfb
='#undef CONFIG_TDFXFB'
4208 novomodules
="tdfxfb $novomodules"
4213 if test "$_s3fb" = yes ; then
4214 def_s3fb
='#define CONFIG_S3FB 1'
4215 vomodules
="s3fb $vomodules"
4217 def_s3fb
='#undef CONFIG_S3FB'
4218 novomodules
="s3fb $novomodules"
4223 if test "$_wii" = yes ; then
4224 def_wii
='#define CONFIG_WII 1'
4225 vomodules
="wii $vomodules"
4227 def_wii
='#undef CONFIG_WII'
4228 novomodules
="wii $novomodules"
4233 if test "$_tdfxvid" = yes ; then
4234 def_tdfxvid
='#define CONFIG_TDFX_VID 1'
4235 vomodules
="tdfx_vid $vomodules"
4237 def_tdfxvid
='#undef CONFIG_TDFX_VID'
4238 novomodules
="tdfx_vid $novomodules"
4243 if test "$_xvr100" = auto
; then
4246 #include <sys/fbio.h>
4247 #include <sys/visual_io.h>
4249 struct vis_identifier ident;
4250 struct fbgattr attr;
4251 ioctl(0, VIS_GETIDENTIFIER, &ident);
4252 ioctl(0, FBIOGATTR, &attr);
4257 cc_check
&& _xvr100
=yes
4259 if test "$_xvr100" = yes ; then
4260 def_xvr100
='#define CONFIG_XVR100 1'
4261 vomodules
="xvr100 $vomodules"
4263 def_tdfxvid
='#undef CONFIG_XVR100'
4264 novomodules
="xvr100 $novomodules"
4269 if test "$_tga" = yes ; then
4270 def_tga
='#define CONFIG_TGA 1'
4271 vomodules
="tga $vomodules"
4273 def_tga
='#undef CONFIG_TGA'
4274 novomodules
="tga $novomodules"
4279 echocheck
"md5sum support"
4280 if test "$_md5sum" = yes; then
4281 def_md5sum
="#define CONFIG_MD5SUM 1"
4282 vomodules
="md5sum $vomodules"
4284 def_md5sum
="#undef CONFIG_MD5SUM"
4285 novomodules
="md5sum $novomodules"
4290 echocheck
"yuv4mpeg support"
4291 if test "$_yuv4mpeg" = yes; then
4292 def_yuv4mpeg
="#define CONFIG_YUV4MPEG 1"
4293 vomodules
="yuv4mpeg $vomodules"
4295 def_yuv4mpeg
="#undef CONFIG_YUV4MPEG"
4296 novomodules
="yuv4mpeg $novomodules"
4298 echores
"$_yuv4mpeg"
4302 if test "$_bl" = yes ; then
4303 def_bl
='#define CONFIG_BL 1'
4304 vomodules
="bl $vomodules"
4306 def_bl
='#undef CONFIG_BL'
4307 novomodules
="bl $novomodules"
4312 echocheck
"DirectFB"
4313 if test "$_directfb" = auto
; then
4316 #include <directfb.h>
4317 int main(void) { DirectFBInit(0, 0); return 0; }
4319 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
4320 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
4321 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
4322 extra_cflags
="$extra_cflags $_inc_tmp" && break
4327 expr $1 \
* 65536 + $2 \
* 256 + $3
4330 if test "$_directfb" = yes; then
4332 #include <directfb_version.h>
4334 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
4337 if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then
4338 _directfb_version
=$
(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" |
tr -d '()')
4339 _dfb_major
=$
(echo $_directfb_version | cut
-d .
-f 1)
4340 _dfb_minor
=$
(echo $_directfb_version | cut
-d .
-f 2)
4341 _dfb_micro
=$
(echo $_directfb_version | cut
-d .
-f 3)
4342 _dfb_version
=$
(dfb_version
$_dfb_major $_dfb_minor $_dfb_micro)
4343 if test "$_dfb_version" -ge $
(dfb_version
0 9 13); then
4344 def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
4345 res_comment
="$_directfb_version"
4346 test "$_dfb_version" -ge $
(dfb_version
0 9 15) && _dfbmga
=yes
4348 def_directfb_version
='#undef DIRECTFBVERSION'
4350 res_comment
="version >=0.9.13 required"
4354 res_comment
="failed to get version"
4357 echores
"$_directfb"
4359 if test "$_directfb" = yes ; then
4360 def_directfb
='#define CONFIG_DIRECTFB 1'
4361 vomodules
="directfb $vomodules"
4362 libs_mplayer
="$libs_mplayer -ldirectfb"
4364 def_directfb
='#undef CONFIG_DIRECTFB'
4365 novomodules
="directfb $novomodules"
4367 if test "$_dfbmga" = yes; then
4368 vomodules
="dfbmga $vomodules"
4369 def_dfbmga
='#define CONFIG_DFBMGA 1'
4371 novomodules
="dfbmga $novomodules"
4372 def_dfbmga
='#undef CONFIG_DFBMGA'
4376 echocheck
"X11 headers presence"
4378 res_comment
="check if the dev(el) packages are installed"
4379 for I
in $
(echo $extra_cflags |
sed s
/-I//g
) /usr
/include
; do
4380 if test -f "$I/X11/Xlib.h" ; then
4386 if test $_cross_compile = no
; then
4387 for I
in /usr
/X11
/include
/usr
/X11R
7/include
/usr
/local
/include
/usr
/X11R
6/include \
4388 /usr
/include
/X11R6
/usr
/openwin
/include
; do
4389 if test -f "$I/X11/Xlib.h" ; then
4390 extra_cflags
="$extra_cflags -I$I"
4392 res_comment
="using $I"
4397 echores
"$_x11_headers"
4401 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
4403 #include <X11/Xlib.h>
4404 #include <X11/Xutil.h>
4405 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
4407 for I
in "" -L/usr
/X11R
7/lib
-L/usr
/local
/lib
-L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6 \
4408 -L/usr
/X11
/lib
-L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/local
/lib64
-L/usr
/X11R
6/lib64 \
4411 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
4413 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
4415 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" \
4416 && _x11
=yes && break
4419 if test "$_x11" = yes ; then
4420 def_x11
='#define CONFIG_X11 1'
4421 vomodules
="x11 xover $vomodules"
4424 def_x11
='#undef CONFIG_X11'
4425 novomodules
="x11 $novomodules"
4426 res_comment
="check if the dev(el) packages are installed"
4427 # disable stuff that depends on X
4428 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _vdpau
=no
4432 echocheck
"Xss screensaver extensions"
4433 if test "$_xss" = auto
; then
4435 #include <X11/Xlib.h>
4436 #include <X11/extensions/scrnsaver.h>
4437 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
4440 cc_check
-lXss && _xss
=yes
4442 if test "$_xss" = yes ; then
4443 def_xss
='#define CONFIG_XSS 1'
4444 libs_mplayer
="$libs_mplayer -lXss"
4446 def_xss
='#undef CONFIG_XSS'
4453 if test "$_x11" = yes ; then
4455 #include <X11/Xmd.h>
4456 #include <X11/Xlib.h>
4457 #include <X11/Xutil.h>
4458 #include <X11/Xatom.h>
4459 #include <X11/extensions/dpms.h>
4460 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4462 cc_check
-lXdpms && _xdpms3
=yes
4464 #include <X11/Xlib.h>
4465 #include <X11/extensions/dpms.h>
4466 int main(void) { (void) DPMSQueryExtension(0, 0, 0); return 0; }
4468 cc_check
-lXext && _xdpms4
=yes
4470 if test "$_xdpms4" = yes ; then
4471 def_xdpms
='#define CONFIG_XDPMS 1'
4472 res_comment
="using Xdpms 4"
4474 elif test "$_xdpms3" = yes ; then
4475 def_xdpms
='#define CONFIG_XDPMS 1'
4476 libs_mplayer
="$libs_mplayer -lXdpms"
4477 res_comment
="using Xdpms 3"
4480 def_xdpms
='#undef CONFIG_XDPMS'
4486 if test "$_xv" = auto
; then
4488 #include <X11/Xlib.h>
4489 #include <X11/extensions/Xvlib.h>
4491 (void) XvGetPortAttribute(0, 0, 0, 0);
4492 (void) XvQueryPortAttributes(0, 0, 0);
4496 cc_check
-lXv && _xv
=yes
4499 if test "$_xv" = yes ; then
4500 def_xv
='#define CONFIG_XV 1'
4501 libs_mplayer
="$libs_mplayer -lXv"
4502 vomodules
="xv $vomodules"
4504 def_xv
='#undef CONFIG_XV'
4505 novomodules
="xv $novomodules"
4511 if test "$_xv" = yes && test "$_xvmc" != no
; then
4514 #include <X11/Xlib.h>
4515 #include <X11/extensions/Xvlib.h>
4516 #include <X11/extensions/XvMClib.h>
4518 (void) XvMCQueryExtension(0,0,0);
4519 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4522 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4523 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4526 if test "$_xvmc" = yes ; then
4527 def_xvmc
='#define CONFIG_XVMC 1'
4528 libs_mplayer
="$libs_mplayer -lXvMC -l$_xvmclib"
4529 vomodules
="xvmc $vomodules"
4530 res_comment
="using $_xvmclib"
4532 def_xvmc
='#define CONFIG_XVMC 0'
4533 novomodules
="xvmc $novomodules"
4534 _libavdecoders
=$
(echo $_libavdecoders |
sed -e s
/MPEG_XVMC_DECODER
//)
4540 if test "$_vdpau" = auto
; then
4542 if test "$_dl" = yes ; then
4544 #include <vdpau/vdpau_x11.h>
4546 (void) vdp_device_create_x11(0, 0, 0, 0);
4547 return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
4549 cc_check
-lvdpau && _vdpau
=yes
4552 if test "$_vdpau" = yes ; then
4553 def_vdpau
='#define CONFIG_VDPAU 1'
4554 libs_mplayer
="$libs_mplayer -lvdpau"
4555 vomodules
="vdpau $vomodules"
4557 def_vdpau
='#define CONFIG_VDPAU 0'
4558 novomodules
="vdpau $novomodules"
4559 _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
//)
4564 echocheck
"Xinerama"
4565 if test "$_xinerama" = auto
; then
4567 #include <X11/Xlib.h>
4568 #include <X11/extensions/Xinerama.h>
4569 int main(void) { (void) XineramaIsActive(0); return 0; }
4572 cc_check
-lXinerama && _xinerama
=yes
4575 if test "$_xinerama" = yes ; then
4576 def_xinerama
='#define CONFIG_XINERAMA 1'
4577 libs_mplayer
="$libs_mplayer -lXinerama"
4579 def_xinerama
='#undef CONFIG_XINERAMA'
4581 echores
"$_xinerama"
4584 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4585 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4586 # named 'X extensions' or something similar.
4587 # This check may be useful for future mplayer versions (to change resolution)
4588 # If you run into problems, remove '-lXxf86vm'.
4590 if test "$_vm" = auto
; then
4592 #include <X11/Xlib.h>
4593 #include <X11/extensions/xf86vmode.h>
4594 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4597 cc_check
-lXxf86vm && _vm
=yes
4599 if test "$_vm" = yes ; then
4600 def_vm
='#define CONFIG_XF86VM 1'
4601 libs_mplayer
="$libs_mplayer -lXxf86vm"
4603 def_vm
='#undef CONFIG_XF86VM'
4607 # Check for the presence of special keycodes, like audio control buttons
4608 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4609 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4610 # have these new keycodes.
4611 echocheck
"XF86keysym"
4612 if test "$_xf86keysym" = auto
; then
4615 #include <X11/Xlib.h>
4616 #include <X11/XF86keysym.h>
4617 int main(void) { return XF86XK_AudioPause; }
4619 cc_check
&& _xf86keysym
=yes
4621 if test "$_xf86keysym" = yes ; then
4622 def_xf86keysym
='#define CONFIG_XF86XK 1'
4624 def_xf86keysym
='#undef CONFIG_XF86XK'
4626 echores
"$_xf86keysym"
4629 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4631 #include <X11/Xlib.h>
4632 #include <X11/extensions/xf86dga.h>
4633 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4636 cc_check
-lXxf86dga && _dga2
=yes
4638 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4640 #include <X11/Xlib.h>
4641 #include <X11/extensions/xf86dga.h>
4642 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4645 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4649 def_dga
='#undef CONFIG_DGA'
4650 def_dga1
='#undef CONFIG_DGA1'
4651 def_dga2
='#undef CONFIG_DGA2'
4652 if test "$_dga1" = yes ; then
4654 def_dga1
='#define CONFIG_DGA1 1'
4655 res_comment
="using DGA 1.0"
4656 elif test "$_dga2" = yes ; then
4658 def_dga2
='#define CONFIG_DGA2 1'
4659 res_comment
="using DGA 2.0"
4661 if test "$_dga" = yes ; then
4662 def_dga
='#define CONFIG_DGA 1'
4663 libs_mplayer
="$libs_mplayer -lXxf86dga"
4664 vomodules
="dga $vomodules"
4666 novomodules
="dga $novomodules"
4672 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4673 def_3dfx
='#define CONFIG_3DFX 1'
4674 vomodules
="3dfx $vomodules"
4676 def_3dfx
='#undef CONFIG_3DFX'
4677 novomodules
="3dfx $novomodules"
4683 def_vidix
='#undef CONFIG_VIDIX'
4684 def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4685 _vidix_drv_cyberblade
=no
4686 def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4688 def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4689 _vidix_drv_mach64
=no
4690 def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4692 def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4693 _vidix_drv_mga_crtc2
=no
4694 def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4695 _vidix_drv_nvidia
=no
4696 def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4698 def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4700 def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4701 _vidix_drv_radeon
=no
4702 def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4703 _vidix_drv_rage128
=no
4704 def_vidix_drv_s3
='#undef CONFIG_VIDIX_DRV_S3'
4706 def_vidix_drv_sh_veu
='#undef CONFIG_VIDIX_DRV_SH_VEU'
4707 _vidix_drv_sh_veu
=no
4708 def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4710 def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4711 _vidix_drv_unichrome
=no
4712 if test "$_vidix" = auto
; then
4714 x86
&& (linux || freebsd || netbsd || openbsd || dragonfly || sunos || win32
) \
4716 x86_64
&& ! linux
&& _vidix
=no
4717 (ppc || alpha
) && linux
&& _vidix
=yes
4721 if test "$_vidix" = yes ; then
4722 def_vidix
='#define CONFIG_VIDIX 1'
4723 vomodules
="cvidix $vomodules"
4724 # FIXME: ivtv driver temporarily disabled until we have a proper test
4725 #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4726 test "$_vidix_drivers" || _vidix_drivers
="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome"
4728 # some vidix drivers are architecture and os specific, discard them elsewhere
4729 x86 || _vidix_drivers
=$
(echo $_vidix_drivers |
sed -e s
/cyberblade
// -e s
/sis
// -e s
/unichrome
// -e s
/s
3//)
4730 (test $host_arch = "sh" && linux
) || _vidix_drivers
=$
(echo $_vidix_drivers |
sed s
/sh_veu
//)
4732 for driver
in $_vidix_drivers ; do
4733 uc_driver
=$
(echo $driver |
tr '[a-z]' '[A-Z]')
4734 eval _vidix_drv_
${driver}=yes
4735 eval def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4738 echocheck
"VIDIX PCI device name database"
4739 echores
"$_vidix_pcidb"
4740 if test "$_vidix_pcidb" = yes ; then
4746 echocheck
"VIDIX dhahelper support"
4747 test "$_dhahelper" = yes && cflags_dhahelper
=-DCONFIG_DHAHELPER
4748 echores
"$_dhahelper"
4750 echocheck
"VIDIX svgalib_helper support"
4751 test "$_svgalib_helper" = yes && cflags_svgalib_helper
=-DCONFIG_SVGAHELPER
4752 echores
"$_svgalib_helper"
4755 novomodules
="cvidix $novomodules"
4758 if test "$_vidix" = yes && win32
; then
4760 vomodules
="winvidix $vomodules"
4761 libs_mplayer
="$libs_mplayer -lgdi32"
4763 novomodules
="winvidix $novomodules"
4765 if test "$_vidix" = yes && test "$_x11" = yes; then
4767 vomodules
="xvidix $vomodules"
4769 novomodules
="xvidix $novomodules"
4772 echocheck
"/dev/mga_vid"
4773 if test "$_mga" = auto
; then
4775 test -c /dev
/mga_vid
&& _mga
=yes
4777 if test "$_mga" = yes ; then
4778 def_mga
='#define CONFIG_MGA 1'
4779 vomodules
="mga $vomodules"
4781 def_mga
='#undef CONFIG_MGA'
4782 novomodules
="mga $novomodules"
4787 if test "$_xmga" = auto
; then
4789 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4791 if test "$_xmga" = yes ; then
4792 def_xmga
='#define CONFIG_XMGA 1'
4793 vomodules
="xmga $vomodules"
4795 def_xmga
='#undef CONFIG_XMGA'
4796 novomodules
="xmga $novomodules"
4802 if test "$_ggi" = auto
; then
4804 #include <ggi/ggi.h>
4805 int main(void) { ggiInit(); return 0; }
4808 cc_check
-lggi && _ggi
=yes
4810 if test "$_ggi" = yes ; then
4811 def_ggi
='#define CONFIG_GGI 1'
4812 libs_mplayer
="$libs_mplayer -lggi"
4813 vomodules
="ggi $vomodules"
4815 def_ggi
='#undef CONFIG_GGI'
4816 novomodules
="ggi $novomodules"
4820 echocheck
"GGI extension: libggiwmh"
4821 if test "$_ggiwmh" = auto
; then
4824 #include <ggi/ggi.h>
4825 #include <ggi/wmh.h>
4826 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4828 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4830 # needed to get right output on obscure combination
4831 # like --disable-ggi --enable-ggiwmh
4832 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4833 def_ggiwmh
='#define CONFIG_GGIWMH 1'
4834 libs_mplayer
="$libs_mplayer -lggiwmh"
4837 def_ggiwmh
='#undef CONFIG_GGIWMH'
4843 if test "$_aa" = auto
; then
4846 extern struct aa_hardware_params aa_defparams;
4847 extern struct aa_renderparams aa_defrenderparams;
4851 (void) aa_init(0, 0, 0);
4852 c = aa_autoinit(&aa_defparams);
4853 p = aa_getrenderparams();
4854 aa_autoinitkbd(c,0);
4858 for _ld_tmp
in "-laa" ; do
4859 cc_check
$_ld_tmp && libs_mplayer
="$libs_mplayer $_ld_tmp" && _aa
=yes && break
4862 if test "$_aa" = yes ; then
4863 def_aa
='#define CONFIG_AA 1'
4865 libs_mplayer
="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
4867 vomodules
="aa $vomodules"
4869 def_aa
='#undef CONFIG_AA'
4870 novomodules
="aa $novomodules"
4876 if test "$_caca" = auto
; then
4878 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4881 #ifdef CACA_API_VERSION_1
4884 int main(void) { (void) caca_init(); return 0; }
4886 cc_check $
(caca-config
--libs) && _caca
=yes
4889 if test "$_caca" = yes ; then
4890 def_caca
='#define CONFIG_CACA 1'
4891 extra_cflags
="$extra_cflags $(caca-config --cflags)"
4892 libs_mplayer
="$libs_mplayer $(caca-config --libs)"
4893 vomodules
="caca $vomodules"
4895 def_caca
='#undef CONFIG_CACA'
4896 novomodules
="caca $novomodules"
4902 if test "$_svga" = auto
; then
4905 int main(void) { return 0; }
4908 cc_check
-lvga $_ld_lm && _svga
=yes
4910 if test "$_svga" = yes ; then
4911 def_svga
='#define CONFIG_SVGALIB 1'
4912 libs_mplayer
="$libs_mplayer -lvga"
4913 vomodules
="svga $vomodules"
4915 def_svga
='#undef CONFIG_SVGALIB'
4916 novomodules
="svga $novomodules"
4922 if test "$_fbdev" = auto
; then
4926 if test "$_fbdev" = yes ; then
4927 def_fbdev
='#define CONFIG_FBDEV 1'
4928 vomodules
="fbdev $vomodules"
4930 def_fbdev
='#undef CONFIG_FBDEV'
4931 novomodules
="fbdev $novomodules"
4938 if test "$_dvb" = auto
; then
4942 #include <sys/ioctl.h>
4946 #include <linux/dvb/dmx.h>
4947 #include <linux/dvb/frontend.h>
4948 #include <linux/dvb/video.h>
4949 #include <linux/dvb/audio.h>
4950 int main(void) {return 0;}
4952 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4953 cc_check
$_inc_tmp && _dvb
=yes && \
4954 extra_cflags
="$extra_cflags $_inc_tmp" && break
4958 if test "$_dvb" = yes ; then
4960 inputmodules
="dvb $inputmodules"
4961 def_dvb
='#define CONFIG_DVB 1'
4962 def_dvbin
='#define CONFIG_DVBIN 1'
4963 aomodules
="mpegpes(dvb) $aomodules"
4964 vomodules
="mpegpes(dvb) $vomodules"
4967 _noinputmodules
="dvb $_noinputmodules"
4968 def_dvb
='#undef CONFIG_DVB'
4969 def_dvbin
='#undef CONFIG_DVBIN '
4970 aomodules
="mpegpes(file) $aomodules"
4971 vomodules
="mpegpes(file) $vomodules"
4977 echocheck
"QuickTime"
4978 if test "$quicktime" = auto
; then
4980 #include <QuickTime/QuickTime.h>
4982 ImageDescription *desc;
4989 cc_check
-framework QuickTime
&& quicktime
=yes
4991 if test "$quicktime" = yes ; then
4992 extra_ldflags
="$extra_ldflags -framework QuickTime"
4993 def_quicktime
='#define CONFIG_QUICKTIME 1'
4995 def_quicktime
='#undef CONFIG_QUICKTIME'
5001 if test "$_quartz" = auto
; then
5003 #include <Carbon/Carbon.h>
5005 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
5010 cc_check
-framework Carbon
&& _quartz
=yes
5012 if test "$_quartz" = yes ; then
5013 libs_mplayer
="$libs_mplayer -framework Carbon"
5014 def_quartz
='#define CONFIG_QUARTZ 1'
5015 vomodules
="quartz $vomodules"
5017 def_quartz
='#undef CONFIG_QUARTZ'
5018 novomodules
="quartz $novomodules"
5022 echocheck
"CoreVideo"
5023 if test "$_corevideo" = auto
; then
5025 #include <Carbon/Carbon.h>
5026 #include <CoreServices/CoreServices.h>
5027 #include <OpenGL/OpenGL.h>
5028 #include <QuartzCore/CoreVideo.h>
5029 int main(void) { return 0; }
5032 cc_check
-framework Carbon
-framework Cocoa
-framework QuartzCore
-framework OpenGL
&& _corevideo
=yes
5034 if test "$_corevideo" = yes ; then
5035 vomodules
="corevideo $vomodules"
5036 libs_mplayer
="$libs_mplayer -framework Carbon -framework Cocoa -framework QuartzCore -framework OpenGL"
5037 def_corevideo
='#define CONFIG_COREVIDEO 1'
5039 novomodules
="corevideo $novomodules"
5040 def_corevideo
='#undef CONFIG_COREVIDEO'
5042 echores
"$_corevideo"
5047 echocheck
"PNG support"
5048 if test "$_png" = auto
; then
5051 # Don't check for -lpng on irix since it has its own libpng
5052 # incompatible with the GNU libpng
5053 res_comment
="disabled on irix (not GNU libpng)"
5059 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
5060 printf("libpng: %s\n", png_libpng_ver);
5061 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
5064 cc_check
-lpng -lz $_ld_lm && _png
=yes
5068 if test "$_png" = yes ; then
5069 def_png
='#define CONFIG_PNG 1'
5070 extra_ldflags
="$extra_ldflags -lpng -lz"
5072 def_png
='#undef CONFIG_PNG'
5075 echocheck
"MNG support"
5076 if test "$_mng" = auto
; then
5081 const char * p_ver = mng_version_text();
5082 return !p_ver || p_ver[0] == 0;
5085 if cc_check
-lmng -lz $_ld_lm ; then
5090 if test "$_mng" = yes ; then
5091 def_mng
='#define CONFIG_MNG 1'
5092 extra_ldflags
="$extra_ldflags -lmng -lz"
5094 def_mng
='#undef CONFIG_MNG'
5097 echocheck
"JPEG support"
5098 if test "$_jpeg" = auto
; then
5105 #include <jpeglib.h>
5106 int main(void) { return 0; }
5108 cc_check
-ljpeg $_ld_lm && _jpeg
=yes
5112 if test "$_jpeg" = yes ; then
5113 def_jpeg
='#define CONFIG_JPEG 1'
5114 vomodules
="jpeg $vomodules"
5115 extra_ldflags
="$extra_ldflags -ljpeg"
5117 def_jpeg
='#undef CONFIG_JPEG'
5118 novomodules
="jpeg $novomodules"
5122 echocheck
"OpenJPEG (JPEG2000) support"
5123 if test "$libopenjpeg" = auto
; then
5127 #include <openjpeg.h>
5128 int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
5130 cc_check
-lopenjpeg $_ld_lm && libopenjpeg
=yes
5132 echores
"$libopenjpeg"
5133 if test "$libopenjpeg" = yes ; then
5134 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 1'
5135 extra_ldflags
="$extra_ldflags -lopenjpeg"
5136 _libavdecoders
="$_libavdecoders LIBOPENJPEG_DECODER"
5137 _libavencoders
="$_libavencoders LIBOPENJPEG_ENCODER"
5138 codecmodules
="OpenJPEG $codecmodules"
5140 def_libopenjpeg
='#define CONFIG_LIBOPENJPEG 0'
5141 nocodecmodules
="OpenJPEG $nocodecmodules"
5145 echocheck
"PNM support"
5146 if test "$_pnm" = yes; then
5147 def_pnm
="#define CONFIG_PNM 1"
5148 vomodules
="pnm $vomodules"
5150 def_pnm
="#undef CONFIG_PNM"
5151 novomodules
="pnm $novomodules"
5157 echocheck
"GIF support"
5158 # This is to appease people who want to force gif support.
5159 # If it is forced to yes, then we still do checks to determine
5160 # which gif library to use.
5161 if test "$_gif" = yes ; then
5166 if test "$_gif" = auto
; then
5169 #include <gif_lib.h>
5170 int main(void) { return 0; }
5172 for _ld_gif
in "-lungif" "-lgif" ; do
5173 cc_check
$_ld_gif && _gif
=yes && break
5177 # If no library was found, and the user wants support forced,
5178 # then we force it on with libgif, as this is the safest
5179 # assumption IMHO. (libungif & libregif both create symbolic
5180 # links to libgif. We also assume that no x11 support is needed,
5181 # because if you are forcing this, then you _should_ know what
5182 # you are doing. [ Besides, package maintainers should never
5183 # have compiled x11 deps into libungif in the first place. ] )
5186 if test "$_force_gif" = yes && test "$_gif" = no
; then
5191 if test "$_gif" = yes ; then
5192 def_gif
='#define CONFIG_GIF 1'
5193 codecmodules
="gif $codecmodules"
5194 vomodules
="gif89a $vomodules"
5195 res_comment
="old version, some encoding functions disabled"
5196 def_gif_4
='#undef CONFIG_GIF_4'
5197 extra_ldflags
="$extra_ldflags $_ld_gif"
5201 #include <gif_lib.h>
5202 void catch() { exit(1); }
5204 signal(SIGSEGV, catch); // catch segfault
5205 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
5206 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
5210 if cc_check
"$_ld_gif" ; then
5211 def_gif_4
='#define CONFIG_GIF_4 1'
5215 def_gif
='#undef CONFIG_GIF'
5216 def_gif_4
='#undef CONFIG_GIF_4'
5217 novomodules
="gif89a $novomodules"
5218 nocodecmodules
="gif $nocodecmodules"
5223 case "$_gif" in yes*)
5224 echocheck
"broken giflib workaround"
5225 def_gif_tvt_hack
='#define CONFIG_GIF_TVT_HACK 1'
5228 #include <gif_lib.h>
5231 printf("UserData is at address %p\n", gif.UserData);
5235 if cc_check
"$_ld_gif" ; then
5236 def_gif_tvt_hack
='#undef CONFIG_GIF_TVT_HACK'
5245 echocheck
"VESA support"
5246 if test "$_vesa" = auto
; then
5249 int main(void) { vbeVersion(); return 0; }
5252 cc_check
-lvbe -llrmi && _vesa
=yes
5254 if test "$_vesa" = yes ; then
5255 def_vesa
='#define CONFIG_VESA 1'
5256 libs_mplayer
="$libs_mplayer -lvbe -llrmi"
5257 vomodules
="vesa $vomodules"
5259 def_vesa
='#undef CONFIG_VESA'
5260 novomodules
="vesa $novomodules"
5272 def_sdl_sdl_h
="#undef CONFIG_SDL_SDL_H"
5273 if test -z "$_sdlconfig" ; then
5274 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
5275 _sdlconfig
="sdl-config"
5276 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
5277 _sdlconfig
="sdl11-config"
5282 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
5284 #ifdef CONFIG_SDL_SDL_H
5285 #include <SDL/SDL.h>
5290 // we allow SDL hacking our main() only on OSX
5293 int main(int argc, char *argv[]) {
5294 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
5299 for _ld_tmp
in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do
5300 if cc_check
-DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then
5302 def_sdl_sdl_h
="#define CONFIG_SDL_SDL_H 1"
5306 if test "$_sdl" = no
&& "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
5307 res_comment
="using $_sdlconfig"
5309 _inc_tmp
="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)"
5310 _ld_tmp
="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)"
5312 _inc_tmp
=$
($_sdlconfig --cflags |
sed s
/-Dmain=SDL_main
//)
5313 _ld_tmp
=$
($_sdlconfig --libs |
sed -e s
/-mwindows// -e s
/-lmingw32//)
5315 _inc_tmp
="$($_sdlconfig --cflags)"
5316 _ld_tmp
="$($_sdlconfig --libs)"
5318 if cc_check
$_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
5323 if test "$_sdl" = yes ; then
5324 def_sdl
='#define CONFIG_SDL 1'
5325 extra_cflags
="$extra_cflags $_inc_tmp"
5326 libs_mplayer
="$libs_mplayer $_ld_tmp"
5327 vomodules
="sdl $vomodules"
5328 aomodules
="sdl $aomodules"
5330 def_sdl
='#undef CONFIG_SDL'
5331 novomodules
="sdl $novomodules"
5332 noaomodules
="sdl $noaomodules"
5337 # make sure this stays below CoreVideo to avoid issues due to namespace
5338 # conflicts between -lGL and -framework OpenGL
5340 #Note: this test is run even with --enable-gl since we autodetect linker flags
5341 if (test "$_x11" = yes ||
test "$_sdl" = yes || win32
) && test "$_gl" != no
; then
5344 #include <windows.h>
5346 #elif defined(GL_SDL)
5348 #ifdef CONFIG_SDL_SDL_H
5349 #include <SDL/SDL.h>
5354 // we allow SDL hacking our main() only on OSX
5359 #include <X11/Xlib.h>
5365 wglCreateContext(dc);
5366 #elif defined(GL_SDL)
5367 SDL_GL_SwapBuffers();
5369 glXCreateContext(NULL, NULL, NULL, True);
5376 for _ld_tmp
in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5377 if cc_check
$_ld_tmp $_ld_lm ; then
5380 libs_mplayer
="$libs_mplayer $_ld_tmp $_ld_dl"
5384 if cc_check
-DGL_WIN32 -lopengl32 ; then
5387 libs_mplayer
="$libs_mplayer -lopengl32 -lgdi32"
5389 # last so it can reuse any linker etc. flags detected before
5390 if test "$_sdl" = yes ; then
5391 if cc_check
-DGL_SDL ||
5392 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL ; then
5395 elif cc_check
-DGL_SDL -lGL ||
5396 cc_check
-DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then
5399 libs_mplayer
="$libs_mplayer -lGL"
5405 if test "$_gl" = yes ; then
5406 def_gl
='#define CONFIG_GL 1'
5407 res_comment
="backends:"
5408 if test "$_gl_win32" = yes ; then
5409 def_gl_win32
='#define CONFIG_GL_WIN32 1'
5410 res_comment
="$res_comment win32"
5412 if test "$_gl_x11" = yes ; then
5413 def_gl_x11
='#define CONFIG_GL_X11 1'
5414 res_comment
="$res_comment x11"
5416 if test "$_gl_sdl" = yes ; then
5417 def_gl_sdl
='#define CONFIG_GL_SDL 1'
5418 res_comment
="$res_comment sdl"
5420 vomodules
="opengl $vomodules"
5422 def_gl
='#undef CONFIG_GL'
5423 def_gl_win32
='#undef CONFIG_GL_WIN32'
5424 def_gl_x11
='#undef CONFIG_GL_X11'
5425 def_gl_sdl
='#undef CONFIG_GL_SDL'
5426 novomodules
="opengl $novomodules"
5431 echocheck
"MatrixView"
5432 if test "$_gl" = no
; then
5435 if test "$matrixview" = yes ; then
5436 vomodules
="matrixview $vomodules"
5437 def_matrixview
='#define CONFIG_MATRIXVIEW 1'
5439 novomodules
="matrixview $novomodules"
5440 def_matrixview
='#undef CONFIG_MATRIXVIEW'
5442 echores
"$matrixview"
5446 echocheck
"KVA (SNAP/WarpOverlay!/DIVE)"
5447 if test "$_kva" = auto
; then
5451 int main( void ) { return 0; }
5454 cc_check
-lkva && _kva
=yes
5456 if test "$_kva" = yes ; then
5457 def_kva
='#define CONFIG_KVA 1'
5458 libs_mplayer
="$libs_mplayer -lkva"
5459 vomodules
="kva $vomodules"
5461 def_kva
='#undef CONFIG_KVA'
5462 novomodules
="kva $novomodules"
5470 echocheck
"Windows waveout"
5471 if test "$_win32waveout" = auto
; then
5473 #include <windows.h>
5474 #include <mmsystem.h>
5475 int main(void) { return 0; }
5478 cc_check
-lwinmm && _win32waveout
=yes
5480 if test "$_win32waveout" = yes ; then
5481 def_win32waveout
='#define CONFIG_WIN32WAVEOUT 1'
5482 libs_mplayer
="$libs_mplayer -lwinmm"
5483 aomodules
="win32 $aomodules"
5485 def_win32waveout
='#undef CONFIG_WIN32WAVEOUT'
5486 noaomodules
="win32 $noaomodules"
5488 echores
"$_win32waveout"
5490 echocheck
"Direct3D"
5491 if test "$_direct3d" = auto
; then
5493 #include <windows.h>
5495 int main(void) { return 0; }
5498 cc_check
&& _direct3d
=yes
5500 if test "$_direct3d" = yes ; then
5501 def_direct3d
='#define CONFIG_DIRECT3D 1'
5502 vomodules
="direct3d $vomodules"
5504 def_direct3d
='#undef CONFIG_DIRECT3D'
5505 novomodules
="direct3d $novomodules"
5507 echores
"$_direct3d"
5510 if test "$_directx" = auto
; then
5512 #include <windows.h>
5515 int main(void) { return 0; }
5518 cc_check
-lgdi32 && _directx
=yes
5520 if test "$_directx" = yes ; then
5521 def_directx
='#define CONFIG_DIRECTX 1'
5522 libs_mplayer
="$libs_mplayer -lgdi32"
5523 vomodules
="directx $vomodules"
5524 aomodules
="dsound $aomodules"
5526 def_directx
='#undef CONFIG_DIRECTX'
5527 novomodules
="directx $novomodules"
5528 noaomodules
="dsound $noaomodules"
5536 if test "$_dxr2" = auto
; then
5539 #include <dxr2ioctl.h>
5540 int main(void) { return 0; }
5542 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
5543 cc_check
$_inc_tmp && _dxr2
=yes && \
5544 extra_cflags
="$extra_cflags $_inc_tmp" && break
5547 if test "$_dxr2" = yes; then
5548 def_dxr2
='#define CONFIG_DXR2 1'
5549 aomodules
="dxr2 $aomodules"
5550 vomodules
="dxr2 $vomodules"
5552 def_dxr2
='#undef CONFIG_DXR2'
5553 noaomodules
="dxr2 $noaomodules"
5554 novomodules
="dxr2 $novomodules"
5559 if test "$_dxr3" = auto
; then
5561 #include <linux/em8300.h>
5562 int main(void) { return 0; }
5565 cc_check
&& _dxr3
=yes
5567 if test "$_dxr3" = yes ; then
5568 def_dxr3
='#define CONFIG_DXR3 1'
5569 vomodules
="dxr3 $vomodules"
5571 def_dxr3
='#undef CONFIG_DXR3'
5572 novomodules
="dxr3 $novomodules"
5577 echocheck
"IVTV TV-Out (pre linux-2.6.24)"
5578 if test "$_ivtv" = auto
; then
5581 #include <inttypes.h>
5582 #include <linux/types.h>
5583 #include <linux/videodev2.h>
5584 #include <linux/ivtv.h>
5585 #include <sys/ioctl.h>
5587 struct ivtv_cfg_stop_decode sd;
5588 struct ivtv_cfg_start_decode sd1;
5589 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5590 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5594 cc_check
&& _ivtv
=yes
5596 if test "$_ivtv" = yes ; then
5597 def_ivtv
='#define CONFIG_IVTV 1'
5598 vomodules
="ivtv $vomodules"
5599 aomodules
="ivtv $aomodules"
5601 def_ivtv
='#undef CONFIG_IVTV'
5602 novomodules
="ivtv $novomodules"
5603 noaomodules
="ivtv $noaomodules"
5608 echocheck
"V4L2 MPEG Decoder"
5609 if test "$_v4l2" = auto
; then
5612 #include <inttypes.h>
5613 #include <linux/types.h>
5614 #include <linux/videodev2.h>
5615 #include <linux/version.h>
5617 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
5618 #error kernel headers too old, need 2.6.22
5620 struct v4l2_ext_controls ctrls;
5621 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
5626 cc_check
&& _v4l2
=yes
5628 if test "$_v4l2" = yes ; then
5629 def_v4l2
='#define CONFIG_V4L2_DECODER 1'
5630 vomodules
="v4l2 $vomodules"
5631 aomodules
="v4l2 $aomodules"
5633 def_v4l2
='#undef CONFIG_V4L2_DECODER'
5634 novomodules
="v4l2 $novomodules"
5635 noaomodules
="v4l2 $noaomodules"
5646 echocheck
"OSS Audio"
5647 if test "$_ossaudio" = auto
; then
5649 #include <sys/ioctl.h>
5650 #include <$_soundcard_header>
5651 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5654 cc_check
&& _ossaudio
=yes
5656 if test "$_ossaudio" = yes ; then
5657 def_ossaudio
='#define CONFIG_OSS_AUDIO 1'
5658 aomodules
="oss $aomodules"
5659 if test "$_linux_devfs" = yes; then
5660 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5661 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5664 #include <sys/ioctl.h>
5665 #include <$_soundcard_header>
5666 #ifdef OPEN_SOUND_SYSTEM
5667 int main(void) { return 0; }
5669 #error Not the real thing
5673 cc_check
&& _real_ossaudio
=yes
5674 if test "$_real_ossaudio" = yes; then
5675 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5676 elif netbsd || openbsd
; then
5677 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5678 extra_ldflags
="$extra_ldflags -lossaudio"
5680 def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5682 def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5685 def_ossaudio
='#undef CONFIG_OSS_AUDIO'
5686 def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5687 def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5688 noaomodules
="oss $noaomodules"
5690 echores
"$_ossaudio"
5694 if test "$_arts" = auto
; then
5696 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5700 int main(void) { return 0; }
5702 cc_check $
(artsc-config
--libs) $
(artsc-config
--cflags) && _arts
=yes
5707 if test "$_arts" = yes ; then
5708 def_arts
='#define CONFIG_ARTS 1'
5709 aomodules
="arts $aomodules"
5710 libs_mplayer
="$libs_mplayer $(artsc-config --libs)"
5711 extra_cflags
="$extra_cflags $(artsc-config --cflags)"
5713 noaomodules
="arts $noaomodules"
5719 if test "$_esd" = auto
; then
5721 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5725 int main(void) { int fd = esd_open_sound("test"); return fd; }
5727 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd
=yes
5733 if test "$_esd" = yes ; then
5734 def_esd
='#define CONFIG_ESD 1'
5735 aomodules
="esd $aomodules"
5736 libs_mplayer
="$libs_mplayer $(esd-config --libs)"
5737 extra_cflags
="$extra_cflags $(esd-config --cflags)"
5739 echocheck
"esd_get_latency()"
5742 int main(void) { return esd_get_latency(0); }
5744 cc_check $
(esd-config
--libs) $
(esd-config
--cflags) && _esd_latency
=yes && def_esd_latency
='#define CONFIG_ESD_LATENCY 1'
5745 echores
"$_esd_latency"
5747 def_esd
='#undef CONFIG_ESD'
5748 def_esd_latency
='#undef CONFIG_ESD_LATENCY'
5749 noaomodules
="esd $noaomodules"
5754 if test "$_nas" = auto
; then
5756 #include <audio/audiolib.h>
5757 int main(void) { return 0; }
5760 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
5762 if test "$_nas" = yes ; then
5763 def_nas
='#define CONFIG_NAS 1'
5764 libs_mplayer
="$libs_mplayer -laudio -lXt"
5765 aomodules
="nas $aomodules"
5767 noaomodules
="nas $noaomodules"
5768 def_nas
='#undef CONFIG_NAS'
5774 if test "$_pulse" = auto
; then
5776 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5779 #include <pulse/pulseaudio.h>
5780 int main(void) { return 0; }
5782 cc_check $
($_pkg_config --libs --cflags libpulse
) && _pulse
=yes
5788 if test "$_pulse" = yes ; then
5789 def_pulse
='#define CONFIG_PULSE 1'
5790 aomodules
="pulse $aomodules"
5791 libs_mplayer
="$libs_mplayer $($_pkg_config --libs libpulse)"
5792 extra_cflags
="$extra_cflags $($_pkg_config --cflags libpulse)"
5794 def_pulse
='#undef CONFIG_PULSE'
5795 noaomodules
="pulse $noaomodules"
5800 if test "$_jack" = auto
; then
5804 #include <jack/jack.h>
5805 int main(void) { jack_client_open("test", JackUseExactName, NULL); return 0; }
5807 if cc_check
-ljack ; then
5808 libs_mplayer
="$libs_mplayer -ljack"
5809 elif cc_check $
($_pkg_config --libs --cflags --silence-errors jack
) ; then
5810 libs_mplayer
="$libs_mplayer $($_pkg_config --libs jack)"
5811 extra_cflags
="$extra_cflags "$
($_pkg_config --cflags jack
)""
5817 if test "$_jack" = yes ; then
5818 def_jack
='#define CONFIG_JACK 1'
5819 aomodules
="jack $aomodules"
5821 noaomodules
="jack $noaomodules"
5826 if test "$_openal" = auto
; then
5830 #include <OpenAL/al.h>
5835 alSourceQueueBuffers(0, 0, 0);
5836 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5840 for I
in "-lopenal" "-lopenal32" "-framework OpenAL" ; do
5841 cc_check
$I && _openal
=yes && break
5842 cc_check
-DOPENAL_AL_H=1 $I && def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5844 test "$_openal" = yes && libs_mplayer
="$libs_mplayer $I"
5846 if test "$_openal" = yes ; then
5847 def_openal
='#define CONFIG_OPENAL 1'
5848 aomodules
="openal $aomodules"
5850 noaomodules
="openal $noaomodules"
5854 echocheck
"ALSA audio"
5855 if test "$_alloca" != yes ; then
5857 res_comment
="alloca missing"
5859 if test "$_alsa" != no
; then
5862 #include <sys/time.h>
5863 #include <sys/asoundlib.h>
5864 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5865 #error "alsa version != 0.5.x"
5867 int main(void) { return 0; }
5869 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5872 #include <sys/time.h>
5873 #include <sys/asoundlib.h>
5874 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5875 #error "alsa version != 0.9.x"
5877 int main(void) { return 0; }
5879 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5881 #include <sys/time.h>
5882 #include <alsa/asoundlib.h>
5883 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5884 #error "alsa version != 0.9.x"
5886 int main(void) { return 0; }
5888 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5891 #include <sys/time.h>
5892 #include <sys/asoundlib.h>
5893 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5894 #error "alsa version != 1.0.x"
5896 int main(void) { return 0; }
5898 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5900 #include <sys/time.h>
5901 #include <alsa/asoundlib.h>
5902 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5903 #error "alsa version != 1.0.x"
5905 int main(void) { return 0; }
5907 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5909 def_alsa
='#undef CONFIG_ALSA'
5910 def_alsa5
='#undef CONFIG_ALSA5'
5911 def_alsa9
='#undef CONFIG_ALSA9'
5912 def_alsa1x
='#undef CONFIG_ALSA1X'
5913 def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5914 def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5915 if test "$_alsaver" ; then
5917 if test "$_alsaver" = '0.5.x' ; then
5919 aomodules
="alsa5 $aomodules"
5920 def_alsa5
='#define CONFIG_ALSA5 1'
5921 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5922 res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5923 elif test "$_alsaver" = '0.9.x-sys' ; then
5925 aomodules
="alsa $aomodules"
5926 def_alsa
='#define CONFIG_ALSA 1'
5927 def_alsa9
='#define CONFIG_ALSA9 1'
5928 def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5929 res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5930 elif test "$_alsaver" = '0.9.x-alsa' ; then
5932 aomodules
="alsa $aomodules"
5933 def_alsa
='#define CONFIG_ALSA 1'
5934 def_alsa9
='#define CONFIG_ALSA9 1'
5935 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5936 res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5937 elif test "$_alsaver" = '1.0.x-sys' ; then
5939 aomodules
="alsa $aomodules"
5940 def_alsa
='#define CONFIG_ALSA 1'
5941 def_alsa1x
="#define CONFIG_ALSA1X 1"
5942 def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5943 res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5944 elif test "$_alsaver" = '1.0.x-alsa' ; then
5946 aomodules
="alsa $aomodules"
5947 def_alsa
='#define CONFIG_ALSA 1'
5948 def_alsa1x
="#define CONFIG_ALSA1X 1"
5949 def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5950 res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5953 res_comment
="unknown version"
5955 extra_ldflags
="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
5957 noaomodules
="alsa $noaomodules"
5962 echocheck
"Sun audio"
5963 if test "$_sunaudio" = auto
; then
5965 #include <sys/types.h>
5966 #include <sys/audioio.h>
5967 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5970 cc_check
&& _sunaudio
=yes
5972 if test "$_sunaudio" = yes ; then
5973 def_sunaudio
='#define CONFIG_SUN_AUDIO 1'
5974 aomodules
="sun $aomodules"
5976 def_sunaudio
='#undef CONFIG_SUN_AUDIO'
5977 noaomodules
="sun $noaomodules"
5979 echores
"$_sunaudio"
5982 def_mlib
='#define CONFIG_MLIB 0'
5984 echocheck
"Sun mediaLib"
5985 if test "$_mlib" = auto
; then
5989 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5991 cc_check
-lmlib && _mlib
=yes && def_mlib
='#define CONFIG_MLIB 1'
5998 echocheck
"CoreAudio"
5999 if test "$_coreaudio" = auto
; then
6001 #include <CoreAudio/CoreAudio.h>
6002 #include <AudioToolbox/AudioToolbox.h>
6003 #include <AudioUnit/AudioUnit.h>
6004 int main(void) { return 0; }
6007 cc_check
-framework CoreAudio
-framework AudioUnit
-framework AudioToolbox
&& _coreaudio
=yes
6009 if test "$_coreaudio" = yes ; then
6010 libs_mplayer
="$libs_mplayer -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
6011 def_coreaudio
='#define CONFIG_COREAUDIO 1'
6012 aomodules
="coreaudio $aomodules"
6014 def_coreaudio
='#undef CONFIG_COREAUDIO'
6015 noaomodules
="coreaudio $noaomodules"
6022 echocheck
"SGI audio"
6023 if test "$_sgiaudio" = auto
; then
6024 # check for SGI audio
6026 #include <dmedia/audio.h>
6027 int main(void) { return 0; }
6030 cc_check
&& _sgiaudio
=yes
6032 if test "$_sgiaudio" = "yes" ; then
6033 def_sgiaudio
='#define CONFIG_SGI_AUDIO 1'
6034 libs_mplayer
="$libs_mplayer -laudio"
6035 aomodules
="sgi $aomodules"
6037 def_sgiaudio
='#undef CONFIG_SGI_AUDIO'
6038 noaomodules
="sgi $noaomodules"
6040 echores
"$_sgiaudio"
6045 echocheck
"KAI (UNIAUD/DART)"
6046 if test "$_kai" = auto
; then
6050 int main(void) { return 0; }
6053 cc_check
-lkai && _kai
=yes
6055 if test "$_kai" = yes ; then
6056 def_kai
='#define CONFIG_KAI 1'
6057 libs_mplayer
="$libs_mplayer -lkai"
6058 aomodules
="kai $aomodules"
6060 def_kai
='#undef CONFIG_KAI'
6061 noaomodules
="kai $noaomodules"
6066 if test "$_dart" = auto
; then
6070 int main( void ) { return 0; }
6073 cc_check
-ldart && _dart
=yes
6075 if test "$_dart" = yes ; then
6076 def_dart
='#define CONFIG_DART 1'
6077 libs_mplayer
="$libs_mplayer -ldart"
6078 aomodules
="dart $aomodules"
6080 def_dart
='#undef CONFIG_DART'
6081 noaomodules
="dart $noaomodules"
6087 # set default CD/DVD devices
6088 if win32 || os2
; then
6089 default_cdrom_device
="D:"
6091 default_cdrom_device
="/dev/disk1"
6092 elif dragonfly
; then
6093 default_cdrom_device
="/dev/cd0"
6095 default_cdrom_device
="/dev/acd0"
6097 default_cdrom_device
="/dev/rcd0a"
6099 default_cdrom_device
="/vol/dev/aliases/cdrom0"
6100 # Modern Solaris versions use HAL instead of the vold daemon, the volfs
6101 # file system and the volfs service.
6102 test -r "/cdrom/cdrom0" && default_cdrom_device
="/cdrom/cdrom0"
6104 default_cdrom_device
="a1ide.device:2"
6106 default_cdrom_device
="/dev/cdrom"
6109 if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos
; then
6110 default_dvd_device
=$default_cdrom_device
6112 default_dvd_device
="/dev/rdiskN"
6114 default_dvd_device
="/dev/dvd"
6118 echocheck
"VCD support"
6119 if test "$_vcd" = auto
; then
6121 if linux || freebsd || netbsd || openbsd || dragonfly || bsdos || darwin || sunos || os2
; then
6125 #include <ddk/ntddcdrm.h>
6126 int main(void) { return 0; }
6128 cc_check
&& _vcd
=yes
6131 if test "$_vcd" = yes; then
6132 inputmodules
="vcd $inputmodules"
6133 def_vcd
='#define CONFIG_VCD 1'
6135 def_vcd
='#undef CONFIG_VCD'
6136 _noinputmodules
="vcd $_noinputmodules"
6137 res_comment
="not supported on this OS"
6144 if test "$_dvdread_internal" = auto
; then
6145 _dvdread_internal
=no
6147 if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux
) \
6148 && (test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
6149 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes) \
6150 || darwin || win32 || os2
; then
6151 _dvdread_internal
=yes
6153 extra_cflags
="-Ilibdvdread4 $extra_cflags"
6155 elif test "$_dvdread" = auto
; then
6157 if test "$_dl" = yes; then
6159 #include <inttypes.h>
6160 #include <dvdread/dvd_reader.h>
6161 #include <dvdread/ifo_types.h>
6162 #include <dvdread/ifo_read.h>
6163 #include <dvdread/nav_read.h>
6164 int main(void) { return 0; }
6166 _dvdreadcflags
=$
($_dvdreadconfig --cflags)
6167 _dvdreadlibs
=$
($_dvdreadconfig --libs)
6168 if cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
6169 $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
6171 extra_cflags
="$extra_cflags $_dvdreadcflags"
6172 extra_ldflags
="$extra_ldflags $_dvdreadlibs"
6173 res_comment
="external"
6178 if test "$_dvdread_internal" = yes; then
6179 def_dvdread
='#define CONFIG_DVDREAD 1'
6180 inputmodules
="dvdread(internal) $inputmodules"
6182 res_comment
="internal"
6183 elif test "$_dvdread" = yes; then
6184 def_dvdread
='#define CONFIG_DVDREAD 1'
6186 extra_ldflags
="$extra_ldflags -ldvdread"
6187 inputmodules
="dvdread(external) $inputmodules"
6188 res_comment
="external"
6190 def_dvdread
='#undef CONFIG_DVDREAD'
6191 _noinputmodules
="dvdread $_noinputmodules"
6196 echocheck
"internal libdvdcss"
6197 if test "$_libdvdcss_internal" = auto
; then
6198 _libdvdcss_internal
=no
6199 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
6200 hpux
&& test "$_hpux_scsi_h" = no
&& _libdvdcss_internal
=no
6202 if test "$_libdvdcss_internal" = yes ; then
6203 if linux || netbsd || openbsd || bsdos
; then
6204 def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
6205 openbsd
&& def_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
6206 elif freebsd || dragonfly
; then
6207 def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
6209 def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
6210 extra_ldflags
="$extra_ldflags -framework IOKit -framework Carbon"
6212 cflags_libdvdcss
="-DSYS_CYGWIN -DWIN32"
6214 cflags_libdvdcss
="-DSYS_BEOS"
6216 cflags_libdvdcss
="-DSYS_OS2"
6218 cflags_libdvdcss_dvdread
="-Ilibdvdcss"
6219 def_dvdcss
="#define HAVE_DVDCSS_DVDCSS_H 1"
6220 inputmodules
="libdvdcss(internal) $inputmodules"
6223 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
6225 echores
"$_libdvdcss_internal"
6228 echocheck
"cdparanoia"
6229 if test "$_cdparanoia" = auto
; then
6231 #include <cdda_interface.h>
6232 #include <cdda_paranoia.h>
6233 // This need a better test. How ?
6234 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
6237 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
6238 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
6239 _cdparanoia
=yes && extra_cflags
="$extra_cflags $_inc_tmp" && break
6242 if test "$_cdparanoia" = yes ; then
6244 extra_ldflags
="$extra_ldflags -lcdda_interface -lcdda_paranoia"
6245 openbsd
&& extra_ldflags
="$extra_ldflags -lutil"
6247 echores
"$_cdparanoia"
6251 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
6254 #include <cdio/version.h>
6255 #include <cdio/cdda.h>
6256 #include <cdio/paranoia.h>
6258 void *test = cdda_verbose_set;
6259 printf("%s\n", CDIO_VERSION);
6260 return test == (void *)1;
6264 for _ld_tmp
in "" "-lwinmm" ; do
6265 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
6266 cc_check
$_ld_tmp $_ld_lm \
6267 && _libcdio
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6269 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
6270 _inc_tmp
=$
($_pkg_config --cflags libcdio_paranoia
)
6271 _ld_tmp
=$
($_pkg_config --libs libcdio_paranoia
)
6272 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
6273 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6276 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
6278 def_libcdio
='#define CONFIG_LIBCDIO 1'
6279 def_havelibcdio
='yes'
6281 if test "$_cdparanoia" = yes ; then
6282 res_comment
="using cdparanoia"
6284 def_libcdio
='#undef CONFIG_LIBCDIO'
6285 def_havelibcdio
='no'
6289 if test "$_cdda" = yes ; then
6290 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
6291 def_cdparanoia
='#define CONFIG_CDDA 1'
6292 inputmodules
="cdda $inputmodules"
6294 def_cdparanoia
='#undef CONFIG_CDDA'
6295 _noinputmodules
="cdda $_noinputmodules"
6298 if test "$_cddb" = yes ; then
6299 def_cddb
='#define CONFIG_CDDB 1'
6300 inputmodules
="cddb $inputmodules"
6303 def_cddb
='#undef CONFIG_CDDB'
6304 _noinputmodules
="cddb $_noinputmodules"
6307 echocheck
"bitmap font support"
6308 if test "$_bitmap_font" = yes ; then
6309 def_bitmap_font
="#define CONFIG_BITMAP_FONT 1"
6311 def_bitmap_font
="#undef CONFIG_BITMAP_FONT"
6313 echores
"$_bitmap_font"
6316 echocheck
"freetype >= 2.0.9"
6318 # freetype depends on iconv
6319 if test "$_iconv" = no
; then
6321 res_comment
="iconv support needed"
6324 if test "$_freetype" = auto
; then
6325 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
6328 #include <ft2build.h>
6329 #include FT_FREETYPE_H
6330 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
6331 #error "Need FreeType 2.0.9 or newer"
6335 FT_Int major=-1,minor=-1,patch=-1;
6336 int err=FT_Init_FreeType(&library);
6341 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _freetype
=yes
6346 if test "$_freetype" = yes ; then
6347 def_freetype
='#define CONFIG_FREETYPE 1'
6348 extra_cflags
="$extra_cflags $($_freetypeconfig --cflags)"
6349 extra_ldflags
="$extra_ldflags $($_freetypeconfig --libs)"
6351 def_freetype
='#undef CONFIG_FREETYPE'
6353 echores
"$_freetype"
6355 if test "$_freetype" = no
; then
6357 res_comment
="FreeType support needed"
6359 echocheck
"fontconfig"
6360 if test "$_fontconfig" = auto
; then
6364 #include <fontconfig/fontconfig.h>
6365 #if FC_VERSION < 20402
6366 #error At least version 2.4.2 of fontconfig required
6370 if (err == FcFalse) {
6371 printf("Couldn't initialize fontconfig lib\n");
6378 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
6379 _ld_tmp
="-lfontconfig $_ld_tmp"
6380 cc_check
$_ld_tmp && _fontconfig
=yes && extra_ldflags
="$extra_ldflags $_ld_tmp" && break
6382 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
6383 _inc_tmp
=$
($_pkg_config --cflags fontconfig
)
6384 _ld_tmp
=$
($_pkg_config --libs fontconfig
)
6385 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
6386 && extra_ldflags
="$extra_ldflags $_ld_tmp" && extra_cflags
="$extra_cflags $_inc_tmp"
6389 if test "$_fontconfig" = yes ; then
6390 def_fontconfig
='#define CONFIG_FONTCONFIG 1'
6392 def_fontconfig
='#undef CONFIG_FONTCONFIG'
6394 echores
"$_fontconfig"
6397 echocheck
"SSA/ASS support"
6398 # libass depends on FreeType
6399 if test "$_freetype" = no
; then
6402 res_comment
="FreeType support needed"
6405 if test "$_ass" = auto
; then
6407 #include <ft2build.h>
6408 #include FT_FREETYPE_H
6409 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 2) || ((FREETYPE_MINOR == 2) && (FREETYPE_PATCH < 1)))
6410 #error "Need FreeType 2.2.1 or newer"
6412 int main(void) { return 0; }
6415 cc_check $
($_freetypeconfig --cflags) $
($_freetypeconfig --libs) && _ass
=yes
6416 if test "$_ass" = no
; then
6418 res_comment
="FreeType >= 2.2.1 needed"
6419 elif test "$ass_internal" = no
; then
6420 res_comment
="external"
6421 extra_ldflags
="$extra_ldflags -lass"
6424 if test "$_ass" = yes ; then
6425 def_ass
='#define CONFIG_ASS 1'
6427 def_ass
='#undef CONFIG_ASS'
6429 if test "$ass_internal" = yes ; then
6430 def_ass_internal
='#define CONFIG_ASS_INTERNAL 1'
6432 def_ass_internal
='#undef CONFIG_ASS_INTERNAL'
6437 echocheck
"fribidi with charsets"
6440 if test "$_fribidi" = auto
; then
6444 /* workaround for fribidi 0.10.4 and below */
6445 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
6446 #include <fribidi/fribidi.h>
6448 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
6449 printf("Fribidi headers are not consistents with the library!\n");
6458 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6459 if $_pkg_config --exists fribidi
> /dev
/null
2>&1 &&
6460 test "$_fribidi" = no
; then
6461 _inc_tmp
="$($_pkg_config --cflags)"
6462 _ld_tmp
="$($_pkg_config --libs)"
6463 cc_check
$_inc_tmp $_ld_tmp && _fribidi
=yes
6466 if test "$_fribidi" = yes ; then
6467 def_fribidi
='#define CONFIG_FRIBIDI 1'
6468 extra_cflags
="$extra_cflags $_inc_tmp"
6469 extra_ldflags
="$extra_ldflags $_ld_tmp"
6471 def_fribidi
='#undef CONFIG_FRIBIDI'
6477 if test "$_enca" = auto
; then
6479 #include <sys/types.h>
6484 langs = enca_get_languages(&langcnt);
6489 cc_check
-lenca $_ld_lm && _enca
=yes
6491 if test "$_enca" = yes ; then
6492 def_enca
='#define CONFIG_ENCA 1'
6493 extra_ldflags
="$extra_ldflags -lenca"
6495 def_enca
='#undef CONFIG_ENCA'
6503 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
6506 cc_check
-lz && _zlib
=yes
6507 if test "$_zlib" = yes ; then
6508 def_zlib
='#define CONFIG_ZLIB 1'
6509 extra_ldflags
="$extra_ldflags -lz"
6511 def_zlib
='#define CONFIG_ZLIB 0'
6512 _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
//)
6513 _libavencoders
=$
(echo $_libavencoders |
sed -e s
/FLASHSV_ENCODER
// -e s
/PNG_ENCODER
// -e s
/ZMBV_ENCODER
// -e s
/ZLIB_ENCODER
//)
6520 def_bzlib
='#define CONFIG_BZLIB 0'
6523 int main(void) { BZ2_bzlibVersion(); return 0; }
6525 cc_check
-lbz2 && bzlib
=yes
6526 if test "$bzlib" = yes ; then
6527 def_bzlib
='#define CONFIG_BZLIB 1'
6528 extra_ldflags
="$extra_ldflags -lbz2"
6534 if test "$_rtc" = auto
; then
6536 #include <sys/ioctl.h>
6538 #include <linux/rtc.h>
6541 #define RTC_PIE_ON RTCIO_PIE_ON
6543 int main(void) { return RTC_PIE_ON; }
6546 cc_check
&& _rtc
=yes
6549 if test "$_rtc" = yes ; then
6550 def_rtc
='#define HAVE_RTC 1'
6552 def_rtc
='#undef HAVE_RTC'
6557 echocheck
"liblzo2 support"
6558 if test "$_liblzo" = auto
; then
6561 #include <lzo/lzo1x.h>
6562 int main(void) { lzo_init();return 0; }
6564 cc_check
-llzo2 && _liblzo
=yes
6566 if test "$_liblzo" = yes ; then
6567 def_liblzo
='#define CONFIG_LIBLZO 1'
6568 extra_ldflags
="$extra_ldflags -llzo2"
6569 codecmodules
="liblzo $codecmodules"
6571 def_liblzo
='#undef CONFIG_LIBLZO'
6572 nocodecmodules
="liblzo $nocodecmodules"
6577 echocheck
"mad support"
6578 if test "$_mad" = auto
; then
6582 int main(void) { return 0; }
6584 cc_check
-lmad && _mad
=yes
6586 if test "$_mad" = yes ; then
6587 def_mad
='#define CONFIG_LIBMAD 1'
6588 extra_ldflags
="$extra_ldflags -lmad"
6589 codecmodules
="libmad $codecmodules"
6591 def_mad
='#undef CONFIG_LIBMAD'
6592 nocodecmodules
="libmad $nocodecmodules"
6597 if test "$_twolame" = auto
; then
6599 #include <twolame.h>
6600 int main(void) { twolame_init(); return 0; }
6603 cc_check
-ltwolame $_ld_lm && _twolame
=yes
6605 if test "$_twolame" = yes ; then
6606 def_twolame
='#define CONFIG_TWOLAME 1'
6607 libs_mencoder
="$libs_mencoder -ltwolame"
6608 codecmodules
="twolame $codecmodules"
6610 def_twolame
='#undef CONFIG_TWOLAME'
6611 nocodecmodules
="twolame $nocodecmodules"
6616 if test "$_toolame" = auto
; then
6618 if test "$_twolame" = yes ; then
6619 res_comment
="disabled by twolame"
6622 #include <toolame.h>
6623 int main(void) { toolame_init(); return 0; }
6625 cc_check
-ltoolame $_ld_lm && _toolame
=yes
6628 if test "$_toolame" = yes ; then
6629 def_toolame
='#define CONFIG_TOOLAME 1'
6630 libs_mencoder
="$libs_mencoder -ltoolame"
6631 codecmodules
="toolame $codecmodules"
6633 def_toolame
='#undef CONFIG_TOOLAME'
6634 nocodecmodules
="toolame $nocodecmodules"
6636 if test "$_toolamedir" ; then
6637 res_comment
="using $_toolamedir"
6641 echocheck
"OggVorbis support"
6642 if test "$_tremor_internal" = yes; then
6644 elif test "$_tremor" = auto
; then
6647 #include <tremor/ivorbiscodec.h>
6648 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6650 cc_check
-logg -lvorbisidec $_ld_lm && _tremor
=yes && _libvorbis
=no
6652 if test "$_libvorbis" = auto
; then
6655 #include <vorbis/codec.h>
6656 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
6658 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
6660 if test "$_tremor_internal" = yes ; then
6662 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6663 def_tremor
='#define CONFIG_TREMOR 1'
6664 codecmodules
="tremor(internal) $codecmodules"
6665 res_comment
="internal Tremor"
6666 if test "$_tremor_low" = yes ; then
6667 cflags_tremor_low
="-D_LOW_ACCURACY_"
6668 res_comment
="internal low accuracy Tremor"
6670 elif test "$_tremor" = yes ; then
6672 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6673 def_tremor
='#define CONFIG_TREMOR 1'
6674 codecmodules
="tremor(external) $codecmodules"
6675 res_comment
="external Tremor"
6676 extra_ldflags
="$extra_ldflags -logg -lvorbisidec"
6677 elif test "$_libvorbis" = yes ; then
6679 def_vorbis
='#define CONFIG_OGGVORBIS 1'
6680 codecmodules
="libvorbis $codecmodules"
6681 res_comment
="libvorbis"
6682 extra_ldflags
="$extra_ldflags -lvorbis -logg"
6685 nocodecmodules
="libvorbis $nocodecmodules"
6689 echocheck
"libspeex (version >= 1.1 required)"
6690 if test "$_speex" = auto
; then
6693 #include <speex/speex.h>
6694 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); return 0; }
6696 cc_check
-lspeex $_ld_lm && _speex
=yes
6698 if test "$_speex" = yes ; then
6699 def_speex
='#define CONFIG_SPEEX 1'
6700 extra_ldflags
="$extra_ldflags -lspeex"
6701 codecmodules
="speex $codecmodules"
6703 def_speex
='#undef CONFIG_SPEEX'
6704 nocodecmodules
="speex $nocodecmodules"
6708 echocheck
"OggTheora support"
6709 if test "$_theora" = auto
; then
6712 #include <theora/theora.h>
6715 /* Theora is in flux, make sure that all interface routines and datatypes
6716 * exist and work the way we expect it, so we don't break MPlayer. */
6725 theora_info_init(&inf);
6726 theora_comment_init(&tc);
6730 /* we don't want to execute this kind of nonsense; just for making sure
6731 * that compilation works... */
6732 memset(&op, 0, sizeof(op));
6733 r = theora_decode_header(&inf, &tc, &op);
6734 r = theora_decode_init(&st, &inf);
6735 t = theora_granule_time(&st, op.granulepos);
6736 r = theora_decode_packetin(&st, &op);
6737 r = theora_decode_YUVout(&st, &yuv);
6743 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6744 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6745 cc_check
$_inc_theora $_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" &&
6746 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6747 if test _theora
= no
; then
6748 _ld_theora
="-ltheora -logg"
6749 cc_check
$_ld_theora && extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6751 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
6752 _ld_theora
=$
($_pkg_config --silence-errors --libs theora
)
6753 _inc_theora
=$
($_pkg_config --silence-errors --cflags theora
)
6754 cc_check tremor
/bitwise.c
$_inc_theora $_ld_theora &&
6755 extra_ldflags
="$extra_ldflags $_ld_theora" &&
6756 extra_cflags
="$extra_cflags $_inc_theora" && _theora
=yes
6757 if test _theora
= no
; then
6758 _ld_theora
="-ltheora -logg"
6759 cc_check tremor
/bitwise.c
$_ld_theora &&
6760 extra_ldflags
="$extra_ldflags $_ld_theora" && _theora
=yes
6764 if test "$_theora" = yes ; then
6765 def_theora
='#define CONFIG_OGGTHEORA 1'
6766 codecmodules
="libtheora $codecmodules"
6767 # when --enable-theora is forced, we'd better provide a probably sane
6768 # $_ld_theora than nothing
6769 test -z "$_ld_theora" && extra_ldflags
="$extra_ldflags -ltheora -logg"
6771 def_theora
='#undef CONFIG_OGGTHEORA'
6772 nocodecmodules
="libtheora $nocodecmodules"
6776 echocheck
"mp3lib support"
6777 if test "$_mp3lib" = auto
; then
6778 test "$cc_vendor" = intel
&& test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib
=no || _mp3lib
=yes
6780 if test "$_mp3lib" = yes ; then
6781 def_mp3lib
='#define CONFIG_MP3LIB 1'
6782 codecmodules
="mp3lib(internal) $codecmodules"
6784 def_mp3lib
='#undef CONFIG_MP3LIB'
6785 nocodecmodules
="mp3lib(internal) $nocodecmodules"
6789 echocheck
"liba52 support"
6790 def_liba52
='#undef CONFIG_LIBA52'
6791 if test "$_liba52" = auto
; then
6794 #include <inttypes.h>
6795 #include <a52dec/a52.h>
6796 int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
6798 cc_check
-la52 && _liba52
=yes && extra_ldflags
="$extra_ldflags -la52"
6800 if test "$_liba52" = yes ; then
6801 def_liba52
='#define CONFIG_LIBA52 1'
6802 codecmodules
="liba52 $codecmodules"
6804 nocodecmodules
="liba52 $nocodecmodules"
6808 echocheck
"internal libmpeg2 support"
6809 if test "$_libmpeg2" = auto
; then
6811 if alpha
&& test cc_vendor
=gnu
; then
6813 2*|
3.0*|
3.1*) # cannot compile MVI instructions
6815 res_comment
="broken gcc"
6820 if test "$_libmpeg2" = yes ; then
6821 def_libmpeg2
='#define CONFIG_LIBMPEG2 1'
6822 codecmodules
="libmpeg2(internal) $codecmodules"
6824 def_libmpeg2
='#undef CONFIG_LIBMPEG2'
6825 nocodecmodules
="libmpeg2(internal) $nocodecmodules"
6827 echores
"$_libmpeg2"
6829 echocheck
"libdca support"
6830 if test "$_libdca" = auto
; then
6833 #include <inttypes.h>
6835 int main(void) { dts_init(0); return 0; }
6837 for _ld_dca
in -ldca -ldts ; do
6838 cc_check
$_ld_dca $_ld_lm && extra_ldflags
="$extra_ldflags $_ld_dca" \
6839 && _libdca
=yes && break
6842 if test "$_libdca" = yes ; then
6843 def_libdca
='#define CONFIG_LIBDCA 1'
6844 codecmodules
="libdca $codecmodules"
6846 def_libdca
='#undef CONFIG_LIBDCA'
6847 nocodecmodules
="libdca $nocodecmodules"
6851 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6852 if test "$_musepack" = auto
; then
6856 #include <mpcdec/mpcdec.h>
6858 mpc_streaminfo info;
6859 mpc_decoder decoder;
6860 mpc_decoder_set_streaminfo(&decoder, &info);
6861 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6865 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6867 if test "$_musepack" = yes ; then
6868 def_musepack
='#define CONFIG_MUSEPACK 1'
6869 extra_ldflags
="$extra_ldflags -lmpcdec"
6870 codecmodules
="musepack $codecmodules"
6872 def_musepack
='#undef CONFIG_MUSEPACK'
6873 nocodecmodules
="musepack $nocodecmodules"
6875 echores
"$_musepack"
6878 echocheck
"FAAC support"
6879 if test "$_faac" = auto
; then
6881 #include <inttypes.h>
6883 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6886 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6887 cc_check
$_ld_faac $_ld_lm && libs_mencoder
="$libs_mencoder $_ld_faac" && _faac
=yes && break
6890 if test "$_faac" = yes ; then
6891 def_faac
="#define CONFIG_FAAC 1"
6892 test "$_faac_lavc" = auto
&& _faac_lavc
=yes
6893 if test "$_faac_lavc" = yes ; then
6894 def_faac_lavc
="#define CONFIG_LIBFAAC 1"
6895 libs_mplayer
="$libs_mplayer $_ld_faac"
6896 _libavencoders
="$_libavencoders LIBFAAC_ENCODER"
6898 codecmodules
="faac $codecmodules"
6901 def_faac
="#undef CONFIG_FAAC"
6902 def_faac_lavc
="#define CONFIG_LIBFAAC 0"
6903 nocodecmodules
="faac $nocodecmodules"
6905 res_comment
="in libavcodec: $_faac_lavc"
6909 echocheck
"FAAD2 support"
6910 if test "$_faad_internal" = auto
; then
6911 if x86_32
&& test cc_vendor
=gnu
; then
6913 3.1*|
3.2) # ICE/insn with these versions
6915 res_comment
="broken gcc"
6927 if test "$_faad" = auto
; then
6930 #ifndef FAAD_MIN_STREAMSIZE
6931 #error Too old version
6933 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6934 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6936 cc_check
-lfaad $_ld_lm && _faad
=yes
6939 def_faad
='#undef CONFIG_FAAD'
6940 def_faad_internal
="#undef CONFIG_FAAD_INTERNAL"
6941 if test "$_faad_internal" = yes ; then
6942 def_faad_internal
="#define CONFIG_FAAD_INTERNAL 1"
6943 res_comment
="internal floating-point"
6944 if test "$_faad_fixed" = yes ; then
6945 # The FIXED_POINT implementation of FAAD2 improves performance
6946 # on some platforms, especially for SBR files.
6947 cflags_faad_fixed
="-DFIXED_POINT"
6948 res_comment
="internal fixed-point"
6950 elif test "$_faad" = yes ; then
6951 extra_ldflags
="$extra_ldflags -lfaad"
6954 if test "$_faad" = yes ; then
6955 def_faad
='#define CONFIG_FAAD 1'
6956 if test "$_faad_internal" = yes ; then
6957 codecmodules
="faad2(internal) $codecmodules"
6959 codecmodules
="faad2 $codecmodules"
6963 nocodecmodules
="faad2 $nocodecmodules"
6968 echocheck
"LADSPA plugin support"
6969 if test "$_ladspa" = auto
; then
6974 const LADSPA_Descriptor *ld = NULL;
6979 cc_check
&& _ladspa
=yes
6981 if test "$_ladspa" = yes; then
6982 def_ladspa
="#define CONFIG_LADSPA 1"
6984 def_ladspa
="#undef CONFIG_LADSPA"
6989 echocheck
"libbs2b audio filter support"
6990 if test "$_libbs2b" = auto
; then
6993 #if BS2B_VERSION_MAJOR < 3
6994 #error Please use libbs2b >= 3.0.0, older versions are not supported.
7004 if $_pkg_config --exists libbs2b
; then
7005 _inc_tmp
=$
($_pkg_config --cflags libbs2b
)
7006 _ld_tmp
=$
($_pkg_config --libs libbs2b
)
7007 cc_check
$_inc_tmp $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" &&
7008 extra_cflags
="$extra_cflags $_inc_tmp" && _libbs2b
=yes
7010 for _inc_tmp
in "" -I/usr
/include
/bs2b
-I/usr
/local
/include \
7011 -I/usr
/local
/include
/bs2b
; do
7012 if cc_check
$_inc_tmp $_ld_lm -lbs2b ; then
7013 extra_ldflags
="$extra_ldflags -lbs2b"
7014 extra_cflags
="$extra_cflags $_inc_tmp"
7021 def_libbs2b
="#undef CONFIG_LIBBS2B"
7022 test "$_libbs2b" = yes && def_libbs2b
="#define CONFIG_LIBBS2B 1"
7026 if test -z "$_codecsdir" ; then
7027 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
7028 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
7029 if test -d "$dir" ; then
7035 # Fall back on default directory.
7036 if test -z "$_codecsdir" ; then
7037 _codecsdir
="$_libdir/codecs"
7038 mingw32 || os2
&& _codecsdir
="codecs"
7042 echocheck
"Win32 codecs"
7043 if test "$_win32dll" = auto
; then
7045 if x86_32
&& ! qnx
; then
7049 if test "$_win32dll" = yes ; then
7050 def_win32dll
='#define CONFIG_WIN32DLL 1'
7052 def_win32_loader
='#define WIN32_LOADER 1'
7053 _win32_emulation
=yes
7055 extra_ldflags
="$extra_ldflags -ladvapi32 -lole32"
7056 res_comment
="using native windows"
7058 codecmodules
="win32 $codecmodules"
7060 def_win32dll
='#undef CONFIG_WIN32DLL'
7061 def_win32_loader
='#undef WIN32_LOADER'
7062 nocodecmodules
="win32 $nocodecmodules"
7064 echores
"$_win32dll"
7067 echocheck
"XAnim codecs"
7068 if test "$_xanim" = auto
; then
7070 res_comment
="dynamic loader support needed"
7071 if test "$_dl" = yes ; then
7075 if test "$_xanim" = yes ; then
7076 def_xanim
='#define CONFIG_XANIM 1'
7077 codecmodules
="xanim $codecmodules"
7079 def_xanim
='#undef CONFIG_XANIM'
7080 nocodecmodules
="xanim $nocodecmodules"
7085 echocheck
"RealPlayer codecs"
7086 if test "$_real" = auto
; then
7088 res_comment
="dynamic loader support needed"
7089 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
7090 (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2
) ; then
7094 if test "$_real" = yes ; then
7095 def_real
='#define CONFIG_REALCODECS 1'
7096 codecmodules
="real $codecmodules"
7098 def_real
='#undef CONFIG_REALCODECS'
7099 nocodecmodules
="real $nocodecmodules"
7104 echocheck
"QuickTime codecs"
7106 def_qtx_win32
='#undef CONFIG_QTX_CODECS_WIN32'
7107 if test "$_qtx" = auto
; then
7108 test "$_win32dll" = yes ||
test "$quicktime" = yes && _qtx
=yes
7110 if test "$_qtx" = yes ; then
7111 def_qtx
='#define CONFIG_QTX_CODECS 1'
7112 win32
&& _qtx_codecs_win32
=yes && def_qtx_win32
='#define CONFIG_QTX_CODECS_WIN32 1'
7113 codecmodules
="qtx $codecmodules"
7114 darwin || win32 || _qtx_emulation
=yes
7116 def_qtx
='#undef CONFIG_QTX_CODECS'
7117 nocodecmodules
="qtx $nocodecmodules"
7121 echocheck
"Nemesi Streaming Media libraries"
7122 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
7124 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
7125 extra_cflags
="$extra_cflags $($_pkg_config --cflags libnemesi)"
7126 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libnemesi)"
7130 if test "$_nemesi" = yes; then
7132 def_nemesi
='#define CONFIG_LIBNEMESI 1'
7133 inputmodules
="nemesi $inputmodules"
7135 _native_rtsp
="$_network"
7137 def_nemesi
='#undef CONFIG_LIBNEMESI'
7138 _noinputmodules
="nemesi $_noinputmodules"
7142 echocheck
"LIVE555 Streaming Media libraries"
7143 if test "$_live" = auto
&& test "$_network" = yes ; then
7144 cat > $TMPCPP << EOF
7145 #include <liveMedia.hh>
7146 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
7147 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
7149 int main(void) { return 0; }
7153 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
7154 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
7155 $I/groupsock
/include
&& _livelibdir
=$
(echo $I|
sed s
/-I//) && \
7156 extra_ldflags
="$_livelibdir/liveMedia/libliveMedia.a \
7157 $_livelibdir/groupsock/libgroupsock.a \
7158 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
7159 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
7160 $extra_ldflags -lstdc++" \
7161 extra_cxxflags
="-I$_livelibdir/liveMedia/include \
7162 -I$_livelibdir/UsageEnvironment/include \
7163 -I$_livelibdir/BasicUsageEnvironment/include \
7164 -I$_livelibdir/groupsock/include" && \
7167 if test "$_live" != yes ; then
7168 ld_tmp
="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
7169 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
$ld_tmp; then
7174 if test "$_live" = yes && test "$_network" = yes; then
7175 test $_livelibdir && res_comment
="using $_livelibdir"
7176 def_live
='#define CONFIG_LIVE555 1'
7177 inputmodules
="live555 $inputmodules"
7178 elif test "$_live_dist" = yes && test "$_network" = yes; then
7179 res_comment
="using distribution version"
7181 def_live
='#define CONFIG_LIVE555 1'
7182 extra_ldflags
="$extra_ldflags $ld_tmp"
7183 extra_cxxflags
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
7184 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
7185 inputmodules
="live555 $inputmodules"
7188 def_live
='#undef CONFIG_LIVE555'
7189 _noinputmodules
="live555 $_noinputmodules"
7194 echocheck
"FFmpeg libavutil"
7195 if test "$_libavutil_a" = auto
; then
7196 if test -d libavutil
; then
7198 res_comment
="static"
7200 die
"MPlayer will not compile without libavutil in the source tree."
7202 elif test "$_libavutil_so" = auto
; then
7205 #include <libavutil/common.h>
7206 int main(void) { av_clip(1, 1, 1); return 0; }
7208 if $_pkg_config --exists libavutil
; then
7209 _inc_libavutil
=$
($_pkg_config --cflags libavutil
)
7210 _ld_tmp
=$
($_pkg_config --libs libavutil
)
7211 cc_check
$_inc_libavutil $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7212 && _libavutil_so
=yes
7213 elif cc_check
-lavutil $_ld_lm ; then
7214 extra_ldflags
="$extra_ldflags -lavutil"
7216 res_comment
="using libavutil.so, but static libavutil is recommended"
7220 def_libavutil
='#undef CONFIG_LIBAVUTIL'
7221 def_libavutil_a
='#undef CONFIG_LIBAVUTIL_A'
7222 def_libavutil_so
='#undef CONFIG_LIBAVUTIL_SO'
7223 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
7224 test "$_libavutil" = yes && def_libavutil
='#define CONFIG_LIBAVUTIL 1'
7225 test "$_libavutil_a" = yes && def_libavutil_a
='#define CONFIG_LIBAVUTIL_A 1'
7226 test "$_libavutil_so" = yes && def_libavutil_so
='#define CONFIG_LIBAVUTIL_SO 1'
7227 # neither static nor shared libavutil is available, but it is mandatory ...
7228 if test "$_libavutil" = no
; then
7229 die
"You need static or shared libavutil, MPlayer will not compile without!"
7231 echores
"$_libavutil"
7233 echocheck
"FFmpeg libavcodec"
7234 if test "$_libavcodec_a" = auto
; then
7236 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
7238 res_comment
="static"
7240 elif test "$_libavcodec_so" = auto
; then
7242 res_comment
="libavcodec.so is discouraged over static libavcodec"
7244 #include <libavcodec/avcodec.h>
7245 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
7247 if $_pkg_config --exists libavcodec
; then
7248 _inc_libavcodec
=$
($_pkg_config --cflags libavcodec
)
7249 _ld_tmp
=$
($_pkg_config --libs libavcodec
)
7250 cc_check
$_inc_libavcodec $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7251 && _libavcodec_so
=yes
7252 elif cc_check
-lavcodec $_ld_lm ; then
7253 extra_ldflags
="$extra_ldflags -lavcodec"
7255 res_comment
="using libavcodec.so, but static libavcodec is recommended"
7259 def_libavcodec
='#undef CONFIG_LIBAVCODEC'
7260 def_libavcodec_a
='#undef CONFIG_LIBAVCODEC_A'
7261 def_libavcodec_so
='#undef CONFIG_LIBAVCODEC_SO'
7262 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
7263 test "$_libavcodec" = yes && def_libavcodec
='#define CONFIG_LIBAVCODEC 1'
7264 test "$_libavcodec_a" = yes && def_libavcodec_a
='#define CONFIG_LIBAVCODEC_A 1'
7265 test "$_libavcodec_so" = yes && def_libavcodec_so
='#define CONFIG_LIBAVCODEC_SO 1'
7266 test "$_libavcodec_mpegaudio_hp" = yes \
7267 && def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1' \
7268 && mak_libavcodec_mpegaudio_hp
='CONFIG_MPEGAUDIO_HP = yes'
7269 if test "$_libavcodec_a" = yes ; then
7270 codecmodules
="libavcodec(internal) $codecmodules"
7271 elif test "$_libavcodec_so" = yes ; then
7272 codecmodules
="libavcodec.so $codecmodules"
7274 nocodecmodules
="libavcodec $nocodecmodules"
7276 echores
"$_libavcodec"
7278 echocheck
"FFmpeg libavformat"
7279 if test "$_libavformat_a" = auto
; then
7281 if test -d libavformat
&& test -f libavformat
/utils.c
; then
7283 res_comment
="static"
7285 elif test "$_libavformat_so" = auto
; then
7288 #include <libavformat/avformat.h>
7289 #include <libavcodec/opt.h>
7290 int main(void) { av_alloc_format_context(); return 0; }
7292 if $_pkg_config --exists libavformat
; then
7293 _inc_libavformat
=$
($_pkg_config --cflags libavformat
)
7294 _ld_tmp
=$
($_pkg_config --libs libavformat
)
7295 cc_check
$_inc_libavformat $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7296 && _libavformat_so
=yes
7297 elif cc_check
$_ld_lm -lavformat ; then
7298 extra_ldflags
="$extra_ldflags -lavformat"
7300 res_comment
="using libavformat.so, but static libavformat is recommended"
7304 def_libavformat
='#undef CONFIG_LIBAVFORMAT'
7305 def_libavformat_a
='#undef CONFIG_LIBAVFORMAT_A'
7306 def_libavformat_so
='#undef CONFIG_LIBAVFORMAT_SO'
7307 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
7308 test "$_libavformat" = yes && def_libavformat
='#define CONFIG_LIBAVFORMAT 1'
7309 test "$_libavformat_a" = yes && def_libavformat_a
='#define CONFIG_LIBAVFORMAT_A 1'
7310 test "$_libavformat_so" = yes \
7311 && def_libavformat_so
='#define CONFIG_LIBAVFORMAT_SO 1'
7312 echores
"$_libavformat"
7314 echocheck
"FFmpeg libpostproc"
7315 if test "$_libpostproc_a" = auto
; then
7317 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
7318 _libpostproc_a
='yes'
7319 res_comment
="static"
7321 elif test "$_libpostproc_so" = auto
; then
7324 #include <inttypes.h>
7325 #include <libpostproc/postprocess.h>
7326 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
7328 if cc_check
-lpostproc $_ld_lm ; then
7329 extra_ldflags
="$extra_ldflags -lpostproc"
7331 res_comment
="using libpostproc.so, but static libpostproc is recommended"
7335 def_libpostproc
='#undef CONFIG_LIBPOSTPROC'
7336 def_libpostproc_a
='#undef CONFIG_LIBPOSTPROC_A'
7337 def_libpostproc_so
='#undef CONFIG_LIBPOSTPROC_SO'
7338 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
7339 test "$_libpostproc" = yes && def_libpostproc
='#define CONFIG_LIBPOSTPROC 1'
7340 test "$_libpostproc_a" = yes && def_libpostproc_a
='#define CONFIG_LIBPOSTPROC_A 1'
7341 test "$_libpostproc_so" = yes \
7342 && def_libpostproc_so
='#define CONFIG_LIBPOSTPROC_SO 1'
7343 echores
"$_libpostproc"
7345 echocheck
"FFmpeg libswscale"
7346 if test "$_libswscale_a" = auto
; then
7348 if test -d libswscale
&& test -f libswscale
/swscale.h
; then
7350 res_comment
="static"
7352 elif test "$_libswscale_so" = auto
; then
7354 res_comment
="using libswscale.so, but static libswscale is recommended"
7356 #include <libswscale/swscale.h>
7357 int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
7359 if $_pkg_config --exists libswscale
; then
7360 _inc_libswscale
=$
($_pkg_config --cflags libswscale
)
7361 _ld_tmp
=$
($_pkg_config --libs libswscale
)
7362 cc_check
$_inc_libswscale $_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" \
7363 && _libswscale_so
=yes
7364 elif cc_check
-lswscale ; then
7365 extra_ldflags
="$extra_ldflags -lswscale"
7370 def_libswscale
='#undef CONFIG_LIBSWSCALE'
7371 def_libswscale_a
='#undef CONFIG_LIBSWSCALE_A'
7372 def_libswscale_so
='#undef CONFIG_LIBSWSCALE_SO'
7373 test "$_libswscale_a" = yes ||
test "$_libswscale_so" = yes && _libswscale
=yes
7374 test "$_libswscale" = yes && def_libswscale
='#define CONFIG_LIBSWSCALE 1'
7375 test "$_libswscale_a" = yes && def_libswscale_a
='#define CONFIG_LIBSWSCALE_A 1'
7376 test "$_libswscale_so" = yes \
7377 && def_libswscale_so
='#define CONFIG_LIBSWSCALE_SO 1'
7378 echores
"$_libswscale"
7380 echocheck
"libopencore_amr narrowband"
7381 if test "$_libopencore_amrnb" = auto
; then
7382 _libopencore_amrnb
=no
7384 #include <opencore-amrnb/interf_dec.h>
7385 int main(void) { Decoder_Interface_init(); return 0; }
7387 cc_check
-lopencore-amrnb && _libopencore_amrnb
=yes
7388 if test "$_libavcodec_a" != yes ; then
7389 _libopencore_amrnb
=no
7390 res_comment
="libavcodec (static) is required by libopencore_amrnb, sorry"
7393 if test "$_libopencore_amrnb" = yes ; then
7394 _libopencore_amr
=yes
7395 extra_ldflags
="$extra_ldflags -lopencore-amrnb"
7396 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 1'
7397 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRNB_DECODER"
7398 _libavencoders
="$_libavencoders LIBOPENCORE_AMRNB_ENCODER"
7399 codecmodules
="libopencore_amrnb $codecmodules"
7401 def_libopencore_amrnb
='#define CONFIG_LIBOPENCORE_AMRNB 0'
7402 nocodecmodules
="libopencore_amrnb $nocodecmodules"
7404 echores
"$_libopencore_amrnb"
7407 echocheck
"libopencore_amr wideband"
7408 if test "$_libopencore_amrwb" = auto
; then
7409 _libopencore_amrwb
=no
7411 #include <opencore-amrwb/dec_if.h>
7412 int main(void) { D_IF_init(); return 0; }
7414 cc_check
-lopencore-amrwb && _libopencore_amrwb
=yes
7415 if test "$_libavcodec_a" != yes ; then
7416 _libopencore_amrwb
=no
7417 res_comment
="libavcodec (static) is required by libopencore_amrwb, sorry"
7420 if test "$_libopencore_amrwb" = yes ; then
7421 _libopencore_amr
=yes
7422 extra_ldflags
="$extra_ldflags -lopencore-amrwb"
7423 def_libopencore_amrwb
='#define CONFIG_LIBOPENCORE_AMRWB 1'
7424 _libavdecoders
="$_libavdecoders LIBOPENCORE_AMRWB_DECODER"
7425 codecmodules
="libopencore_amrwb $codecmodules"
7427 def_libopencore_amrwb
='#define LIBOPENCORE_AMRWB 0'
7428 nocodecmodules
="libopencore_amrwb $nocodecmodules"
7430 echores
"$_libopencore_amrwb"
7432 echocheck
"libdv-0.9.5+"
7433 if test "$_libdv" = auto
; then
7436 #include <libdv/dv.h>
7437 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
7439 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
7441 if test "$_libdv" = yes ; then
7442 def_libdv
='#define CONFIG_LIBDV095 1'
7443 extra_ldflags
="$extra_ldflags -ldv"
7444 codecmodules
="libdv $codecmodules"
7446 def_libdv
='#undef CONFIG_LIBDV095'
7447 nocodecmodules
="libdv $nocodecmodules"
7453 if test "$_xvid" = auto
; then
7457 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
7459 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
7460 cc_check
$_ld_tmp && extra_ldflags
="$extra_ldflags $_ld_tmp" && _xvid
=yes && break
7464 if test "$_xvid" = yes ; then
7465 def_xvid
='#define CONFIG_XVID4 1'
7466 codecmodules
="xvid $codecmodules"
7468 def_xvid
='#undef CONFIG_XVID4'
7469 nocodecmodules
="xvid $nocodecmodules"
7473 echocheck
"Xvid two pass plugin"
7474 if test "$_xvid" = yes && test "$_xvid_lavc" = auto
; then
7477 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
7479 cc_check
&& _xvid_lavc
=yes
7481 if test "$_xvid_lavc" = yes ; then
7482 def_xvid_lavc
='#define CONFIG_LIBXVID 1'
7483 _libavencoders
="$_libavencoders LIBXVID_ENCODER"
7486 def_xvid_lavc
='#define CONFIG_LIBXVID 0'
7488 echores
"$_xvid_lavc"
7492 if test "$_x264" = auto
; then
7494 #include <inttypes.h>
7497 #error We do not support old versions of x264. Get the latest from git.
7499 int main(void) { x264_encoder_open((void*)0); return 0; }
7502 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
7503 cc_check
$_ld_x264 && libs_mencoder
="$libs_mencoder $_ld_x264" && _x264
=yes && break
7507 if test "$_x264" = yes ; then
7508 def_x264
='#define CONFIG_X264 1'
7509 codecmodules
="x264 $codecmodules"
7510 test "$_x264_lavc" = auto
&& _x264_lavc
=yes
7511 if test "$_x264_lavc" = yes ; then
7512 def_x264_lavc
='#define CONFIG_LIBX264 1'
7513 libs_mplayer
="$libs_mplayer $_ld_x264"
7514 _libavencoders
="$_libavencoders LIBX264_ENCODER"
7518 def_x264
='#undef CONFIG_X264'
7519 def_x264_lavc
='#define CONFIG_LIBX264 0'
7520 nocodecmodules
="x264 $nocodecmodules"
7522 res_comment
="in libavcodec: $_x264_lavc"
7526 echocheck
"libdirac"
7527 if test "$_libdirac_lavc" = auto
; then
7529 if test "$_libavcodec_a" != yes; then
7530 res_comment
="libavcodec (static) is required by libdirac, sorry"
7533 #include <libdirac_encoder/dirac_encoder.h>
7534 #include <libdirac_decoder/dirac_parser.h>
7537 dirac_encoder_context_t enc_ctx;
7538 dirac_decoder_t *dec_handle;
7539 dirac_encoder_context_init(&enc_ctx, VIDEO_FORMAT_SD_576I50);
7540 dec_handle = dirac_decoder_init(0);
7542 dirac_decoder_close(dec_handle);
7546 if $_pkg_config --exists dirac
; then
7547 _inc_dirac
=$
($_pkg_config --silence-errors --cflags dirac
)
7548 _ld_dirac
=$
($_pkg_config --silence-errors --libs dirac
)
7549 cc_check
$_inc_dirac $_ld_dirac &&
7550 _libdirac_lavc
=yes &&
7551 extra_cflags
="$extra_cflags $_inc_dirac" &&
7552 extra_ldflags
="$extra_ldflags $_ld_dirac"
7556 if test "$_libdirac_lavc" = yes ; then
7557 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 1'
7558 _libavencoders
="$_libavencoders LIBDIRAC_ENCODER"
7559 _libavdecoders
="$_libavdecoders LIBDIRAC_DECODER"
7560 codecmodules
="libdirac $codecmodules"
7562 def_libdirac_lavc
='#define CONFIG_LIBDIRAC 0'
7563 nocodecmodules
="libdirac $nocodecmodules"
7565 echores
"$_libdirac_lavc"
7568 echocheck
"libschroedinger"
7569 if test "$_libschroedinger_lavc" = auto
; then
7570 _libschroedinger_lavc
=no
7571 if test "$_libavcodec_a" != yes; then
7572 res_comment
="libavcodec (static) is required by libschroedinger, sorry"
7575 #include <schroedinger/schro.h>
7576 int main(void) { schro_init(); return SCHRO_ENCODER_RATE_CONTROL_CONSTANT_QUALITY; }
7578 if $_pkg_config --exists schroedinger-1.0
; then
7579 _inc_schroedinger
=$
($_pkg_config --silence-errors --cflags schroedinger-1.0
)
7580 _ld_schroedinger
=$
($_pkg_config --silence-errors --libs schroedinger-1.0
)
7581 cc_check
$_inc_schroedinger $_ld_schroedinger &&
7582 _libschroedinger_lavc
=yes &&
7583 extra_cflags
="$extra_cflags $_inc_schroedinger" &&
7584 extra_ldflags
="$extra_ldflags $_ld_schroedinger"
7588 if test "$_libschroedinger_lavc" = yes ; then
7589 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 1'
7590 _libavencoders
="$_libavencoders LIBSCHROEDINGER_ENCODER"
7591 _libavdecoders
="$_libavdecoders LIBSCHROEDINGER_DECODER"
7592 codecmodules
="libschroedinger $codecmodules"
7594 def_libschroedinger_lavc
='#define CONFIG_LIBSCHROEDINGER 0'
7595 nocodecmodules
="libschroedinger $nocodecmodules"
7597 echores
"$_libschroedinger_lavc"
7600 if test "$_libnut" = auto
; then
7604 #include <inttypes.h>
7606 nut_context_tt * nut;
7607 int main(void) { (void)nut_error(0); return 0; }
7610 cc_check
-lnut && _libnut
=yes
7613 if test "$_libnut" = yes ; then
7614 def_libnut
='#define CONFIG_LIBNUT 1'
7615 extra_ldflags
="$extra_ldflags -lnut"
7617 def_libnut
='#undef CONFIG_LIBNUT'
7621 #check must be done after libavcodec one
7623 if test "$_zr" = auto
; then
7624 #36067's seem to identify themselves as 36057PQC's, so the line
7625 #below should work for 36067's and 36057's.
7626 if grep -q -s -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
; then
7632 if test "$_zr" = yes ; then
7633 if test "$_libavcodec_a" = yes ; then
7634 def_zr
='#define CONFIG_ZR 1'
7635 vomodules
="zr zr2 $vomodules"
7637 res_comment
="libavcodec (static) is required by zr, sorry"
7638 novomodules
="zr $novomodules"
7639 def_zr
='#undef CONFIG_ZR'
7642 def_zr
='#undef CONFIG_ZR'
7643 novomodules
="zr zr2 $novomodules"
7647 # mencoder requires (optional) those libs: libmp3lame
7648 if test "$_mencoder" != no
; then
7650 echocheck
"libmp3lame"
7651 def_mp3lame_preset
='#undef CONFIG_MP3LAME_PRESET'
7652 def_mp3lame_preset_medium
='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7653 if test "$_mp3lame" = auto
; then
7656 #include <lame/lame.h>
7657 int main(void) { lame_version_t lv; (void) lame_init();
7658 get_lame_version_numerical(&lv);
7661 cc_check
-lmp3lame $_ld_lm && _mp3lame
=yes
7663 if test "$_mp3lame" = yes ; then
7664 def_mp3lame
="#define CONFIG_MP3LAME 1"
7665 _ld_mp3lame
=-lmp3lame
7666 libs_mencoder
="$libs_mencoder $_ld_mp3lame"
7668 #include <lame/lame.h>
7669 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
7671 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset
="#define CONFIG_MP3LAME_PRESET 1"
7673 #include <lame/lame.h>
7674 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
7676 cc_check
$_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium
="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7677 test "$_mp3lame_lavc" = auto
&& _mp3lame_lavc
=yes
7678 if test "$_mp3lame_lavc" = yes ; then
7679 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 1"
7680 _libavencoders
="$_libavencoders LIBMP3LAME_ENCODER"
7681 libs_mplayer
="$libs_mplayer $_ld_mp3lame"
7685 def_mp3lame
='#undef CONFIG_MP3LAME'
7686 def_mp3lame_lavc
="#define CONFIG_LIBMP3LAME 0"
7688 res_comment
="in libavcodec: $_mp3lame_lavc"
7691 fi # test "$_mencoder" != no
7693 echocheck
"mencoder"
7694 if test "$_mencoder" = yes ; then
7695 def_muxers
='#define CONFIG_MUXERS 1'
7697 # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint,
7698 # png for vf_screenshot, mjpeg for zr
7699 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
7700 test "$_zlib" = yes && _libavencoders
="$_libavencoders PNG_ENCODER"
7701 test "$_zr" = yes && _libavencoders
="$_libavencoders MJPEG_ENCODER"
7703 def_muxers
='#define CONFIG_MUXERS 0'
7705 echores
"$_mencoder"
7708 echocheck
"UnRAR executable"
7709 if test "$_unrar_exec" = auto
; then
7711 mingw32
&& _unrar_exec
="no"
7713 if test "$_unrar_exec" = yes ; then
7714 def_unrar_exec
='#define CONFIG_UNRAR_EXEC 1'
7716 def_unrar_exec
='#undef CONFIG_UNRAR_EXEC'
7718 echores
"$_unrar_exec"
7720 echocheck
"TV interface"
7721 if test "$_tv" = yes ; then
7722 def_tv
='#define CONFIG_TV 1'
7723 inputmodules
="tv $inputmodules"
7725 _noinputmodules
="tv $_noinputmodules"
7726 def_tv
='#undef CONFIG_TV'
7731 if freebsd || netbsd || openbsd || dragonfly || bsdos
; then
7732 echocheck
"*BSD BT848 bt8xx header"
7734 for file in "machine/ioctl_bt848.h" \
7735 "dev/bktr/ioctl_bt848.h" \
7736 "dev/video/bktr/ioctl_bt848.h" \
7737 "dev/ic/bt8xx.h" ; do
7739 #include <sys/types.h>
7740 #include <sys/ioctl.h>
7742 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
7746 _ioctl_bt848_h_name
="$file"
7750 if test "$_ioctl_bt848_h" = yes ; then
7751 def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
7752 res_comment
="using $_ioctl_bt848_h_name"
7754 def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
7756 echores
"$_ioctl_bt848_h"
7758 echocheck
"*BSD ioctl_meteor.h"
7760 for file in "machine/ioctl_meteor.h" \
7761 "dev/bktr/ioctl_meteor.h" \
7762 "dev/video/bktr/ioctl_meteor.h" ; do
7764 #include <sys/types.h>
7766 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
7770 _ioctl_meteor_h_name
="$file"
7774 if test "$_ioctl_meteor_h" = yes ; then
7775 def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
7776 res_comment
="using $_ioctl_meteor_h_name"
7778 def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
7780 echores
"$_ioctl_meteor_h"
7782 echocheck
"*BSD BrookTree 848 TV interface"
7783 if test "$_tv_bsdbt848" = auto
; then
7785 if test "$_tv" = yes ; then
7787 #include <sys/types.h>
7788 $def_ioctl_meteor_h_name
7789 $def_ioctl_bt848_h_name
7790 #ifdef IOCTL_METEOR_H_NAME
7791 #include IOCTL_METEOR_H_NAME
7793 #ifdef IOCTL_BT848_H_NAME
7794 #include IOCTL_BT848_H_NAME
7797 ioctl(0, METEORSINPUT, 0);
7798 ioctl(0, TVTUNER_GETFREQ, 0);
7802 cc_check
&& _tv_bsdbt848
=yes
7805 if test "$_tv_bsdbt848" = yes ; then
7806 def_tv_bsdbt848
='#define CONFIG_TV_BSDBT848 1'
7807 inputmodules
="tv-bsdbt848 $inputmodules"
7809 def_tv_bsdbt848
='#undef CONFIG_TV_BSDBT848'
7810 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
7812 echores
"$_tv_bsdbt848"
7813 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos
7816 echocheck
"DirectShow TV interface"
7817 if test "$_tv_dshow" = auto
; then
7819 if test "$_tv" = yes && win32
; then
7824 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
7828 cc_check
-lole32 -luuid && _tv_dshow
=yes
7831 if test "$_tv_dshow" = yes ; then
7832 inputmodules
="tv-dshow $inputmodules"
7833 def_tv_dshow
='#define CONFIG_TV_DSHOW 1'
7834 extra_ldflags
="$extra_ldflags -lole32 -luuid"
7836 _noinputmodules
="tv-dshow $_noinputmodules"
7837 def_tv_dshow
='#undef CONFIG_TV_DSHOW'
7839 echores
"$_tv_dshow"
7842 echocheck
"Video 4 Linux TV interface"
7843 if test "$_tv_v4l1" = auto
; then
7845 if test "$_tv" = yes && linux
; then
7848 #include <linux/videodev.h>
7849 int main(void) { return 0; }
7851 cc_check
&& _tv_v4l1
=yes
7854 if test "$_tv_v4l1" = yes ; then
7857 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7858 def_tv_v4l1
='#define CONFIG_TV_V4L1 1'
7859 inputmodules
="tv-v4l $inputmodules"
7861 _noinputmodules
="tv-v4l1 $_noinputmodules"
7862 def_tv_v4l
='#undef CONFIG_TV_V4L'
7867 echocheck
"Video 4 Linux 2 TV interface"
7868 if test "$_tv_v4l2" = auto
; then
7870 if test "$_tv" = yes && linux
; then
7873 #include <linux/types.h>
7874 #include <linux/videodev2.h>
7875 int main(void) { return 0; }
7877 cc_check
&& _tv_v4l2
=yes
7880 if test "$_tv_v4l2" = yes ; then
7883 def_tv_v4l
='#define CONFIG_TV_V4L 1'
7884 def_tv_v4l2
='#define CONFIG_TV_V4L2 1'
7885 inputmodules
="tv-v4l2 $inputmodules"
7887 _noinputmodules
="tv-v4l2 $_noinputmodules"
7888 def_tv_v4l2
='#undef CONFIG_TV_V4L2'
7893 echocheck
"Radio interface"
7894 if test "$_radio" = yes ; then
7895 def_radio
='#define CONFIG_RADIO 1'
7896 inputmodules
="radio $inputmodules"
7897 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
7900 if test "$_radio_capture" = yes ; then
7902 def_radio_capture
="#define CONFIG_RADIO_CAPTURE 1"
7904 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7907 _noinputmodules
="radio $_noinputmodules"
7908 def_radio
='#undef CONFIG_RADIO'
7909 def_radio_capture
="#undef CONFIG_RADIO_CAPTURE"
7913 echocheck
"Capture for Radio interface"
7914 echores
"$_radio_capture"
7916 echocheck
"Video 4 Linux 2 Radio interface"
7917 if test "$_radio_v4l2" = auto
; then
7919 if test "$_radio" = yes && linux
; then
7922 #include <linux/types.h>
7923 #include <linux/videodev2.h>
7924 int main(void) { return 0; }
7926 cc_check
&& _radio_v4l2
=yes
7929 if test "$_radio_v4l2" = yes ; then
7930 def_radio_v4l2
='#define CONFIG_RADIO_V4L2 1'
7932 def_radio_v4l2
='#undef CONFIG_RADIO_V4L2'
7934 echores
"$_radio_v4l2"
7936 echocheck
"Video 4 Linux Radio interface"
7937 if test "$_radio_v4l" = auto
; then
7939 if test "$_radio" = yes && linux
; then
7942 #include <linux/videodev.h>
7943 int main(void) { return 0; }
7945 cc_check
&& _radio_v4l
=yes
7948 if test "$_radio_v4l" = yes ; then
7949 def_radio_v4l
='#define CONFIG_RADIO_V4L 1'
7951 def_radio_v4l
='#undef CONFIG_RADIO_V4L'
7953 echores
"$_radio_v4l"
7955 if freebsd || netbsd || openbsd || dragonfly || bsdos \
7956 && test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
7957 echocheck
"*BSD BrookTree 848 Radio interface"
7960 #include <sys/types.h>
7961 $def_ioctl_bt848_h_name
7962 #ifdef IOCTL_BT848_H_NAME
7963 #include IOCTL_BT848_H_NAME
7965 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7967 cc_check
&& _radio_bsdbt848
=yes
7968 echores
"$_radio_bsdbt848"
7969 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7971 if test "$_radio_bsdbt848" = yes ; then
7972 def_radio_bsdbt848
='#define CONFIG_RADIO_BSDBT848 1'
7974 def_radio_bsdbt848
='#undef CONFIG_RADIO_BSDBT848'
7977 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7978 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7979 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7982 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7983 if test "$_pvr" = auto
; then
7985 if test "$_tv_v4l2" = yes && linux
; then
7988 #include <inttypes.h>
7989 #include <linux/types.h>
7990 #include <linux/videodev2.h>
7991 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
7993 cc_check
&& _pvr
=yes
7996 if test "$_pvr" = yes ; then
7997 def_pvr
='#define CONFIG_PVR 1'
7998 inputmodules
="pvr $inputmodules"
8000 _noinputmodules
="pvr $_noinputmodules"
8001 def_pvr
='#undef CONFIG_PVR'
8007 if ! beos
&& test "$_ftp" = yes ; then
8008 def_ftp
='#define CONFIG_FTP 1'
8009 inputmodules
="ftp $inputmodules"
8011 _noinputmodules
="ftp $_noinputmodules"
8012 def_ftp
='#undef CONFIG_FTP'
8016 echocheck
"vstream client"
8017 if test "$_vstream" = auto
; then
8020 #include <vstream-client.h>
8021 void vstream_error(const char *format, ... ) {}
8022 int main(void) { vstream_start(); return 0; }
8024 cc_check
-lvstream-client && _vstream
=yes
8026 if test "$_vstream" = yes ; then
8027 def_vstream
='#define CONFIG_VSTREAM 1'
8028 inputmodules
="vstream $inputmodules"
8029 extra_ldflags
="$extra_ldflags -lvstream-client"
8031 _noinputmodules
="vstream $_noinputmodules"
8032 def_vstream
='#undef CONFIG_VSTREAM'
8037 echocheck
"OSD menu"
8038 if test "$_menu" = yes ; then
8039 def_menu
='#define CONFIG_MENU 1'
8040 test $_dvbin = "yes" && _menu_dvbin
=yes
8042 def_menu
='#undef CONFIG_MENU'
8048 echocheck
"Subtitles sorting"
8049 if test "$_sortsub" = yes ; then
8050 def_sortsub
='#define CONFIG_SORTSUB 1'
8052 def_sortsub
='#undef CONFIG_SORTSUB'
8057 echocheck
"XMMS inputplugin support"
8058 if test "$_xmms" = yes ; then
8059 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
8060 _xmmsplugindir
=$
(xmms-config
--input-plugin-dir)
8061 _xmmslibdir
=$
(xmms-config
--exec-prefix)/lib
8063 _xmmsplugindir
=/usr
/lib
/xmms
/Input
8064 _xmmslibdir
=/usr
/lib
8067 def_xmms
='#define CONFIG_XMMS 1'
8069 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.dylib"
8071 extra_ldflags
="$extra_ldflags ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
8074 def_xmms
='#undef CONFIG_XMMS'
8079 # --------------- GUI specific tests begin -------------------
8082 if test "$_gui" = yes ; then
8084 # Required libraries
8085 if test "$_libavcodec" != yes ||
8086 ! echo $_libavdecoders |
grep -q PNG_DECODER
; then
8087 die
"The GUI requires libavcodec with PNG support (needs zlib)."
8089 test "$_freetype" = no
&& test "$_bitmap_font" = no
&& \
8090 die
"The GUI requires either FreeType or bitmap font support."
8093 test "$_x11" != yes && die
"X11 support required for GUI compilation."
8095 echocheck
"XShape extension"
8096 if test "$_xshape" = auto
; then
8099 #include <X11/Xlib.h>
8100 #include <X11/Xproto.h>
8101 #include <X11/Xutil.h>
8102 #include <X11/extensions/shape.h>
8105 char *name = ":0.0";
8108 int eventbase, errorbase;
8109 if (getenv("DISPLAY"))
8110 name=getenv("DISPLAY");
8111 wsDisplay=XOpenDisplay(name);
8112 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
8114 XCloseDisplay(wsDisplay);
8118 cc_check
-lXext && _xshape
=yes
8120 if test "$_xshape" = yes ; then
8121 def_xshape
='#define CONFIG_XSHAPE 1'
8123 die
"The GUI requires the X11 extension XShape (which was not found)."
8128 if test "$_gtk1" = no
; then
8130 echocheck
"GTK+ version"
8132 if $_pkg_config gtk
+-2.0
--exists ; then
8133 _gtk
=$
($_pkg_config gtk
+-2.0
--modversion 2>/dev
/null
)
8134 extra_cflags
="$extra_cflags $($_pkg_config gtk+-2.0 --cflags 2>/dev/null)"
8135 libs_mplayer
="$libs_mplayer $($_pkg_config gtk+-2.0 --libs 2>/dev/null)"
8139 if $_pkg_config glib-2.0
--exists ; then
8140 echocheck
"glib version"
8141 _glib
=$
($_pkg_config glib-2.0
--modversion 2>/dev
/null
)
8142 libs_mplayer
="$libs_mplayer $($_pkg_config glib-2.0 --libs 2>/dev/null)"
8145 def_gui
='#define CONFIG_GUI 1'
8146 def_gtk2
='#define CONFIG_GTK2 1'
8149 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
8152 echo "GTK-2 devel packages were not found, trying GTK 1.2"
8157 if test "$_gtk1" = yes ; then
8158 # Check for old GTK (1.2.x)
8159 echocheck
"GTK version"
8160 if test -z "$_gtkconfig" ; then
8161 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
8162 _gtkconfig
="gtk-config"
8163 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
8164 _gtkconfig
="gtk12-config"
8166 die
"The GUI requires GTK devel packages (which were not found)."
8169 _gtk
=$
($_gtkconfig --version 2>&1)
8170 extra_cflags
="$extra_cflags $($_gtkconfig --cflags 2>&1)"
8171 libs_mplayer
="$libs_mplayer $($_gtkconfig --libs 2>&1)"
8172 echores
"$_gtk (using $_gtkconfig)"
8175 echocheck
"glib version"
8176 if test -z "$_glibconfig" ; then
8177 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
8178 _glibconfig
="glib-config"
8179 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
8180 _glibconfig
="glib12-config"
8182 die
"The GUI requires GLIB devel packages (which were not found)"
8185 _glib
=$
($_glibconfig --version 2>&1)
8186 libs_mplayer
="$libs_mplayer $($_glibconfig --libs 2>&1)"
8187 echores
"$_glib (using $_glibconfig)"
8189 def_gui
='#define CONFIG_GUI 1'
8190 def_gtk2
='#undef CONFIG_GTK2'
8195 libs_mplayer
="$libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
8196 def_gui
='#define CONFIG_GUI 1'
8197 def_gtk2
='#undef CONFIG_GTK2'
8200 else #if test "$_gui"
8201 def_gui
='#undef CONFIG_GUI'
8202 def_gtk2
='#undef CONFIG_GTK2'
8204 # --------------- GUI specific tests end -------------------
8207 if test "$_charset" != "noconv" ; then
8208 def_charset
="#define MSG_CHARSET \"$_charset\""
8210 def_charset
="#undef MSG_CHARSET"
8214 if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
8215 echocheck
"iconv program"
8216 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
8217 if test "$?" -ne 0 ; then
8219 echo "No working iconv program found, use "
8220 echo "--charset=UTF-8 to continue anyway."
8221 echo "If you also have problems with iconv library functions use --charset=noconv."
8222 echo "Messages in the GTK-2 interface will be broken then."
8229 #############################################################################
8231 echocheck
"automatic gdb attach"
8232 if test "$_crash_debug" = yes ; then
8233 def_crash_debug
='#define CONFIG_CRASH_DEBUG 1'
8235 def_crash_debug
='#undef CONFIG_CRASH_DEBUG'
8238 echores
"$_crash_debug"
8240 echocheck
"compiler support for noexecstack"
8242 int main(void) { return 0; }
8244 if cc_check
-Wl,-z,noexecstack
; then
8245 extra_ldflags
="-Wl,-z,noexecstack $extra_ldflags"
8251 echocheck
"linker support for --nxcompat --no-seh --dynamicbase"
8252 if cc_check
"-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" ; then
8253 extra_ldflags
="-Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase $extra_ldflags"
8260 # Dynamic linking flags
8261 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
8263 freebsd || netbsd || openbsd || dragonfly || bsdos
&& _ld_dl_dynamic
='-rdynamic'
8264 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
&& ! os2
&& ! sunos
; then
8265 _ld_dl_dynamic
='-rdynamic'
8268 extra_ldflags
="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
8269 bsdos
&& extra_ldflags
="$extra_ldflags -ldvd"
8270 (netbsd || openbsd
) && x86_32
&& extra_ldflags
="$extra_ldflags -li386"
8272 def_debug
='#undef MP_DEBUG'
8273 test "$_debug" != "" && def_debug
='#define MP_DEBUG 1'
8276 echocheck
"joystick"
8277 def_joystick
='#undef CONFIG_JOYSTICK'
8278 if test "$_joystick" = yes ; then
8280 # TODO add some check
8281 def_joystick
='#define CONFIG_JOYSTICK 1'
8284 res_comment
="unsupported under $system_name"
8287 echores
"$_joystick"
8290 if test "$_lirc" = auto
; then
8293 #include <lirc/lirc_client.h>
8294 int main(void) { return 0; }
8296 cc_check
-llirc_client && _lirc
=yes
8298 if test "$_lirc" = yes ; then
8299 def_lirc
='#define CONFIG_LIRC 1'
8300 libs_mplayer
="$libs_mplayer -llirc_client"
8302 def_lirc
='#undef CONFIG_LIRC'
8307 if test "$_lircc" = auto
; then
8310 #include <lirc/lircc.h>
8311 int main(void) { return 0; }
8313 cc_check
-llircc && _lircc
=yes
8315 if test "$_lircc" = yes ; then
8316 def_lircc
='#define CONFIG_LIRCC 1'
8317 libs_mplayer
="$libs_mplayer -llircc"
8319 def_lircc
='#undef CONFIG_LIRCC'
8324 # Detect maemo development platform libraries availability (http://www.maemo.org),
8325 # they are used when run on Nokia 770|8x0
8326 echocheck
"maemo (Nokia 770|8x0)"
8327 if test "$_maemo" = auto
; then
8330 #include <libosso.h>
8331 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
8333 cc_check $
($_pkg_config --cflags --libs libosso
2>/dev
/null
) && _maemo
=yes
8335 if test "$_maemo" = yes ; then
8336 def_maemo
='#define CONFIG_MAEMO 1'
8337 extra_cflags
="$extra_cflags $($_pkg_config --cflags libosso)"
8338 extra_ldflags
="$extra_ldflags $($_pkg_config --libs libosso) -lXsp"
8340 def_maemo
='#undef CONFIG_MAEMO'
8345 #############################################################################
8347 # On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
8348 # the OMF format needs to come after the 'extern symbol prefix' check, which
8351 extra_ldflags
="$extra_ldflags -Zomf -Zstack 16384 -Zbin-files -Zargs-wild"
8354 # linker paths should be the same for mencoder and mplayer
8356 for I
in $libs_mplayer ; do
8357 _tmp
=$
(echo $I |
sed -e 's/^-L.*$//')
8358 if test -z "$_tmp" ; then
8359 extra_ldflags
="$extra_ldflags $I"
8361 _ld_tmp
="$_ld_tmp $I"
8364 libs_mplayer
=$_ld_tmp
8367 #############################################################################
8368 # 64 bit file offsets?
8369 if test "$_largefiles" = yes || freebsd
; then
8370 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
8371 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
8372 # dvdread support requires this (for off64_t)
8373 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
8377 CXXFLAGS
=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
8379 # This must be the last test to be performed. Any other tests following it
8380 # could fail due to linker errors. libdvdnavmini is intentionally not linked
8381 # against libdvdread (to permit MPlayer to use its own copy of the library).
8382 # So any compilation using the flags added here but not linking against
8383 # libdvdread can fail.
8384 echocheck
"DVD support (libdvdnav)"
8386 if test "$_dvdnav" = auto
; then
8387 if test "$_dvdread_internal" = yes ; then
8390 res_comment
="internal"
8392 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
8395 if test "$_dvdnav" = auto
; then
8397 #include <inttypes.h>
8398 #include <dvdnav/dvdnav.h>
8399 int main(void) { dvdnav_t *dvd=0; return 0; }
8402 _dvdnavdir
=$
($_dvdnavconfig --cflags)
8403 _dvdnavlibs
=$
($_dvdnavconfig --libs)
8404 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
8406 if test "$_dvdnav" = yes ; then
8408 def_dvdnav
='#define CONFIG_DVDNAV 1'
8409 if test "$dvdnav_internal" = yes ; then
8410 cflags_libdvdnav
="-Ilibdvdnav"
8411 inputmodules
="dvdnav(internal) $inputmodules"
8413 extra_cflags
="$extra_cflags $($_dvdnavconfig --cflags)"
8414 extra_ldflags
="$extra_ldflags $($_dvdnavconfig --minilibs)"
8415 inputmodules
="dvdnav $inputmodules"
8418 def_dvdnav
='#undef CONFIG_DVDNAV'
8419 _noinputmodules
="dvdnav $_noinputmodules"
8423 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
8424 # Read dvdnav comment above.
8427 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8428 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8430 for part
in $list; do
8431 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8432 echo "${nprefix}_$part = yes"
8437 #############################################################################
8438 echo "Creating config.mak"
8439 cat > config.mak
<< EOF
8440 # -------- Generated by configure -----------
8442 # Ensure that locale settings do not interfere with shell commands.
8445 CONFIGURATION = $_configuration
8448 DOC_LANGS = $language_doc
8449 DOC_LANG_ALL = $doc_lang_all
8450 MAN_LANGS = $language_man
8451 MAN_LANG_ALL = $man_lang_all
8453 prefix = \$(DESTDIR)$_prefix
8454 BINDIR = \$(DESTDIR)$_bindir
8455 DATADIR = \$(DESTDIR)$_datadir
8456 LIBDIR = \$(DESTDIR)$_libdir
8457 MANDIR = \$(DESTDIR)$_mandir
8458 CONFDIR = \$(DESTDIR)$_confdir
8466 INSTALLSTRIP = $_install_strip
8469 CFLAGS = $CFLAGS $extra_cflags
8470 ASFLAGS = \$(CFLAGS)
8471 CXXFLAGS = $CXXFLAGS $extra_cflags $extra_cxxflags
8473 CFLAGS_DHAHELPER = $cflags_dhahelper
8474 CFLAGS_FAAD_FIXED = $cflags_faad_fixed
8475 CFLAGS_LIBDVDCSS = $cflags_libdvdcss
8476 CFLAGS_LIBDVDCSS_DVDREAD = $cflags_libdvdcss_dvdread
8477 CFLAGS_LIBDVDNAV = $cflags_libdvdnav
8478 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
8479 CFLAGS_STACKREALIGN = $cflags_stackrealign
8480 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
8481 CFLAGS_TREMOR_LOW = $cflags_tremor_low
8483 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
8484 EXTRALIBS_MPLAYER = $libs_mplayer
8485 EXTRALIBS_MENCODER = $libs_mencoder
8488 HELP_FILE = $_mp_help
8495 $(mak_enable "$arch_all" "$arch" ARCH)
8496 $(mak_enable "$subarch_all" "$subarch" ARCH)
8497 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
8499 MENCODER = $_mencoder
8502 NEED_GETTIMEOFDAY = $_need_gettimeofday
8503 NEED_GLOB = $_need_glob
8504 NEED_MMAP = $_need_mmap
8505 NEED_SETENV = $_need_setenv
8506 NEED_SHMEM = $_need_shmem
8507 NEED_STRSEP = $_need_strsep
8508 NEED_SWAB = $_need_swab
8509 NEED_VSSCANF = $_need_vsscanf
8517 APPLE_IR = $_apple_ir
8518 APPLE_REMOTE = $_apple_remote
8520 AUDIO_INPUT = $_audio_input
8521 BITMAP_FONT = $_bitmap_font
8526 COREAUDIO = $_coreaudio
8527 COREVIDEO = $_corevideo
8531 DIRECT3D = $_direct3d
8532 DIRECTFB = $_directfb
8536 DVDNAV_INTERNAL = $dvdnav_internal
8538 DVDREAD_INTERNAL = $_dvdread_internal
8544 FAAD_INTERNAL = $_faad_internal
8545 FASTMEMCPY = $_fastmemcpy
8547 FREETYPE = $_freetype
8552 GL_WIN32 = $_gl_win32
8555 MATRIXVIEW = $matrixview
8558 GUI_WIN32 = $_gui_win32
8559 HAVE_POSIX_SELECT = $_posix_select
8560 HAVE_SYS_MMAN_H = $_mman
8563 JOYSTICK = $_joystick
8570 LIBASS_INTERNAL = $ass_internal
8574 LIBDVDCSS_INTERNAL = $_libdvdcss_internal
8578 LIBMENU_DVBIN = $_menu_dvbin
8579 LIBMPEG2 = $_libmpeg2
8580 LIBNEMESI = $_nemesi
8582 LIBSMBCLIENT = $_smb
8583 LIBTHEORA = $_theora
8586 MACOSX_FINDER = $_macosx_finder
8592 MUSEPACK = $_musepack
8594 NATIVE_RTSP = $_native_rtsp
8598 PE_EXECUTABLE = $_pe_executable
8601 PRIORITY = $_priority
8605 QTX_CODECS_WIN32 = $_qtx_codecs_win32
8606 QTX_EMULATION = $_qtx_emulation
8609 RADIO_CAPTURE=$_radio_capture
8610 REAL_CODECS = $_real
8614 STREAM_CACHE = $_stream_cache
8615 SGIAUDIO = $_sgiaudio
8616 SUNAUDIO = $_sunaudio
8622 TREMOR_INTERNAL = $_tremor_internal
8624 TV_BSDBT848 = $_tv_bsdbt848
8625 TV_DSHOW = $_tv_dshow
8630 UNRAR_EXEC = $_unrar_exec
8636 VIDIX_PCIDB = $_vidix_pcidb_val
8637 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
8638 VIDIX_IVTV=$_vidix_drv_ivtv
8639 VIDIX_MACH64=$_vidix_drv_mach64
8640 VIDIX_MGA=$_vidix_drv_mga
8641 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
8642 VIDIX_NVIDIA=$_vidix_drv_nvidia
8643 VIDIX_PM2=$_vidix_drv_pm2
8644 VIDIX_PM3=$_vidix_drv_pm3
8645 VIDIX_RADEON=$_vidix_drv_radeon
8646 VIDIX_RAGE128=$_vidix_drv_rage128
8647 VIDIX_S3=$_vidix_drv_s3
8648 VIDIX_SH_VEU=$_vidix_drv_sh_veu
8649 VIDIX_SIS=$_vidix_drv_sis
8650 VIDIX_UNICHROME=$_vidix_drv_unichrome
8654 WIN32DLL = $_win32dll
8655 WIN32WAVEOUT = $_win32waveout
8656 WIN32_EMULATION = $_win32_emulation
8657 WINVIDIX = $winvidix
8660 XANIM_CODECS = $_xanim
8662 XMMS_PLUGINS = $_xmms
8668 YUV4MPEG = $_yuv4mpeg
8672 LIBAVUTIL = $_libavutil
8673 LIBAVUTIL_A = $_libavutil_a
8674 LIBAVUTIL_SO = $_libavutil_so
8675 LIBAVCODEC = $_libavcodec
8676 LIBAVCODEC_A = $_libavcodec_a
8677 LIBAVCODEC_SO = $_libavcodec_so
8678 LIBAVFORMAT = $_libavformat
8679 LIBAVFORMAT_A = $_libavformat_a
8680 LIBAVFORMAT_SO = $_libavformat_so
8681 LIBPOSTPROC = $_libpostproc
8682 LIBPOSTPROC_A = $_libpostproc_a
8683 LIBPOSTPROC_SO = $_libpostproc_so
8684 LIBSWSCALE = $_libswscale
8685 LIBSWSCALE_A = $_libswscale_a
8686 LIBSWSCALE_SO = $_libswscale_so
8688 HOSTCC = \$(HOST_CC)
8689 HOSTCFLAGS = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3
8695 YASMFLAGS = $YASMFLAGS
8702 LIBNAME = \$(LIBPREF)\$(NAME)\$(LIBSUF)
8703 FULLNAME = \$(NAME)\$(BUILDSUF)
8705 # Some FFmpeg codecs depend on these. Enable them unconditionally for now.
8711 CONFIG_H264DSP = yes
8717 $mak_hardcoded_tables
8718 $mak_libavcodec_mpegaudio_hp
8719 !CONFIG_LIBRTMP = yes
8721 CONFIG_BZLIB = $bzlib
8722 CONFIG_ENCODERS = yes
8724 CONFIG_LIBDIRAC_DECODER = $_libdirac_lavc
8725 CONFIG_LIBDIRAC_ENCODER = $_libdirac_lavc
8726 CONFIG_LIBFAAC_ENCODER = $_faac_lavc
8727 CONFIG_LIBMP3LAME_ENCODER = $_mp3lame_lavc
8728 CONFIG_LIBOPENCORE_AMRNB_DECODER = $_libopencore_amrnb
8729 CONFIG_LIBOPENCORE_AMRNB_ENCODER = $_libopencore_amrnb
8730 CONFIG_LIBOPENCORE_AMRWB_DECODER = $_libopencore_amrwb
8731 OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
8732 OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
8733 CONFIG_LIBSCHROEDINGER_DECODER = $_libschroedinger_lavc
8734 CONFIG_LIBSCHROEDINGER_ENCODER = $_libschroedinger_lavc
8735 CONFIG_LIBVORBIS_ENCODER = $_libvorbis
8736 CONFIG_LIBX264_ENCODER = $_x264_lavc
8737 CONFIG_LIBXVID_ENCODER = $_xvid_lavc
8738 CONFIG_MLIB = $_mlib
8739 CONFIG_MUXERS = $_mencoder
8740 CONFIG_POSTPROC = yes
8741 CONFIG_VDPAU = $_vdpau
8742 CONFIG_XVMC = $_xvmc
8743 CONFIG_ZLIB = $_zlib
8745 HAVE_PTHREADS = $_pthreads
8747 HAVE_W32THREADS = $_w32threads
8748 HAVE_YASM = $have_yasm
8750 $(echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8751 $(echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8752 $(echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8753 $(echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8754 $(echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8755 $(echo $_libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8756 $(echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8757 $(echo $_libavhwaccels | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/')
8760 #############################################################################
8762 ff_config_enable
() {
8763 list
=$
(echo $1 |
tr '[a-z]' '[A-Z]')
8764 item
=$
(echo $2 |
tr '[a-z]' '[A-Z]')
8766 test -z "$_nprefix" && _nprefix
='CONFIG'
8767 for part
in $list; do
8768 if $
(echo $item |
grep -q -E "(^| )$part($| )"); then
8769 echo "#define ${_nprefix}_$part 1"
8771 echo "#define ${_nprefix}_$part 0"
8776 echo "Creating config.h"
8778 /*----------------------------------------------------------------------------
8779 ** This file has been automatically generated by configure any changes in it
8780 ** will be lost when you run configure again.
8781 ** Instead of modifying definitions here, use the --enable/--disable options
8782 ** of the configure script! See ./configure --help for details.
8783 *---------------------------------------------------------------------------*/
8785 #ifndef MPLAYER_CONFIG_H
8786 #define MPLAYER_CONFIG_H
8788 /* Undefine this if you do not want to select mono audio (left or right)
8789 with a stereo MPEG layer 2/3 audio stream. The command line option
8790 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
8791 right-only), with 0 being the default.
8793 #define CONFIG_FAKE_MONO 1
8795 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
8796 #define MAX_OUTBURST 65536
8798 /* set up audio OUTBURST. Do not change this! */
8799 #define OUTBURST 512
8801 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8803 #undef FAST_OSD_TABLE
8805 /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */
8806 #define MPEG12_POSTPROC 1
8807 #define ATTRIBUTE_ALIGNED_MAX 16
8811 #define CONFIGURATION "$_configuration"
8813 #define MPLAYER_DATADIR "$_datadir"
8814 #define MPLAYER_CONFDIR "$_confdir"
8815 #define MPLAYER_LIBDIR "$_libdir"
8817 /* definitions needed by included libraries */
8818 #define HAVE_INTTYPES_H 1
8819 /* libmpeg2 + FFmpeg */
8822 #define HAVE_ERRNO_H 1
8823 /* libdvdcss + libdvdread */
8824 #define HAVE_LIMITS_H 1
8825 /* libdvdcss + libfaad2 */
8826 #define HAVE_UNISTD_H 1
8827 /* libfaad2 + libdvdread */
8828 #define STDC_HEADERS 1
8829 #define HAVE_MEMCPY 1
8831 #define HAVE_STRING_H 1
8832 #define HAVE_STRINGS_H 1
8833 #define HAVE_SYS_STAT_H 1
8834 #define HAVE_SYS_TYPES_H 1
8836 #define READ_CACHE_TRACE 0
8838 #define HAVE_DLFCN_H 1
8842 /* system headers */
8844 $def_alsa_asoundlib_h
8848 $def_mman_has_map_failed
8850 $def_sys_asoundlib_h
8851 $def_sys_soundcard_h
8858 /* system functions */
8881 /* system-specific features */
8896 $def_restrict_keyword
8901 /* configurable options */
8905 $def_dynamic_plugins
8908 $def_runtime_cpudetection
8916 #define __CPU__ $iproc
8919 $(ff_config_enable "$arch_all" "$arch" "ARCH")
8920 $(ff_config_enable "$subarch_all" "$subarch" "ARCH")
8921 $(ff_config_enable "$cpuexts_all" "$cpuexts" "HAVE")
8925 #define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
8926 #define DEFAULT_DVD_DEVICE "$default_dvd_device"
8946 /* codec libraries */
8958 $def_mp3lame_preset_medium
8982 #define BINARY_CODECS_PATH "$_codecsdir"
8983 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8992 /* Audio output drivers */
9008 $def_ossaudio_devdsp
9009 $def_ossaudio_devmixer
9022 $def_ioctl_bt848_h_name
9023 $def_ioctl_meteor_h_name
9062 $def_struct_ipv6_mreq
9063 $def_struct_sockaddr_in6
9064 $def_struct_sockaddr_sa_len
9068 $def_sockaddr_storage
9083 $def_directfb_version
9120 $def_vidix_drv_cyberblade
9122 $def_vidix_drv_mach64
9124 $def_vidix_drv_mga_crtc2
9125 $def_vidix_drv_nvidia
9127 $def_vidix_drv_radeon
9128 $def_vidix_drv_rage128
9130 $def_vidix_drv_sh_veu
9132 $def_vidix_drv_unichrome
9166 #define CONFIG_DECODERS 1
9167 #define CONFIG_ENCODERS 1
9168 #define CONFIG_DEMUXERS 1
9179 $def_hardcoded_tables
9180 $def_libavcodec_mpegaudio_hp
9183 $def_local_aligned_8
9184 $def_local_aligned_16
9201 #define CONFIG_FASTDIV 0
9202 #define CONFIG_FFSERVER 0
9203 #define CONFIG_GPL 1
9204 #define CONFIG_GRAY 0
9205 #define CONFIG_LIBRTMP 0
9206 #define CONFIG_LIBVORBIS 0
9207 #define CONFIG_POWERPC_PERF 0
9208 #define CONFIG_SMALL 0
9209 #define CONFIG_SWSCALE_ALPHA 1
9211 #if defined(HAVE_AF_INET6) && (!defined(_WIN32) || defined(__CYGWIN__))
9212 #define CONFIG_IPV6 1
9214 #define CONFIG_IPV6 0
9217 #define HAVE_ATTRIBUTE_MAY_ALIAS 1
9218 #define av_alias __attribute__((may_alias))
9219 #define HAVE_ATTRIBUTE_PACKED 1
9220 #define HAVE_GETHRTIME 0
9221 #define HAVE_INLINE_ASM 1
9222 #define HAVE_LDBRX 0
9223 #define HAVE_POLL_H 1
9224 #define HAVE_PPC4XX 0
9225 #define HAVE_STRERROR_R 0
9226 #define HAVE_SYS_SELECT_H 0
9227 #define HAVE_VFP_ARGS 1
9228 #define HAVE_VIRTUALALLOC 0
9230 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
9231 #define CONFIG_AANDCT 1
9232 #define CONFIG_DCT 1
9233 #define CONFIG_DWT 1
9234 #define CONFIG_FFT 1
9235 #define CONFIG_GOLOMB 1
9236 #define CONFIG_H264DSP 1
9237 #define CONFIG_LPC 1
9238 #define CONFIG_MDCT 1
9239 #define CONFIG_RDFT 1
9241 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
9244 #define HAVE_EBP_AVAILABLE 1
9246 #define HAVE_EBP_AVAILABLE 0
9249 #define FFMPEG_CONFIGURATION "--enable-gpl --enable-postproc"
9250 #define FFMPEG_LICENSE "GPL version 2 or later"
9252 /* External libraries used through libavcodec. */
9255 $def_libopencore_amrnb
9256 $def_libopencore_amrwb
9258 $def_libschroedinger_lavc
9263 $(ff_config_enable "$_libavdecoders_all" "$_libavdecoders")
9264 $(ff_config_enable "$_libavencoders_all" "$_libavencoders")
9265 $(ff_config_enable "$_libavparsers_all" "$_libavparsers")
9266 $(ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers")
9267 $(ff_config_enable "$_libavmuxers_all" "$_libavmuxers")
9268 $(ff_config_enable "$_libavprotocols_all" "$_libavprotocols")
9269 $(ff_config_enable "$_libavbsfs_all" "$_libavbsfs")
9270 $(ff_config_enable "$_libavhwaccels_all" "$_libavhwaccels")
9272 #endif /* MPLAYER_CONFIG_H */
9275 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
9276 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
9278 ############################################################################
9280 # Create avconfig.h for FFmpeg.
9281 cat > "$TMPH" << EOF
9282 /* Generated by mpconfigure */
9283 #ifndef AVUTIL_AVCONFIG_H
9284 #define AVUTIL_AVCONFIG_H
9286 #endif /* AVUTIL_AVCONFIG_H */
9289 # Do not overwrite an unchanged avconfig.h to avoid superfluous rebuilds.
9290 cmp -s "$TMPH" libavutil
/avconfig.h ||
mv -f "$TMPH" libavutil
/avconfig.h
9292 #############################################################################
9296 Config files successfully generated by ./configure $_configuration !
9298 Install prefix: $_prefix
9299 Data directory: $_datadir
9300 Config direct.: $_confdir
9302 Byte order: $_byte_order
9303 Optimizing for: $_optimizing
9306 Messages/GUI: $language_msg
9307 Manual pages: $language_man
9308 Documentation: $language_doc
9310 Enabled optional drivers:
9311 Input: $inputmodules
9312 Codecs: $codecmodules
9313 Audio output: $aomodules
9314 Video output: $vomodules
9316 Disabled optional drivers:
9317 Input: $_noinputmodules
9318 Codecs: $nocodecmodules
9319 Audio output: $noaomodules
9320 Video output: $novomodules
9322 'config.h' and 'config.mak' contain your configuration options.
9323 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
9324 compile *** DO NOT REPORT BUGS if you tweak these files ***
9326 'make' will now compile MPlayer and 'make install' will install it.
9327 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
9332 if test "$_mtrr" = yes ; then
9333 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$doc_lang/video.html#mtrr)"
9339 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
9340 operating system ($system_name). You may encounter a few files that cannot
9341 be played due to missing open source video/audio codec support.
9348 Check $TMPLOG if you wonder why an autodetection failed (make sure
9349 development headers/packages are installed).
9351 NOTE: The --enable-* parameters unconditionally force options on, completely
9352 skipping autodetection. This behavior is unlike what you may be used to from
9353 autoconf-based configure scripts that can decide to override you. This greater
9354 level of control comes at a price. You may have to provide the correct compiler
9355 and linker flags yourself.
9356 If you used one of these options (except --enable-menu and similar ones that
9357 turn on internal features) and experience a compilation or linking failure,
9358 make sure you have passed the necessary compiler/linker flags to configure.
9360 If you suspect a bug, please read DOCS/HTML/$doc_lang/bugreports.html.
9364 if test "$_warn_CFLAGS" = yes; then
9367 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
9370 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
9372 It is strongly recommended to let MPlayer choose the correct CFLAGS!
9373 To do so, execute 'CFLAGS= ./configure <options>'
9379 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"