3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: check the cvs 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 "$_feature" = auto; then
27 # #include <feature.h>
28 # int main(void) { return 0; }
31 # cc_check && _feature=yes
32 # if test "$_feature" = yes ; then
33 # _def_feature='#define HAVE_FEATURE 1'
35 # _def_feature='#undef HAVE_FEATURE'
39 # Furthermore you need to add the variable _feature to the list of default
40 # settings and set it to one of yes/no/auto. Also add appropriate
41 # --enable-feature/--disable-feature command line options.
42 # The results of the check should be written to config.h and config.mak
43 # at the end of this script. The variable names used for this should be
44 # uniform, i.e. if the option is named 'feature':
46 # _feature : should have a value of yes/no/auto
47 # _def_feature : '#define ... 1' or '#undef ...' for conditional compilation
48 # _ld_feature : '-L/path/dir -lfeature' GCC options
50 #############################################################################
52 # 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 $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
67 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
75 compile_check
$TMPC $@
79 compile_check
$TMPCPP $@
-lstdc++
83 "$TMPEXE" >> "$TMPLOG" 2>&1
86 # Display error message, flushes tempfile, exit
91 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP"
92 echo "Check \"$TMPLOG\" if you do not understand why it failed."
96 # OS test booleans functions
98 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
100 linux
() { issystem
"Linux" || issystem
"uClinux" ; return "$?" ; }
101 sunos
() { issystem
"SunOS" ; return "$?" ; }
102 hpux
() { issystem
"HP-UX" ; return "$?" ; }
103 irix
() { issystem
"IRIX" ; return "$?" ; }
104 aix
() { issystem
"AIX" ; return "$?" ; }
105 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
106 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; return "$?" ; }
107 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
108 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
109 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
110 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
111 qnx
() { issystem
"QNX" ; return "$?" ; }
112 darwin
() { issystem
"Darwin" ; return "$?" ; }
113 gnu
() { issystem
"GNU" ; return "$?" ; }
114 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
115 morphos
() { issystem
"MorphOS" ; return "$?" ; }
116 amigaos
() { issystem
"AmigaOS" ; return "$?" ; }
117 win32
() { cygwin || mingw32
; return "$?" ; }
118 beos
() { issystem
"BEOS" ; return "$?" ; }
120 # arch test boolean functions
121 # x86/x86pc is used by QNX
124 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
131 x86_64|amd64
) return 0 ;;
142 ppc|powerpc
) return 0;;
168 # Use this before starting a check
170 echo "============ Checking for $@ ============" >> "$TMPLOG"
171 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
174 # Use this to echo the results of a check
176 if test "$_res_comment" ; then
177 _res_comment
="($_res_comment)"
179 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
180 echo "##########################################" >> "$TMPLOG"
182 echo "$@ $_res_comment"
185 #############################################################################
187 # Check how echo works in this /bin/sh
189 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
190 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
193 LANGUAGES
=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s:help/help_mp-\(..\).h:\1:g" | sed "s:help/help_mp-\(.....\).h:\1:g"`
197 Usage: $0 [OPTIONS]...
200 -h, --help display this help and exit
202 Installation directories:
203 --prefix=DIR prefix directory for installation [/usr/local]
204 --bindir=DIR directory for installing binaries [PREFIX/bin]
205 --datadir=DIR directory for installing machine independent
206 data files (skins, etc) [PREFIX/share/mplayer]
207 --mandir=DIR directory for installing man pages [PREFIX/share/man]
208 --confdir=DIR directory for installing configuration files
210 --libdir=DIR directory for object code libraries [PREFIX/lib]
211 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
212 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
213 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
214 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
217 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
218 --disable-mplayer disable MPlayer compilation [enable]
219 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
220 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
221 --enable-largefiles enable support for files > 2GB [disable]
222 --enable-linux-devfs set default devices to devfs [disable]
223 --enable-termcap use termcap database for key codes [autodetect]
224 --enable-termios use termios database for key codes [autodetect]
225 --disable-iconv disable iconv for encoding conversion [autodetect]
226 --disable-langinfo do not use langinfo [autodetect]
227 --enable-lirc enable LIRC (remote control) support [autodetect]
228 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
229 --enable-joystick enable joystick support [disable]
230 --enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
231 --disable-vm disable X video mode extensions [autodetect]
232 --disable-xf86keysym disable support for multimedia keys [autodetect]
233 --enable-radio enable radio interface [disable]
234 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
235 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
236 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
237 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
238 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
239 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
240 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
241 --disable-tv-teletext disable TV teletext interface [autodetect]
242 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
243 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
244 --disable-network disable networking [enable]
245 --enable-winsock2 enable winsock2 [autodetect]
246 --enable-smb enable Samba (SMB) input [autodetect]
247 --enable-live enable LIVE555 Streaming Media [autodetect]
248 --enable-nemesi enable Nemesi Streaming Media [autodetect]
249 --disable-dvdnav disable libdvdnav [autodetect]
250 --disable-dvdread disable libdvdread [autodetect]
251 --disable-dvdread-internal disable internal libdvdread [autodetect]
252 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
253 --disable-cdparanoia disable cdparanoia [autodetect]
254 --disable-cddb disable cddb [autodetect]
255 --disable-bitmap-font disable bitmap font support [enable]
256 --disable-freetype disable FreeType 2 font rendering [autodetect]
257 --disable-fontconfig disable fontconfig font lookup [autodetect]
258 --disable-unrarlib disable Unique RAR File Library [enabled]
259 --enable-menu enable OSD menu (not DVD menu) [disabled]
260 --disable-sortsub disable subtitle sorting [enabled]
261 --enable-fribidi enable the FriBiDi libs [autodetect]
262 --disable-enca disable ENCA charset oracle library [autodetect]
263 --disable-macosx disable Mac OS X specific features [autodetect]
264 --disable-maemo disable maemo specific features [autodetect]
265 --enable-macosx-finder-support enable Mac OS X Finder invocation
266 parameter parsing [disabled]
267 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
268 --disable-inet6 disable IPv6 support [autodetect]
269 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
270 --disable-ftp disable FTP support [enabled]
271 --disable-vstream disable TiVo vstream client support [autodetect]
272 --disable-pthreads disable Posix threads support [autodetect]
273 --disable-w32threads disable Win32 threads support [autodetect]
274 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
275 --enable-rpath enable runtime linker path for extra libs [disabled]
278 --enable-gif enable GIF support [autodetect]
279 --enable-png enable PNG input/output support [autodetect]
280 --enable-jpeg enable JPEG input/output support [autodetect]
281 --enable-libcdio enable external libcdio [autodetect]
282 --enable-liblzo enable external liblzo [autodetect]
283 --disable-win32dll disable Win32 DLL support [enabled]
284 --disable-qtx disable QuickTime codecs support [enabled]
285 --disable-xanim disable XAnim codecs support [enabled]
286 --disable-real disable RealPlayer codecs support [enabled]
287 --disable-xvid disable XviD [autodetect]
288 --disable-x264 disable x264 [autodetect]
289 --disable-libnut disable libnut [autodetect]
290 --disable-libavutil_a disable static libavutil [autodetect]
291 --disable-libavcodec_a disable static libavcodec [autodetect]
292 --disable-libavformat_a disable static libavformat [autodetect]
293 --disable-libpostproc_a disable static libpostproc [autodetect]
294 --disable-libavutil_so disable shared libavutil [autodetect]
295 --disable-libavcodec_so disable shared libavcodec [autodetect]
296 --disable-libavformat_so disable shared libavformat [autodetect]
297 --disable-libpostproc_so disable shared libpostproc [autodetect]
298 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
299 in libavcodec [enabled]
300 --disable-tremor-internal disable internal Tremor [enabled]
301 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
302 --enable-tremor-external enable external Tremor [autodetect]
303 --disable-libvorbis disable libvorbis support [autodetect]
304 --disable-speex disable Speex support [autodetect]
305 --enable-theora enable OggTheora libraries [autodetect]
306 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
307 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
308 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
309 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
310 --disable-ladspa disable LADSPA plugin support [autodetect]
311 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
312 --disable-mad disable libmad (MPEG audio) support [autodetect]
313 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
314 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
315 --enable-xmms enable XMMS input plugin support [disabled]
316 --enable-libdca enable libdca support [autodetect]
317 --disable-mp3lib disable builtin mp3lib [enabled]
318 --disable-liba52 disable builtin liba52 [enabled]
319 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
320 --disable-musepack disable musepack support [autodetect]
321 --disable-libamr_nb disable libamr narrowband [autodetect]
322 --disable-libamr_wb disable libamr wideband [autodetect]
323 --disable-decoder=DECODER disable specified FFmpeg decoder
324 --enable-decoder=DECODER enable specified FFmpeg decoder
325 --disable-encoder=ENCODER disable specified FFmpeg encoder
326 --enable-encoder=ENCODER enable specified FFmpeg encoder
327 --disable-parser=PARSER disable specified FFmpeg parser
328 --enable-parser=PARSER enable specified FFmpeg parser
329 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
330 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
331 --disable-muxer=MUXER disable specified FFmpeg muxer
332 --enable-muxer=MUXER enable specified FFmpeg muxer
335 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
336 --disable-vidix-external disable external VIDIX [for x86 *nix]
337 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
338 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
339 nvidia,pm2,pm3,radeon,rage128,savage,sis,unichrome
340 --enable-gl enable OpenGL video output [autodetect]
341 --enable-dga2 enable DGA 2 support [autodetect]
342 --enable-dga1 enable DGA 1 support [autodetect]
343 --enable-vesa enable VESA video output [autodetect]
344 --enable-svga enable SVGAlib video output [autodetect]
345 --enable-sdl enable SDL video output [autodetect]
346 --enable-aa enable AAlib video output [autodetect]
347 --enable-caca enable CACA video output [autodetect]
348 --enable-ggi enable GGI video output [autodetect]
349 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
350 --enable-directx enable DirectX video output [autodetect]
351 --enable-dxr2 enable DXR2 video output [autodetect]
352 --enable-dxr3 enable DXR3/H+ video output [autodetect]
353 --enable-ivtv enable IVTV TV-Out video output [autodetect]
354 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
355 --enable-dvb enable DVB video output [autodetect]
356 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
357 --enable-mga enable mga_vid video output [autodetect]
358 --enable-xmga enable mga_vid X11 video output [autodetect]
359 --enable-xv enable Xv video output [autodetect]
360 --enable-xvmc enable XvMC acceleration [disable]
361 --enable-vm enable XF86VidMode support [autodetect]
362 --enable-xinerama enable Xinerama support [autodetect]
363 --enable-x11 enable X11 video output [autodetect]
364 --enable-xshape enable XShape support [autodetect]
365 --enable-fbdev enable FBDev video output [autodetect]
366 --enable-mlib enable mediaLib video output (Solaris) [disable]
367 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
368 --enable-tdfxfb enable tdfxfb video output [disable]
369 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
370 --enable-directfb enable DirectFB video output [autodetect]
371 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
372 --enable-bl enable Blinkenlights video output [disable]
373 --enable-tdfxvid enable tdfx_vid video output [disable]
374 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
375 --disable-tga disable Targa video output [enable]
376 --disable-pnm disable PNM video output [enable]
377 --disable-md5sum disable md5sum video output [enable]
380 --disable-alsa disable ALSA audio output [autodetect]
381 --disable-ossaudio disable OSS audio output [autodetect]
382 --disable-arts disable aRts audio output [autodetect]
383 --disable-esd disable esd audio output [autodetect]
384 --disable-pulse disable Pulseaudio audio output [autodetect]
385 --disable-jack disable JACK audio output [autodetect]
386 --disable-openal disable OpenAL audio output [autodetect]
387 --disable-nas disable NAS audio output [autodetect]
388 --disable-sgiaudio disable SGI audio output [autodetect]
389 --disable-sunaudio disable Sun audio output [autodetect]
390 --disable-win32waveout disable Windows waveout audio output [autodetect]
391 --disable-select disable using select() on the audio device [enable]
393 Miscellaneous options:
394 --enable-runtime-cpudetection enable runtime CPU detection [disable]
395 --enable-cross-compile enable cross-compilation [autodetect]
396 --cc=COMPILER C compiler to build MPlayer [gcc]
397 --host-cc=COMPILER C compiler for tools needed while building [gcc]
398 --as=ASSEMBLER assembler to build MPlayer [as]
399 --ar=AR librarian to build MPlayer [ar]
400 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
401 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
402 --enable-static build a statically linked binary
403 --charset=charset convert the console messages to this character set
404 --language=list a white space or comma separated list of languages for
405 translated man pages, the first language is used for
406 messages and the GUI (the environment variable
407 \$LINGUAS is also honored) [en]
408 (Available: $LANGUAGES all)
409 --with-install=PATH path to a custom install program
410 --enable-color-console enable color console output (UNSUPPORTED) [disable]
413 --enable-mmx enable MMX [autodetect]
414 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
415 --enable-3dnow enable 3DNow! [autodetect]
416 --enable-3dnowext enable extended 3DNow! [autodetect]
417 --enable-sse enable SSE [autodetect]
418 --enable-sse2 enable SSE2 [autodetect]
419 --enable-ssse3 enable SSSE3 [autodetect]
420 --enable-shm enable shm [autodetect]
421 --enable-altivec enable AltiVec (PowerPC) [autodetect]
422 --enable-armv5te enable DSP extensions (ARM) [autodetect]
423 --enable-armv6 enable ARMv6 (ARM) [autodetect]
424 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
425 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
426 --enable-big-endian force byte order to big-endian [autodetect]
427 --enable-debug[=1-3] compile-in debugging information [disable]
428 --enable-profile compile-in profiling information [disable]
429 --disable-sighandler disable sighandler for crashes [enable]
430 --enable-crash-debug enable automatic gdb attach on crash [disable]
431 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
433 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
434 --disable-gcc-check disable gcc version checking [enable]
436 Use these options if autodetection fails (Options marked with (*) accept
437 multiple paths separated by ':'):
438 --extra-libs=FLAGS extra linker flags
439 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
440 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
441 --with-extraincdir=DIR extra header search paths in DIR (*)
442 --with-extralibdir=DIR extra linker search paths in DIR (*)
443 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
445 --with-freetype-config=PATH path to freetype-config
446 --with-fribidi-config=PATH path to fribidi-config
447 --with-glib-config=PATH path to glib*-config
448 --with-gtk-config=PATH path to gtk*-config
449 --with-sdl-config=PATH path to sdl*-config
450 --with-dvdnav-config=PATH path to dvdnav-config
452 This configure script is NOT autoconf-based, even though its output is similar.
453 It will try to autodetect all configuration options. If you --enable an option
454 it will be forcefully turned on, skipping autodetection. This can break
455 compilation, so you need to know what you are doing.
460 # GOTCHA: the variables below defines the default behavior for autodetection
461 # and have - unless stated otherwise - at least 2 states : yes no
462 # If autodetection is available then the third state is: auto
482 test "$CC" && _cc
="$CC"
485 _runtime_cpudetection
=no
493 _libavdecoders_all
=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
494 _libavdecoders
=` echo $_libavdecoders_all | sed -e s/LIBFAAD_DECODER// -e s/MPEG4AAC_DECODER// -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// `
495 _libavencoders_all
=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
496 _libavencoders
=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// -e s/LIBVORBIS_ENCODER// `
497 _libavparsers_all
=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
498 _libavparsers
=$_libavparsers_all
499 _libavbsfs_all
=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
500 _libavbsfs
=$_libavbsfs_all
501 _libavdemuxers_all
=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
502 _libavdemuxers
=`echo $_libavdemuxers_all | sed -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/LIBNUT_DEMUXER// -e s/AVISYNTH_DEMUXER// `
503 _libavmuxers_all
=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
504 _libavmuxers
=`echo $_libavmuxers_all | sed -e s/RTP_MUXER// `
505 _libavprotocols_all
=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
511 _libavcodec_mpegaudio_hp
=yes
519 _xvmc
=no
#auto when complete
559 _tremor_external
=auto
574 _dvdnavconfig
=dvdnav-config
576 _dvdread_internal
=auto
577 _libdvdcss_internal
=auto
588 _mlib
=no
#broken, thus disabled
652 _macosx_finder_support
=no
655 _freetypeconfig
='freetype-config'
657 _fribidiconfig
='fribidi-config'
671 _def_stream_cache
="#define USE_STREAM_CACHE 1"
679 _prefix
=`echo $ac_option | cut -d '=' -f 2`
682 _bindir
=`echo $ac_option | cut -d '=' -f 2`
685 _datadir
=`echo $ac_option | cut -d '=' -f 2`
688 _mandir
=`echo $ac_option | cut -d '=' -f 2`
691 _confdir
=`echo $ac_option | cut -d '=' -f 2`
694 _libdir
=`echo $ac_option | cut -d '=' -f 2`
697 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
700 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
703 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
706 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
708 --with-extraincdir=*)
709 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
711 --with-extralibdir=*)
712 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
716 _install
=`echo $ac_option | cut -d '=' -f 2 `
719 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
723 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
725 --with-freetype-config=*)
726 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
728 --with-fribidi-config=*)
729 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
732 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
734 --with-glib-config=*)
735 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
737 --with-dvdnav-config=*)
738 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
742 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
744 --extra-libs-mplayer=*)
745 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
747 --extra-libs-mencoder=*)
748 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
752 _target
=`echo $ac_option | cut -d '=' -f 2`
755 _cc
=`echo $ac_option | cut -d '=' -f 2`
758 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
761 _as
=`echo $ac_option | cut -d '=' -f 2`
764 _ar
=`echo $ac_option | cut -d '=' -f 2`
767 _ranlib
=`echo $ac_option | cut -d '=' -f 2`
770 _charset
=`echo $ac_option | cut -d '=' -f 2`
773 _language
=`echo $ac_option | cut -d '=' -f 2`
792 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
797 --enable-gcc-check) _gcc_check
=yes ;;
798 --disable-gcc-check) _gcc_check
=no
;;
799 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
800 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
801 --enable-cross-compile) _cross_compile
=yes ;;
802 --disable-cross-compile) _cross_compile
=no
;;
803 --enable-mencoder) _mencoder
=yes ;;
804 --disable-mencoder) _mencoder
=no
;;
805 --enable-mplayer) _mplayer
=yes ;;
806 --disable-mplayer) _mplayer
=no
;;
807 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
808 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
809 --enable-x11) _x11
=yes ;;
810 --disable-x11) _x11
=no
;;
811 --enable-xshape) _xshape
=yes ;;
812 --disable-xshape) _xshape
=no
;;
813 --enable-xv) _xv
=yes ;;
814 --disable-xv) _xv
=no
;;
815 --enable-xvmc) _xvmc
=yes ;;
816 --disable-xvmc) _xvmc
=no
;;
817 --enable-sdl) _sdl
=yes ;;
818 --disable-sdl) _sdl
=no
;;
819 --enable-directx) _directx
=yes ;;
820 --disable-directx) _directx
=no
;;
821 --enable-win32waveout) _win32waveout
=yes ;;
822 --disable-win32waveout) _win32waveout
=no
;;
823 --enable-nas) _nas
=yes ;;
824 --disable-nas) _nas
=no
;;
825 --enable-png) _png
=yes ;;
826 --disable-png) _png
=no
;;
827 --enable-jpeg) _jpeg
=yes ;;
828 --disable-jpeg) _jpeg
=no
;;
829 --enable-pnm) _pnm
=yes ;;
830 --disable-pnm) _pnm
=no
;;
831 --enable-md5sum) _md5sum
=yes ;;
832 --disable-md5sum) _md5sum
=no
;;
833 --enable-gif) _gif
=yes ;;
834 --disable-gif) _gif
=no
;;
835 --enable-gl) _gl
=yes ;;
836 --disable-gl) _gl
=no
;;
837 --enable-ggi) _ggi
=yes ;;
838 --disable-ggi) _ggi
=no
;;
839 --enable-ggiwmh) _ggiwmh
=yes ;;
840 --disable-ggiwmh) _ggiwmh
=no
;;
841 --enable-aa) _aa
=yes ;;
842 --disable-aa) _aa
=no
;;
843 --enable-caca) _caca
=yes ;;
844 --disable-caca) _caca
=no
;;
845 --enable-svga) _svga
=yes ;;
846 --disable-svga) _svga
=no
;;
847 --enable-vesa) _vesa
=yes ;;
848 --disable-vesa) _vesa
=no
;;
849 --enable-fbdev) _fbdev
=yes ;;
850 --disable-fbdev) _fbdev
=no
;;
851 --enable-dvb) _dvb
=yes ;;
852 --disable-dvb) _dvb
=no
;;
853 --enable-dvbhead) _dvbhead
=yes ;;
854 --disable-dvbhead) _dvbhead
=no
;;
855 --enable-dxr2) _dxr2
=yes ;;
856 --disable-dxr2) _dxr2
=no
;;
857 --enable-dxr3) _dxr3
=yes ;;
858 --disable-dxr3) _dxr3
=no
;;
859 --enable-ivtv) _ivtv
=yes ;;
860 --disable-ivtv) _ivtv
=no
;;
861 --enable-v4l2) _v4l2
=yes ;;
862 --disable-v4l2) _v4l2
=no
;;
863 --enable-iconv) _iconv
=yes ;;
864 --disable-iconv) _iconv
=no
;;
865 --enable-langinfo) _langinfo
=yes ;;
866 --disable-langinfo) _langinfo
=no
;;
867 --enable-rtc) _rtc
=yes ;;
868 --disable-rtc) _rtc
=no
;;
869 --enable-libdv) _libdv
=yes ;;
870 --disable-libdv) _libdv
=no
;;
871 --enable-ossaudio) _ossaudio
=yes ;;
872 --disable-ossaudio) _ossaudio
=no
;;
873 --enable-arts) _arts
=yes ;;
874 --disable-arts) _arts
=no
;;
875 --enable-esd) _esd
=yes ;;
876 --disable-esd) _esd
=no
;;
877 --enable-pulse) _pulse
=yes ;;
878 --disable-pulse) _pulse
=no
;;
879 --enable-jack) _jack
=yes ;;
880 --disable-jack) _jack
=no
;;
881 --enable-openal) _openal
=yes ;;
882 --disable-openal) _openal
=no
;;
883 --enable-mad) _mad
=yes ;;
884 --disable-mad) _mad
=no
;;
885 --enable-toolame) _toolame
=yes ;;
886 --disable-toolame) _toolame
=no
;;
887 --enable-twolame) _twolame
=yes ;;
888 --disable-twolame) _twolame
=no
;;
889 --enable-libcdio) _libcdio
=yes ;;
890 --disable-libcdio) _libcdio
=no
;;
891 --enable-liblzo) _liblzo
=yes ;;
892 --disable-liblzo) _liblzo
=no
;;
893 --enable-libvorbis) _libvorbis
=yes ;;
894 --disable-libvorbis) _libvorbis
=no
;;
895 --enable-speex) _speex
=yes ;;
896 --disable-speex) _speex
=no
;;
897 --enable-tremor-internal) _tremor_internal
=yes ;;
898 --disable-tremor-internal) _tremor_internal
=no
;;
899 --enable-tremor-low) _tremor_low
=yes ;;
900 --disable-tremor-low) _tremor_low
=no
;;
901 --enable-tremor-external) _tremor_external
=yes ;;
902 --disable-tremor-external) _tremor_external
=no
;;
903 --enable-theora) _theora
=yes ;;
904 --disable-theora) _theora
=no
;;
905 --enable-mp3lib) _mp3lib
=yes ;;
906 --disable-mp3lib) _mp3lib
=no
;;
907 --enable-liba52) _liba52
=yes ;;
908 --disable-liba52) _liba52
=no
;;
909 --enable-libdca) _libdca
=yes ;;
910 --disable-libdca) _libdca
=no
;;
911 --enable-libmpeg2) _libmpeg2
=yes ;;
912 --disable-libmpeg2) _libmpeg2
=no
;;
913 --enable-musepack) _musepack
=yes ;;
914 --disable-musepack) _musepack
=no
;;
915 --enable-faad-internal) _faad_internal
=yes ;;
916 --disable-faad-internal) _faad_internal
=no
;;
917 --enable-faad-external) _faad_external
=yes ;;
918 --disable-faad-external) _faad_external
=no
;;
919 --enable-faad-fixed) _faad_fixed
=yes ;;
920 --disable-faad-fixed) _faad_fixed
=no
;;
921 --enable-faac) _faac
=yes ;;
922 --disable-faac) _faac
=no
;;
923 --enable-ladspa) _ladspa
=yes ;;
924 --disable-ladspa) _ladspa
=no
;;
925 --enable-xmms) _xmms
=yes ;;
926 --disable-xmms) _xmms
=no
;;
927 --enable-dvdread) _dvdread
=yes ;;
928 --disable-dvdread) _dvdread
=no
;;
929 --enable-dvdread-internal) _dvdread_internal
=yes ;;
930 --disable-dvdread-internal) _dvdread_internal
=no
;;
931 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
932 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
933 --enable-dvdnav) _dvdnav
=yes ;;
934 --disable-dvdnav) _dvdnav
=no
;;
935 --enable-xanim) _xanim
=yes ;;
936 --disable-xanim) _xanim
=no
;;
937 --enable-real) _real
=yes ;;
938 --disable-real) _real
=no
;;
939 --enable-live) _live
=yes ;;
940 --disable-live) _live
=no
;;
941 --enable-nemesi) _nemesi
=yes ;;
942 --disable-nemesi) _nemesi
=no
;;
943 --enable-xinerama) _xinerama
=yes ;;
944 --disable-xinerama) _xinerama
=no
;;
945 --enable-mga) _mga
=yes ;;
946 --disable-mga) _mga
=no
;;
947 --enable-xmga) _xmga
=yes ;;
948 --disable-xmga) _xmga
=no
;;
949 --enable-vm) _vm
=yes ;;
950 --disable-vm) _vm
=no
;;
951 --enable-xf86keysym) _xf86keysym
=yes ;;
952 --disable-xf86keysym) _xf86keysym
=no
;;
953 --enable-mlib) _mlib
=yes ;;
954 --disable-mlib) _mlib
=no
;;
955 --enable-sunaudio) _sunaudio
=yes ;;
956 --disable-sunaudio) _sunaudio
=no
;;
957 --enable-sgiaudio) _sgiaudio
=yes ;;
958 --disable-sgiaudio) _sgiaudio
=no
;;
959 --enable-alsa) _alsa
=yes ;;
960 --disable-alsa) _alsa
=no
;;
961 --enable-tv) _tv
=yes ;;
962 --disable-tv) _tv
=no
;;
963 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
964 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
965 --enable-tv-v4l1) _tv_v4l1
=yes ;;
966 --disable-tv-v4l1) _tv_v4l1
=no
;;
967 --enable-tv-v4l2) _tv_v4l2
=yes ;;
968 --disable-tv-v4l2) _tv_v4l2
=no
;;
969 --enable-tv-dshow) _tv_dshow
=yes ;;
970 --disable-tv-dshow) _tv_dshow
=no
;;
971 --enable-tv-teletext) _tv_teletext
=yes ;;
972 --disable-tv-teletext) _tv_teletext
=no
;;
973 --enable-radio) _radio
=yes ;;
974 --enable-radio-capture) _radio_capture
=yes ;;
975 --disable-radio-capture) _radio_capture
=no
;;
976 --disable-radio) _radio
=no
;;
977 --enable-radio-v4l) _radio_v4l
=yes ;;
978 --disable-radio-v4l) _radio_v4l
=no
;;
979 --enable-radio-v4l2) _radio_v4l2
=yes ;;
980 --disable-radio-v4l2) _radio_v4l2
=no
;;
981 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
982 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
983 --enable-pvr) _pvr
=yes ;;
984 --disable-pvr) _pvr
=no
;;
985 --enable-fastmemcpy) _fastmemcpy
=yes ;;
986 --disable-fastmemcpy) _fastmemcpy
=no
;;
987 --enable-network) _network
=yes ;;
988 --disable-network) _network
=no
;;
989 --enable-winsock2) _winsock2
=yes ;;
990 --disable-winsock2) _winsock2
=no
;;
991 --enable-smb) _smbsupport
=yes ;;
992 --disable-smb) _smbsupport
=no
;;
993 --enable-vidix-internal) _vidix_internal
=yes ;;
994 --disable-vidix-internal) _vidix_internal
=no
;;
995 --enable-vidix-external) _vidix_external
=yes ;;
996 --disable-vidix-external) _vidix_external
=no
;;
997 --with-vidix-drivers=*)
998 _vidix_drivers
=`echo $ac_option | cut -d '=' -f 2`
1000 --enable-joystick) _joystick
=yes ;;
1001 --disable-joystick) _joystick
=no
;;
1002 --enable-xvid) _xvid
=yes ;;
1003 --disable-xvid) _xvid
=no
;;
1004 --enable-x264) _x264
=yes ;;
1005 --disable-x264) _x264
=no
;;
1006 --enable-libnut) _libnut
=yes ;;
1007 --disable-libnut) _libnut
=no
;;
1008 --enable-libavutil_a) _libavutil_a
=yes ;;
1009 --disable-libavutil_a) _libavutil_a
=no
;;
1010 --enable-libavutil_so) _libavutil_so
=yes ;;
1011 --disable-libavutil_so) _libavutil_so
=no
;;
1012 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1013 --disable-libavcodec_a) _libavcodec_a
=no
;;
1014 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1015 --disable-libavcodec_so) _libavcodec_so
=no
;;
1016 --enable-libamr_nb) _libamr_nb
=yes ;;
1017 --disable-libamr_nb) _libamr_nb
=no
;;
1018 --enable-libamr_wb) _libamr_wb
=yes ;;
1019 --disable-libamr_wb) _libamr_wb
=no
;;
1020 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
1021 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1022 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
1023 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1024 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
1025 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1026 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
1027 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1028 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
1029 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1030 --enable-libavformat_a) _libavformat_a
=yes ;;
1031 --disable-libavformat_a) _libavformat_a
=no
;;
1032 --enable-libavformat_so) _libavformat_so
=yes ;;
1033 --disable-libavformat_so) _libavformat_so
=no
;;
1034 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1035 --disable-libpostproc_a) _libpostproc_a
=no
;;
1036 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1037 --disable-libpostproc_so) _libpostproc_so
=no
;;
1038 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1039 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1041 --enable-lirc) _lirc
=yes ;;
1042 --disable-lirc) _lirc
=no
;;
1043 --enable-lircc) _lircc
=yes ;;
1044 --disable-lircc) _lircc
=no
;;
1045 --enable-apple-remote) _apple_remote
=yes ;;
1046 --disable-apple-remote) _apple_remote
=no
;;
1047 --enable-gui) _gui
=yes ;;
1048 --disable-gui) _gui
=no
;;
1049 --enable-gtk1) _gtk1
=yes ;;
1050 --disable-gtk1) _gtk1
=no
;;
1051 --enable-termcap) _termcap
=yes ;;
1052 --disable-termcap) _termcap
=no
;;
1053 --enable-termios) _termios
=yes ;;
1054 --disable-termios) _termios
=no
;;
1055 --enable-3dfx) _3dfx
=yes ;;
1056 --disable-3dfx) _3dfx
=no
;;
1057 --enable-s3fb) _s3fb
=yes ;;
1058 --disable-s3fb) _s3fb
=no
;;
1059 --enable-tdfxfb) _tdfxfb
=yes ;;
1060 --disable-tdfxfb) _tdfxfb
=no
;;
1061 --disable-tdfxvid) _tdfxvid
=no
;;
1062 --enable-tdfxvid) _tdfxvid
=yes ;;
1063 --disable-xvr100) _xvr100
=no
;;
1064 --enable-xvr100) _xvr100
=yes ;;
1065 --disable-tga) _tga
=no
;;
1066 --enable-tga) _tga
=yes ;;
1067 --enable-directfb) _directfb
=yes ;;
1068 --disable-directfb) _directfb
=no
;;
1069 --enable-zr) _zr
=yes ;;
1070 --disable-zr) _zr
=no
;;
1071 --enable-bl) _bl
=yes ;;
1072 --disable-bl) _bl
=no
;;
1073 --enable-mtrr) _mtrr
=yes ;;
1074 --disable-mtrr) _mtrr
=no
;;
1075 --enable-largefiles) _largefiles
=yes ;;
1076 --disable-largefiles) _largefiles
=no
;;
1077 --enable-shm) _shm
=yes ;;
1078 --disable-shm) _shm
=no
;;
1079 --enable-select) _select
=yes ;;
1080 --disable-select) _select
=no
;;
1081 --enable-linux-devfs) _linux_devfs
=yes ;;
1082 --disable-linux-devfs) _linux_devfs
=no
;;
1083 --enable-cdparanoia) _cdparanoia
=yes ;;
1084 --disable-cdparanoia) _cdparanoia
=no
;;
1085 --enable-cddb) _cddb
=yes ;;
1086 --disable-cddb) _cddb
=no
;;
1087 --enable-big-endian) _big_endian
=yes ;;
1088 --disable-big-endian) _big_endian
=no
;;
1089 --enable-bitmap-font) _bitmap_font
=yes ;;
1090 --disable-bitmap-font) _bitmap_font
=no
;;
1091 --enable-freetype) _freetype
=yes ;;
1092 --disable-freetype) _freetype
=no
;;
1093 --enable-fontconfig) _fontconfig
=yes ;;
1094 --disable-fontconfig) _fontconfig
=no
;;
1095 --enable-unrarlib) _unrarlib
=yes ;;
1096 --disable-unrarlib) _unrarlib
=no
;;
1097 --enable-ftp) _ftp
=yes ;;
1098 --disable-ftp) _ftp
=no
;;
1099 --enable-vstream) _vstream
=yes ;;
1100 --disable-vstream) _vstream
=no
;;
1101 --enable-pthreads) _pthreads
=yes ;;
1102 --disable-pthreads) _pthreads
=no
;;
1103 --enable-w32threads) _w32threads
=yes ;;
1104 --disable-w32threads) _w32threads
=no
;;
1105 --enable-ass) _ass
=yes ;;
1106 --disable-ass) _ass
=no
;;
1107 --enable-rpath) _rpath
=yes ;;
1108 --disable-rpath) _rpath
=no
;;
1109 --enable-color-console) _color_console
=yes ;;
1110 --disable-color-console) _color_console
=no
;;
1112 --enable-fribidi) _fribidi
=yes ;;
1113 --disable-fribidi) _fribidi
=no
;;
1115 --enable-enca) _enca
=yes ;;
1116 --disable-enca) _enca
=no
;;
1118 --enable-inet6) _inet6
=yes ;;
1119 --disable-inet6) _inet6
=no
;;
1121 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1122 --disable-gethostbyname2) _gethostbyname2
=no
;;
1124 --enable-dga1) _dga1
=yes ;;
1125 --disable-dga1) _dga1
=no
;;
1126 --enable-dga2) _dga2
=yes ;;
1127 --disable-dga2) _dga2
=no
;;
1129 --enable-menu) _menu
=yes ;;
1130 --disable-menu) _menu
=no
;;
1132 --enable-qtx) _qtx
=yes ;;
1133 --disable-qtx) _qtx
=no
;;
1135 --enable-macosx) _macosx
=yes ;;
1136 --disable-macosx) _macosx
=no
;;
1137 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1138 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1139 --enable-macosx-bundle) _macosx_bundle
=yes;;
1140 --disable-macosx-bundle) _macosx_bundle
=no
;;
1142 --enable-maemo) _maemo
=yes ;;
1143 --disable-maemo) _maemo
=no
;;
1145 --enable-sortsub) _sortsub
=yes ;;
1146 --disable-sortsub) _sortsub
=no
;;
1148 --enable-crash-debug) _crash_debug
=yes ;;
1149 --disable-crash-debug) _crash_debug
=no
;;
1150 --enable-sighandler) _sighandler
=yes ;;
1151 --disable-sighandler) _sighandler
=no
;;
1152 --enable-win32dll) _win32dll
=yes ;;
1153 --disable-win32dll) _win32dll
=no
;;
1155 --enable-sse) _sse
=yes ;;
1156 --disable-sse) _sse
=no
;;
1157 --enable-sse2) _sse2
=yes ;;
1158 --disable-sse2) _sse2
=no
;;
1159 --enable-ssse3) _ssse3
=yes ;;
1160 --disable-ssse3) _ssse3
=no
;;
1161 --enable-mmxext) _mmxext
=yes ;;
1162 --disable-mmxext) _mmxext
=no
;;
1163 --enable-3dnow) _3dnow
=yes ;;
1164 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1165 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1166 --disable-3dnowext) _3dnowext
=no
;;
1167 --enable-cmov) _cmov
=yes ;;
1168 --disable-cmov) _cmov
=no
;;
1169 --enable-fast-cmov) _fast_cmov
=yes ;;
1170 --disable-fast-cmov) _fast_cmov
=no
;;
1171 --enable-altivec) _altivec
=yes ;;
1172 --disable-altivec) _altivec
=no
;;
1173 --enable-armv5te) _armv5te
=yes ;;
1174 --disable-armv5te) _armv5te
=no
;;
1175 --enable-armv6) _armv6
=yes ;;
1176 --disable-armv6) _armv6
=no
;;
1177 --enable-iwmmxt) _iwmmxt
=yes ;;
1178 --disable-iwmmxt) _iwmmxt
=no
;;
1179 --enable-mmx) _mmx
=yes ;;
1180 --disable-mmx) # 3Dnow! and MMX2 require MMX
1181 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1184 echo "Unknown parameter: $ac_option"
1191 # Atmos: moved this here, to be correct, if --prefix is specified
1192 test -z "$_bindir" && _bindir
="$_prefix/bin"
1193 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1194 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1195 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1196 test -z "$_libdir" && _libdir
="$_prefix/lib"
1198 # Determine our OS name and CPU architecture
1199 if test -z "$_target" ; then
1201 system_name
=`uname -s 2>&1`
1202 case "$system_name" in
1203 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1214 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1221 system_name
="$system_name-UNKNOWN"
1226 # host's CPU/instruction set
1227 host_arch
=`uname -p 2>&1`
1228 case "$host_arch" in
1229 i386|sparc|ppc|alpha|arm|sh3|mips|vax
)
1231 powerpc
) # Darwin returns 'powerpc'
1234 *) # uname -p on Linux returns 'unknown' for the processor type,
1235 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1237 # Maybe uname -m (machine hardware name) returns something we
1240 # x86/x86pc is used by QNX
1241 case "`uname -m 2>&1`" in
1242 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
;;
1243 ia64
) host_arch
=ia64
;;
1245 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1246 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1252 macppc|ppc|ppc64
) host_arch
=ppc
;;
1253 alpha
) host_arch
=alpha
;;
1254 sparc
) host_arch
=sparc
;;
1255 sparc64
) host_arch
=sparc64
;;
1256 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1257 arm
*|zaurus|cats
) host_arch
=arm
;;
1258 sh3
) host_arch
=sh3
;;
1259 s390
) host_arch
=s390
;;
1260 s390x
) host_arch
=s390x
;;
1261 mips
*) host_arch
=mips
;;
1262 vax
) host_arch
=vax
;;
1263 *) host_arch
=UNKNOWN
;;
1267 else # if test -z "$_target"
1268 system_name
=`echo $_target | cut -d '-' -f 2`
1269 case "`echo $system_name | tr A-Z a-z`" in
1270 linux
) system_name
=Linux
;;
1271 freebsd
) system_name
=FreeBSD
;;
1272 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1273 netbsd
) system_name
=NetBSD
;;
1274 bsd
/os
) system_name
=BSD
/OS
;;
1275 openbsd
) system_name
=OpenBSD
;;
1276 sunos
) system_name
=SunOS
;;
1277 qnx
) system_name
=QNX
;;
1278 morphos
) system_name
=MorphOS
;;
1279 amigaos
) system_name
=AmigaOS
;;
1280 mingw32msvc
) system_name
=MINGW32
;;
1282 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1283 host_arch
=`echo $_target | cut -d '-' -f 1`
1284 if test `echo $host_arch` != "x86_64" ; then
1285 host_arch
=`echo $host_arch | tr '_' '-'`
1289 echo "Detected operating system: $system_name"
1290 echo "Detected host architecture: $host_arch"
1292 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1293 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1298 _ldconfig
="ldconfig -R"
1302 _ld_extra
="$_ld_extra -L/usr/local/lib"
1303 _inc_extra
="$_inc_extra -I/usr/local/include"
1307 _ld_extra
="$_ld_extra -L/usr/local/lib"
1308 _inc_extra
="$_inc_extra -I/usr/local/include"
1312 _ld_extra
="$_ld_extra -lC"
1323 # -lwinmm is always needed for osdep/timer-win2.c
1324 _ld_extra
="$_ld_extra -lwinmm"
1325 _confwin32
='TARGET_WIN32 = yes'
1327 _confwin32
='TARGET_WIN32 = no'
1335 _def_confwin32
='#define WIN32'
1342 _def_stream_cache
="#undef USE_STREAM_CACHE"
1346 _ld_extra
="$_ld_extra -lph"
1349 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1354 TMPLOG
="configure.log"
1355 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1356 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1357 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1358 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1359 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1362 echo configuration
: $_configuration > "$TMPLOG"
1366 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1367 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1369 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1370 _head
() { head -$1 2>/dev
/null
; }
1372 _head
() { head -n $1 2>/dev
/null
; }
1374 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1375 _tail
() { tail -$1 2>/dev
/null
; }
1377 _tail
() { tail -n $1 2>/dev
/null
; }
1380 # Checking CC version...
1381 if test "$_gcc_check" = yes ; then
1382 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1383 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1384 echocheck
"$_cc version"
1386 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1387 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1388 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1389 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1390 # TODO verify older icc/ecc compatibility
1393 cc_version
="v. ?.??, bad"
1397 cc_version
="$cc_version, ok"
1401 cc_version
="$cc_version, bad"
1405 echores
"$cc_version"
1407 for _cc
in "$_cc" gcc cc
; do
1408 echocheck
"$_cc version"
1410 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1411 cc_version
=`$_cc -dumpversion 2>&1`
1412 if test "$?" -gt 0; then
1413 cc_version
="not found"
1417 cc_version
="v. ?.??, bad"
1420 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1421 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1422 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1423 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1424 cc_version
="$cc_version, ok"
1431 cc_version
="$cc_version, bad"
1435 echores
"$cc_version"
1436 test "$cc_verc_fail" = "no" && break
1439 if test "$cc_verc_fail" = yes ; then
1442 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1444 You are not using a supported compiler. We do not have the time to make sure
1445 everything works with compilers other than the ones we use. Use either the
1446 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1447 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1449 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1450 mplayer and lame (which is used for mencoder). If you get compile errors,
1451 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1452 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1455 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1458 die
"Bad gcc version"
1463 ******************************************************************************
1465 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1466 Ok. You know. Do it.
1468 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1469 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1470 Lame which is used by mencoder produces weird errors, too.
1472 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1473 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1475 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1477 ******************************************************************************
1485 test "$_host_cc" || _host_cc
=$_cc
1488 echocheck
"cross compilation"
1489 if test $_cross_compile = auto
; then
1491 int main(void) { return 0; }
1494 cc_check
&& "$TMPEXE" && _cross_compile
=no
1496 echores
$_cross_compile
1498 if test $_cross_compile = yes; then
1506 # now that we know what compiler should be used for compilation, try to find
1507 # out which assembler is used by the $_cc compiler
1508 if test "$_as" = auto
; then
1509 _as
=`$_cc -print-prog-name=as`
1510 test -z "$_as" && _as
=as
1513 # XXX: this should be ok..
1516 if test "$_runtime_cpudetection" = no
; then
1518 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1519 # FIXME: Remove the cygwin check once AMD CPUs are supported
1520 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1521 # Linux with /proc mounted, extract CPU information from it
1522 _cpuinfo
="cat /proc/cpuinfo"
1523 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86_32
; then
1524 # FreeBSD with Linux emulation /proc mounted,
1525 # extract CPU information from it
1526 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1527 elif darwin
&& ! x86_32
; then
1528 # use hostinfo on Darwin
1531 # use 'lsattr' on AIX
1532 _cpuinfo
="lsattr -E -l proc0 -a type"
1534 # all other OSes try to extract CPU information from a small helper
1535 # program cpuinfo instead
1536 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1537 _cpuinfo
="./cpuinfo$_exesuf"
1541 # gather more CPU information
1542 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1543 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1544 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1545 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1546 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1548 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1550 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1551 -e s/xmm/sse/ -e s/kni/sse/`
1553 for ext
in $pparam ; do
1554 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1557 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1558 test $_sse = kernel_check
&& _mmxext
=kernel_check
1560 echocheck
"CPU vendor"
1561 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1563 echocheck
"CPU type"
1567 fi # test "$_runtime_cpudetection" = no
1569 if x86
&& test "$_runtime_cpudetection" = no
; then
1571 if test "$1" = kernel_check
; then
1572 echocheck
"kernel support of $2"
1575 void catch() { exit(1); }
1577 signal(SIGILL, catch);
1578 __asm__ __volatile__ ("$3":::"memory");return(0);
1582 if cc_check
&& tmp_run
; then
1585 _optimizing
="$_optimizing $2"
1590 echo "It seems that your kernel does not correctly support $2."
1591 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1598 extcheck
$_mmx "mmx" "emms"
1599 extcheck
$_mmxext "mmxext" "sfence"
1600 extcheck
$_3dnow "3dnow" "femms"
1601 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1602 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1603 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1604 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1605 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1607 echocheck
"mtrr support"
1608 if test "$_mtrr" = kernel_check
; then
1610 _optimizing
="$_optimizing mtrr"
1614 if test "$_gcc3_ext" != ""; then
1615 # if we had to disable sse/sse2 because the active kernel does not
1616 # support this instruction set extension, we also have to tell
1617 # gcc3 to not generate sse/sse2 instructions for normal C code
1619 int main(void) { return 0; }
1621 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1627 _arch_all
='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L SH3 POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN GENERIC'
1628 case "$host_arch" in
1629 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1631 _target_arch_x86
="ARCH_X86 = yes"
1632 _target_arch
="ARCH_X86_32 = yes"
1633 _def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1638 if test "$_runtime_cpudetection" = no
; then
1642 3) proc
=i386 iproc
=386 ;;
1643 4) proc
=i486 iproc
=486 ;;
1644 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1645 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1646 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1648 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1650 elif test "$pmodel" -ge 8; then
1652 elif test "$pmodel" -ge 6; then
1659 # It's a bit difficult to determine the correct type of Family 6
1660 # AMD CPUs just from their signature. Instead, we check directly
1661 # whether it supports SSE.
1662 if test "$_sse" = yes; then
1663 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1666 # Again, gcc treats athlon and athlon-tbird similarly.
1671 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1672 # caught and remedied in the optimization tests below.
1676 *) proc
=k8 iproc
=686 ;;
1681 3) proc
=i386 iproc
=386 ;;
1682 4) proc
=i486 iproc
=486 ;;
1684 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1685 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1691 if test "$pmodel" -ge 15; then
1693 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1695 elif test "$pmodel" -ge 7; then
1697 elif test "$pmodel" -ge 3; then
1704 # A nocona in 32-bit mode has no more capabilities than a prescott.
1705 if test "$pmodel" -ge 3; then
1710 test $_fast_cmov = "auto" && _fast_cmov
=no
1712 *) proc
=prescott iproc
=686 ;;
1718 if test "$pmodel" -ge 8; then
1720 elif test "$pmodel" -ge 4; then
1727 if test "$pmodel" -ge 9; then
1734 *) proc
=i686 iproc
=i686
;;
1739 3) proc
=i386 iproc
=386 ;;
1740 4) proc
=i486 iproc
=486 ;;
1741 *) proc
=i586 iproc
=586 ;;
1745 proc
=i586 iproc
=586 ;;
1747 fi # test "$_runtime_cpudetection" = no
1750 # check that gcc supports our CPU, if not, fall back to earlier ones
1751 # LGB: check -mcpu and -march swithing step by step with enabling
1752 # to fall back till 386.
1754 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1756 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1762 echocheck
"GCC & CPU optimization abilities"
1764 int main(void) { return 0; }
1766 if test "$_runtime_cpudetection" = no
; then
1767 cc_check
-march=native
&& proc
=native
1768 if test "$proc" = "k8"; then
1769 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1771 if test "$proc" = "athlon-xp"; then
1772 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1774 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1775 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1777 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1778 if ! cc_check
-march=$proc $cpuopt=$proc; then
1779 if cc_check
-march=i586
$cpuopt=i686
; then
1786 if test "$proc" = "prescott" ; then
1787 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1789 if test "$proc" = "core2" ; then
1790 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1792 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
1793 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1795 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1796 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1798 if test "$proc" = "i586"; then
1799 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1801 if test "$proc" = "i486" ; then
1802 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1804 if test "$proc" = "i386" ; then
1805 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1807 if test "$proc" = "error" ; then
1808 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1812 elif test "$proc" = "i586-i686"; then
1813 _march
="-march=i586"
1814 _mcpu
="$cpuopt=i686"
1817 _march
="-march=$proc"
1818 _mcpu
="$cpuopt=$proc"
1821 else # if test "$_runtime_cpudetection" = no
1822 _mcpu
="$cpuopt=generic"
1823 # at least i486 required, for bswap instruction
1824 _march
="-march=i486"
1825 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1826 cc_check
$_mcpu || _mcpu
=""
1827 cc_check
$_march $_mcpu || _march
=""
1830 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1831 ## autodetected mcpu/march parameters
1832 if test "$_target" ; then
1833 # TODO: it may be a good idea to check GCC and fall back in all cases
1834 if test "$host_arch" = "i586-i686"; then
1835 _march
="-march=i586"
1836 _mcpu
="$cpuopt=i686"
1838 _march
="-march=$host_arch"
1839 _mcpu
="$cpuopt=$host_arch"
1847 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1848 i686|athlon
*|pentium
*) iproc
=686 ;;
1853 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1864 _target_arch
='ARCH_IA64 = yes'
1874 _target_arch
='ARCH_X86_64 = yes'
1875 _target_arch_x86
="ARCH_X86 = yes"
1876 _def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1879 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1880 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1885 if test "$_runtime_cpudetection" = no
; then
1893 # 64-bit prescotts exist, but as far as GCC is concerned they
1894 # have the same capabilities as a nocona.
1896 test $_fast_cmov = "auto" && _fast_cmov
=no
1903 fi # test "$_runtime_cpudetection" = no
1905 echocheck
"GCC & CPU optimization abilities"
1907 int main(void) { return 0; }
1909 # This is a stripped-down version of the i386 fallback.
1910 if test "$_runtime_cpudetection" = no
; then
1911 cc_check
-march=native
&& proc
=native
1912 # --- AMD processors ---
1913 if test "$proc" = "k8"; then
1914 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1916 # This will fail if gcc version < 3.3, which is ok because earlier
1917 # versions don't really support 64-bit on amd64.
1918 # Is this a valid assumption? -Corey
1919 if test "$proc" = "athlon-xp"; then
1920 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1922 # --- Intel processors ---
1923 if test "$proc" = "core2"; then
1924 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1926 if test "$proc" = "nocona"; then
1927 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1929 if test "$proc" = "pentium4"; then
1930 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1933 _march
="-march=$proc"
1934 _mcpu
="$cpuopt=$proc"
1935 if test "$proc" = "error" ; then
1936 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1940 else # if test "$_runtime_cpudetection" = no
1941 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1942 _march
="-march=x86-64"
1943 _mcpu
="$cpuopt=generic"
1944 cc_check
$_mcpu || _mcpu
="x86-64"
1945 cc_check
$_mcpu || _mcpu
=""
1946 cc_check
$_march $_mcpu || _march
=""
1956 _target_arch
='ARCH_SPARC = yes'
1959 echocheck
"CPU type"
1961 case "`echo $karch`" in
1966 sun4u
) proc
=ultrasparc _vis
='yes' ;;
1981 _target_arch
='ARCH_SPARC = yes'
1990 arm|armv4l|armv5tel
)
1992 _target_arch
='ARCH_ARMV4L = yes'
2002 _target_arch
='ARCH_SH3 = yes'
2012 _def_dcbzl
='#undef HAVE_DCBZL'
2013 _target_arch
='ARCH_POWERPC = yes'
2020 echocheck
"CPU type"
2021 case $system_name in
2023 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
2024 if test -n "`$_cpuinfo | grep altivec`"; then
2025 test $_altivec = auto
&& _altivec
=yes
2029 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
2030 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
2031 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
2032 test $_altivec = auto
&& _altivec
=yes
2036 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2038 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2041 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
2042 test $_altivec = auto
&& _altivec
=yes
2048 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
2051 if test "$_altivec" = yes; then
2052 echores
"$proc altivec"
2058 echocheck
"GCC & CPU optimization abilities"
2060 if test -n "$proc"; then
2062 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2063 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2064 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2065 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2066 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2067 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2068 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2069 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2070 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2073 # gcc 3.1(.1) and up supports 7400 and 7450
2074 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2076 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2077 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2081 # gcc 3.2 and up supports 970
2082 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2084 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2085 _def_dcbzl
='#define HAVE_DCBZL 1' ;;
2089 # gcc 3.3 and up supports POWER4
2090 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2092 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2096 # gcc 3.4 and up supports 440*
2097 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2099 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2100 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2104 # gcc 4.0 and up supports POWER5
2105 if test "$_cc_major" -ge "4"; then
2107 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2113 if test -n "$_mcpu"; then
2114 _optimizing
=`echo $_mcpu | cut -c 8-`
2115 echores
"$_optimizing"
2124 _target_arch
='ARCH_ALPHA = yes'
2128 echocheck
"CPU type"
2131 unsigned long ver, mask;
2132 asm ("implver %0" : "=r" (ver));
2133 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2134 printf("%ld-%x\n", ver, ~mask);
2138 $_cc -o "$TMPEXE" "$TMPC"
2141 0-0) proc
="ev4"; _mvi
="0";;
2142 1-0) proc
="ev5"; _mvi
="0";;
2143 1-1) proc
="ev56"; _mvi
="0";;
2144 1-101) proc
="pca56"; _mvi
="1";;
2145 2-303) proc
="ev6"; _mvi
="1";;
2146 2-307) proc
="ev67"; _mvi
="1";;
2147 2-1307) proc
="ev68"; _mvi
="1";;
2151 echocheck
"GCC & CPU optimization abilities"
2152 if test "$proc" = "ev68" ; then
2153 cc_check
-mcpu=$proc || proc
=ev67
2155 if test "$proc" = "ev67" ; then
2156 cc_check
-mcpu=$proc || proc
=ev6
2163 echocheck
"MVI instruction support in GCC"
2164 if test "$_cc_major" -ge "3" && test "$_mvi" = "1" ; then
2165 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2168 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2169 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2175 _target_arch
='ARCH_SGI_MIPS = yes'
2183 echocheck
"CPU type"
2184 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2185 case "`echo $proc`" in
2186 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2187 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2188 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2189 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2190 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2191 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2193 # gcc < 3.x does not support -mtune.
2194 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2204 _target_arch
='ARCH_PA_RISC = yes'
2214 _target_arch
='ARCH_S390 = yes'
2224 _target_arch
='ARCH_S390X = yes'
2234 _target_arch
='ARCH_VAX = yes'
2244 _target_arch
='ARCH_GENERIC = yes'
2253 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2254 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2255 die
"unsupported architecture $host_arch"
2257 esac # case "$host_arch" in
2259 if test "$_runtime_cpudetection" = yes ; then
2261 test "$_cmov" != no
&& _cmov
=yes
2263 test "$_mmx" != no
&& _mmx
=yes
2264 test "$_3dnow" != no
&& _3dnow
=yes
2265 test "$_3dnowext" != no
&& _3dnowext
=yes
2266 test "$_mmxext" != no
&& _mmxext
=yes
2267 test "$_sse" != no
&& _sse
=yes
2268 test "$_sse2" != no
&& _sse2
=yes
2269 test "$_ssse3" != no
&& _ssse3
=yes
2270 test "$_mtrr" != no
&& _mtrr
=yes
2279 echocheck
"assembler support of -pipe option"
2281 int main(void) { return 0; }
2283 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2286 echocheck
"compiler support of named assembler arguments"
2288 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2289 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2290 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2292 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2294 echores
$_named_asm_args
2297 if darwin
&& test "$cc_vendor" = "gnu" ; then
2298 echocheck
"GCC support of -mstackrealign"
2299 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2300 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2301 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2302 # wrong code with this flag, but this can be worked around by adding
2303 # -fno-unit-at-a-time as described in the blog post at
2304 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2306 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2307 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2309 cc_check
-O4 -mstackrealign && tmp_run
&& _stackrealign
=-mstackrealign
2310 test -z "$_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2311 && tmp_run
&& _stackrealign
="-mstackrealign -fno-unit-at-a-time"
2312 test -n "$_stackrealign" && echores
"yes" || echores
"no"
2313 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2316 # Checking for CFLAGS
2318 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2319 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2321 elif test -z "$CFLAGS" ; then
2322 if test "$cc_vendor" = "intel" ; then
2323 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2324 elif test "$cc_vendor" != "gnu" ; then
2325 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2327 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2332 if test -n "$LDFLAGS" ; then
2333 _ld_extra
="$_ld_extra $LDFLAGS"
2335 elif test "$cc_vendor" = "intel" ; then
2336 _ld_extra
="$_ld_extra -i-static"
2338 if test -n "$CPPFLAGS" ; then
2339 _inc_extra
="$_inc_extra $CPPFLAGS"
2346 # Checking assembler (_as) compatibility...
2347 # Added workaround for older as that reads from stdin by default - atmos
2348 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2349 echocheck
"assembler ($_as $as_version)"
2351 _pref_as_version
='2.9.1'
2353 if test "$_mmx" = yes ; then
2354 echo 'emms' >> $TMPS
2356 if test "$_3dnow" = yes ; then
2357 _pref_as_version
='2.10.1'
2358 echo 'femms' >> $TMPS
2360 if test "$_3dnowext" = yes ; then
2361 _pref_as_version
='2.10.1'
2362 echo 'pswapd %mm0, %mm0' >> $TMPS
2364 if test "$_mmxext" = yes ; then
2365 _pref_as_version
='2.10.1'
2366 echo 'movntq %mm0, (%eax)' >> $TMPS
2368 if test "$_sse" = yes ; then
2369 _pref_as_version
='2.10.1'
2370 echo 'xorps %xmm0, %xmm0' >> $TMPS
2372 #if test "$_sse2" = yes ; then
2373 # _pref_as_version='2.11'
2374 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2376 if test "$_cmov" = yes ; then
2377 _pref_as_version
='2.10.1'
2378 echo 'cmovb %eax, %ebx' >> $TMPS
2380 if test "$_ssse3" = yes ; then
2381 _pref_as_version
='2.16.92'
2382 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2384 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2386 if test "$as_verc_fail" != yes ; then
2389 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2391 die
"obsolete binutils version"
2396 echocheck
".align is a power of two"
2397 if test "$_asmalign_pot" = auto
; then
2400 main(void) { asm (".align 3"); }
2402 cc_check
&& _asmalign_pot
=yes
2404 if test "$_asmalign_pot" = "yes" ; then
2405 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2407 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2409 echores
$_asmalign_pot
2412 #FIXME: This should happen before the check for CFLAGS..
2415 # check if altivec is supported by the compiler, and how to enable it
2417 _altivec_gcc_flags
=''
2419 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2420 echocheck
"GCC altivec support"
2428 FSF_flags
='-maltivec -mabi=altivec'
2429 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2431 # check for Darwin-style flags first, since
2432 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2433 # accepts but ignores FSF-style flags...
2435 if test -z "$p"; then
2436 cc_check
$Darwin_flags && p
='Darwin'
2438 if test -z "$p"; then
2439 cc_check
$FSF_flags && p
='FSF'
2443 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2444 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2448 if test -z "$p"; then
2451 p
="$p-style ($_altivec_gcc_flags)"
2457 # check if <altivec.h> should be included
2459 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2461 if test "$_altivec" = yes ; then
2462 echocheck
"altivec.h"
2464 #include <altivec.h>
2465 int main(void) { return 0; }
2468 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2469 if test "$_have_altivec_h" = yes ; then
2470 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2472 echores
"$_have_altivec_h"
2475 # disable runtime cpudetection if
2476 # - we cannot generate altivec code
2477 # - altivec is disabled by the user
2479 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2480 _runtime_cpudetection
=no
2483 # show that we are optimizing for altivec (if enabled and supported)
2485 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2486 _optimizing
="$_optimizing altivec"
2489 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2491 if test "$_altivec" = yes ; then
2492 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2493 #_mcpu="$_mcpu $_altivec_gcc_flags"
2494 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2499 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2500 if test $_armv5te = "auto" ; then
2503 __asm__ __volatile__ ("qadd r0, r0, r0");
2507 cc_check
&& _armv5te
=yes
2511 echocheck
"ARMv6 (SIMD instructions)"
2512 if test $_armv6 = "auto" ; then
2514 int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); }
2517 cc_check
&& _armv6
=yes
2521 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2522 if test $_iwmmxt = "auto" ; then
2525 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2529 cc_check
&& _iwmmxt
=yes
2534 _cpuexts_all
='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 IWMMXT MLIB MMI SH4 VIS MVI'
2535 test "$_altivec" = yes && _cpuexts
="ALTIVEC $_cpuexts"
2536 test "$_mmx" = yes && _cpuexts
="MMX $_cpuexts"
2537 test "$_mmxext" = yes && _cpuexts
="MMX2 $_cpuexts"
2538 test "$_3dnow" = yes && _cpuexts
="3DNOW $_cpuexts"
2539 test "$_3dnowext" = yes && _cpuexts
="3DNOWEX $_cpuexts"
2540 test "$_sse" = yes && _cpuexts
="SSE $_cpuexts"
2541 test "$_sse2" = yes && _cpuexts
="SSE2 $_cpuexts"
2542 test "$_ssse3" = yes && _cpuexts
="SSSE3 $_cpuexts"
2543 test "$_cmov" = yes && _cpuexts
="CMOV $_cpuexts"
2544 test "$_fast_cmov" = yes && _cpuexts
="FAST_CMOV $_cpuexts"
2545 test "$_armv5te" = yes && _cpuexts
="ARMV5TE $_cpuexts"
2546 test "$_armv6" = yes && _cpuexts
="ARMV6 $_cpuexts"
2547 test "$_iwmmxt" = yes && _cpuexts
="IWMMXT $_cpuexts"
2548 test "$_vis" = yes && _cpuexts
="VIS $_cpuexts"
2549 test "$_mvi" = yes && _cpuexts
="MVI $_cpuexts"
2551 # Checking kernel version...
2552 if x86_32
&& linux
; then
2554 kernel_version
=`uname -r 2>&1`
2555 echocheck
"$system_name kernel version"
2556 case "$kernel_version" in
2557 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2558 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2559 _k_verc_problem
=yes;;
2561 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2564 if test "$_k_verc_fail" ; then
2565 echores
"$kernel_version, fail"
2566 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2567 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2568 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2569 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2570 echo "2.2.x you must upgrade it to get SSE support!"
2571 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2573 echores
"$kernel_version, ok"
2577 ######################
2578 # MAIN TESTS GO HERE #
2579 ######################
2584 int main(void) { return 0; }
2586 if cc_check
-lposix ; then
2587 _ld_extra
="$_ld_extra -lposix"
2595 int main(void) { return 0; }
2597 if cc_check
-lm ; then
2606 echocheck
"langinfo"
2607 if test "$_langinfo" = auto
; then
2609 #include <langinfo.h>
2610 int main(void) { nl_langinfo(CODESET); return 0; }
2613 cc_check
&& _langinfo
=yes
2615 if test "$_langinfo" = yes ; then
2616 _def_langinfo
='#define USE_LANGINFO 1'
2618 _def_langinfo
='#undef USE_LANGINFO'
2620 echores
"$_langinfo"
2623 echocheck
"language"
2624 test -z "$_language" && _language
=$LINGUAS
2625 _language
=`echo $_language | sed 's/,/ /g'`
2626 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2627 for lang
in $_language ; do
2628 test "$lang" = all
&& lang
=en
2629 if test -f "help/help_mp-${lang}.h" ; then
2633 echo ${_echo_n} "$lang not found, ${_echo_c}"
2634 _language
=`echo $_language | sed "s/$lang *//"`
2637 test -z "$_language" && _language
=en
2638 _mp_help
="help/help_mp-${_language}.h"
2639 test -f $_mp_help || die
"$_mp_help not found"
2640 for lang
in $LANGUAGES ; do
2641 if test -f "DOCS/man/$lang/mplayer.1" ; then
2642 MAN_LANG
="$lang $MAN_LANG"
2645 _doc_lang
=$_language
2646 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2647 echores
"using $_language (man pages: $MAN_LANG)"
2650 echocheck
"enable sighandler"
2651 if test "$_sighandler" = yes ; then
2652 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2654 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2656 echores
"$_sighandler"
2658 echocheck
"runtime cpudetection"
2659 if test "$_runtime_cpudetection" = yes ; then
2660 _optimizing
="Runtime CPU-Detection enabled"
2661 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2663 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2665 echores
"$_runtime_cpudetection"
2668 echocheck
"restrict keyword"
2669 for restrict_keyword
in restrict __restrict __restrict__
; do
2670 echo "void foo(char * $restrict_keyword p); int main(void){}" > $TMPC
2672 _def_restrict_keyword
=$restrict_keyword
2676 if [ -n "$_def_restrict_keyword" ]; then
2677 echores
"$_def_restrict_keyword"
2681 # Avoid infinite recursion loop ("#define restrict restrict")
2682 if [ "$_def_restrict_keyword" != "restrict" ]; then
2683 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2685 _def_restrict_keyword
=""
2689 echocheck
"__builtin_expect"
2690 # GCC branch prediction hint
2693 a = __builtin_expect (a, 10);
2694 return a == 10 ? 0 : 1;
2696 int main(void) { return foo(10) && foo(0); }
2699 cc_check
&& _builtin_expect
=yes
2700 if test "$_builtin_expect" = yes ; then
2701 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2703 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2705 echores
"$_builtin_expect"
2711 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2714 cc_check
-lkstat && _kstat
=yes
2715 if test "$_kstat" = yes ; then
2716 _def_kstat
="#define HAVE_LIBKSTAT 1"
2717 _ld_extra
="$_ld_extra -lkstat"
2719 _def_kstat
="#undef HAVE_LIBKSTAT"
2725 # required for nanosleep on some systems
2728 int main(void) { (void) nanosleep(0, 0); return 0; }
2731 cc_check
-lposix4 && _posix4
=yes
2732 if test "$_posix4" = yes ; then
2733 _ld_extra
="$_ld_extra -lposix4"
2740 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2743 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2744 if test "$_lrintf" = yes ; then
2745 _def_lrintf
="#define HAVE_LRINTF 1"
2747 _def_lrintf
="#undef HAVE_LRINTF"
2755 int main(void) { char a; mkstemp(&a); return 0; }
2758 cc_check
&& _mkstemp
=yes
2759 if test "$_mkstemp" = yes ; then
2760 _def_mkstemp
='#define HAVE_MKSTEMP 1'
2762 _def_mkstemp
='#undef HAVE_MKSTEMP'
2767 echocheck
"nanosleep"
2768 # also check for nanosleep
2771 int main(void) { (void) nanosleep(0, 0); return 0; }
2774 cc_check
&& _nanosleep
=yes
2775 if test "$_nanosleep" = yes ; then
2776 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2778 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2780 echores
"$_nanosleep"
2784 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2785 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2788 #include <sys/socket.h>
2789 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2792 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2793 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2795 if test $_winsock2 = auto
&& ! cygwin
; then
2798 #include <winsock2.h>
2799 int main(void) { (void) gethostbyname(0); return 0; }
2801 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2803 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2807 if test $_winsock2 = yes ; then
2809 _def_winsock2
='#define HAVE_WINSOCK2 1'
2811 _def_winsock2
='#undef HAVE_WINSOCK2'
2816 echocheck
"inet_pton()"
2818 #include <sys/types.h>
2819 #include <sys/socket.h>
2820 #include <arpa/inet.h>
2821 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2823 if test "$_winsock2" = yes ; then
2824 _res_comment
="using winsock2 functions instead"
2826 elif cc_check
$_ld_sock ; then
2827 # NOTE: Linux has libresolv but does not need it
2829 _res_comment
="using $_ld_sock"
2831 elif cc_check
$_ld_sock -lresolv ; then
2832 # NOTE: needed for SunOS at least
2833 _ld_sock
="$_ld_sock -lresolv"
2834 _res_comment
="using $_ld_sock"
2837 _res_comment
="trying inet_aton next"
2840 echocheck
"inet_aton()"
2842 #include <sys/types.h>
2843 #include <sys/socket.h>
2844 #include <arpa/inet.h>
2845 int main(void) { (void) inet_aton(0, 0); return 0; }
2848 if cc_check
$_ld_sock ; then
2849 # NOTE: Linux has libresolv but does not need it
2851 _res_comment
="using $_ld_sock"
2852 elif cc_check
$_ld_sock -lresolv ; then
2853 # NOTE: needed for SunOS at least
2854 _ld_sock
="$_ld_sock -lresolv"
2855 _res_comment
="using $_ld_sock"
2859 _res_comment
="network support disabled"
2861 echores
"$_use_aton"
2864 _def_use_aton
='#undef USE_ATON'
2865 if test "$_use_aton" = yes; then
2866 _def_use_aton
='#define USE_ATON 1'
2870 # FIXME network check
2871 if test "$_network" = yes ; then
2872 _def_network
='#define MPLAYER_NETWORK 1'
2873 _ld_extra
="$_ld_extra $_ld_sock"
2874 _inputmodules
="network $_inputmodules"
2876 _noinputmodules
="network $_noinputmodules"
2877 _def_network
='#undef MPLAYER_NETWORK'
2882 echocheck
"inttypes.h (required)"
2884 #include <inttypes.h>
2885 int main(void) { return 0; }
2888 cc_check
&& _inttypes
=yes
2889 echores
"$_inttypes"
2891 if test "$_inttypes" = no
; then
2892 echocheck
"bitypes.h (inttypes.h predecessor)"
2894 #include <sys/bitypes.h>
2895 int main(void) { return 0; }
2897 cc_check
&& _inttypes
=yes
2898 if test "$_inttypes" = yes ; then
2899 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."
2901 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
2906 echocheck
"int_fastXY_t in inttypes.h"
2908 #include <inttypes.h>
2910 volatile int_fast16_t v= 0;
2914 cc_check
&& _fast_inttypes
=yes
2915 if test "$_fast_inttypes" = yes ; then
2919 _def_fast_inttypes
='
2920 typedef signed char int_fast8_t;
2921 typedef signed int int_fast16_t;
2922 typedef signed int int_fast32_t;
2923 typedef signed long long int_fast64_t;
2924 typedef unsigned char uint_fast8_t;
2925 typedef unsigned int uint_fast16_t;
2926 typedef unsigned int uint_fast32_t;
2927 typedef unsigned long long uint_fast64_t;'
2929 echores
"$_fast_inttypes"
2932 echocheck
"word size"
2933 _mp_wordsize
="#undef MP_WORDSIZE"
2936 #include <sys/types.h>
2937 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2939 cc_check
&& _wordsize
=`$TMPEXE` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2940 echores
"$_wordsize"
2943 echocheck
"malloc.h"
2946 int main(void) { (void) malloc(0); return 0; }
2949 cc_check
&& _malloc
=yes
2950 if test "$_malloc" = yes ; then
2951 _def_malloc
='#define HAVE_MALLOC_H 1'
2953 _def_malloc
='#undef HAVE_MALLOC_H'
2955 # malloc.h emits a warning in FreeBSD and OpenBSD
2956 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2960 echocheck
"memalign()"
2961 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2964 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2967 cc_check
&& _memalign
=yes
2968 if test "$_memalign" = yes ; then
2969 _def_memalign
='#define HAVE_MEMALIGN 1'
2971 _def_memalign
='#undef HAVE_MEMALIGN'
2972 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2973 darwin || _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2975 echores
"$_memalign"
2978 echocheck
"alloca.h"
2981 int main(void) { (void) alloca(0); return 0; }
2984 cc_check
&& _alloca
=yes
2986 _def_alloca
='#define HAVE_ALLOCA_H 1'
2988 _def_alloca
='#undef HAVE_ALLOCA_H'
2995 #include <sys/types.h>
2996 #include <sys/mman.h>
2997 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3000 cc_check
&& _mman
=yes
3001 if test "$_mman" = yes ; then
3002 _def_mman
='#define HAVE_SYS_MMAN_H 1'
3004 _def_mman
='#undef HAVE_SYS_MMAN_H'
3009 #include <sys/types.h>
3010 #include <sys/mman.h>
3011 int main(void) { void *p = MAP_FAILED; return 0; }
3013 _mman_has_map_failed
=no
3014 cc_check
&& _mman_has_map_failed
=yes
3015 if test "$_mman_has_map_failed" = yes ; then
3016 _def_mman_has_map_failed
=''
3018 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3021 echocheck
"dynamic loader"
3024 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
3027 for _ld_tmp
in "" "-ldl" ; do
3028 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3030 if test "$_dl" = yes ; then
3031 _def_dl
='#define HAVE_LIBDL 1'
3033 _def_dl
='#undef HAVE_LIBDL'
3038 echocheck
"dynamic a/v plugins support"
3039 if test "$_dl" = no
; then
3042 if test "$_dynamic_plugins" = yes ; then
3043 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
3045 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3047 echores
"$_dynamic_plugins"
3050 _def_threads
='#undef HAVE_THREADS'
3053 if test "$_pthreads" = auto
; then
3055 #include <pthread.h>
3056 void* func(void *arg) { return arg; }
3057 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3061 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3062 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3063 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3067 if test "$_pthreads" = yes ; then
3068 _res_comment
="using $_ld_pthread"
3069 _def_pthreads
='#define HAVE_PTHREADS 1'
3070 _def_threads
='#define HAVE_THREADS 1'
3072 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3073 _def_pthreads
='#undef HAVE_PTHREADS'
3074 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3075 mingw32 || _win32dll
=no
3077 echores
"$_pthreads"
3079 echocheck
"w32threads"
3080 if test "$_pthreads" = yes ; then
3081 _res_comment
="using pthread instead"
3084 if test "$_w32threads" = auto
; then
3086 mingw32
&& _w32threads
=yes
3088 test "$_w32threads" = yes && _def_threads
='#define HAVE_THREADS 1'
3089 echores
"$_w32threads"
3093 if test "$_rpath" = yes ; then
3094 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3095 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3102 if test "$_iconv" = auto
; then
3107 #define INBUFSIZE 1024
3108 #define OUTBUFSIZE 4096
3110 char inbuffer[INBUFSIZE];
3111 char outbuffer[OUTBUFSIZE];
3116 char *tocode="UTF-8";
3117 char *fromcode="cp1250";
3118 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3119 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3120 char *iptr=inbuffer;
3121 char *optr=outbuffer;
3122 size_t inleft=numread;
3123 size_t outleft=OUTBUFSIZE;
3124 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3126 write (1, outbuffer, OUTBUFSIZE - outleft);
3129 if (iconv_close(icdsc) == -1)
3135 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3136 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3140 if test "$_iconv" = yes ; then
3141 _def_iconv
='#define USE_ICONV 1'
3143 _def_iconv
='#undef USE_ICONV'
3148 echocheck
"soundcard.h"
3150 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3151 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3152 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3154 #include <$_soundcard_header>
3155 int main(void) { return 0; }
3157 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3160 if test "$_soundcard_h" = yes ; then
3161 if test $_soundcard_header = "sys/soundcard.h"; then
3162 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3164 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3167 echores
"$_soundcard_h"
3170 echocheck
"sys/dvdio.h"
3173 #include <sys/dvdio.h>
3174 int main(void) { return 0; }
3177 cc_check
&& _dvdio
=yes
3178 if test "$_dvdio" = yes ; then
3179 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3181 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3186 echocheck
"sys/cdio.h"
3189 #include <sys/cdio.h>
3190 int main(void) { return 0; }
3193 cc_check
&& _cdio
=yes
3194 if test "$_cdio" = yes ; then
3195 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3197 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3202 echocheck
"linux/cdrom.h"
3204 #include <sys/types.h>
3205 #include <linux/cdrom.h>
3206 int main(void) { return 0; }
3209 cc_check
&& _cdrom
=yes
3210 if test "$_cdrom" = yes ; then
3211 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3213 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3221 int main(void) { return 0; }
3224 cc_check
&& _dvd
=yes
3225 if test "$_dvd" = yes ; then
3226 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3228 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3234 echocheck
"BSDI dvd.h"
3237 int main(void) { return 0; }
3240 cc_check
&& _bsdi_dvd
=yes
3241 if test "$_bsdi_dvd" = yes ; then
3242 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3244 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3246 echores
"$_bsdi_dvd"
3251 # also used by AIX, but AIX does not support VCD and/or libdvdread
3252 echocheck
"HP-UX SCSI header"
3254 #include <sys/scsi.h>
3255 int main(void) { return 0; }
3258 cc_check
&& _hpux_scsi_h
=yes
3259 if test "$_hpux_scsi_h" = yes ; then
3260 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3262 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3264 echores
"$_hpux_scsi_h"
3269 echocheck
"userspace SCSI headers (Solaris)"
3271 # include <unistd.h>
3272 # include <stropts.h>
3273 # include <sys/scsi/scsi_types.h>
3274 # include <sys/scsi/impl/uscsi.h>
3275 int main(void) { return 0; }
3278 cc_check
&& _sol_scsi_h
=yes
3279 if test "$_sol_scsi_h" = yes ; then
3280 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3282 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3284 echores
"$_sol_scsi_h"
3289 if test "$_termcap" = auto
; then
3291 int main(void) { tgetent(); return 0; }
3294 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3295 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3296 && _termcap
=yes && break
3299 if test "$_termcap" = yes ; then
3300 _def_termcap
='#define USE_TERMCAP 1'
3301 _res_comment
="using $_ld_tmp"
3303 _def_termcap
='#undef USE_TERMCAP'
3309 _def_termios
='#undef HAVE_TERMIOS'
3310 _def_termios_h
='#undef HAVE_TERMIOS_H'
3311 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3312 if test "$_termios" = auto
; then
3314 for _termios_header
in "sys/termios.h" "termios.h"; do
3316 #include <$_termios_header>
3317 int main(void) { return 0; }
3319 cc_check
&& _termios
=yes && _res_comment
="$_termios_header" && break
3323 if test "$_termios" = yes ; then
3324 _def_termios
='#define HAVE_TERMIOS 1'
3325 if test "$_termios_header" = "termios.h" ; then
3326 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3328 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3335 if test "$_shm" = auto
; then
3337 #include <sys/types.h>
3338 #include <sys/shm.h>
3339 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3342 cc_check
&& _shm
=yes
3344 if test "$_shm" = yes ; then
3345 _def_shm
='#define HAVE_SHM 1'
3347 _def_shm
='#undef HAVE_SHM'
3352 echocheck
"strsep()"
3355 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3358 cc_check
&& _strsep
=yes
3359 if test "$_strsep" = yes ; then
3360 _def_strsep
='#define HAVE_STRSEP 1'
3363 _def_strsep
='#undef HAVE_STRSEP'
3369 echocheck
"vsscanf()"
3372 int main(void) { vsscanf(0, 0, 0); return 0; }
3375 cc_check
&& _vsscanf
=yes
3376 if test "$_vsscanf" = yes ; then
3377 _def_vsscanf
='#define HAVE_VSSCANF 1'
3380 _def_vsscanf
='#undef HAVE_VSSCANF'
3389 int main(void) { swab(0, 0, 0); return 0; }
3392 cc_check
&& _swab
=yes
3393 if test "$_swab" = yes ; then
3394 _def_swab
='#define HAVE_SWAB 1'
3397 _def_swab
='#undef HAVE_SWAB'
3402 echocheck
"POSIX select()"
3406 #include <sys/types.h>
3408 #include <sys/time.h>
3410 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3413 _def_posix_select
='#undef HAVE_POSIX_SELECT'
3414 cc_check
&& _posix_select
=yes \
3415 && _def_posix_select
='#define HAVE_POSIX_SELECT 1'
3416 echores
"$_posix_select"
3419 echocheck
"gettimeofday()"
3422 #include <sys/time.h>
3423 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3426 cc_check
&& _gettimeofday
=yes
3427 if test "$_gettimeofday" = yes ; then
3428 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3429 _need_gettimeofday
=no
3431 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3432 _need_gettimeofday
=yes
3434 echores
"$_gettimeofday"
3441 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3444 cc_check
&& _glob
=yes
3445 if test "$_glob" = yes ; then
3446 _def_glob
='#define HAVE_GLOB 1'
3449 _def_glob
='#undef HAVE_GLOB'
3455 echocheck
"setenv()"
3458 int main (void){ setenv("","",0); return 0; }
3461 cc_check
&& _setenv
=yes
3462 if test "$_setenv" = yes ; then
3463 _def_setenv
='#define HAVE_SETENV 1'
3466 _def_setenv
='#undef HAVE_SETENV'
3473 echocheck
"sysi86()"
3475 #include <sys/sysi86.h>
3476 int main (void) { sysi86(0); return 0; }
3479 cc_check
&& _sysi86
=yes
3480 if test "$_sysi86" = yes ; then
3481 _def_sysi86
='#define HAVE_SYSI86 1'
3483 #include <sys/sysi86.h>
3484 int main (void) { int sysi86(int, void*); sysi86(0); return 0; }
3486 cc_check
&& _def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3488 _def_sysi86
='#undef HAVE_SYSI86'
3494 echocheck
"sys/sysinfo.h"
3496 #include <sys/sysinfo.h>
3498 struct sysinfo s_info;
3504 cc_check
&& _sys_sysinfo
=yes
3505 if test "$_sys_sysinfo" = yes ; then
3506 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3508 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3510 echores
"$_sys_sysinfo"
3515 echocheck
"Mac OS X APIs"
3516 if test "$_macosx" = auto
; then
3517 productName
=`/usr/bin/sw_vers -productName`
3518 if test "$productName" = "Mac OS X" ||
3519 test "$productName" = "Mac OS X Server" ; then
3523 _def_macosx
='#undef MACOSX'
3524 _noaomodules
="macosx $_noaomodules"
3525 _novomodules
="quartz $_novomodules"
3528 if test "$_macosx" = yes ; then
3530 #include <Carbon/Carbon.h>
3531 #include <QuickTime/QuickTime.h>
3532 #include <CoreAudio/CoreAudio.h>
3536 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3539 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3540 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3541 _def_macosx
='#define MACOSX 1'
3542 _aosrc
="$_aosrc ao_macosx.c"
3543 _aomodules
="macosx $_aomodules"
3544 _vosrc
="$_vosrc vo_quartz.c"
3545 _vomodules
="quartz $_vomodules"
3548 _def_macosx
='#undef MACOSX'
3549 _noaomodules
="macosx $_noaomodules"
3550 _novomodules
="quartz $_novomodules"
3553 #include <Carbon/Carbon.h>
3554 #include <QuartzCore/CoreVideo.h>
3557 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3558 _vosrc
="$_vosrc vo_macosx.m"
3559 _vomodules
="macosx $_vomodules"
3560 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3561 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3562 _macosx_corevideo
=yes
3564 _novomodules
="macosx $_novomodules"
3565 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3566 _macosx_corevideo
=no
3571 echocheck
"Mac OS X Finder Support"
3572 if test "$_macosx_finder_support" = auto
; then
3573 _macosx_finder_support
=$_macosx
3575 if test "$_macosx_finder_support" = yes; then
3576 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3577 _macosx_finder_support
=yes
3579 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3580 _macosx_finder_support
=no
3582 echores
"$_macosx_finder_support"
3584 echocheck
"Mac OS X Bundle file locations"
3585 if test "$_macosx_bundle" = auto
; then
3586 _macosx_bundle
=$_macosx_finder_support
3588 if test "$_macosx_bundle" = yes; then
3589 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3591 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3594 echores
"$_macosx_bundle"
3596 echocheck
"Apple Remote"
3597 if test "$_apple_remote" = auto
; then
3601 #include <IOKit/IOCFPlugIn.h>
3602 int main (int argc, const char * argv[])
3604 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3605 CFMutableDictionaryRef hidMatchDictionary;
3606 IOReturn ioReturnValue;
3608 // Set up a matching dictionary to search the I/O Registry by class.
3609 // name for all HID class devices
3610 hidMatchDictionary = IOServiceMatching("AppleIRController");
3612 // Now search I/O Registry for matching devices.
3613 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3614 hidMatchDictionary, &hidObjectIterator);
3616 // If search is unsuccessful, return nonzero.
3617 if (ioReturnValue != kIOReturnSuccess ||
3618 !IOIteratorIsValid(hidObjectIterator)) {
3624 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
3626 if test "$_apple_remote" = yes ; then
3627 _def_apple_remote
='#define HAVE_APPLE_REMOTE 1'
3628 _ld_extra
="$_ld_extra -framework IOKit"
3630 _def_apple_remote
='#undef HAVE_APPLE_REMOTE'
3632 echores
"$_apple_remote"
3637 echocheck
"pkg-config"
3638 _pkg_config
=pkg-config
3639 if `$_pkg_config --version > /dev/null 2>&1`; then
3640 if test "$_ld_static"; then
3641 _pkg_config
="$_pkg_config --static"
3650 echocheck
"Samba support (libsmbclient)"
3651 if test "$_smbsupport" = yes; then
3652 _ld_extra
="$_ld_extra -lsmbclient"
3654 if test "$_smbsupport" = auto
; then
3657 #include <libsmbclient.h>
3658 int main(void) { smbc_opendir("smb://"); return 0; }
3660 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3661 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3662 _smbsupport
=yes && break
3666 if test "$_smbsupport" = yes; then
3667 _def_smbsupport
="#define LIBSMBCLIENT"
3668 _inputmodules
="smb $_inputmodules"
3670 _def_smbsupport
="#undef LIBSMBCLIENT"
3671 _noinputmodules
="smb $_noinputmodules"
3673 echores
"$_smbsupport"
3682 if test "$_tdfxfb" = yes ; then
3683 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3684 _vosrc
="$_vosrc vo_tdfxfb.c"
3685 _vomodules
="tdfxfb $_vomodules"
3687 _def_tdfxfb
='#undef HAVE_TDFXFB'
3688 _novomodules
="tdfxfb $_novomodules"
3693 if test "$_s3fb" = yes ; then
3694 _def_s3fb
='#define HAVE_S3FB 1'
3695 _vosrc
="$_vosrc vo_s3fb.c"
3696 _vomodules
="s3fb $_vomodules"
3698 _def_s3fb
='#undef HAVE_S3FB'
3699 _novomodules
="s3fb $_novomodules"
3704 if test "$_tdfxvid" = yes ; then
3705 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3706 _vosrc
="$_vosrc vo_tdfx_vid.c"
3707 _vomodules
="tdfx_vid $_vomodules"
3709 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3710 _novomodules
="tdfx_vid $_novomodules"
3715 if test "$_xvr100" = auto
; then
3718 #include <sys/fbio.h>
3719 #include <sys/visual_io.h>
3721 struct vis_identifier ident;
3722 struct fbgattr attr;
3724 ioctl(0, VIS_GETIDENTIFIER, &ident);
3725 ioctl(0, FBIOGATTR, &attr);
3729 cc_check
&& _xvr100
=yes
3731 if test "$_xvr100" = yes ; then
3732 _def_xvr100
='#define HAVE_XVR100 1'
3733 _vosrc
="$_vosrc vo_xvr100.c"
3734 _vomodules
="xvr100 $_vomodules"
3736 _def_tdfxvid
='#undef HAVE_XVR100'
3737 _novomodules
="xvr100 $_novomodules"
3742 if test "$_tga" = yes ; then
3743 _def_tga
='#define HAVE_TGA 1'
3744 _vosrc
="$_vosrc vo_tga.c"
3745 _vomodules
="tga $_vomodules"
3747 _def_tga
='#undef HAVE_TGA'
3748 _novomodules
="tga $_novomodules"
3753 echocheck
"md5sum support"
3754 if test "$_md5sum" = yes; then
3755 _def_md5sum
="#define HAVE_MD5SUM"
3756 _vosrc
="$_vosrc vo_md5sum.c"
3757 _vomodules
="md5sum $_vomodules"
3759 _def_md5sum
="#undef HAVE_MD5SUM"
3760 _novomodules
="md5sum $_novomodules"
3766 if test "$_bl" = yes ; then
3767 _def_bl
='#define HAVE_BL 1'
3768 _vosrc
="$_vosrc vo_bl.c"
3769 _vomodules
="bl $_vomodules"
3771 _def_bl
='#undef HAVE_BL'
3772 _novomodules
="bl $_novomodules"
3777 echocheck
"DirectFB"
3778 if test "$_directfb" = auto
; then
3781 #include <directfb.h>
3782 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3784 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3785 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
3786 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3787 _inc_extra
="$_inc_extra $_inc_tmp" && break
3792 expr $1 \
* 65536 + $2 \
* 256 + $3
3795 if test "$_directfb" = yes; then
3797 #include <directfb_version.h>
3799 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3802 if $_cc -E $TMPC $_inc_extra > "$TMPEXE"; then
3803 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()'`
3804 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3805 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3806 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3807 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3808 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3809 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3810 _res_comment
="$_directfb_version"
3811 test "$_dfb_version" -ge `dfb_version 0 9 15` && _dfbmga
=yes
3813 _def_directfb_version
='#undef DIRECTFBVERSION'
3815 _res_comment
="version >=0.9.13 required"
3819 _res_comment
="failed to get version"
3822 echores
"$_directfb"
3824 if test "$_directfb" = yes ; then
3825 _def_directfb
='#define HAVE_DIRECTFB 1'
3826 _vosrc
="$_vosrc vo_directfb2.c"
3827 _vomodules
="directfb $_vomodules"
3828 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3830 _def_directfb
='#undef HAVE_DIRECTFB'
3831 _novomodules
="directfb $_novomodules"
3833 if test "$_dfbmga" = yes; then
3834 _vosrc
="$_vosrc vo_dfbmga.c"
3835 _vomodules
="dfbmga $_vomodules"
3836 _def_dfbmga
='#define HAVE_DFBMGA 1'
3838 _novomodules
="dfbmga $_novomodules"
3839 _def_dfbmga
='#undef HAVE_DFBMGA'
3843 echocheck
"X11 headers presence"
3845 _res_comment
="check if the dev(el) packages are installed"
3846 for I
in `echo $_inc_extra | sed s/-I//g` /usr
/include
; do
3847 if test -f "$I/X11/Xlib.h" ; then
3853 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/openwin
/include
; do
3854 if test -f "$I/X11/Xlib.h" ; then
3855 _inc_extra
="$_inc_extra -I$I"
3857 _res_comment
="using $I"
3861 echores
"$_x11_headers"
3865 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3867 #include <X11/Xlib.h>
3868 #include <X11/Xutil.h>
3869 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3871 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3872 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3874 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3876 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3878 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3879 && _x11
=yes && break
3882 if test "$_x11" = yes ; then
3883 _def_x11
='#define HAVE_X11 1'
3884 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3885 _vomodules
="x11 xover $_vomodules"
3888 _def_x11
='#undef HAVE_X11'
3889 _novomodules
="x11 $_novomodules"
3890 _res_comment
="check if the dev(el) packages are installed"
3891 # disable stuff that depends on X
3892 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
3900 if test "$_x11" = yes ; then
3902 #include <X11/Xmd.h>
3903 #include <X11/Xlib.h>
3904 #include <X11/Xutil.h>
3905 #include <X11/Xatom.h>
3906 #include <X11/extensions/dpms.h>
3908 (void) DPMSQueryExtension(0, 0, 0);
3911 cc_check
-lXdpms && _xdpms3
=yes
3913 #include <X11/Xlib.h>
3914 #include <X11/extensions/dpms.h>
3916 (void) DPMSQueryExtension(0, 0, 0);
3919 cc_check
-lXext && _xdpms4
=yes
3921 if test "$_xdpms4" = yes ; then
3922 _def_xdpms
='#define HAVE_XDPMS 1'
3923 _res_comment
="using Xdpms 4"
3925 elif test "$_xdpms3" = yes ; then
3926 _def_xdpms
='#define HAVE_XDPMS 1'
3927 _libs_mplayer
="$_libs_mplayer -lXdpms"
3928 _res_comment
="using Xdpms 3"
3931 _def_xdpms
='#undef HAVE_XDPMS'
3937 if test "$_xv" = auto
; then
3939 #include <X11/Xlib.h>
3940 #include <X11/extensions/Xvlib.h>
3942 (void) XvGetPortAttribute(0, 0, 0, 0);
3943 (void) XvQueryPortAttributes(0, 0, 0);
3947 cc_check
-lXv && _xv
=yes
3950 if test "$_xv" = yes ; then
3951 _def_xv
='#define HAVE_XV 1'
3952 _libs_mplayer
="$_libs_mplayer -lXv"
3953 _vosrc
="$_vosrc vo_xv.c"
3954 _vomodules
="xv $_vomodules"
3956 _def_xv
='#undef HAVE_XV'
3957 _novomodules
="xv $_novomodules"
3963 if test "$_xv" = yes && test "$_xvmc" != no
; then
3966 #include <X11/Xlib.h>
3967 #include <X11/extensions/Xvlib.h>
3968 #include <X11/extensions/XvMClib.h>
3970 (void) XvMCQueryExtension(0,0,0);
3971 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3974 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3975 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3978 if test "$_xvmc" = yes ; then
3979 _def_xvmc
='#define HAVE_XVMC 1'
3980 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
3981 _vosrc
="$_vosrc vo_xvmc.c"
3982 _vomodules
="xvmc $_vomodules"
3983 _res_comment
="using $_xvmclib"
3985 _def_xvmc
='#undef HAVE_XVMC'
3986 _novomodules
="xvmc $_novomodules"
3987 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
3992 echocheck
"Xinerama"
3993 if test "$_xinerama" = auto
; then
3995 #include <X11/Xlib.h>
3996 #include <X11/extensions/Xinerama.h>
3997 int main(void) { (void) XineramaIsActive(0); return 0; }
4000 cc_check
-lXinerama && _xinerama
=yes
4003 if test "$_xinerama" = yes ; then
4004 _def_xinerama
='#define HAVE_XINERAMA 1'
4005 _libs_mplayer
="$_libs_mplayer -lXinerama"
4007 _def_xinerama
='#undef HAVE_XINERAMA'
4009 echores
"$_xinerama"
4012 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4013 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4014 # named 'X extensions' or something similar.
4015 # This check may be useful for future mplayer versions (to change resolution)
4016 # If you run into problems, remove '-lXxf86vm'.
4018 if test "$_vm" = auto
; then
4020 #include <X11/Xlib.h>
4021 #include <X11/extensions/xf86vmode.h>
4022 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4025 cc_check
-lXxf86vm && _vm
=yes
4027 if test "$_vm" = yes ; then
4028 _def_vm
='#define HAVE_XF86VM 1'
4029 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
4031 _def_vm
='#undef HAVE_XF86VM'
4035 # Check for the presence of special keycodes, like audio control buttons
4036 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4037 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4038 # have these new keycodes.
4039 echocheck
"XF86keysym"
4040 if test "$_xf86keysym" = auto
; then
4043 #include <X11/Xlib.h>
4044 #include <X11/XF86keysym.h>
4045 int main(void) { return XF86XK_AudioPause; }
4047 cc_check
&& _xf86keysym
=yes
4049 if test "$_xf86keysym" = yes ; then
4050 _def_xf86keysym
='#define HAVE_XF86XK 1'
4052 _def_xf86keysym
='#undef HAVE_XF86XK'
4054 echores
"$_xf86keysym"
4057 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4059 #include <X11/Xlib.h>
4060 #include <X11/extensions/xf86dga.h>
4061 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4064 cc_check
-lXxf86dga && _dga2
=yes
4066 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4068 #include <X11/Xlib.h>
4069 #include <X11/extensions/xf86dga.h>
4070 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4073 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4077 _def_dga
='#undef HAVE_DGA'
4078 _def_dga1
='#undef HAVE_DGA1'
4079 _def_dga2
='#undef HAVE_DGA2'
4080 if test "$_dga1" = yes ; then
4082 _def_dga1
='#define HAVE_DGA1 1'
4083 _res_comment
="using DGA 1.0"
4084 elif test "$_dga2" = yes ; then
4086 _def_dga2
='#define HAVE_DGA2 1'
4087 _res_comment
="using DGA 2.0"
4089 if test "$_dga" = yes ; then
4090 _def_dga
='#define HAVE_DGA 1'
4091 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4092 _vosrc
="$_vosrc vo_dga.c"
4093 _vomodules
="dga $_vomodules"
4095 _novomodules
="dga $_novomodules"
4101 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4102 _def_3dfx
='#define HAVE_3DFX 1'
4103 _vosrc
="$_vosrc vo_3dfx.c"
4104 _vomodules
="3dfx $_vomodules"
4106 _def_3dfx
='#undef HAVE_3DFX'
4107 _novomodules
="3dfx $_novomodules"
4113 #Note: this test is run even with --enable-gl since we autodetect linker flags
4114 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4118 #include <windows.h>
4119 #include <GL/glext.h>
4121 #include <X11/Xlib.h>
4127 wglCreateContext(dc);
4129 glXCreateContext(NULL, NULL, NULL, True);
4136 if cc_check
-lGL $_ld_lm ; then
4138 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4139 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4141 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4142 elif cc_check
-DGL_WIN32 -lopengl32 ; then
4145 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4150 if test "$_gl" = yes ; then
4151 _def_gl
='#define HAVE_GL 1'
4152 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4153 if test "$_gl_win32" = yes ; then
4154 _def_gl_win32
='#define GL_WIN32 1'
4155 _vosrc
="$_vosrc w32_common.c"
4156 _res_comment
="win32 version"
4158 _vomodules
="opengl $_vomodules"
4160 _def_gl
='#undef HAVE_GL'
4161 _def_gl_win32
='#undef GL_WIN32'
4162 _novomodules
="opengl $_novomodules"
4169 _def_vidix
='#undef CONFIG_VIDIX'
4170 _def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4171 _vidix_drv_cyberblade
=no
4172 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4174 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4176 _def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4177 _vidix_drv_mach64
=no
4178 _def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4180 _def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4181 _vidix_drv_mga_crtc2
=no
4182 _def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4183 _vidix_drv_nvidia
=no
4184 _def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4186 _def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4188 _def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4189 _vidix_drv_radeon
=no
4190 _def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4191 _vidix_drv_rage128
=no
4192 _def_vidix_drv_savage
='#undef CONFIG_VIDIX_DRV_SAVAGE'
4193 _vidix_drv_savage
=no
4194 _def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4196 _def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4197 _vidix_drv_unichrome
=no
4198 if test "$_vidix_internal" = auto
; then
4200 x86
&& _vidix_internal
=yes
4201 ppc
&& linux
&& _vidix_internal
=yes
4202 alpha
&& linux
&& _vidix_internal
=yes
4203 qnx || beos || darwin
&& _vidix_internal
=no
4205 if test "$_vidix_internal" = yes; then
4206 _res_comment
="internal"
4209 elif test "$_vidix_external" = auto
; then
4212 #include <vidix/vidix.h>
4213 int main(void) { return 0; }
4215 cc_check
-lvidix && _vidix_external
=yes && _res_comment
="external" \
4220 if test "$_vidix" = yes ; then
4221 _def_vidix
='#define CONFIG_VIDIX 1'
4222 _vosrc
="$_vosrc vo_cvidix.c"
4223 _vomodules
="cvidix $_vomodules"
4224 test "$_vidix_drivers" || _vidix_drivers
="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 savage sis unichrome"
4225 test $_ivtv = "yes" || _vidix_drivers
=`echo $_vidix_drivers | sed s/ivtv//`
4227 # some vidix drivers are meant to work on x86 only, discard them elsewhere
4228 x86 || _vidix_drivers
=`echo $_vidix_drivers | sed -e s/cyberblade// -e s/sis// -e s/unichrome//`
4230 for driver
in $_vidix_drivers ; do
4231 uc_driver
=`echo $driver | tr '[a-z]' '[A-Z]'`
4232 eval _vidix_drv_
${driver}=yes
4233 eval _def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4236 _novomodules
="cvidix $_novomodules"
4239 if test "$_vidix_internal" = yes ; then
4240 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
4241 elif test "$_vidix_external" = yes ; then
4242 _libs_mplayer
="$_libs_mplayer -lvidix"
4243 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
4246 if test "$_vidix" = yes && win32
; then
4247 _vosrc
="$_vosrc vo_winvidix.c"
4248 _vomodules
="winvidix $_vomodules"
4249 _libs_mplayer
="$_libs_mplayer -lgdi32"
4251 _novomodules
="winvidix $_novomodules"
4253 if test "$_vidix" = yes && test "$_x11" = yes; then
4254 _vosrc
="$_vosrc vo_xvidix.c"
4255 _vomodules
="xvidix $_vomodules"
4257 _novomodules
="xvidix $_novomodules"
4261 echocheck
"/dev/mga_vid"
4262 if test "$_mga" = auto
; then
4264 test -c /dev
/mga_vid
&& _mga
=yes
4266 if test "$_mga" = yes ; then
4267 _def_mga
='#define HAVE_MGA 1'
4268 _vosrc
="$_vosrc vo_mga.c"
4269 _vomodules
="mga $_vomodules"
4271 _def_mga
='#undef HAVE_MGA'
4272 _novomodules
="mga $_novomodules"
4278 if test "$_xmga" = auto
; then
4280 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4282 if test "$_xmga" = yes ; then
4283 _def_xmga
='#define HAVE_XMGA 1'
4284 _vosrc
="$_vosrc vo_xmga.c"
4285 _vomodules
="xmga $_vomodules"
4287 _def_xmga
='#undef HAVE_XMGA'
4288 _novomodules
="xmga $_novomodules"
4294 if test "$_ggi" = auto
; then
4296 #include <ggi/ggi.h>
4297 int main(void) { ggiInit(); return 0; }
4300 cc_check
-lggi && _ggi
=yes
4302 if test "$_ggi" = yes ; then
4303 _def_ggi
='#define HAVE_GGI 1'
4304 _libs_mplayer
="$_libs_mplayer -lggi"
4305 _vosrc
="$_vosrc vo_ggi.c"
4306 _vomodules
="ggi $_vomodules"
4308 _def_ggi
='#undef HAVE_GGI'
4309 _novomodules
="ggi $_novomodules"
4313 echocheck
"GGI extension: libggiwmh"
4314 if test "$_ggiwmh" = auto
; then
4317 #include <ggi/ggi.h>
4318 #include <ggi/wmh.h>
4319 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4321 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4323 # needed to get right output on obscure combination
4324 # like --disable-ggi --enable-ggiwmh
4325 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4326 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4327 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4330 _def_ggiwmh
='#undef HAVE_GGIWMH'
4336 if test "$_aa" = auto
; then
4339 extern struct aa_hardware_params aa_defparams;
4340 extern struct aa_renderparams aa_defrenderparams;
4344 (void) aa_init(0, 0, 0);
4345 c = aa_autoinit(&aa_defparams);
4346 p = aa_getrenderparams();
4347 aa_autoinitkbd(c,0);
4351 for _ld_tmp
in "-laa" ; do
4352 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4355 if test "$_aa" = yes ; then
4356 _def_aa
='#define HAVE_AA 1'
4358 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4360 _vosrc
="$_vosrc vo_aa.c"
4361 _vomodules
="aa $_vomodules"
4363 _def_aa
='#undef HAVE_AA'
4364 _novomodules
="aa $_novomodules"
4370 if test "$_caca" = auto
; then
4372 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4375 #ifdef CACA_API_VERSION_1
4378 int main(void) { (void) caca_init(); return 0; }
4380 cc_check
`caca-config --libs` && _caca
=yes
4383 if test "$_caca" = yes ; then
4384 _def_caca
='#define HAVE_CACA 1'
4385 _inc_extra
="$_inc_extra `caca-config --cflags`"
4386 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4387 _vosrc
="$_vosrc vo_caca.c"
4388 _vomodules
="caca $_vomodules"
4390 _def_caca
='#undef HAVE_CACA'
4391 _novomodules
="caca $_novomodules"
4397 if test "$_svga" = auto
; then
4400 int main(void) { return 0; }
4403 cc_check
-lvga $_ld_lm && _svga
=yes
4405 if test "$_svga" = yes ; then
4406 _def_svga
='#define HAVE_SVGALIB 1'
4407 _libs_mplayer
="$_libs_mplayer -lvga"
4408 _vosrc
="$_vosrc vo_svga.c"
4409 _vomodules
="svga $_vomodules"
4411 _def_svga
='#undef HAVE_SVGALIB'
4412 _novomodules
="svga $_novomodules"
4418 if test "$_fbdev" = auto
; then
4422 if test "$_fbdev" = yes ; then
4423 _def_fbdev
='#define HAVE_FBDEV 1'
4424 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4425 _vomodules
="fbdev $_vomodules"
4427 _def_fbdev
='#undef HAVE_FBDEV'
4428 _novomodules
="fbdev $_novomodules"
4435 if test "$_dvb" = auto
; then
4438 #include <sys/poll.h>
4439 #include <sys/ioctl.h>
4444 #include <ost/dmx.h>
4445 #include <ost/frontend.h>
4446 #include <ost/sec.h>
4447 #include <ost/video.h>
4448 #include <ost/audio.h>
4449 int main(void) {return 0;}
4451 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4452 cc_check
$_inc_tmp && _dvb
=yes && \
4453 _inc_extra
="$_inc_extra $_inc_tmp" && break
4457 if test "$_dvb" = yes ; then
4458 _def_dvb
='#define HAVE_DVB 1'
4459 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4460 _aomodules
="mpegpes(dvb) $_aomodules"
4461 _vomodules
="mpegpes(dvb) $_vomodules"
4464 echocheck
"DVB HEAD"
4465 if test "$_dvbhead" = auto
; then
4469 #include <sys/poll.h>
4470 #include <sys/ioctl.h>
4475 #include <linux/dvb/dmx.h>
4476 #include <linux/dvb/frontend.h>
4477 #include <linux/dvb/video.h>
4478 #include <linux/dvb/audio.h>
4479 int main(void) {return 0;}
4481 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4482 cc_check
$_inc_tmp && _dvbhead
=yes && \
4483 _inc_extra
="$_inc_extra $_inc_tmp" && break
4487 if test "$_dvbhead" = yes ; then
4488 _def_dvb
='#define HAVE_DVB_HEAD 1'
4489 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4490 _aomodules
="mpegpes(dvb) $_aomodules"
4491 _vomodules
="mpegpes(dvb) $_vomodules"
4494 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4495 _def_dvb
='#undef HAVE_DVB'
4496 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4497 _aomodules
="mpegpes(file) $_aomodules"
4498 _vomodules
="mpegpes(file) $_vomodules"
4501 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4503 _inputmodules
="dvb $_inputmodules"
4506 _noinputmodules
="dvb $_noinputmodules"
4511 if test "$_zr" = auto
; then
4512 #36067's seem to identify themselves as 36057PQC's, so the line
4513 #below should work for 36067's and 36057's.
4514 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
4520 if test "$_zr" = yes ; then
4521 if test "$_libavcodec_a" = yes ; then
4522 _def_zr
='#define HAVE_ZR 1'
4523 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
4524 _vomodules
="zr zr2 $_vomodules"
4526 _res_comment
="libavcodec (static) is required by zr, sorry"
4527 _novomodules
="zr $_novomodules"
4528 _def_zr
='#undef HAVE_ZR'
4531 _def_zr
='#undef HAVE_ZR'
4532 _novomodules
="zr zr2 $_novomodules"
4537 echocheck
"PNG support"
4538 if test "$_png" = auto
; then
4541 # Don't check for -lpng on irix since it has its own libpng
4542 # incompatible with the GNU libpng
4543 _res_comment
="disabled on irix (not GNU libpng)"
4549 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4550 printf("libpng: %s\n", png_libpng_ver);
4551 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4554 if cc_check
-lpng -lz $_ld_lm ; then
4558 _res_comment
="mismatch of library and header versions"
4564 if test "$_png" = yes ; then
4565 _def_png
='#define HAVE_PNG 1'
4566 _ld_extra
="$_ld_extra -lpng -lz"
4567 _vosrc
="$_vosrc vo_png.c"
4568 _vomodules
="png $_vomodules"
4570 _def_png
='#undef HAVE_PNG'
4571 _novomodules
="png $_novomodules"
4574 echocheck
"JPEG support"
4575 if test "$_jpeg" = auto
; then
4582 #include <jpeglib.h>
4587 if cc_check
-ljpeg $_ld_lm ; then
4595 if test "$_jpeg" = yes ; then
4596 _def_jpeg
='#define HAVE_JPEG 1'
4597 _vosrc
="$_vosrc vo_jpeg.c"
4598 _vomodules
="jpeg $_vomodules"
4599 _ld_extra
="$_ld_extra -ljpeg"
4601 _def_jpeg
='#undef HAVE_JPEG'
4602 _novomodules
="jpeg $_novomodules"
4607 echocheck
"PNM support"
4608 if test "$_pnm" = yes; then
4609 _def_pnm
="#define HAVE_PNM"
4610 _vosrc
="$_vosrc vo_pnm.c"
4611 _vomodules
="pnm $_vomodules"
4613 _def_pnm
="#undef HAVE_PNM"
4614 _novomodules
="pnm $_novomodules"
4620 echocheck
"GIF support"
4621 # This is to appease people who want to force gif support.
4622 # If it is forced to yes, then we still do checks to determine
4623 # which gif library to use.
4624 if test "$_gif" = yes ; then
4629 if test "$_gif" = auto
; then
4632 #include <gif_lib.h>
4637 for _ld_gif
in "-lungif" "-lgif" ; do
4638 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4642 # If no library was found, and the user wants support forced,
4643 # then we force it on with libgif, as this is the safest
4644 # assumption IMHO. (libungif & libregif both create symbolic
4645 # links to libgif. We also assume that no x11 support is needed,
4646 # because if you are forcing this, then you _should_ know what
4647 # you are doing. [ Besides, package maintainers should never
4648 # have compiled x11 deps into libungif in the first place. ] )
4651 if test "$_force_gif" = yes && test "$_gif" = no
; then
4656 if test "$_gif" = yes ; then
4657 _def_gif
='#define HAVE_GIF 1'
4658 _vosrc
="$_vosrc vo_gif89a.c"
4659 _codecmodules
="gif $_codecmodules"
4660 _vomodules
="gif89a $_vomodules"
4661 _res_comment
="old version, some encoding functions disabled"
4662 _def_gif_4
='#undef HAVE_GIF_4'
4663 _ld_extra
="$_ld_extra $_ld_gif"
4667 #include <gif_lib.h>
4668 void catch() { exit(1); }
4670 signal(SIGSEGV, catch); // catch segfault
4671 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4672 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4676 if cc_check
"$_ld_gif" && tmp_run
; then
4677 _def_gif_4
='#define HAVE_GIF_4 1'
4681 _def_gif
='#undef HAVE_GIF'
4682 _def_gif_4
='#undef HAVE_GIF_4'
4683 _novomodules
="gif89a $_novomodules"
4684 _nocodecmodules
="gif $_nocodecmodules"
4689 case "$_gif" in yes*)
4690 echocheck
"broken giflib workaround"
4691 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4694 #include <gif_lib.h>
4697 printf("UserData is at address %p\n", gif.UserData);
4701 if cc_check
"$_ld_gif" && tmp_run
; then
4702 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4711 echocheck
"VESA support"
4712 if test "$_vesa" = auto
; then
4715 int main(void) { vbeVersion(); return 0; }
4718 cc_check
-lvbe -llrmi && _vesa
=yes
4720 if test "$_vesa" = yes ; then
4721 _def_vesa
='#define HAVE_VESA 1'
4722 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4723 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4724 _vomodules
="vesa $_vomodules"
4726 _def_vesa
='#undef HAVE_VESA'
4727 _novomodules
="vesa $_novomodules"
4737 if test -z "$_sdlconfig" ; then
4738 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4739 _sdlconfig
="sdl-config"
4740 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4741 _sdlconfig
="sdl11-config"
4746 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4749 int main(int argc, char *argv[]) {
4750 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4755 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4756 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4757 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4758 if test "$_sdlversion" -gt 116 ; then
4759 if test "$_sdlversion" -lt 121 ; then
4760 _def_sdlbuggy
='#define BUGGY_SDL'
4762 _def_sdlbuggy
='#undef BUGGY_SDL'
4769 if test "$_sdl" = yes ; then
4770 _def_sdl
='#define HAVE_SDL 1'
4772 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4773 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4775 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4776 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4778 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4779 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4781 _vosrc
="$_vosrc vo_sdl.c"
4782 _vomodules
="sdl $_vomodules"
4783 _aosrc
="$_aosrc ao_sdl.c"
4784 _aomodules
="sdl $_aomodules"
4785 _res_comment
="using $_sdlconfig"
4787 _def_sdl
='#undef HAVE_SDL'
4788 _novomodules
="sdl $_novomodules"
4789 _noaomodules
="sdl $_noaomodules"
4796 echocheck
"Windows waveout"
4797 if test "$_win32waveout" = auto
; then
4799 #include <windows.h>
4800 #include <mmsystem.h>
4801 int main(void) { return 0; }
4804 cc_check
-lwinmm && _win32waveout
=yes
4806 if test "$_win32waveout" = yes ; then
4807 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4808 _libs_mplayer
="$_libs_mplayer -lwinmm"
4809 _aosrc
="$_aosrc ao_win32.c"
4810 _aomodules
="win32 $_aomodules"
4812 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4813 _noaomodules
="win32 $_noaomodules"
4815 echores
"$_win32waveout"
4818 if test "$_directx" = auto
; then
4820 #include <windows.h>
4823 int main(void) { return 0; }
4826 cc_check
-lgdi32 && _directx
=yes
4828 if test "$_directx" = yes ; then
4829 _def_directx
='#define HAVE_DIRECTX 1'
4830 _libs_mplayer
="$_libs_mplayer -lgdi32"
4831 _vosrc
="$_vosrc vo_directx.c"
4832 _vomodules
="directx $_vomodules"
4833 _aosrc
="$_aosrc ao_dsound.c"
4834 _aomodules
="dsound $_aomodules"
4836 _def_directx
='#undef HAVE_DIRECTX'
4837 _novomodules
="directx $_novomodules"
4838 _noaomodules
="dsound $_noaomodules"
4846 if test "$_nas" = auto
; then
4848 #include <audio/audiolib.h>
4849 int main(void) { return 0; }
4852 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4854 if test "$_nas" = yes ; then
4855 _def_nas
='#define HAVE_NAS 1'
4856 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4857 _aosrc
="$_aosrc ao_nas.c"
4858 _aomodules
="nas $_aomodules"
4860 _noaomodules
="nas $_noaomodules"
4861 _def_nas
='#undef HAVE_NAS'
4866 if test "$_dxr2" = auto
; then
4869 #include <dxr2ioctl.h>
4870 int main(void) { return 0; }
4872 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4873 cc_check
$_inc_tmp && _dxr2
=yes && \
4874 _inc_extra
="$_inc_extra $_inc_tmp" && break
4877 if test "$_dxr2" = yes; then
4878 _def_dxr2
='#define HAVE_DXR2 1'
4879 _vosrc
="$_vosrc vo_dxr2.c"
4880 _aosrc
="$_aosrc ao_dxr2.c"
4881 _aomodules
="dxr2 $_aomodules"
4882 _vomodules
="dxr2 $_vomodules"
4884 _def_dxr2
='#undef HAVE_DXR2'
4885 _noaomodules
="dxr2 $_noaomodules"
4886 _novomodules
="dxr2 $_novomodules"
4891 if test "$_dxr3" = auto
; then
4893 #include <linux/em8300.h>
4894 int main(void) { return 0; }
4897 cc_check
&& _dxr3
=yes
4899 if test "$_dxr3" = yes ; then
4900 _def_dxr3
='#define HAVE_DXR3 1'
4901 _vosrc
="$_vosrc vo_dxr3.c"
4902 _vomodules
="dxr3 $_vomodules"
4904 _def_dxr3
='#undef HAVE_DXR3'
4905 _novomodules
="dxr3 $_novomodules"
4910 echocheck
"IVTV TV-Out"
4911 if test "$_ivtv" = auto
; then
4914 #include <inttypes.h>
4915 #include <linux/types.h>
4916 #include <linux/videodev2.h>
4917 #include <linux/ivtv.h>
4918 int main(void) { return 0; }
4921 cc_check
&& _ivtv
=yes
4923 if test "$_ivtv" = yes ; then
4924 _def_ivtv
='#define HAVE_IVTV 1'
4925 _vosrc
="$_vosrc vo_ivtv.c"
4926 _vomodules
="ivtv $_vomodules"
4927 _aosrc
="$_aosrc ao_ivtv.c"
4928 _aomodules
="ivtv $_aomodules"
4930 _def_ivtv
='#undef HAVE_IVTV'
4931 _novomodules
="ivtv $_novomodules"
4932 _noaomodules
="ivtv $_noaomodules"
4937 echocheck
"V4L2 MPEG Decoder"
4938 if test "$_v4l2" = auto
; then
4941 #include <inttypes.h>
4942 #include <linux/types.h>
4943 #include <linux/videodev2.h>
4944 #include <linux/version.h>
4946 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4947 #error kernel headers too old, need 2.6.22
4948 bad_kernel_version();
4950 struct v4l2_ext_controls ctrls;
4951 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4956 cc_check
&& _v4l2
=yes
4958 if test "$_v4l2" = yes ; then
4959 _def_v4l2
='#define HAVE_V4L2_DECODER 1'
4960 _vosrc
="$_vosrc vo_v4l2.c"
4961 _vomodules
="v4l2 $_vomodules"
4962 _aosrc
="$_aosrc ao_v4l2.c"
4963 _aomodules
="v4l2 $_aomodules"
4965 _def_v4l2
='#undef HAVE_V4L2_DECODER'
4966 _novomodules
="v4l2 $_novomodules"
4967 _noaomodules
="v4l2 $_noaomodules"
4978 echocheck
"OSS Audio"
4979 if test "$_ossaudio" = auto
; then
4981 #include <sys/ioctl.h>
4982 #include <$_soundcard_header>
4983 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4986 cc_check
&& _ossaudio
=yes
4988 if test "$_ossaudio" = yes ; then
4989 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4990 _aosrc
="$_aosrc ao_oss.c"
4991 _aomodules
="oss $_aomodules"
4992 if test "$_linux_devfs" = yes; then
4993 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4994 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4997 #include <sys/ioctl.h>
4998 #include <$_soundcard_header>
4999 #ifdef OPEN_SOUND_SYSTEM
5000 int main(void) { return 0; }
5002 #error Not the real thing
5006 cc_check
&& _real_ossaudio
=yes
5007 if test "$_real_ossaudio" = yes; then
5008 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5009 elif netbsd || openbsd
; then
5010 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5011 _ld_extra
="$_ld_extra -lossaudio"
5013 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5015 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5018 _def_ossaudio
='#undef USE_OSS_AUDIO'
5019 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5020 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5021 _noaomodules
="oss $_noaomodules"
5023 echores
"$_ossaudio"
5027 if test "$_arts" = auto
; then
5029 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5033 int main(void) { return 0; }
5035 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
5040 if test "$_arts" = yes ; then
5041 _def_arts
='#define USE_ARTS 1'
5042 _aosrc
="$_aosrc ao_arts.c"
5043 _aomodules
="arts $_aomodules"
5044 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
5045 _inc_extra
="$_inc_extra `artsc-config --cflags`"
5047 _noaomodules
="arts $_noaomodules"
5053 if test "$_esd" = auto
; then
5055 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5059 int main(void) { int fd = esd_open_sound("test"); return fd; }
5061 cc_check
`esd-config --libs` `esd-config --cflags` && _esd
=yes
5067 if test "$_esd" = yes ; then
5068 _def_esd
='#define USE_ESD 1'
5069 _aosrc
="$_aosrc ao_esd.c"
5070 _aomodules
="esd $_aomodules"
5071 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
5072 _inc_extra
="$_inc_extra `esd-config --cflags`"
5074 echocheck
"esd_get_latency()"
5077 int main(void) { return esd_get_latency(0); }
5079 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
5080 echores
"$_esd_latency"
5082 _def_esd
='#undef USE_ESD'
5083 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
5084 _noaomodules
="esd $_noaomodules"
5088 if test "$_pulse" = auto
; then
5090 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5093 #include <pulse/pulseaudio.h>
5094 int main(void) { return 0; }
5096 cc_check
`$_pkg_config --libs --cflags libpulse` && tmp_run
&& _pulse
=yes
5102 if test "$_pulse" = yes ; then
5103 _def_pulse
='#define USE_PULSE 1'
5104 _aosrc
="$_aosrc ao_pulse.c"
5105 _aomodules
="pulse $_aomodules"
5106 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs libpulse`"
5107 _inc_extra
="$_inc_extra `$_pkg_config --cflags libpulse`"
5109 _def_pulse
='#undef USE_PULSE'
5110 _noaomodules
="pulse $_noaomodules"
5115 if test "$_jack" = auto
; then
5119 #include <jack/jack.h>
5120 int main(void) { jack_client_new("test"); return 0; }
5122 if cc_check
-ljack ; then
5123 _libs_mplayer
="$_libs_mplayer -ljack"
5124 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
5125 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
5126 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
5132 if test "$_jack" = yes ; then
5133 _def_jack
='#define USE_JACK 1'
5134 _aosrc
="$_aosrc ao_jack.c"
5135 _aomodules
="jack $_aomodules"
5137 _noaomodules
="jack $_noaomodules"
5142 if test "$_openal" = auto
; then
5146 #include <OpenAL/al.h>
5151 alSourceQueueBuffers(0, 0, 0);
5152 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5156 for I
in "-lopenal" "-framework OpenAL" ; do
5157 cc_check
$I && _openal
=yes && break
5158 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5160 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
5162 if test "$_openal" = yes ; then
5163 _def_openal
='#define USE_OPENAL 1'
5164 _aosrc
="$_aosrc ao_openal.c"
5165 _aomodules
="openal $_aomodules"
5167 _noaomodules
="openal $_noaomodules"
5171 echocheck
"ALSA audio"
5172 if test "$_alsa" != no
; then
5175 #include <sys/asoundlib.h>
5176 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5177 #error "alsa version != 0.5.x"
5179 int main(void) { return 0; }
5181 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5184 #include <sys/asoundlib.h>
5185 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5186 #error "alsa version != 0.9.x"
5188 int main(void) { return 0; }
5190 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5192 #include <alsa/asoundlib.h>
5193 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5194 #error "alsa version != 0.9.x"
5196 int main(void) { return 0; }
5198 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5201 #include <sys/asoundlib.h>
5202 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5203 #error "alsa version != 1.0.x"
5205 int main(void) { return 0; }
5207 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5209 #include <alsa/asoundlib.h>
5210 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5211 #error "alsa version != 1.0.x"
5213 int main(void) { return 0; }
5215 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5217 _def_alsa5
='#undef HAVE_ALSA5'
5218 _def_alsa9
='#undef HAVE_ALSA9'
5219 _def_alsa1x
='#undef HAVE_ALSA1X'
5220 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5221 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5222 if test "$_alsaver" ; then
5224 if test "$_alsaver" = '0.5.x' ; then
5226 _aosrc
="$_aosrc ao_alsa5.c"
5227 _aomodules
="alsa5 $_aomodules"
5228 _def_alsa5
='#define HAVE_ALSA5 1'
5229 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5230 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5231 elif test "$_alsaver" = '0.9.x-sys' ; then
5233 _aosrc
="$_aosrc ao_alsa.c"
5234 _aomodules
="alsa $_aomodules"
5235 _def_alsa9
='#define HAVE_ALSA9 1'
5236 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5237 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5238 elif test "$_alsaver" = '0.9.x-alsa' ; then
5240 _aosrc
="$_aosrc ao_alsa.c"
5241 _aomodules
="alsa $_aomodules"
5242 _def_alsa9
='#define HAVE_ALSA9 1'
5243 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5244 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5245 elif test "$_alsaver" = '1.0.x-sys' ; then
5247 _aosrc
="$_aosrc ao_alsa.c"
5248 _aomodules
="alsa $_aomodules"
5249 _def_alsa1x
="#define HAVE_ALSA1X 1"
5250 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5251 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5252 elif test "$_alsaver" = '1.0.x-alsa' ; then
5254 _aosrc
="$_aosrc ao_alsa.c"
5255 _aomodules
="alsa $_aomodules"
5256 _def_alsa1x
="#define HAVE_ALSA1X 1"
5257 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5258 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5261 _res_comment
="unknown version"
5263 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5265 _noaomodules
="alsa $_noaomodules"
5270 echocheck
"Sun audio"
5271 if test "$_sunaudio" = auto
; then
5273 #include <sys/types.h>
5274 #include <sys/audioio.h>
5275 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5278 cc_check
&& _sunaudio
=yes
5280 if test "$_sunaudio" = yes ; then
5281 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5282 _aosrc
="$_aosrc ao_sun.c"
5283 _aomodules
="sun $_aomodules"
5285 _def_sunaudio
='#undef USE_SUN_AUDIO'
5286 _noaomodules
="sun $_noaomodules"
5288 echores
"$_sunaudio"
5292 echocheck
"Sun mediaLib"
5293 if test "$_mlib" = auto
; then
5297 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5299 cc_check
-lmlib && _mlib
=yes
5301 test "$_mlib" = yes && _cpuexts
="MLIB $_cpuexts"
5307 echocheck
"SGI audio"
5308 if test "$_sgiaudio" = auto
; then
5309 # check for SGI audio
5311 #include <dmedia/audio.h>
5312 int main(void) { return 0; }
5315 cc_check
&& _sgiaudio
=yes
5317 if test "$_sgiaudio" = "yes" ; then
5318 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5319 _libs_mplayer
="$_libs_mplayer -laudio"
5320 _aosrc
="$_aosrc ao_sgi.c"
5321 _aomodules
="sgi $_aomodules"
5323 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5324 _noaomodules
="sgi $_noaomodules"
5326 echores
"$_sgiaudio"
5330 echocheck
"VCD support"
5331 if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32
; then
5332 _inputmodules
="vcd $_inputmodules"
5333 _def_vcd
='#define HAVE_VCD 1'
5336 _def_vcd
='#undef HAVE_VCD'
5337 _noinputmodules
="vcd $_noinputmodules"
5338 _res_comment
="not supported on this OS"
5346 if test "$_dvdread_internal" = auto
; then
5347 _dvdread_internal
=no
5348 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5349 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5350 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5351 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5352 _dvdread_internal
=yes
5355 elif test "$_dvdread" = auto
; then
5357 if test "$_dl" = yes; then
5359 #include <inttypes.h>
5360 #include <dvdread/dvd_reader.h>
5361 #include <dvdread/ifo_types.h>
5362 #include <dvdread/ifo_read.h>
5363 #include <dvdread/nav_read.h>
5364 int main(void) { return 0; }
5366 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5367 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5371 if test "$_dvdread_internal" = yes; then
5372 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5373 _def_dvdread
='#define USE_DVDREAD 1'
5374 _inputmodules
="dvdread(internal) $_inputmodules"
5376 _res_comment
="internal"
5377 elif test "$_dvdread" = yes; then
5378 _def_dvdread
='#define USE_DVDREAD 1'
5380 _ld_extra
="$_ld_extra -ldvdread"
5381 _inputmodules
="dvdread(external) $_inputmodules"
5382 _res_comment
="external"
5384 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5385 _def_dvdread
='#undef USE_DVDREAD'
5386 _noinputmodules
="dvdread $_noinputmodules"
5391 echocheck
"internal libdvdcss"
5392 if test "$_libdvdcss_internal" = auto
; then
5393 _libdvdcss_internal
=no
5394 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5396 if test "$_libdvdcss_internal" = yes ; then
5397 if linux || netbsd || openbsd || bsdos
; then
5398 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5399 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5401 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5403 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5404 _ld_extra
="$_ld_extra -framework IOKit"
5406 _inputmodules
="libdvdcss(internal) $_inputmodules"
5409 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5411 echores
"$_libdvdcss_internal"
5414 echocheck
"cdparanoia"
5415 if test "$_cdparanoia" = auto
; then
5417 #include <cdda_interface.h>
5418 #include <cdda_paranoia.h>
5419 // This need a better test. How ?
5421 void *test = cdda_verbose_set;
5422 return test == (void *)1;
5426 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5427 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5428 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5431 if test "$_cdparanoia" = yes ; then
5433 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5434 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5436 echores
"$_cdparanoia"
5440 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5443 #include <cdio/version.h>
5444 #include <cdio/cdda.h>
5445 #include <cdio/paranoia.h>
5448 void *test = cdda_verbose_set;
5449 printf("%s\n", CDIO_VERSION);
5450 return test == (void *)1;
5455 for _ld_tmp
in "" "-lwinmm" ; do
5456 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5457 cc_check
$_ld_tmp $_ld_lm \
5458 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5460 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5461 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5462 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5463 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5464 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5467 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5469 _def_libcdio
='#define HAVE_LIBCDIO'
5470 _def_havelibcdio
='yes'
5472 if test "$_cdparanoia" = yes ; then
5473 _res_comment
="using cdparanoia"
5475 _def_libcdio
='#undef HAVE_LIBCDIO'
5476 _def_havelibcdio
='no'
5480 if test "$_cdda" = yes ; then
5481 test $_cddb = auto
&& test $_network = yes && ! darwin
&& _cddb
=yes
5482 _def_cdparanoia
='#define HAVE_CDDA'
5483 _inputmodules
="cdda $_inputmodules"
5485 _def_cdparanoia
='#undef HAVE_CDDA'
5486 _noinputmodules
="cdda $_noinputmodules"
5489 if test "$_cddb" = yes ; then
5490 _def_cddb
='#define HAVE_CDDB'
5491 _inputmodules
="cddb $_inputmodules"
5494 _def_cddb
='#undef HAVE_CDDB'
5495 _noinputmodules
="cddb $_noinputmodules"
5498 echocheck
"bitmap font support"
5499 if test "$_bitmap_font" = yes ; then
5500 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5502 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5504 echores
"$_bitmap_font"
5507 echocheck
"freetype >= 2.0.9"
5509 # freetype depends on iconv
5510 if test "$_iconv" = no
; then
5512 _res_comment
="iconv support needed"
5515 if test "$_freetype" = auto
; then
5516 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5519 #include <ft2build.h>
5520 #include FT_FREETYPE_H
5521 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5522 #error "Need FreeType 2.0.9 or newer"
5527 FT_Int major=-1,minor=-1,patch=-1;
5528 int err=FT_Init_FreeType(&library);
5530 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5533 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5534 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5535 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5536 (int)major,(int)minor,(int)patch );
5537 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5538 printf("Library and header version mismatch! Fix it in your distribution!\n");
5545 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5550 if test "$_freetype" = yes ; then
5551 _def_freetype
='#define HAVE_FREETYPE'
5552 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5553 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5555 _def_freetype
='#undef HAVE_FREETYPE'
5557 echores
"$_freetype"
5559 if test "$_freetype" = no
; then
5561 _res_comment
="freetype support needed"
5563 echocheck
"fontconfig"
5564 if test "$_fontconfig" = auto
; then
5567 #include <fontconfig/fontconfig.h>
5572 printf("Couldn't initialize fontconfig lib\n");
5580 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5581 _ld_tmp
="-lfontconfig $_ld_tmp"
5582 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5584 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5585 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5586 _ld_tmp
=`$_pkg_config --libs fontconfig`
5587 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5588 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5591 if test "$_fontconfig" = yes ; then
5592 _def_fontconfig
='#define HAVE_FONTCONFIG'
5594 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5596 echores
"$_fontconfig"
5599 echocheck
"SSA/ASS support"
5600 # libass depends on FreeType
5601 if test "$_freetype" = no
; then
5603 _res_comment
="FreeType support needed"
5606 if test "$_ass" = auto
; then
5608 #include <ft2build.h>
5609 #include FT_FREETYPE_H
5610 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5611 #error "Need FreeType 2.1.8 or newer"
5613 int main(void) { return 0; }
5616 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5617 if test "$_ass" = no
; then
5618 _res_comment
="FreeType >= 2.1.8 needed"
5621 if test "$_ass" = yes ; then
5622 _def_ass
='#define USE_ASS'
5624 _def_ass
='#undef USE_ASS'
5629 echocheck
"fribidi with charsets"
5630 if test "$_fribidi" = auto
; then
5631 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5634 /* workaround for fribidi 0.10.4 and below */
5635 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5636 #include <fribidi/fribidi.h>
5639 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5640 printf("Fribidi headers are not consistents with the library!\n");
5647 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5652 if test "$_fribidi" = yes ; then
5653 _def_fribidi
='#define USE_FRIBIDI'
5654 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5655 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5657 _def_fribidi
='#undef USE_FRIBIDI'
5663 if test "$_enca" = auto
; then
5670 langs = enca_get_languages(&langcnt);
5675 cc_check
-lenca $_ld_lm && _enca
=yes
5677 if test "$_enca" = yes ; then
5678 _def_enca
='#define HAVE_ENCA 1'
5679 _ld_extra
="$_ld_extra -lenca"
5681 _def_enca
='#undef HAVE_ENCA'
5689 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5692 cc_check
-lz && _zlib
=yes
5693 if test "$_zlib" = yes ; then
5694 _def_zlib
='#define HAVE_ZLIB 1'
5695 _ld_extra
="$_ld_extra -lz"
5697 _def_zlib
='#undef HAVE_ZLIB'
5698 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
5699 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
5705 if test "$_rtc" = auto
; then
5707 #include <sys/ioctl.h>
5709 #include <linux/rtc.h>
5712 #define RTC_PIE_ON RTCIO_PIE_ON
5714 int main(void) { return RTC_PIE_ON; }
5717 cc_check
&& _rtc
=yes
5720 if test "$_rtc" = yes ; then
5721 _def_rtc
='#define HAVE_RTC 1'
5723 _def_rtc
='#undef HAVE_RTC'
5728 echocheck
"liblzo2 support"
5729 if test "$_liblzo" = auto
; then
5732 #include <lzo/lzo1x.h>
5733 int main(void) { lzo_init();return 0; }
5735 cc_check
-llzo2 && _liblzo
=yes
5737 if test "$_liblzo" = yes ; then
5738 _def_liblzo
='#define USE_LIBLZO 1'
5739 _ld_extra
="$_ld_extra -llzo2"
5740 _codecmodules
="liblzo $_codecmodules"
5742 _def_liblzo
='#undef USE_LIBLZO'
5743 _nocodecmodules
="liblzo $_nocodecmodules"
5748 echocheck
"mad support"
5749 if test "$_mad" = auto
; then
5753 int main(void) { return 0; }
5755 cc_check
-lmad && _mad
=yes
5757 if test "$_mad" = yes ; then
5758 _def_mad
='#define USE_LIBMAD 1'
5759 _ld_extra
="$_ld_extra -lmad"
5760 _codecmodules
="libmad $_codecmodules"
5762 _def_mad
='#undef USE_LIBMAD'
5763 _nocodecmodules
="libmad $_nocodecmodules"
5768 if test "$_twolame" = auto
; then
5770 #include <twolame.h>
5771 int main(void) { twolame_init(); return 0; }
5774 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5776 if test "$_twolame" = yes ; then
5777 _def_twolame
='#define HAVE_TWOLAME 1'
5778 _libs_mencoder
="$_libs_mencoder -ltwolame"
5779 _codecmodules
="twolame $_codecmodules"
5781 _def_twolame
='#undef HAVE_TWOLAME'
5782 _nocodecmodules
="twolame $_nocodecmodules"
5787 if test "$_toolame" = auto
; then
5789 if test "$_twolame" = yes ; then
5790 _res_comment
="disabled by twolame"
5793 #include <toolame.h>
5794 int main(void) { toolame_init(); return 0; }
5796 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5799 if test "$_toolame" = yes ; then
5800 _def_toolame
='#define HAVE_TOOLAME 1'
5801 _libs_mencoder
="$_libs_mencoder -ltoolame"
5802 _codecmodules
="toolame $_codecmodules"
5804 _def_toolame
='#undef HAVE_TOOLAME'
5805 _nocodecmodules
="toolame $_nocodecmodules"
5807 if test "$_toolamedir" ; then
5808 _res_comment
="using $_toolamedir"
5812 echocheck
"OggVorbis support"
5813 if test "$_tremor_internal" = yes; then
5815 elif test "$_tremor_external" = auto
; then
5818 #include <tremor/ivorbiscodec.h>
5819 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5821 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5823 if test "$_libvorbis" = auto
; then
5826 #include <vorbis/codec.h>
5827 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5829 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5831 if test "$_tremor_internal" = yes ; then
5833 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5834 _def_tremor
='#define TREMOR 1'
5835 _codecmodules
="tremor(internal) $_codecmodules"
5836 _res_comment
="internal Tremor"
5837 if test "$_tremor_low" = yes ; then
5838 _res_comment
="internal low accuracy Tremor"
5840 elif test "$_tremor_external" = yes ; then
5842 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5843 _def_tremor
='#define TREMOR 1'
5844 _codecmodules
="tremor(external) $_codecmodules"
5845 _res_comment
="external Tremor"
5846 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5847 elif test "$_libvorbis" = yes ; then
5849 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5850 _codecmodules
="libvorbis $_codecmodules"
5851 _res_comment
="libvorbis"
5852 _ld_extra
="$_ld_extra -lvorbis -logg"
5855 _nocodecmodules
="libvorbis $_nocodecmodules"
5857 if test "$_libvorbis" = no
; then
5858 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
5862 echocheck
"libspeex (version >= 1.1 required)"
5863 if test "$_speex" = auto
; then
5866 #include <speex/speex.h>
5870 speex_decode_int(dec, &bits, dec);
5873 cc_check
-lspeex $_ld_lm && _speex
=yes
5875 if test "$_speex" = yes ; then
5876 _def_speex
='#define HAVE_SPEEX 1'
5877 _ld_extra
="$_ld_extra -lspeex"
5878 _codecmodules
="speex $_codecmodules"
5880 _def_speex
='#undef HAVE_SPEEX'
5881 _nocodecmodules
="speex $_nocodecmodules"
5885 echocheck
"OggTheora support"
5886 if test "$_theora" = auto
; then
5889 #include <theora/theora.h>
5893 /* theora is in flux, make sure that all interface routines and
5894 * datatypes exist and work the way we expect it, so we don't break
5904 theora_info_init (&inf);
5905 theora_comment_init (&tc);
5909 /* we don't want to execute this kind of nonsense; just for making sure
5910 * that compilation works... */
5911 memset(&op, 0, sizeof(op));
5912 r = theora_decode_header (&inf, &tc, &op);
5913 r = theora_decode_init (&st, &inf);
5914 t = theora_granule_time (&st, op.granulepos);
5915 r = theora_decode_packetin (&st, &op);
5916 r = theora_decode_YUVout (&st, &yuv);
5922 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
5923 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5924 && _theora
=yes && break
5926 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5927 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
5928 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5929 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5933 if test "$_theora" = yes ; then
5934 _def_theora
='#define HAVE_OGGTHEORA 1'
5935 _codecmodules
="libtheora $_codecmodules"
5936 # when --enable-theora is forced, we'd better provide a probably sane
5937 # $_ld_theora than nothing
5938 test -z "$_ld_theora" && _ld_extra
="$_ld_extra -ltheora -logg"
5940 _def_theora
='#undef HAVE_OGGTHEORA'
5941 _nocodecmodules
="libtheora $_nocodecmodules"
5945 echocheck
"internal mp3lib support"
5946 if test "$_mp3lib" = yes ; then
5947 _def_mp3lib
='#define USE_MP3LIB 1'
5948 _codecmodules
="mp3lib $_codecmodules"
5950 _def_mp3lib
='#undef USE_MP3LIB'
5951 _nocodecmodules
="mp3lib $_nocodecmodules"
5955 echocheck
"internal liba52 support"
5956 if test "$_liba52" = yes ; then
5957 _def_liba52
='#define USE_LIBA52 1'
5958 _codecmodules
="liba52 $_codecmodules"
5960 _def_liba52
='#undef USE_LIBA52'
5961 _nocodecmodules
="liba52 $_nocodecmodules"
5965 echocheck
"libdca support"
5966 if test "$_libdca" = auto
; then
5969 #include <inttypes.h>
5971 int main(void) { dts_init (0); return 0; }
5973 for _ld_dca
in -ldts -ldca ; do
5974 cc_check
$_ld_dca $_ld_lm && _ld_extra
="$_ld_extra $_ld_dca" \
5975 && _libdca
=yes && break
5978 if test "$_libdca" = yes ; then
5979 _def_libdca
='#define USE_LIBDCA 1'
5980 _codecmodules
="libdca $_codecmodules"
5982 _def_libdca
='#undef USE_LIBDCA'
5983 _nocodecmodules
="libdca $_nocodecmodules"
5987 echocheck
"internal libmpeg2 support"
5988 if test "$_libmpeg2" = yes ; then
5989 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5990 _codecmodules
="libmpeg2 $_codecmodules"
5992 _def_libmpeg2
='#undef USE_LIBMPEG2'
5993 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5995 echores
"$_libmpeg2"
5997 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5998 if test "$_musepack" = auto
; then
6001 #include <mpcdec/mpcdec.h>
6003 mpc_streaminfo info;
6004 mpc_decoder decoder;
6005 mpc_decoder_set_streaminfo(&decoder, &info);
6006 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6009 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6011 if test "$_musepack" = yes ; then
6012 _def_musepack
='#define HAVE_MUSEPACK 1'
6013 _ld_extra
="$_ld_extra -lmpcdec"
6014 _codecmodules
="musepack $_codecmodules"
6016 _def_musepack
='#undef HAVE_MUSEPACK'
6017 _nocodecmodules
="musepack $_nocodecmodules"
6019 echores
"$_musepack"
6022 echocheck
"FAAC (AAC encoder) support"
6023 if test "$_faac" = auto
; then
6025 #include <inttypes.h>
6027 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6030 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6031 cc_check
-O4 $_ld_faac $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
6034 if test "$_faac" = yes ; then
6035 _def_faac
="#define HAVE_FAAC 1"
6036 if echo $_libavencoders |
grep -q FAAC
; then
6038 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
6039 _libs_mplayer
="$_libs_mplayer $_ld_faac"
6042 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
6044 _codecmodules
="faac $_codecmodules"
6046 _def_faac
="#undef HAVE_FAAC"
6047 _nocodecmodules
="faac $_nocodecmodules"
6048 _libavencoders
=`echo $_libavencoders | sed -e s/LIBFAAC_ENCODER// `
6050 echores
"$_faac (in libavcodec: $_lavc_faac)"
6053 echocheck
"FAAD2 (AAC) support"
6054 if test "$_faad_internal" = auto
; then
6055 if x86_32
&& test cc_vendor
=gnu
; then
6057 3.1*|
3.2) # ICE/insn with these versions
6059 _res_comment
="broken gcc"
6068 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
6072 #ifndef FAAD_MIN_STREAMSIZE
6073 #error Too old version
6075 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6077 cc_check
-lfaad $_ld_lm && _faad_external
=yes
6080 if test "$_faad_internal" = yes ; then
6081 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
6083 _res_comment
="internal floating-point"
6084 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
6085 elif test "$_faad_external" = yes ; then
6087 _ld_extra
="$_ld_extra -lfaad"
6089 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
6093 if test "$_faad" = yes ; then
6094 _def_faad
='#define HAVE_FAAD 1'
6095 _codecmodules
="faad2 $_codecmodules"
6097 _def_faad
='#undef HAVE_FAAD'
6098 _nocodecmodules
="faad2 $_nocodecmodules"
6103 echocheck
"LADSPA plugin support"
6104 if test "$_ladspa" = auto
; then
6109 const LADSPA_Descriptor *ld = NULL;
6114 cc_check
&& _ladspa
=yes
6116 if test "$_ladspa" = yes; then
6117 _def_ladspa
="#define HAVE_LADSPA"
6118 _afsrc
="$_afsrc af_ladspa.c"
6119 _afmodules
="ladspa $_afmodules"
6121 _def_ladspa
="#undef HAVE_LADSPA"
6122 _noafmodules
="ladspa $_noafmodules"
6127 if test -z "$_codecsdir" ; then
6128 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6129 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6130 if test -d "$dir" ; then
6136 # Fall back on default directory.
6137 if test -z "$_codecsdir" ; then
6138 _codecsdir
="$_libdir/codecs"
6139 mingw32
&& _codecsdir
="codecs"
6143 echocheck
"Win32 codecs"
6144 if test "$_win32dll" = auto
; then
6146 if x86_32
&& ! qnx
; then
6150 if test "$_win32dll" = yes ; then
6151 _def_win32dll
='#define USE_WIN32DLL 1'
6152 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6153 _res_comment
="using $_win32codecsdir"
6155 _def_win32_loader
='#define WIN32_LOADER 1'
6157 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
6158 _res_comment
="using native windows"
6160 _codecmodules
="win32 $_codecmodules"
6162 _def_win32dll
='#undef USE_WIN32DLL'
6163 _def_win32_loader
='#undef WIN32_LOADER'
6164 _nocodecmodules
="win32 $_nocodecmodules"
6166 echores
"$_win32dll"
6169 echocheck
"XAnim codecs"
6170 if test "$_xanim" = auto
; then
6172 _res_comment
="dynamic loader support needed"
6173 if test "$_dl" = yes ; then
6177 if test "$_xanim" = yes ; then
6178 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6179 _def_xanim
='#define USE_XANIM 1'
6180 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6181 _codecmodules
="xanim $_codecmodules"
6182 _res_comment
="using $_xanimcodecsdir"
6184 _def_xanim
='#undef USE_XANIM'
6185 _def_xanim_path
='#undef XACODEC_PATH'
6186 _nocodecmodules
="xanim $_nocodecmodules"
6191 echocheck
"RealPlayer codecs"
6192 if test "$_real" = auto
; then
6194 _res_comment
="dynamic loader support needed"
6195 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6196 (linux || freebsd || netbsd || win32 || darwin
) ; then
6200 if test "$_real" = yes ; then
6201 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6202 _def_real
='#define USE_REALCODECS 1'
6203 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6204 _codecmodules
="real $_codecmodules"
6205 _res_comment
="using $_realcodecsdir"
6207 _def_real
='#undef USE_REALCODECS'
6208 _def_real_path
="#undef REALCODEC_PATH"
6209 _nocodecmodules
="real $_nocodecmodules"
6214 echocheck
"QuickTime codecs"
6215 if test "$_qtx" = auto
; then
6216 test "$_win32dll" = yes || darwin
&& _qtx
=yes
6218 if test "$_qtx" = yes ; then
6219 _def_qtx
='#define USE_QTX_CODECS 1'
6220 _codecmodules
="qtx $_codecmodules"
6222 _def_qtx
='#undef USE_QTX_CODECS'
6223 _nocodecmodules
="qtx $_nocodecmodules"
6227 echocheck
"Nemesi Streaming Media libraries"
6228 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
6230 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6231 _ld_extra
="$_ld_extra `$_pkg_config --libs libnemesi`"
6235 if test "$_nemesi" = yes; then
6237 _def_nemesi
='#define LIBNEMESI 1'
6238 _inputmodules
="nemesi $_inputmodules"
6240 _native_rtsp
="$_network"
6242 _def_nemesi
='#undef LIBNEMESI'
6243 _noinputmodules
="nemesi $_noinputmodules"
6247 echocheck
"LIVE555 Streaming Media libraries"
6248 if test "$_live" = auto
&& test "$_network" = yes ; then
6249 cat > $TMPCPP << EOF
6250 #include <liveMedia.hh>
6251 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6252 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6258 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6259 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6260 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6261 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6262 $_livelibdir/groupsock/libgroupsock.a \
6263 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6264 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6265 $_ld_extra -lstdc++" \
6266 _inc_extraxx
="-I$_livelibdir/liveMedia/include \
6267 -I$_livelibdir/UsageEnvironment/include \
6268 -I$_livelibdir/BasicUsageEnvironment/include \
6269 -I$_livelibdir/groupsock/include" && \
6272 if test "$_live" != yes ; then
6273 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6278 if test "$_live" = yes && test "$_network" = yes && test "$_nemesi" = no
; then
6279 _res_comment
="using $_livelibdir"
6280 _def_live
='#define STREAMING_LIVE555 1'
6281 _inputmodules
="live555 $_inputmodules"
6282 elif test "$_live_dist" = yes && test "$_network" = yes && test "$_nemesi" = no
; then
6283 _res_comment
="using distribution version"
6285 _def_live
='#define STREAMING_LIVE555 1'
6286 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6287 _inc_extraxx
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6288 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6289 _inputmodules
="live555 $_inputmodules"
6292 _def_live
='#undef STREAMING_LIVE555'
6293 _noinputmodules
="live555 $_noinputmodules"
6298 echocheck
"FFmpeg libavutil"
6299 if test "$_libavutil_a" = auto
; then
6300 if test -d libavutil
; then
6302 _res_comment
="static"
6304 die
"MPlayer will not compile without libavutil in the source tree."
6306 elif test "$_libavutil_so" = auto
; then
6309 #include <ffmpeg/common.h>
6310 int main(void) { ff_gcd(1,1); return 0; }
6312 if $_pkg_config --exists libavutil
; then
6313 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6314 _ld_tmp
=`$_pkg_config --libs libavutil`
6315 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6316 && _libavutil_so
=yes
6317 elif cc_check
-lavutil $_ld_lm ; then
6318 _ld_extra
="$_ld_extra -lavutil"
6320 _res_comment
="using libavutil.so, but static libavutil is recommended"
6324 _def_libavutil
='#undef USE_LIBAVUTIL'
6325 _def_libavutil_a
='#undef USE_LIBAVUTIL_A'
6326 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6327 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
6328 test "$_libavutil" = yes && _def_libavutil
='#define USE_LIBAVUTIL 1'
6329 test "$_libavutil_a" = yes && _def_libavutil_a
='#define USE_LIBAVUTIL_A 1'
6330 test "$_libavutil_so" = yes && _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6331 # neither static nor shared libavutil is available, but it is mandatory ...
6332 if test "$_libavutil" = no
; then
6333 die
"You need static or shared libavutil, MPlayer will not compile without!"
6335 echores
"$_libavutil"
6337 echocheck
"FFmpeg libavcodec"
6338 if test "$_libavcodec_a" = auto
; then
6340 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6342 _res_comment
="static"
6344 elif test "$_libavcodec_so" = auto
; then
6346 _res_comment
="libavcodec.so is discouraged over static libavcodec"
6348 #include <ffmpeg/avcodec.h>
6349 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6351 if $_pkg_config --exists libavcodec
; then
6352 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6353 _ld_tmp
=`$_pkg_config --libs libavcodec`
6354 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6355 && _libavcodec_so
=yes
6356 elif cc_check
-lavcodec $_ld_lm ; then
6357 _ld_extra
="$_ld_extra -lavcodec"
6359 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6363 _def_libavcodec
='#undef USE_LIBAVCODEC'
6364 _def_libavcodec_a
='#undef USE_LIBAVCODEC_A'
6365 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6366 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
6367 test "$_libavcodec" = yes && _def_libavcodec
='#define USE_LIBAVCODEC 1'
6368 test "$_libavcodec_a" = yes && _def_libavcodec_a
='#define USE_LIBAVCODEC_A 1'
6369 test "$_libavcodec_so" = yes && _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6370 test "$_libavcodec_mpegaudio_hp" = yes \
6371 && _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6372 if test "$_libavcodec_a" = yes ; then
6373 _codecmodules
="libavcodec $_codecmodules"
6374 elif test "$_libavcodec_so" = yes ; then
6375 _codecmodules
="libavcodec.so $_codecmodules"
6377 _nocodecmodules
="libavcodec $_nocodecmodules"
6379 echores
"$_libavcodec"
6381 echocheck
"FFmpeg libavformat"
6382 if test "$_libavformat_a" = auto
; then
6384 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6386 _res_comment
="static"
6388 elif test "$_libavformat_so" = auto
; then
6391 #include <ffmpeg/avformat.h>
6392 #include <ffmpeg/opt.h>
6393 int main(void) { av_alloc_format_context(); return 0; }
6395 if $_pkg_config --exists libavformat
; then
6396 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6397 _ld_tmp
=`$_pkg_config --libs libavformat`
6398 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6399 && _libavformat_so
=yes
6400 elif cc_check
$_ld_lm -lavformat ; then
6401 _ld_extra
="$_ld_extra -lavformat"
6403 _res_comment
="using libavformat.so, but static libavformat is recommended"
6407 _def_libavformat
='#undef USE_LIBAVFORMAT'
6408 _def_libavformat_a
='#undef USE_LIBAVFORMAT_A'
6409 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6410 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
6411 test "$_libavformat" = yes && _def_libavformat
='#define USE_LIBAVFORMAT 1'
6412 test "$_libavformat_a" = yes && _def_libavformat_a
='#define USE_LIBAVFORMAT_A 1'
6413 test "$_libavformat_so" = yes \
6414 && _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6415 echores
"$_libavformat"
6417 echocheck
"FFmpeg libpostproc"
6418 if test "$_libpostproc_a" = auto
; then
6420 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6421 _libpostproc_a
='yes'
6422 _res_comment
="static"
6424 elif test "$_libpostproc_so" = auto
; then
6427 #define USE_LIBPOSTPROC 1
6428 #include <inttypes.h>
6429 #include <postproc/postprocess.h>
6430 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6432 if cc_check
-lpostproc $_ld_lm ; then
6433 _ld_extra
="$_ld_extra -lpostproc"
6435 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6439 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6440 _def_libpostproc_a
='#undef USE_LIBPOSTPROC_A'
6441 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6442 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
6443 test "$_libpostproc" = yes && _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6444 test "$_libpostproc_a" = yes && _def_libpostproc_a
='#define USE_LIBPOSTPROC_A 1'
6445 test "$_libpostproc_so" = yes \
6446 && _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6447 echores
"$_libpostproc"
6450 echocheck
"libamr narrowband"
6451 if test "$_libamr_nb" = auto
; then
6454 #include <amrnb/interf_dec.h>
6455 int main(void) { Speech_Decode_Frame_init(); return 0; }
6457 cc_check
-lamrnb && _libamr_nb
=yes
6458 if test "$_libavcodec_a" != yes ; then
6460 _res_comment
="libavcodec (static) is required by libamr_nb, sorry"
6463 if test "$_libamr_nb" = yes ; then
6465 _ld_extra
="$_ld_extra -lamrnb"
6466 _def_libamr
='#define CONFIG_LIBAMR 1'
6467 _def_libamr_nb
='#define CONFIG_LIBAMR_NB 1'
6468 _codecmodules
="libamr_nb $_codecmodules"
6470 _def_libamr_nb
='#undef CONFIG_LIBAMR_NB'
6471 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_NB_DECODER// `
6472 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_NB_ENCODER// `
6473 _nocodecmodules
="libamr_nb $_nocodecmodules"
6475 echores
"$_libamr_nb"
6478 echocheck
"libamr wideband"
6479 if test "$_libamr_wb" = auto
; then
6482 #include <amrwb/dec_if.h>
6483 int main(void) { D_IF_init(); return 0; }
6485 cc_check
-lamrwb && _libamr_wb
=yes
6486 if test "$_libavcodec_a" != yes ; then
6488 _res_comment
="libavcodec (static) is required by libamr_wb, sorry"
6491 if test "$_libamr_wb" = yes ; then
6493 _ld_extra
="$_ld_extra -lamrwb"
6494 _def_libamr
='#define CONFIG_LIBAMR 1'
6495 _def_libamr_wb
='#define CONFIG_LIBAMR_WB 1'
6496 _codecmodules
="libamr_wb $_codecmodules"
6498 _def_libamr_wb
='#undef CONFIG_LIBAMR_WB'
6499 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_WB_DECODER// `
6500 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_WB_ENCODER// `
6501 _nocodecmodules
="libamr_wb $_nocodecmodules"
6503 echores
"$_libamr_wb"
6505 echocheck
"libdv-0.9.5+"
6506 if test "$_libdv" = auto
; then
6509 #include <libdv/dv.h>
6510 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6512 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6514 if test "$_libdv" = yes ; then
6515 _def_libdv
='#define HAVE_LIBDV095 1'
6516 _ld_extra
="$_ld_extra -ldv"
6517 _codecmodules
="libdv $_codecmodules"
6519 _def_libdv
='#undef HAVE_LIBDV095'
6520 _nocodecmodules
="libdv $_nocodecmodules"
6526 if test "$_xvid" = auto
; then
6530 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6532 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6533 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6537 if test "$_xvid" = yes ; then
6538 _def_xvid
='#define HAVE_XVID4 1'
6539 _codecmodules
="xvid $_codecmodules"
6541 _def_xvid
='#undef HAVE_XVID4'
6542 _nocodecmodules
="xvid $_nocodecmodules"
6543 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6547 if test "$_xvid" = yes ; then
6548 echocheck
"XviD two pass plugin"
6551 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6555 _def_lavc_xvid
='#define CONFIG_LIBXVID 1'
6558 _def_lavc_xvid
='#undef CONFIG_LIBXVID'
6559 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6561 echores
"$_lavc_xvid"
6566 if test "$_x264" = auto
; then
6568 #include <inttypes.h>
6571 #error We do not support old versions of x264. Get the latest from SVN.
6573 int main(void) { x264_encoder_open((void*)0); return 0; }
6576 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6577 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6581 if test "$_x264" = yes ; then
6582 _def_x264
='#define HAVE_X264 1'
6583 _codecmodules
="x264 $_codecmodules"
6584 if echo $_libavencoders |
grep -q X264
; then
6586 _def_lavc_x264
='#define CONFIG_LIBX264 1'
6587 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6590 _def_lavc_x264
='#undef CONFIG_LIBX264'
6594 _def_x264
='#undef HAVE_X264'
6595 _def_lavc_x264
='#undef CONFIG_LIBX264'
6596 _nocodecmodules
="x264 $_nocodecmodules"
6597 _libavencoders
=`echo $_libavencoders | sed -e s/LIBX264_ENCODER// `
6599 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6603 if test "$_libnut" = auto
; then
6607 #include <inttypes.h>
6609 int main(void) { (void)nut_error(0); return 0; }
6612 cc_check
-lnut && _libnut
=yes
6615 if test "$_libnut" = yes ; then
6616 _def_libnut
='#define HAVE_LIBNUT 1'
6617 _ld_extra
="$_ld_extra -lnut"
6619 _def_libnut
='#undef HAVE_LIBNUT'
6620 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
6625 # mencoder requires (optional) those libs: libmp3lame
6626 if test "$_mencoder" != no
; then
6628 echocheck
"libmp3lame (for mencoder)"
6630 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6631 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6633 #include <lame/lame.h>
6634 int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; }
6636 # Note: libmp3lame usually depends on vorbis
6637 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6638 if test "$_mp3lame" = yes ; then
6639 _def_mp3lame
="#define HAVE_MP3LAME"
6640 _ld_mp3lame
=-lmp3lame
6641 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6643 #include <lame/lame.h>
6644 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6646 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6648 #include <lame/lame.h>
6649 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6651 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6652 if echo $_libavencoders |
grep -q MP3LAME
; then
6654 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6655 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6658 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6661 _def_mp3lame
='#undef HAVE_MP3LAME'
6662 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
6668 echocheck
"mencoder"
6669 _mencoder_flag
='#undef HAVE_MENCODER'
6670 if test "$_mencoder" = yes ; then
6671 _mencoder_flag
='#define HAVE_MENCODER'
6672 _def_muxers
='#define CONFIG_MUXERS 1'
6674 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6675 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6678 echores
"$_mencoder"
6680 echocheck
"fastmemcpy"
6681 # fastmemcpy check is done earlier with tests of CPU & binutils features
6682 if test "$_fastmemcpy" = yes ; then
6683 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6685 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6687 echores
"$_fastmemcpy"
6689 echocheck
"UniquE RAR File Library"
6690 if test "$_unrarlib" = yes ; then
6691 _def_unrarlib
='#define USE_UNRARLIB 1'
6693 _def_unrarlib
='#undef USE_UNRARLIB'
6695 echores
"$_unrarlib"
6697 echocheck
"TV interface"
6698 if test "$_tv" = yes ; then
6699 _def_tv
='#define USE_TV 1'
6700 _inputmodules
="tv $_inputmodules"
6702 _noinputmodules
="tv $_noinputmodules"
6703 _def_tv
='#undef USE_TV'
6709 echocheck
"*BSD BT848 bt8xx header"
6711 for file in "machine/ioctl_bt848.h" \
6712 "dev/bktr/ioctl_bt848.h" \
6713 "dev/video/bktr/ioctl_bt848.h" \
6714 "dev/ic/bt8xx.h" ; do
6716 #include <sys/types.h>
6717 #include <sys/ioctl.h>
6720 ioctl(0, TVTUNER_GETFREQ, 0);
6726 _ioctl_bt848_h_name
="$file"
6730 if test "$_ioctl_bt848_h" = yes ; then
6731 _def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6732 _res_comment
="using $_ioctl_bt848_h_name"
6734 _def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6736 echores
"$_ioctl_bt848_h"
6738 echocheck
"*BSD ioctl_meteor.h"
6740 for file in "machine/ioctl_meteor.h" \
6741 "dev/bktr/ioctl_meteor.h" \
6742 "dev/video/bktr/ioctl_meteor.h" ; do
6744 #include <sys/types.h>
6747 ioctl(0, METEORSINPUT, 0);
6753 _ioctl_meteor_h_name
="$file"
6757 if test "$_ioctl_meteor_h" = yes ; then
6758 _def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6759 _res_comment
="using $_ioctl_meteor_h_name"
6761 _def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6763 echores
"$_ioctl_meteor_h"
6765 echocheck
"*BSD BrookTree 848 TV interface"
6766 if test "$_tv_bsdbt848" = auto
; then
6768 if test "$_tv" = yes ; then
6770 #include <sys/types.h>
6771 $_def_ioctl_meteor_h_name
6772 $_def_ioctl_bt848_h_name
6773 #ifdef IOCTL_METEOR_H_NAME
6774 #include IOCTL_METEOR_H_NAME
6776 #ifdef IOCTL_BT848_H_NAME
6777 #include IOCTL_BT848_H_NAME
6780 ioctl(0, METEORSINPUT, 0);
6781 ioctl(0, TVTUNER_GETFREQ, 0);
6785 cc_check
&& _tv_bsdbt848
=yes
6788 if test "$_tv_bsdbt848" = yes ; then
6789 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6790 _inputmodules
="tv-bsdbt848 $_inputmodules"
6792 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6793 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6795 echores
"$_tv_bsdbt848"
6799 echocheck
"DirectShow TV interface"
6800 if test "$_tv_dshow" = auto
; then
6802 if test "$_tv" = yes && win32
; then
6807 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
6811 cc_check
-lole32 -luuid && _tv_dshow
=yes
6814 if test "$_tv_dshow" = yes ; then
6815 _inputmodules
="tv-dshow $_inputmodules"
6816 _def_tv_dshow
='#define HAVE_TV_DSHOW 1'
6817 _ld_extra
="$_ld_extra -lole32 -luuid"
6819 _noinputmodules
="tv-dshow $_noinputmodules"
6820 _def_tv_dshow
='#undef HAVE_TV_DSHOW'
6822 echores
"$_tv_dshow"
6825 echocheck
"Video 4 Linux TV interface"
6826 if test "$_tv_v4l1" = auto
; then
6828 if test "$_tv" = yes && linux
; then
6831 #include <linux/videodev.h>
6832 int main(void) { return 0; }
6834 cc_check
&& _tv_v4l1
=yes
6837 if test "$_tv_v4l1" = yes ; then
6840 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6841 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6842 _inputmodules
="tv-v4l $_inputmodules"
6844 _noinputmodules
="tv-v4l1 $_noinputmodules"
6845 _def_tv_v4l
='#undef HAVE_TV_V4L'
6850 echocheck
"Video 4 Linux 2 TV interface"
6851 if test "$_tv_v4l2" = auto
; then
6853 if test "$_tv" = yes && linux
; then
6856 #include <linux/types.h>
6857 #include <linux/videodev2.h>
6858 int main(void) { return 0; }
6860 cc_check
&& _tv_v4l2
=yes
6863 if test "$_tv_v4l2" = yes ; then
6866 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6867 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6868 _inputmodules
="tv-v4l2 $_inputmodules"
6870 _noinputmodules
="tv-v4l2 $_noinputmodules"
6871 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6876 echocheck
"TV teletext interface"
6877 if test "$_tv_teletext" = auto
; then
6879 if test "$_freetype" = yes && test "$_pthreads" = yes; then
6880 if test "$_tv_v4l2" = yes ||
test "$_v4l" = yes ||
test "$_tv_dshow" = yes; then
6885 if test "$_tv_teletext" = yes ; then
6886 _def_tv_teletext
='#define HAVE_TV_TELETEXT 1'
6887 _inputmodules
="tv-teletext $_inputmodules"
6889 _noinputmodules
="tv-teletext $_noinputmodules"
6890 _def_tv_teletext
='#undef HAVE_TV_TELETEXT'
6892 echores
"$_tv_teletext"
6895 echocheck
"Radio interface"
6896 if test "$_radio" = yes ; then
6897 _def_radio
='#define USE_RADIO 1'
6898 _inputmodules
="radio $_inputmodules"
6899 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6902 if test "$_radio_capture" = yes ; then
6904 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6906 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6909 _noinputmodules
="radio $_noinputmodules"
6910 _def_radio
='#undef USE_RADIO'
6911 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6915 echocheck
"Capture for Radio interface"
6916 echores
"$_radio_capture"
6918 echocheck
"Video 4 Linux 2 Radio interface"
6919 if test "$_radio_v4l2" = auto
; then
6921 if test "$_radio" = yes && linux
; then
6924 #include <linux/types.h>
6925 #include <linux/videodev2.h>
6926 int main(void) { return 0; }
6928 cc_check
&& _radio_v4l2
=yes
6931 if test "$_radio_v4l2" = yes ; then
6932 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6934 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6936 echores
"$_radio_v4l2"
6938 echocheck
"Video 4 Linux Radio interface"
6939 if test "$_radio_v4l" = auto
; then
6941 if test "$_radio" = yes && linux
; then
6944 #include <linux/videodev.h>
6945 int main(void) { return 0; }
6947 cc_check
&& _radio_v4l
=yes
6950 if test "$_radio_v4l" = yes ; then
6951 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6953 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6955 echores
"$_radio_v4l"
6957 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6958 echocheck
"*BSD BrookTree 848 Radio interface"
6961 #include <sys/types.h>
6962 $_def_ioctl_bt848_h_name
6963 #ifdef IOCTL_BT848_H_NAME
6964 #include IOCTL_BT848_H_NAME
6967 ioctl(0, RADIO_GETFREQ, 0);
6971 cc_check
&& _radio_bsdbt848
=yes
6972 echores
"$_radio_bsdbt848"
6973 fi #if bsd && radio && radio_bsdbt848
6975 if test "$_radio_bsdbt848" = yes ; then
6976 _def_radio_bsdbt848
='#define HAVE_RADIO_BSDBT848 1'
6978 _def_radio_bsdbt848
='#undef HAVE_RADIO_BSDBT848'
6981 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6982 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6983 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6986 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6987 if test "$_pvr" = auto
; then
6989 if test "$_tv_v4l2" = yes && linux
; then
6992 #include <inttypes.h>
6993 #include <linux/types.h>
6994 #include <linux/videodev2.h>
6995 int main(void) { struct v4l2_ext_controls ext; return 0; }
6997 cc_check
&& _pvr
=yes
7000 if test "$_pvr" = yes ; then
7001 _def_pvr
='#define HAVE_PVR 1'
7002 _inputmodules
="pvr $_inputmodules"
7004 _noinputmodules
="pvr $_noinputmodules"
7005 _def_pvr
='#undef HAVE_PVR'
7010 echocheck
"audio select()"
7011 if test "$_select" = no
; then
7012 _def_select
='#undef HAVE_AUDIO_SELECT'
7013 elif test "$_select" = yes ; then
7014 _def_select
='#define HAVE_AUDIO_SELECT 1'
7020 if ! beos
&& test "$_ftp" = yes ; then
7021 _def_ftp
='#define HAVE_FTP 1'
7022 _inputmodules
="ftp $_inputmodules"
7024 _noinputmodules
="ftp $_noinputmodules"
7025 _def_ftp
='#undef HAVE_FTP'
7029 echocheck
"vstream client"
7030 if test "$_vstream" = auto
; then
7033 #include <vstream-client.h>
7034 void vstream_error(const char *format, ... ) {}
7035 int main(void) { vstream_start(); return 0; }
7037 cc_check
-lvstream-client && _vstream
=yes
7039 if test "$_vstream" = yes ; then
7040 _def_vstream
='#define HAVE_VSTREAM 1'
7041 _inputmodules
="vstream $_inputmodules"
7042 _ld_extra
="$_ld_extra -lvstream-client"
7044 _noinputmodules
="vstream $_noinputmodules"
7045 _def_vstream
='#undef HAVE_VSTREAM'
7050 echocheck
"byte order"
7051 if test "$_big_endian" = auto
; then
7053 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
7054 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
7056 return (int)ascii_name;
7060 if strings $TMPEXE |
grep -l MPlayerBigEndian
>/dev
/null
; then
7066 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
7069 if test "$_big_endian" = yes ; then
7070 _byte_order
='big-endian'
7071 _def_words_endian
='#define WORDS_BIGENDIAN 1'
7073 _byte_order
='little-endian'
7074 _def_words_endian
='#undef WORDS_BIGENDIAN'
7076 echores
"$_byte_order"
7078 echocheck
"OSD menu"
7079 if test "$_menu" = yes ; then
7080 _def_menu
='#define HAVE_MENU 1'
7082 _def_menu
='#undef HAVE_MENU'
7087 echocheck
"Subtitles sorting"
7088 if test "$_sortsub" = yes ; then
7089 _def_sortsub
='#define USE_SORTSUB 1'
7091 _def_sortsub
='#undef USE_SORTSUB'
7096 echocheck
"XMMS inputplugin support"
7097 if test "$_xmms" = yes ; then
7098 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7099 _xmmsplugindir
=`xmms-config --input-plugin-dir`
7100 _xmmslibdir
=`xmms-config --exec-prefix`/lib
7102 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7103 _xmmslibdir
=/usr
/lib
7106 _def_xmms
='#define HAVE_XMMS 1'
7108 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
7110 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7113 _def_xmms
='#undef HAVE_XMMS'
7118 if test "$_inet6" = auto
; then
7120 #include <sys/types.h>
7121 #if !defined(_WIN32) || defined(__CYGWIN__)
7122 #include <sys/socket.h>
7123 #include <netinet/in.h>
7125 #include <ws2tcpip.h>
7127 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
7130 if cc_check
$_ld_sock ; then
7134 if test "$_inet6" = yes ; then
7135 _def_inet6
='#define HAVE_AF_INET6 1'
7137 _def_inet6
='#undef HAVE_AF_INET6'
7142 echocheck
"gethostbyname2"
7143 if test "$_gethostbyname2" = auto
; then
7145 #include <sys/types.h>
7146 #include <sys/socket.h>
7148 int main(void) { gethostbyname2("", AF_INET); }
7156 if test "$_gethostbyname2" = yes ; then
7157 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
7159 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
7161 echores
"$_gethostbyname2"
7164 # --------------- GUI specific tests begin -------------------
7167 if test "$_gui" = yes ; then
7169 # Required libraries
7170 if test "$_libavcodec" != yes ||
7171 ! echo $_libavdecoders |
grep PNG_DECODER
>/dev
/null
2>&1 ; then
7172 die
"The GUI requires libavcodec with PNG support (needs zlib)."
7175 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7177 echocheck
"XShape extension"
7178 if test "$_xshape" = auto
; then
7181 #include <X11/Xlib.h>
7182 #include <X11/Xproto.h>
7183 #include <X11/Xutil.h>
7184 #include <X11/extensions/shape.h>
7187 char *name = ":0.0";
7190 int eventbase, errorbase;
7191 if (getenv("DISPLAY"))
7192 name=getenv("DISPLAY");
7193 wsDisplay=XOpenDisplay(name);
7194 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7196 XCloseDisplay(wsDisplay);
7200 cc_check
-lXext && _xshape
=yes
7202 if test "$_xshape" = yes ; then
7203 _def_xshape
='#define HAVE_XSHAPE 1'
7205 die
"The GUI requires the X11 extension XShape (which was not found)."
7210 if test "$_gtk1" = no
; then
7212 echocheck
"GTK+ version"
7214 if $_pkg_config gtk
+-2.0
--exists ; then
7215 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7216 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7217 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7221 if $_pkg_config glib-2.0
--exists ; then
7222 echocheck
"glib version"
7223 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7224 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7227 _def_gui
='#define HAVE_NEW_GUI 1'
7228 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7231 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7234 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7239 if test "$_gtk1" = yes ; then
7240 # Check for old GTK (1.2.x)
7241 echocheck
"GTK version"
7242 if test -z "$_gtkconfig" ; then
7243 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7244 _gtkconfig
="gtk-config"
7245 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7246 _gtkconfig
="gtk12-config"
7248 die
"The GUI requires GTK devel packages (which were not found)."
7251 _gtk
=`$_gtkconfig --version 2>&1`
7252 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7253 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7254 echores
"$_gtk (using $_gtkconfig)"
7257 echocheck
"glib version"
7258 if test -z "$_glibconfig" ; then
7259 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7260 _glibconfig
="glib-config"
7261 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7262 _glibconfig
="glib12-config"
7264 die
"The GUI requires GLIB devel packages (which were not found)"
7267 _glib
=`$_glibconfig --version 2>&1`
7268 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7269 echores
"$_glib (using $_glibconfig)"
7271 _def_gui
='#define HAVE_NEW_GUI 1'
7272 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7276 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7277 _def_gui
='#define HAVE_NEW_GUI 1'
7278 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7281 else #if test "$_gui"
7282 _def_gui
='#undef HAVE_NEW_GUI'
7283 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7285 # --------------- GUI specific tests end -------------------
7288 if test "$_charset" = "noconv" ; then
7291 if test "$_charset" ; then
7292 _def_charset
="#define MSG_CHARSET \"$_charset\""
7294 _def_charset
="#undef MSG_CHARSET"
7297 if test "$_charset" = "UTF-8" ; then
7298 # hack to disable conversion in the Makefile
7302 if test "$_charset" ; then
7303 echocheck
"iconv program"
7304 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7305 if test "$?" -ne 0 ; then
7307 echo "No working iconv program found, use "
7308 echo "--charset=UTF-8 to continue anyway."
7309 echo "If you also have problems with iconv library functions use --charset=noconv."
7310 echo "Messages in the GTK-2 interface will be broken then."
7317 #############################################################################
7319 echocheck
"automatic gdb attach"
7320 if test "$_crash_debug" = yes ; then
7321 _def_crash_debug
='#define CRASH_DEBUG 1'
7323 _def_crash_debug
='#undef CRASH_DEBUG'
7326 echores
"$_crash_debug"
7328 echocheck
"compiler support for noexecstack"
7330 int main(void) { return 0; }
7332 if cc_check
-Wl,-z,noexecstack
; then
7333 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7340 # Dynamic linking flags
7341 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7343 bsd
&& _ld_dl_dynamic
='-rdynamic'
7344 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
; then
7345 _ld_dl_dynamic
='-rdynamic'
7348 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7349 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7350 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7351 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7353 _def_debug
='#undef MP_DEBUG'
7354 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7356 _def_linux
='#undef TARGET_LINUX'
7357 linux
&& _def_linux
='#define TARGET_LINUX 1'
7360 echocheck
"joystick"
7361 _def_joystick
='#undef HAVE_JOYSTICK'
7362 if test "$_joystick" = yes ; then
7364 # TODO add some check
7365 _def_joystick
='#define HAVE_JOYSTICK 1'
7367 _joystick
="no (unsupported under $system_name)"
7370 echores
"$_joystick"
7373 if test "$_lirc" = auto
; then
7376 #include <lirc/lirc_client.h>
7377 int main(void) { return 0; }
7379 cc_check
-llirc_client && _lirc
=yes
7381 if test "$_lirc" = yes ; then
7382 _def_lirc
='#define HAVE_LIRC 1'
7383 _ld_extra
="$_ld_extra -llirc_client"
7385 _def_lirc
='#undef HAVE_LIRC'
7390 if test "$_lircc" = auto
; then
7393 #include <lirc/lircc.h>
7394 int main(void) { return 0; }
7396 cc_check
-llircc && _lircc
=yes
7398 if test "$_lircc" = yes ; then
7399 _def_lircc
='#define HAVE_LIRCC 1'
7400 _ld_extra
="$_ld_extra -llircc"
7402 _def_lircc
='#undef HAVE_LIRCC'
7407 # Detect maemo development platform libraries availability (http://www.maemo.org),
7408 # they are used when run on Nokia 770
7409 echocheck
"maemo (Nokia 770)"
7410 if test "$_maemo" = auto
; then
7413 #include <libosso.h>
7414 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7416 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7418 if test "$_maemo" = yes ; then
7419 _def_maemo
='#define HAVE_MAEMO 1'
7420 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7421 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7423 _def_maemo
='#undef HAVE_MAEMO'
7428 echocheck
"color console output"
7429 if test "$_color_console" = yes ; then
7430 _def_color_console
='#define MSG_USE_COLORS 1'
7432 _def_color_console
='#undef MSG_USE_COLORS'
7434 echores
"$_color_console"
7436 # linker paths should be the same for mencoder and mplayer
7438 for I
in $_libs_mplayer ; do
7439 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7440 if test -z "$_tmp" ; then
7441 _ld_extra
="$I $_ld_extra"
7443 _ld_tmp
="$_ld_tmp $I"
7446 _libs_mplayer
=$_ld_tmp
7449 #############################################################################
7451 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -shared-libgcc"
7452 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7453 CFLAGS
="$CFLAGS -no-cpp-precomp"
7457 CFLAGS
="$CFLAGS -DNEWLIB -D__USE_INLINE__ -DSYS_AMIGAOS4"
7460 # use flag for HPUX missing setenv()
7461 CFLAGS
="$CFLAGS -DHPUX"
7465 CFLAGS
="$CFLAGS -D_REENTRANT"
7467 # FIXME bsd needs this so maybe other OS'es
7468 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7471 CFLAGS
="$CFLAGS -D__CYGWIN__"
7473 # 64 bit file offsets?
7474 if test "$_largefiles" = yes || freebsd
; then
7475 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7476 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7477 # dvdread support requires this (for off64_t)
7478 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7479 cygwin
&& CFLAGS
="$CFLAGS -DSYS_CYGWIN"
7483 # Make sure config.h gets included.
7484 if test "$_dvdread_internal" = yes ||
test "$_faad_internal" = yes ; then
7485 CFLAGS
="$CFLAGS -DHAVE_CONFIG_H"
7488 CFLAGS
="-I. -I.. -I../libavutil $CFLAGS"
7489 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
7492 int main(void) { return 0; }
7494 if test "$cc_vendor" = "gnu" ; then
7495 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7496 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
7497 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
7501 #this must be the last test to be performed or the ones following it will likely fail
7502 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
7503 # to use its own copy of the library)
7504 echocheck
"DVD support (libdvdnav)"
7505 if test "$_dvdnav" = auto
; then
7506 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7508 if test "$_dvdnav" = auto
; then
7510 #include <inttypes.h>
7512 int main(void) { dvdnav_t *dvd=0; return 0; }
7515 _dvdnavdir
=`$_dvdnavconfig --cflags`
7516 _dvdnavlibs
=`$_dvdnavconfig --libs`
7517 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7519 if test "$_dvdnav" = yes ; then
7521 _def_dvdnav
='#define USE_DVDNAV 1'
7522 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
7523 _ld_extra
="$_ld_extra `$_dvdnavconfig --minilibs`"
7524 _inputmodules
="dvdnav $_inputmodules"
7526 _def_dvdnav
='#undef USE_DVDNAV'
7527 _noinputmodules
="dvdnav $_noinputmodules"
7531 #############################################################################
7532 echo "Creating config.mak"
7533 cat > config.mak
<< EOF
7534 # -------- Generated by configure -----------
7537 MAN_LANG = $MAN_LANG
7538 TARGET_OS = $system_name
7540 prefix = \$(DESTDIR)$_prefix
7541 BINDIR = \$(DESTDIR)$_bindir
7542 DATADIR = \$(DESTDIR)$_datadir
7543 MANDIR = \$(DESTDIR)$_mandir
7544 CONFDIR = \$(DESTDIR)$_confdir
7545 LIBDIR = \$(DESTDIR)$_libdir
7546 # FFmpeg uses libdir instead of LIBDIR
7553 LDCONFIG = $_ldconfig
7555 EXTRA_INC = $_inc_extra
7556 EXTRAXX_INC = $_inc_extra $_inc_extraxx
7557 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7558 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
7559 CFLAG_STACKREALIGN = $_stackrealign
7560 INSTALLSTRIP = $_install_strip
7562 HELP_FILE = $_mp_help
7566 MPLAYER_NETWORK = $_network
7568 STREAMING_LIVE555 = $_live
7569 LIBNEMESI = $_nemesi
7570 NATIVE_RTSP = $_native_rtsp
7572 STREAM_CACHE = $_stream_cache
7575 VIDIX_INTERNAL = $_vidix_internal
7576 VIDIX_EXTERNAL = $_vidix_external
7583 LIBMPEG2 = $_libmpeg2
7584 TREMOR_INTERNAL = $_tremor_internal
7585 TREMOR_LOW = $_tremor_low
7589 MUSEPACK = $_musepack
7591 UNRARLIB = $_unrarlib
7596 EXTRALIBS = $_extra_libs
7597 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7598 EXTRALIBS_MPLAYER = $_libs_mplayer
7599 EXTRALIBS_MENCODER = $_libs_mencoder
7602 HAVE_PTHREADS = $_pthreads
7603 HAVE_W32THREADS = $_w32threads
7605 HAVE_XVMC_ACCEL = $_xvmc
7607 HAVE_SYS_MMAN_H = $_mman
7608 HAVE_POSIX_SELECT = $_posix_select
7610 NEED_GETTIMEOFDAY = $_need_gettimeofday
7611 NEED_GLOB = $_need_glob
7612 NEED_SETENV = $_need_setenv
7613 NEED_SHMEM = $_need_shmem
7614 NEED_STRSEP = $_need_strsep
7615 NEED_SWAB = $_need_swab
7616 NEED_VSSCANF = $_need_vsscanf
7623 LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7632 # input/demuxer/codecs
7633 JOYSTICK = $_joystick
7635 APPLE_REMOTE = $_apple_remote
7640 TV_DSHOW = $_tv_dshow
7641 TV_BSDBT848 = $_tv_bsdbt848
7642 TV_TELETEXT = $_tv_teletext
7643 AUDIO_INPUT = $_audio_input
7647 DVDREAD_INTERNAL = $_dvdread_internal
7648 DVDCSS_INTERNAL = $_libdvdcss_internal
7650 WIN32DLL = $_win32dll
7652 REAL_CODECS = $_real
7653 XANIM_CODECS = $_xanim
7654 LIBAVUTIL = $_libavutil
7655 LIBAVUTIL_A = $_libavutil_a
7656 LIBAVUTIL_SO = $_libavutil_so
7657 LIBAVCODEC = $_libavcodec
7658 LIBAVCODEC_A = $_libavcodec_a
7659 LIBAVCODEC_SO = $_libavcodec_so
7660 LIBAVFORMAT = $_libavformat
7661 LIBAVFORMAT_A = $_libavformat_a
7662 LIBAVFORMAT_SO = $_libavformat_so
7663 LIBPOSTPROC = $_libpostproc
7664 LIBPOSTPROC_A = $_libpostproc_a
7665 LIBPOSTPROC_SO = $_libpostproc_so
7674 MENCODER = $_mencoder
7677 BITMAP_FONT = $_bitmap_font
7678 FREETYPE = $_freetype
7681 LIBVORBIS = $_vorbis
7682 LIBTHEORA = $_theora
7683 FAAD_INTERNAL = $_faad_internal
7684 FAAD_FIXED = $_faad_fixed
7685 LIBSMBCLIENT = $_smbsupport
7686 XMMS_PLUGINS = $_xmms
7688 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7689 MACOSX_BUNDLE = $_macosx_bundle
7690 MACOSX_COREVIDEO = $_macosx_corevideo
7694 CONFIG_LIBAMR=$_libamr
7695 CONFIG_LIBAMR_NB=$_libamr_nb
7696 CONFIG_LIBAMR_WB=$_libamr_wb
7697 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7698 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7699 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7700 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7701 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7702 `echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7703 CONFIG_LIBFAAC=$_lavc_faac
7704 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7705 CONFIG_LIBVORBIS=$_libvorbis
7706 CONFIG_LIBXVID=$_lavc_xvid
7707 CONFIG_LIBX264=$_lavc_x264
7710 CONFIG_ENCODERS=$_mencoder
7711 CONFIG_MUXERS=$_mencoder
7713 RADIO_CAPTURE=$_radio_capture
7714 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7715 VIDIX_IVTV=$_vidix_drv_ivtv
7716 VIDIX_MACH64=$_vidix_drv_mach64
7717 VIDIX_MGA=$_vidix_drv_mga
7718 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7719 VIDIX_NVIDIA=$_vidix_drv_nvidia
7720 VIDIX_PM2=$_vidix_drv_pm2
7721 VIDIX_PM3=$_vidix_drv_pm3
7722 VIDIX_RADEON=$_vidix_drv_radeon
7723 VIDIX_RAGE128=$_vidix_drv_rage128
7724 VIDIX_SAVAGE=$_vidix_drv_savage
7725 VIDIX_SIS=$_vidix_drv_sis
7726 VIDIX_UNICHROME=$_vidix_drv_unichrome
7728 # --- Some stuff for autoconfigure ----
7734 HAVE_MMX2 = $_mmxext
7735 HAVE_3DNOW = $_3dnow
7736 HAVE_3DNOWEX = $_3dnowext
7739 HAVE_ALTIVEC = $_altivec
7740 HAVE_ARMV5TE = $_armv5te
7741 HAVE_ARMV6 = $_armv6
7742 HAVE_IWMMXT = $_iwmmxt
7748 # --- libvo stuff ---
7751 # --- libao2 stuff ---
7754 # --- libaf stuff ---
7759 #############################################################################
7761 ff_config_enable
() {
7763 test -z "$_nprefix" && _nprefix
='CONFIG'
7765 if ` echo $2 | grep -E "(^| )$part($| )" > /dev/null `; then
7766 echo "#define ${_nprefix}_$part 1"
7767 echo "#define ENABLE_$part 1"
7769 echo "#define ENABLE_$part 0"
7774 echo "Creating config.h"
7776 /* -------- This file has been automatically generated by configure ---------
7777 Note: Any changes in it will be lost when you run configure again. */
7779 /* Protect against multiple inclusion */
7780 #ifndef MPLAYER_CONFIG_H
7781 #define MPLAYER_CONFIG_H 1
7783 #define CONFIGURATION "$_configuration"
7785 /* make sure we never get lavformat's poll() emulation, the results are
7786 horrible if the X libs try to actually use it, see MPlayer-users
7787 Message-ID: <45D49541.8060101@infernix.net>
7788 Date: Thu, 15 Feb 2007 18:15:45 +0100
7789 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7791 #define HAVE_SYS_POLL_H 1
7793 /* yes, we have inttypes.h */
7794 #define HAVE_INTTYPES_H 1
7796 /* int_fastXY_t emulation */
7800 #define HAVE_ERRNO_H 1
7802 /* libdvdcss + libdvdread */
7803 #define HAVE_LIMITS_H 1
7805 /* libdvdcss + libfaad2 */
7806 #define HAVE_UNISTD_H 1
7808 /* libfaad2 + libdvdread */
7809 #define STDC_HEADERS 1
7812 #define HAVE_MEMCPY 1
7813 #define HAVE_STRCHR 1
7816 #define HAVE_UINTPTR_T 1
7818 /* name of messages charset */
7821 /* Runtime CPU detection */
7822 $_def_runtime_cpudetection
7824 /* Dynamic a/v plugins */
7825 $_def_dynamic_plugins
7827 /* "restrict" keyword */
7828 $_def_restrict_keyword
7830 /* __builtin_expect branch prediction hint */
7831 $_def_builtin_expect
7832 #ifdef HAVE_BUILTIN_EXPECT
7833 #define likely(x) __builtin_expect ((x) != 0, 1)
7834 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7836 #define likely(x) (x)
7837 #define unlikely(x) (x)
7840 /* attribute(used) as needed by some compilers */
7841 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7842 # define attribute_used __attribute__((used))
7844 # define attribute_used
7847 /* compiler support for named assembler arguments */
7848 $_def_named_asm_args
7850 /* enable/disable SIGHANDLER */
7853 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7856 /* Toggles debugging informations */
7859 /* Toggles color console output */
7862 /* Indicates that libcdio is available for VCD and CD-DA playback */
7865 /* Indicates that Ogle's libdvdread is available for DVD playback */
7868 /* Indicates that dvdread is internal */
7869 $_def_dvdread_internal
7871 /* Additional options for libdvdread/libdvdcss */
7884 /* Common data directory (for fonts, etc) */
7885 #define MPLAYER_DATADIR "$_datadir"
7886 #define MPLAYER_CONFDIR "$_confdir"
7887 #define MPLAYER_LIBDIR "$_libdir"
7889 /* Define this to compile stream-caching support, it can be enabled via
7890 -cache <kilobytes> */
7893 /* Define if you are using XviD library */
7896 /* Define if you are using the X.264 library */
7899 /* Define if you are using libnut */
7902 /* Define to include support for libdv-0.9.5 */
7905 /* If build mencoder */
7908 /* Indicates if libmp3lame is available
7909 Note: for mencoder */
7911 $_def_mp3lame_preset
7912 $_def_mp3lame_preset_medium
7914 /* Undefine this if you do not want to select mono audio (left or right)
7915 with a stereo MPEG layer 2/3 audio stream. The command line option
7916 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7917 right-only), with 0 being the default.
7919 #define USE_FAKE_MONO 1
7921 /* Undefine this if your sound card driver has no working select().
7922 If you have kernel Oops, player hangups, or just no audio, you should
7923 try to recompile MPlayer with this option disabled! */
7926 /* define this to use iconv(3) function to codepage conversions */
7929 /* define this to use nl_langinfo function */
7932 /* define this to use RTC (/dev/rtc) for video timers */
7935 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7936 #define MAX_OUTBURST 65536
7938 /* set up audio OUTBURST. Do not change this! */
7939 #define OUTBURST 512
7941 /* Define this if your system has the header file for the OSS sound interface */
7944 /* Define this if your system has the header file for the OSS sound interface
7945 * in /usr/include */
7948 /* Define this if your system has the sysinfo header */
7951 /* Define this if your system has the "malloc.h" header file */
7954 /* memalign is mapped to malloc if unsupported */
7959 /* assembler handling of .align */
7962 /* Define this if your system has the "alloca.h" header file */
7965 /* Define this if your system has the "sys/mman.h" header file */
7967 $_def_mman_has_map_failed
7969 /* Define this if you have the elf dynamic linker -ldl library */
7972 /* Define this if you have the kstat kernel statistics library */
7975 /* Define this if you have zlib */
7978 #define CONFIG_ZLIB 1
7981 /* Define this if you have shm support */
7984 /* Define this if your system has strsep */
7987 /* Define this if your system has vsscanf */
7990 /* Define this if your system has swab */
7993 /* Define this if your system has posix select */
7996 /* Define this if your system has gettimeofday */
7999 /* Define this if your system has glob */
8002 /* Define this if your system has setenv */
8005 int setenv(const char *name, const char *val, int overwrite);
8008 /* Define this if your system has sysi86 */
8012 /* Define this if your system has pthreads */
8015 /* Define this if you enabled thread support for libavcodec */
8018 #define ENABLE_THREADS 1
8020 #define ENABLE_THREADS 0
8023 /* LIRC (remote control, see www.lirc.org) support: */
8026 /* Apple Remote (remote control, see http://docs.info.apple.com/article.html?artnum=302504) support: */
8029 /* Support for maemo (http://www.maemo.org) */
8033 * LIRCCD (LIRC client daemon)
8034 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
8038 /* DVD navigation support using libdvdnav */
8041 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
8042 #define MPEG12_POSTPROC 1
8044 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
8047 $_def_libpostproc_so
8049 /* Win32 DLL support */
8051 #define WIN32_PATH "$_win32codecsdir"
8053 /* Mac OS X specific features */
8055 $_def_macosx_finder_support
8057 $_def_macosx_corevideo
8059 /* Build our Win32-loader */
8062 /* ffmpeg's libavcodec support (requires libavcodec source) */
8066 $_def_libavcodec_mpegaudio_hp
8068 /* ffmpeg's libavformat support (requires libavformat source) */
8071 $_def_libavformat_so
8077 /* Use libavcodec's decoders */
8078 #define CONFIG_DECODERS 1
8079 /* Use libavcodec's encoders */
8080 #define CONFIG_ENCODERS 1
8082 /* Use libavformat's demuxers */
8083 #define CONFIG_DEMUXERS 1
8084 /* Use libavformat's muxers */
8087 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8088 #define HAVE_EBX_AVAILABLE 1
8090 #define HAVE_EBP_AVAILABLE 1
8093 #define CONFIG_GPL 1
8094 #define ENABLE_SMALL 0
8096 /* Support for grayscale encoding/decoding in FFmpeg (makes color slower) */
8097 #define ENABLE_GRAY 1
8099 /* Use AMR codecs from libavcodec. */
8104 /* Use specific parts from FFmpeg. */
8105 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
8106 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
8107 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
8108 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
8109 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
8110 `ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
8111 `ff_config_enable "$_libavbsfs_all" "$_libavbsfs"`
8118 /* Use codec libs included in mplayer CVS / source dist: */
8124 /* XAnim DLL support */
8126 /* Default search path */
8129 /* RealPlayer DLL support */
8131 /* Default search path */
8134 /* LIVE555 Streaming Media library support */
8137 /* libnemesi Streaming Media library support */
8140 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8143 /* Use unrarlib for Vobsubs */
8146 /* gui support, please do not edit this option */
8150 /* Audio output drivers */
8152 $_def_ossaudio_devdsp
8153 $_def_ossaudio_devmixer
8164 $_def_sys_asoundlib_h
8165 $_def_alsa_asoundlib_h
8171 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8173 #undef FAST_OSD_TABLE
8175 /* Enable TV Interface support */
8178 /* Enable Video 4 Linux TV interface support */
8181 /* Enable Video 4 Linux 1 TV interface support */
8184 /* Enable Video 4 Linux 2 TV interface support */
8187 /* Enable DirectShow TV interface support */
8190 /* *BSD BrookTree headers */
8191 $_def_ioctl_meteor_h_name
8192 $_def_ioctl_bt848_h_name
8194 /* Enable *BSD BrookTree TV interface support */
8197 /* Enable TV Teletext Interface support */
8200 /* Enable Radio Interface support */
8203 /* Enable Capture for Radio Interface support */
8206 /* Enable Video 4 Linux Radio interface support */
8209 /* Enable Video 4 Linux 2 Radio interface support */
8212 /* Enable *BSD BrookTree Radio interface support */
8213 $_def_radio_bsdbt848
8215 /* Enable Video 4 Linux 2 MPEG PVR support */
8218 /* Define if your processor stores words with the most significant
8219 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8222 /* Define if your processor can access unaligned data in a fast way */
8223 $_def_fast_unaligned
8225 `ff_config_enable "$_arch_all" "$_arch" "ARCH"`
8227 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8228 have the instruction. */
8231 /* only gcc3 can compile mvi instructions (libmpeg2) */
8232 $_def_gcc_mvi_support
8234 /* Define this for Cygwin build for win32 */
8237 /* Define this to any prefered value from 386 up to infinity with step 100 */
8238 #define __CPU__ $iproc
8247 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8248 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8250 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8251 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8252 #elif defined(WIN32)
8253 #define DEFAULT_CDROM_DEVICE "D:"
8254 #define DEFAULT_DVD_DEVICE "D:"
8255 #elif defined(SYS_DARWIN)
8256 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8257 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8258 #elif defined(__OpenBSD__)
8259 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8260 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8261 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8262 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8263 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8264 #elif defined(SYS_AMIGAOS4)
8265 #define DEFAULT_CDROM_DEVICE "a1ide.device:2"
8266 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8268 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8269 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8273 /*----------------------------------------------------------------------------
8275 ** NOTE: Instead of modifying these definitions here, use the
8276 ** --enable/--disable options of the ./configure script!
8277 ** See ./configure --help for details.
8279 *---------------------------------------------------------------------------*/
8281 /* C99 lrintf function available */
8284 /* mkstemp support */
8287 /* nanosleep support */
8293 /* termcap flag for getch2.c */
8296 /* termios flag for getch2.c */
8301 /* enable PNG support */
8304 /* enable JPEG support */
8307 /* enable PNM support */
8310 /* enable md5sum support */
8313 /* enable GIF support */
8318 /* enable bitmap font support */
8321 /* enable FreeType support */
8324 /* enable Fontconfig support */
8327 /* enable SSA/ASS support */
8330 /* enable FriBiDi usage */
8333 /* enable ENCA usage */
8336 /* liblzo support */
8339 #define CONFIG_LZO 1
8342 /* libmad support */
8345 /* enable OggVorbis support */
8349 /* enable Speex support */
8352 /* enable musepack support */
8355 /* enable OggTheora support */
8358 /* enable FAAD (AAC) support */
8362 /* enable FAAC (AAC encoder) support */
8365 /* enable LADSPA plugin support */
8368 /* enable network */
8371 /* enable ftp support */
8374 /* enable vstream support */
8377 /* enable winsock2 instead of Unix functions*/
8380 /* define this to use inet_aton() instead of inet_pton() */
8383 /* enables / disables cdparanoia support */
8387 /* enables / disables VIDIX usage */
8389 $_def_vidix_drv_cyberblade
8390 $_def_vidix_drv_ivtv
8391 $_def_vidix_drv_mach64
8393 $_def_vidix_drv_mga_crtc2
8394 $_def_vidix_drv_nvidia
8396 $_def_vidix_drv_radeon
8397 $_def_vidix_drv_rage128
8398 $_def_vidix_drv_savage
8400 $_def_vidix_drv_unichrome
8403 /* enables / disables new input joystick support */
8406 /* enables / disables QTX codecs */
8409 /* enables / disables osd menu */
8412 /* enables / disables subtitles sorting */
8415 /* XMMS input plugin support */
8417 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8419 /* enables inet6 support */
8422 /* do we have gethostbyname2? */
8423 $_def_gethostbyname2
8425 /* Extension defines */
8426 `ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
8428 $_def_altivec_h // enables usage of altivec.h
8430 /* libmpeg2 uses a different feature test macro for mediaLib */
8432 #define LIBMPEG2_MLIB 1
8436 #define SCREEN_SIZE_X 1
8437 #define SCREEN_SIZE_Y 1
8450 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8461 $_def_directfb_version
8486 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8487 #define X11_FULLSCREEN 1
8490 #endif /* MPLAYER_CONFIG_H */
8493 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8494 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
8496 #############################################################################
8500 Config files successfully generated by ./configure $_configuration !
8502 Install prefix: $_prefix
8503 Data directory: $_datadir
8504 Config direct.: $_confdir
8506 Byte order: $_byte_order
8507 Optimizing for: $_optimizing
8510 Messages/GUI: $_language
8513 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8514 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8519 Enabled optional drivers:
8520 Input: $_inputmodules
8521 Codecs: $_codecmodules
8522 Audio output: $_aomodules
8523 Video output: $_vomodules
8524 Audio filters: $_afmodules
8525 Disabled optional drivers:
8526 Input: $_noinputmodules
8527 Codecs: $_nocodecmodules
8528 Audio output: $_noaomodules
8529 Video output: $_novomodules
8530 Audio filters: $_noafmodules
8532 'config.h' and 'config.mak' contain your configuration options.
8533 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8534 compile *** DO NOT REPORT BUGS if you tweak these files ***
8536 'make' will now compile MPlayer and 'make install' will install it.
8537 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8542 if test "$_mtrr" = yes ; then
8543 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8549 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8550 operating system ($system_name). You may encounter a few files that cannot
8551 be played due to missing open source video/audio codec support.
8558 Check $TMPLOG if you wonder why an autodetection failed (make sure
8559 development headers/packages are installed).
8561 NOTE: The --enable-* parameters unconditionally force options on, completely
8562 skipping autodetection. This behavior is unlike what you may be used to from
8563 autoconf-based configure scripts that can decide to override you. This greater
8564 level of control comes at a price. You may have to provide the correct compiler
8565 and linker flags yourself.
8566 If you used one of these options (except --enable-gui and similar ones that
8567 turn on internal features) and experience a compilation or linking failure,
8568 make sure you have passed the necessary compiler/linker flags to configure.
8570 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8574 if test "$_warn_CFLAGS" = yes; then
8577 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8579 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8581 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8582 To do so, execute 'CFLAGS= ./configure <options>'
8588 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"