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 --disable-largefiles disable support for files > 2GB [enable]
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 --disable-unrarexec disable using of UnRAR executable [enabled]
260 --enable-menu enable OSD menu (not DVD menu) [disabled]
261 --disable-sortsub disable subtitle sorting [enabled]
262 --enable-fribidi enable the FriBiDi libs [autodetect]
263 --disable-enca disable ENCA charset oracle library [autodetect]
264 --disable-macosx disable Mac OS X specific features [autodetect]
265 --disable-maemo disable maemo specific features [autodetect]
266 --enable-macosx-finder-support enable Mac OS X Finder invocation
267 parameter parsing [disabled]
268 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
269 --disable-inet6 disable IPv6 support [autodetect]
270 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
271 --disable-ftp disable FTP support [enabled]
272 --disable-vstream disable TiVo vstream client support [autodetect]
273 --disable-pthreads disable Posix threads support [autodetect]
274 --disable-w32threads disable Win32 threads support [autodetect]
275 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
276 --enable-rpath enable runtime linker path for extra libs [disabled]
279 --enable-gif enable GIF support [autodetect]
280 --enable-png enable PNG input/output support [autodetect]
281 --enable-jpeg enable JPEG input/output support [autodetect]
282 --enable-libcdio enable external libcdio [autodetect]
283 --enable-liblzo enable external liblzo [autodetect]
284 --disable-win32dll disable Win32 DLL support [enabled]
285 --disable-qtx disable QuickTime codecs support [enabled]
286 --disable-xanim disable XAnim codecs support [enabled]
287 --disable-real disable RealPlayer codecs support [enabled]
288 --disable-xvid disable XviD [autodetect]
289 --disable-x264 disable x264 [autodetect]
290 --disable-libnut disable libnut [autodetect]
291 --disable-libavutil_a disable static libavutil [autodetect]
292 --disable-libavcodec_a disable static libavcodec [autodetect]
293 --disable-libavformat_a disable static libavformat [autodetect]
294 --disable-libpostproc_a disable static libpostproc [autodetect]
295 --disable-libavutil_so disable shared libavutil [autodetect]
296 --disable-libavcodec_so disable shared libavcodec [autodetect]
297 --disable-libavformat_so disable shared libavformat [autodetect]
298 --disable-libpostproc_so disable shared libpostproc [autodetect]
299 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
300 in libavcodec [enabled]
301 --disable-tremor-internal disable internal Tremor [enabled]
302 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
303 --enable-tremor-external enable external Tremor [autodetect]
304 --disable-libvorbis disable libvorbis support [autodetect]
305 --disable-speex disable Speex support [autodetect]
306 --enable-theora enable OggTheora libraries [autodetect]
307 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
308 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
309 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
310 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
311 --disable-ladspa disable LADSPA plugin support [autodetect]
312 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
313 --disable-mad disable libmad (MPEG audio) support [autodetect]
314 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
315 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
316 --enable-xmms enable XMMS input plugin support [disabled]
317 --enable-libdca enable libdca support [autodetect]
318 --disable-mp3lib disable builtin mp3lib [enabled]
319 --disable-liba52 disable builtin liba52 [enabled]
320 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
321 --disable-musepack disable musepack support [autodetect]
322 --disable-libamr_nb disable libamr narrowband [autodetect]
323 --disable-libamr_wb disable libamr wideband [autodetect]
324 --disable-decoder=DECODER disable specified FFmpeg decoder
325 --enable-decoder=DECODER enable specified FFmpeg decoder
326 --disable-encoder=ENCODER disable specified FFmpeg encoder
327 --enable-encoder=ENCODER enable specified FFmpeg encoder
328 --disable-parser=PARSER disable specified FFmpeg parser
329 --enable-parser=PARSER enable specified FFmpeg parser
330 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
331 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
332 --disable-muxer=MUXER disable specified FFmpeg muxer
333 --enable-muxer=MUXER enable specified FFmpeg muxer
336 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
337 --disable-vidix-external disable external VIDIX [for x86 *nix]
338 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
339 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
340 nvidia,pm2,pm3,radeon,rage128,savage,sis,unichrome
341 --disable-vidix-pcidb disable VIDIX PCI device name database
342 --enable-gl enable OpenGL video output [autodetect]
343 --enable-dga2 enable DGA 2 support [autodetect]
344 --enable-dga1 enable DGA 1 support [autodetect]
345 --enable-vesa enable VESA video output [autodetect]
346 --enable-svga enable SVGAlib video output [autodetect]
347 --enable-sdl enable SDL video output [autodetect]
348 --enable-aa enable AAlib video output [autodetect]
349 --enable-caca enable CACA video output [autodetect]
350 --enable-ggi enable GGI video output [autodetect]
351 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
352 --enable-directx enable DirectX video output [autodetect]
353 --enable-dxr2 enable DXR2 video output [autodetect]
354 --enable-dxr3 enable DXR3/H+ video output [autodetect]
355 --enable-ivtv enable IVTV TV-Out video output [autodetect]
356 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
357 --enable-dvb enable DVB video output [autodetect]
358 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
359 --enable-mga enable mga_vid video output [autodetect]
360 --enable-xmga enable mga_vid X11 video output [autodetect]
361 --enable-xv enable Xv video output [autodetect]
362 --enable-xvmc enable XvMC acceleration [disable]
363 --enable-vm enable XF86VidMode support [autodetect]
364 --enable-xinerama enable Xinerama support [autodetect]
365 --enable-x11 enable X11 video output [autodetect]
366 --enable-xshape enable XShape support [autodetect]
367 --enable-fbdev enable FBDev video output [autodetect]
368 --enable-mlib enable mediaLib video output (Solaris) [disable]
369 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
370 --enable-tdfxfb enable tdfxfb video output [disable]
371 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
372 --enable-directfb enable DirectFB video output [autodetect]
373 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
374 --enable-bl enable Blinkenlights video output [disable]
375 --enable-tdfxvid enable tdfx_vid video output [disable]
376 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
377 --disable-tga disable Targa video output [enable]
378 --disable-pnm disable PNM video output [enable]
379 --disable-md5sum disable md5sum video output [enable]
382 --disable-alsa disable ALSA audio output [autodetect]
383 --disable-ossaudio disable OSS audio output [autodetect]
384 --disable-arts disable aRts audio output [autodetect]
385 --disable-esd disable esd audio output [autodetect]
386 --disable-pulse disable Pulseaudio audio output [autodetect]
387 --disable-jack disable JACK audio output [autodetect]
388 --disable-openal disable OpenAL audio output [autodetect]
389 --disable-nas disable NAS audio output [autodetect]
390 --disable-sgiaudio disable SGI audio output [autodetect]
391 --disable-sunaudio disable Sun audio output [autodetect]
392 --disable-win32waveout disable Windows waveout audio output [autodetect]
393 --disable-select disable using select() on the audio device [enable]
395 Miscellaneous options:
396 --enable-runtime-cpudetection enable runtime CPU detection [disable]
397 --enable-cross-compile enable cross-compilation [autodetect]
398 --cc=COMPILER C compiler to build MPlayer [gcc]
399 --host-cc=COMPILER C compiler for tools needed while building [gcc]
400 --as=ASSEMBLER assembler to build MPlayer [as]
401 --ar=AR librarian to build MPlayer [ar]
402 --ranlib=RANLIB ranlib to build MPlayer [ranlib]
403 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
404 --enable-static build a statically linked binary
405 --charset=charset convert the console messages to this character set
406 --language=list a white space or comma separated list of languages for
407 translated man pages, the first language is used for
408 messages and the GUI (the environment variable
409 \$LINGUAS is also honored) [en]
410 (Available: $LANGUAGES all)
411 --with-install=PATH path to a custom install program
412 --enable-color-console enable color console output (UNSUPPORTED) [disable]
415 --enable-mmx enable MMX [autodetect]
416 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
417 --enable-3dnow enable 3DNow! [autodetect]
418 --enable-3dnowext enable extended 3DNow! [autodetect]
419 --enable-sse enable SSE [autodetect]
420 --enable-sse2 enable SSE2 [autodetect]
421 --enable-ssse3 enable SSSE3 [autodetect]
422 --enable-shm enable shm [autodetect]
423 --enable-altivec enable AltiVec (PowerPC) [autodetect]
424 --enable-armv5te enable DSP extensions (ARM) [autodetect]
425 --enable-armv6 enable ARMv6 (ARM) [autodetect]
426 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
427 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
428 --enable-big-endian force byte order to big-endian [autodetect]
429 --enable-debug[=1-3] compile-in debugging information [disable]
430 --enable-profile compile-in profiling information [disable]
431 --disable-sighandler disable sighandler for crashes [enable]
432 --enable-crash-debug enable automatic gdb attach on crash [disable]
433 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
435 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
436 --disable-gcc-check disable gcc version checking [enable]
438 Use these options if autodetection fails (Options marked with (*) accept
439 multiple paths separated by ':'):
440 --extra-libs=FLAGS extra linker flags
441 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
442 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
443 --with-extraincdir=DIR extra header search paths in DIR (*)
444 --with-extralibdir=DIR extra linker search paths in DIR (*)
445 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
447 --with-freetype-config=PATH path to freetype-config
448 --with-fribidi-config=PATH path to fribidi-config
449 --with-glib-config=PATH path to glib*-config
450 --with-gtk-config=PATH path to gtk*-config
451 --with-sdl-config=PATH path to sdl*-config
452 --with-dvdnav-config=PATH path to dvdnav-config
454 This configure script is NOT autoconf-based, even though its output is similar.
455 It will try to autodetect all configuration options. If you --enable an option
456 it will be forcefully turned on, skipping autodetection. This can break
457 compilation, so you need to know what you are doing.
462 # GOTCHA: the variables below defines the default behavior for autodetection
463 # and have - unless stated otherwise - at least 2 states : yes no
464 # If autodetection is available then the third state is: auto
484 test "$CC" && _cc
="$CC"
487 _runtime_cpudetection
=no
495 _libavdecoders_all
=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
496 _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// `
497 _libavencoders_all
=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
498 _libavencoders
=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// -e s/LIBVORBIS_ENCODER// `
499 _libavparsers_all
=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
500 _libavparsers
=$_libavparsers_all
501 _libavbsfs_all
=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
502 _libavbsfs
=$_libavbsfs_all
503 _libavdemuxers_all
=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
504 _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// `
505 _libavmuxers_all
=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
506 _libavmuxers
=`echo $_libavmuxers_all | sed -e s/RTP_MUXER// `
507 _libavprotocols_all
=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
513 _libavcodec_mpegaudio_hp
=yes
521 _xvmc
=no
#auto when complete
561 _tremor_external
=auto
576 _dvdnavconfig
=dvdnav-config
578 _dvdread_internal
=auto
579 _libdvdcss_internal
=auto
590 _mlib
=no
#broken, thus disabled
656 _macosx_finder_support
=no
659 _freetypeconfig
='freetype-config'
661 _fribidiconfig
='fribidi-config'
675 _def_stream_cache
="#define USE_STREAM_CACHE 1"
683 _prefix
=`echo $ac_option | cut -d '=' -f 2`
686 _bindir
=`echo $ac_option | cut -d '=' -f 2`
689 _datadir
=`echo $ac_option | cut -d '=' -f 2`
692 _mandir
=`echo $ac_option | cut -d '=' -f 2`
695 _confdir
=`echo $ac_option | cut -d '=' -f 2`
698 _libdir
=`echo $ac_option | cut -d '=' -f 2`
701 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
704 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
707 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
710 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
712 --with-extraincdir=*)
713 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
715 --with-extralibdir=*)
716 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
720 _install
=`echo $ac_option | cut -d '=' -f 2 `
723 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
727 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
729 --with-freetype-config=*)
730 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
732 --with-fribidi-config=*)
733 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
736 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
738 --with-glib-config=*)
739 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
741 --with-dvdnav-config=*)
742 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
746 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
748 --extra-libs-mplayer=*)
749 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
751 --extra-libs-mencoder=*)
752 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
756 _target
=`echo $ac_option | cut -d '=' -f 2`
759 _cc
=`echo $ac_option | cut -d '=' -f 2`
762 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
765 _as
=`echo $ac_option | cut -d '=' -f 2`
768 _ar
=`echo $ac_option | cut -d '=' -f 2`
771 _ranlib
=`echo $ac_option | cut -d '=' -f 2`
774 _charset
=`echo $ac_option | cut -d '=' -f 2`
777 _language
=`echo $ac_option | cut -d '=' -f 2`
796 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
801 --enable-gcc-check) _gcc_check
=yes ;;
802 --disable-gcc-check) _gcc_check
=no
;;
803 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
804 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
805 --enable-cross-compile) _cross_compile
=yes ;;
806 --disable-cross-compile) _cross_compile
=no
;;
807 --enable-mencoder) _mencoder
=yes ;;
808 --disable-mencoder) _mencoder
=no
;;
809 --enable-mplayer) _mplayer
=yes ;;
810 --disable-mplayer) _mplayer
=no
;;
811 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
812 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
813 --enable-x11) _x11
=yes ;;
814 --disable-x11) _x11
=no
;;
815 --enable-xshape) _xshape
=yes ;;
816 --disable-xshape) _xshape
=no
;;
817 --enable-xv) _xv
=yes ;;
818 --disable-xv) _xv
=no
;;
819 --enable-xvmc) _xvmc
=yes ;;
820 --disable-xvmc) _xvmc
=no
;;
821 --enable-sdl) _sdl
=yes ;;
822 --disable-sdl) _sdl
=no
;;
823 --enable-directx) _directx
=yes ;;
824 --disable-directx) _directx
=no
;;
825 --enable-win32waveout) _win32waveout
=yes ;;
826 --disable-win32waveout) _win32waveout
=no
;;
827 --enable-nas) _nas
=yes ;;
828 --disable-nas) _nas
=no
;;
829 --enable-png) _png
=yes ;;
830 --disable-png) _png
=no
;;
831 --enable-jpeg) _jpeg
=yes ;;
832 --disable-jpeg) _jpeg
=no
;;
833 --enable-pnm) _pnm
=yes ;;
834 --disable-pnm) _pnm
=no
;;
835 --enable-md5sum) _md5sum
=yes ;;
836 --disable-md5sum) _md5sum
=no
;;
837 --enable-gif) _gif
=yes ;;
838 --disable-gif) _gif
=no
;;
839 --enable-gl) _gl
=yes ;;
840 --disable-gl) _gl
=no
;;
841 --enable-ggi) _ggi
=yes ;;
842 --disable-ggi) _ggi
=no
;;
843 --enable-ggiwmh) _ggiwmh
=yes ;;
844 --disable-ggiwmh) _ggiwmh
=no
;;
845 --enable-aa) _aa
=yes ;;
846 --disable-aa) _aa
=no
;;
847 --enable-caca) _caca
=yes ;;
848 --disable-caca) _caca
=no
;;
849 --enable-svga) _svga
=yes ;;
850 --disable-svga) _svga
=no
;;
851 --enable-vesa) _vesa
=yes ;;
852 --disable-vesa) _vesa
=no
;;
853 --enable-fbdev) _fbdev
=yes ;;
854 --disable-fbdev) _fbdev
=no
;;
855 --enable-dvb) _dvb
=yes ;;
856 --disable-dvb) _dvb
=no
;;
857 --enable-dvbhead) _dvbhead
=yes ;;
858 --disable-dvbhead) _dvbhead
=no
;;
859 --enable-dxr2) _dxr2
=yes ;;
860 --disable-dxr2) _dxr2
=no
;;
861 --enable-dxr3) _dxr3
=yes ;;
862 --disable-dxr3) _dxr3
=no
;;
863 --enable-ivtv) _ivtv
=yes ;;
864 --disable-ivtv) _ivtv
=no
;;
865 --enable-v4l2) _v4l2
=yes ;;
866 --disable-v4l2) _v4l2
=no
;;
867 --enable-iconv) _iconv
=yes ;;
868 --disable-iconv) _iconv
=no
;;
869 --enable-langinfo) _langinfo
=yes ;;
870 --disable-langinfo) _langinfo
=no
;;
871 --enable-rtc) _rtc
=yes ;;
872 --disable-rtc) _rtc
=no
;;
873 --enable-libdv) _libdv
=yes ;;
874 --disable-libdv) _libdv
=no
;;
875 --enable-ossaudio) _ossaudio
=yes ;;
876 --disable-ossaudio) _ossaudio
=no
;;
877 --enable-arts) _arts
=yes ;;
878 --disable-arts) _arts
=no
;;
879 --enable-esd) _esd
=yes ;;
880 --disable-esd) _esd
=no
;;
881 --enable-pulse) _pulse
=yes ;;
882 --disable-pulse) _pulse
=no
;;
883 --enable-jack) _jack
=yes ;;
884 --disable-jack) _jack
=no
;;
885 --enable-openal) _openal
=yes ;;
886 --disable-openal) _openal
=no
;;
887 --enable-mad) _mad
=yes ;;
888 --disable-mad) _mad
=no
;;
889 --enable-toolame) _toolame
=yes ;;
890 --disable-toolame) _toolame
=no
;;
891 --enable-twolame) _twolame
=yes ;;
892 --disable-twolame) _twolame
=no
;;
893 --enable-libcdio) _libcdio
=yes ;;
894 --disable-libcdio) _libcdio
=no
;;
895 --enable-liblzo) _liblzo
=yes ;;
896 --disable-liblzo) _liblzo
=no
;;
897 --enable-libvorbis) _libvorbis
=yes ;;
898 --disable-libvorbis) _libvorbis
=no
;;
899 --enable-speex) _speex
=yes ;;
900 --disable-speex) _speex
=no
;;
901 --enable-tremor-internal) _tremor_internal
=yes ;;
902 --disable-tremor-internal) _tremor_internal
=no
;;
903 --enable-tremor-low) _tremor_low
=yes ;;
904 --disable-tremor-low) _tremor_low
=no
;;
905 --enable-tremor-external) _tremor_external
=yes ;;
906 --disable-tremor-external) _tremor_external
=no
;;
907 --enable-theora) _theora
=yes ;;
908 --disable-theora) _theora
=no
;;
909 --enable-mp3lib) _mp3lib
=yes ;;
910 --disable-mp3lib) _mp3lib
=no
;;
911 --enable-liba52) _liba52
=yes ;;
912 --disable-liba52) _liba52
=no
;;
913 --enable-libdca) _libdca
=yes ;;
914 --disable-libdca) _libdca
=no
;;
915 --enable-libmpeg2) _libmpeg2
=yes ;;
916 --disable-libmpeg2) _libmpeg2
=no
;;
917 --enable-musepack) _musepack
=yes ;;
918 --disable-musepack) _musepack
=no
;;
919 --enable-faad-internal) _faad_internal
=yes ;;
920 --disable-faad-internal) _faad_internal
=no
;;
921 --enable-faad-external) _faad_external
=yes ;;
922 --disable-faad-external) _faad_external
=no
;;
923 --enable-faad-fixed) _faad_fixed
=yes ;;
924 --disable-faad-fixed) _faad_fixed
=no
;;
925 --enable-faac) _faac
=yes ;;
926 --disable-faac) _faac
=no
;;
927 --enable-ladspa) _ladspa
=yes ;;
928 --disable-ladspa) _ladspa
=no
;;
929 --enable-xmms) _xmms
=yes ;;
930 --disable-xmms) _xmms
=no
;;
931 --enable-dvdread) _dvdread
=yes ;;
932 --disable-dvdread) _dvdread
=no
;;
933 --enable-dvdread-internal) _dvdread_internal
=yes ;;
934 --disable-dvdread-internal) _dvdread_internal
=no
;;
935 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
936 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
937 --enable-dvdnav) _dvdnav
=yes ;;
938 --disable-dvdnav) _dvdnav
=no
;;
939 --enable-xanim) _xanim
=yes ;;
940 --disable-xanim) _xanim
=no
;;
941 --enable-real) _real
=yes ;;
942 --disable-real) _real
=no
;;
943 --enable-live) _live
=yes ;;
944 --disable-live) _live
=no
;;
945 --enable-nemesi) _nemesi
=yes ;;
946 --disable-nemesi) _nemesi
=no
;;
947 --enable-xinerama) _xinerama
=yes ;;
948 --disable-xinerama) _xinerama
=no
;;
949 --enable-mga) _mga
=yes ;;
950 --disable-mga) _mga
=no
;;
951 --enable-xmga) _xmga
=yes ;;
952 --disable-xmga) _xmga
=no
;;
953 --enable-vm) _vm
=yes ;;
954 --disable-vm) _vm
=no
;;
955 --enable-xf86keysym) _xf86keysym
=yes ;;
956 --disable-xf86keysym) _xf86keysym
=no
;;
957 --enable-mlib) _mlib
=yes ;;
958 --disable-mlib) _mlib
=no
;;
959 --enable-sunaudio) _sunaudio
=yes ;;
960 --disable-sunaudio) _sunaudio
=no
;;
961 --enable-sgiaudio) _sgiaudio
=yes ;;
962 --disable-sgiaudio) _sgiaudio
=no
;;
963 --enable-alsa) _alsa
=yes ;;
964 --disable-alsa) _alsa
=no
;;
965 --enable-tv) _tv
=yes ;;
966 --disable-tv) _tv
=no
;;
967 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
968 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
969 --enable-tv-v4l1) _tv_v4l1
=yes ;;
970 --disable-tv-v4l1) _tv_v4l1
=no
;;
971 --enable-tv-v4l2) _tv_v4l2
=yes ;;
972 --disable-tv-v4l2) _tv_v4l2
=no
;;
973 --enable-tv-dshow) _tv_dshow
=yes ;;
974 --disable-tv-dshow) _tv_dshow
=no
;;
975 --enable-tv-teletext) _tv_teletext
=yes ;;
976 --disable-tv-teletext) _tv_teletext
=no
;;
977 --enable-radio) _radio
=yes ;;
978 --enable-radio-capture) _radio_capture
=yes ;;
979 --disable-radio-capture) _radio_capture
=no
;;
980 --disable-radio) _radio
=no
;;
981 --enable-radio-v4l) _radio_v4l
=yes ;;
982 --disable-radio-v4l) _radio_v4l
=no
;;
983 --enable-radio-v4l2) _radio_v4l2
=yes ;;
984 --disable-radio-v4l2) _radio_v4l2
=no
;;
985 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
986 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
987 --enable-pvr) _pvr
=yes ;;
988 --disable-pvr) _pvr
=no
;;
989 --enable-fastmemcpy) _fastmemcpy
=yes ;;
990 --disable-fastmemcpy) _fastmemcpy
=no
;;
991 --enable-network) _network
=yes ;;
992 --disable-network) _network
=no
;;
993 --enable-winsock2) _winsock2
=yes ;;
994 --disable-winsock2) _winsock2
=no
;;
995 --enable-smb) _smbsupport
=yes ;;
996 --disable-smb) _smbsupport
=no
;;
997 --enable-vidix-internal) _vidix_internal
=yes ;;
998 --disable-vidix-internal) _vidix_internal
=no
;;
999 --enable-vidix-external) _vidix_external
=yes ;;
1000 --disable-vidix-external) _vidix_external
=no
;;
1001 --with-vidix-drivers=*)
1002 _vidix_drivers
=`echo $ac_option | cut -d '=' -f 2`
1004 --disable-vidix-pcidb) _vidix_pcidb
=no
;;
1005 --enable-joystick) _joystick
=yes ;;
1006 --disable-joystick) _joystick
=no
;;
1007 --enable-xvid) _xvid
=yes ;;
1008 --disable-xvid) _xvid
=no
;;
1009 --enable-x264) _x264
=yes ;;
1010 --disable-x264) _x264
=no
;;
1011 --enable-libnut) _libnut
=yes ;;
1012 --disable-libnut) _libnut
=no
;;
1013 --enable-libavutil_a) _libavutil_a
=yes ;;
1014 --disable-libavutil_a) _libavutil_a
=no
;;
1015 --enable-libavutil_so) _libavutil_so
=yes ;;
1016 --disable-libavutil_so) _libavutil_so
=no
;;
1017 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1018 --disable-libavcodec_a) _libavcodec_a
=no
;;
1019 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1020 --disable-libavcodec_so) _libavcodec_so
=no
;;
1021 --enable-libamr_nb) _libamr_nb
=yes ;;
1022 --disable-libamr_nb) _libamr_nb
=no
;;
1023 --enable-libamr_wb) _libamr_wb
=yes ;;
1024 --disable-libamr_wb) _libamr_wb
=no
;;
1025 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
1026 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1027 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
1028 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1029 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
1030 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1031 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
1032 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1033 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
1034 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1035 --enable-libavformat_a) _libavformat_a
=yes ;;
1036 --disable-libavformat_a) _libavformat_a
=no
;;
1037 --enable-libavformat_so) _libavformat_so
=yes ;;
1038 --disable-libavformat_so) _libavformat_so
=no
;;
1039 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1040 --disable-libpostproc_a) _libpostproc_a
=no
;;
1041 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1042 --disable-libpostproc_so) _libpostproc_so
=no
;;
1043 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1044 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1046 --enable-lirc) _lirc
=yes ;;
1047 --disable-lirc) _lirc
=no
;;
1048 --enable-lircc) _lircc
=yes ;;
1049 --disable-lircc) _lircc
=no
;;
1050 --enable-apple-remote) _apple_remote
=yes ;;
1051 --disable-apple-remote) _apple_remote
=no
;;
1052 --enable-gui) _gui
=yes ;;
1053 --disable-gui) _gui
=no
;;
1054 --enable-gtk1) _gtk1
=yes ;;
1055 --disable-gtk1) _gtk1
=no
;;
1056 --enable-termcap) _termcap
=yes ;;
1057 --disable-termcap) _termcap
=no
;;
1058 --enable-termios) _termios
=yes ;;
1059 --disable-termios) _termios
=no
;;
1060 --enable-3dfx) _3dfx
=yes ;;
1061 --disable-3dfx) _3dfx
=no
;;
1062 --enable-s3fb) _s3fb
=yes ;;
1063 --disable-s3fb) _s3fb
=no
;;
1064 --enable-tdfxfb) _tdfxfb
=yes ;;
1065 --disable-tdfxfb) _tdfxfb
=no
;;
1066 --disable-tdfxvid) _tdfxvid
=no
;;
1067 --enable-tdfxvid) _tdfxvid
=yes ;;
1068 --disable-xvr100) _xvr100
=no
;;
1069 --enable-xvr100) _xvr100
=yes ;;
1070 --disable-tga) _tga
=no
;;
1071 --enable-tga) _tga
=yes ;;
1072 --enable-directfb) _directfb
=yes ;;
1073 --disable-directfb) _directfb
=no
;;
1074 --enable-zr) _zr
=yes ;;
1075 --disable-zr) _zr
=no
;;
1076 --enable-bl) _bl
=yes ;;
1077 --disable-bl) _bl
=no
;;
1078 --enable-mtrr) _mtrr
=yes ;;
1079 --disable-mtrr) _mtrr
=no
;;
1080 --enable-largefiles) _largefiles
=yes ;;
1081 --disable-largefiles) _largefiles
=no
;;
1082 --enable-shm) _shm
=yes ;;
1083 --disable-shm) _shm
=no
;;
1084 --enable-select) _select
=yes ;;
1085 --disable-select) _select
=no
;;
1086 --enable-linux-devfs) _linux_devfs
=yes ;;
1087 --disable-linux-devfs) _linux_devfs
=no
;;
1088 --enable-cdparanoia) _cdparanoia
=yes ;;
1089 --disable-cdparanoia) _cdparanoia
=no
;;
1090 --enable-cddb) _cddb
=yes ;;
1091 --disable-cddb) _cddb
=no
;;
1092 --enable-big-endian) _big_endian
=yes ;;
1093 --disable-big-endian) _big_endian
=no
;;
1094 --enable-bitmap-font) _bitmap_font
=yes ;;
1095 --disable-bitmap-font) _bitmap_font
=no
;;
1096 --enable-freetype) _freetype
=yes ;;
1097 --disable-freetype) _freetype
=no
;;
1098 --enable-fontconfig) _fontconfig
=yes ;;
1099 --disable-fontconfig) _fontconfig
=no
;;
1100 --enable-unrarlib) _unrarlib
=yes ;;
1101 --disable-unrarlib) _unrarlib
=no
;;
1102 --enable-unrarexec) _unrar_exec
=yes ;;
1103 --disable-unrarexec) _unrar_exec
=no
;;
1104 --enable-ftp) _ftp
=yes ;;
1105 --disable-ftp) _ftp
=no
;;
1106 --enable-vstream) _vstream
=yes ;;
1107 --disable-vstream) _vstream
=no
;;
1108 --enable-pthreads) _pthreads
=yes ;;
1109 --disable-pthreads) _pthreads
=no
;;
1110 --enable-w32threads) _w32threads
=yes ;;
1111 --disable-w32threads) _w32threads
=no
;;
1112 --enable-ass) _ass
=yes ;;
1113 --disable-ass) _ass
=no
;;
1114 --enable-rpath) _rpath
=yes ;;
1115 --disable-rpath) _rpath
=no
;;
1116 --enable-color-console) _color_console
=yes ;;
1117 --disable-color-console) _color_console
=no
;;
1119 --enable-fribidi) _fribidi
=yes ;;
1120 --disable-fribidi) _fribidi
=no
;;
1122 --enable-enca) _enca
=yes ;;
1123 --disable-enca) _enca
=no
;;
1125 --enable-inet6) _inet6
=yes ;;
1126 --disable-inet6) _inet6
=no
;;
1128 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1129 --disable-gethostbyname2) _gethostbyname2
=no
;;
1131 --enable-dga1) _dga1
=yes ;;
1132 --disable-dga1) _dga1
=no
;;
1133 --enable-dga2) _dga2
=yes ;;
1134 --disable-dga2) _dga2
=no
;;
1136 --enable-menu) _menu
=yes ;;
1137 --disable-menu) _menu
=no
;;
1139 --enable-qtx) _qtx
=yes ;;
1140 --disable-qtx) _qtx
=no
;;
1142 --enable-macosx) _macosx
=yes ;;
1143 --disable-macosx) _macosx
=no
;;
1144 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1145 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1146 --enable-macosx-bundle) _macosx_bundle
=yes;;
1147 --disable-macosx-bundle) _macosx_bundle
=no
;;
1149 --enable-maemo) _maemo
=yes ;;
1150 --disable-maemo) _maemo
=no
;;
1152 --enable-sortsub) _sortsub
=yes ;;
1153 --disable-sortsub) _sortsub
=no
;;
1155 --enable-crash-debug) _crash_debug
=yes ;;
1156 --disable-crash-debug) _crash_debug
=no
;;
1157 --enable-sighandler) _sighandler
=yes ;;
1158 --disable-sighandler) _sighandler
=no
;;
1159 --enable-win32dll) _win32dll
=yes ;;
1160 --disable-win32dll) _win32dll
=no
;;
1162 --enable-sse) _sse
=yes ;;
1163 --disable-sse) _sse
=no
;;
1164 --enable-sse2) _sse2
=yes ;;
1165 --disable-sse2) _sse2
=no
;;
1166 --enable-ssse3) _ssse3
=yes ;;
1167 --disable-ssse3) _ssse3
=no
;;
1168 --enable-mmxext) _mmxext
=yes ;;
1169 --disable-mmxext) _mmxext
=no
;;
1170 --enable-3dnow) _3dnow
=yes ;;
1171 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1172 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1173 --disable-3dnowext) _3dnowext
=no
;;
1174 --enable-cmov) _cmov
=yes ;;
1175 --disable-cmov) _cmov
=no
;;
1176 --enable-fast-cmov) _fast_cmov
=yes ;;
1177 --disable-fast-cmov) _fast_cmov
=no
;;
1178 --enable-altivec) _altivec
=yes ;;
1179 --disable-altivec) _altivec
=no
;;
1180 --enable-armv5te) _armv5te
=yes ;;
1181 --disable-armv5te) _armv5te
=no
;;
1182 --enable-armv6) _armv6
=yes ;;
1183 --disable-armv6) _armv6
=no
;;
1184 --enable-iwmmxt) _iwmmxt
=yes ;;
1185 --disable-iwmmxt) _iwmmxt
=no
;;
1186 --enable-mmx) _mmx
=yes ;;
1187 --disable-mmx) # 3Dnow! and MMX2 require MMX
1188 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1191 echo "Unknown parameter: $ac_option"
1198 # Atmos: moved this here, to be correct, if --prefix is specified
1199 test -z "$_bindir" && _bindir
="$_prefix/bin"
1200 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1201 test -z "$_mandir" && _mandir
="$_prefix/share/man"
1202 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1203 test -z "$_libdir" && _libdir
="$_prefix/lib"
1205 # Determine our OS name and CPU architecture
1206 if test -z "$_target" ; then
1208 system_name
=`uname -s 2>&1`
1209 case "$system_name" in
1210 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1221 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1228 system_name
="$system_name-UNKNOWN"
1233 # host's CPU/instruction set
1234 host_arch
=`uname -p 2>&1`
1235 case "$host_arch" in
1236 i386|sparc|ppc|alpha|arm|sh3|mips|vax
)
1238 powerpc
) # Darwin returns 'powerpc'
1241 *) # uname -p on Linux returns 'unknown' for the processor type,
1242 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1244 # Maybe uname -m (machine hardware name) returns something we
1247 # x86/x86pc is used by QNX
1248 case "`uname -m 2>&1`" in
1249 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
;;
1250 ia64
) host_arch
=ia64
;;
1252 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1253 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1259 macppc|ppc|ppc64
) host_arch
=ppc
;;
1260 alpha
) host_arch
=alpha
;;
1261 sparc
) host_arch
=sparc
;;
1262 sparc64
) host_arch
=sparc64
;;
1263 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1264 arm
*|zaurus|cats
) host_arch
=arm
;;
1265 sh3
) host_arch
=sh3
;;
1266 s390
) host_arch
=s390
;;
1267 s390x
) host_arch
=s390x
;;
1268 mips
*) host_arch
=mips
;;
1269 vax
) host_arch
=vax
;;
1270 xtensa
*) host_arch
=xtensa
;;
1271 *) host_arch
=UNKNOWN
;;
1275 else # if test -z "$_target"
1276 system_name
=`echo $_target | cut -d '-' -f 2`
1277 case "`echo $system_name | tr A-Z a-z`" in
1278 linux
) system_name
=Linux
;;
1279 freebsd
) system_name
=FreeBSD
;;
1280 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1281 netbsd
) system_name
=NetBSD
;;
1282 bsd
/os
) system_name
=BSD
/OS
;;
1283 openbsd
) system_name
=OpenBSD
;;
1284 sunos
) system_name
=SunOS
;;
1285 qnx
) system_name
=QNX
;;
1286 morphos
) system_name
=MorphOS
;;
1287 amigaos
) system_name
=AmigaOS
;;
1288 mingw32msvc
) system_name
=MINGW32
;;
1290 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1291 host_arch
=`echo $_target | cut -d '-' -f 1`
1292 if test `echo $host_arch` != "x86_64" ; then
1293 host_arch
=`echo $host_arch | tr '_' '-'`
1297 echo "Detected operating system: $system_name"
1298 echo "Detected host architecture: $host_arch"
1300 if test "$_runtime_cpudetection" = yes && ! x86
&& ! ppc
; then
1301 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1306 _ldconfig
="ldconfig -R"
1310 _ld_extra
="$_ld_extra -L/usr/local/lib"
1311 _inc_extra
="$_inc_extra -I/usr/local/include"
1315 _ld_extra
="$_ld_extra -L/usr/local/lib"
1316 _inc_extra
="$_inc_extra -I/usr/local/include"
1320 _ld_extra
="$_ld_extra -lC"
1331 # -lwinmm is always needed for osdep/timer-win2.c
1332 _ld_extra
="$_ld_extra -lwinmm"
1333 _confwin32
='TARGET_WIN32 = yes'
1335 _confwin32
='TARGET_WIN32 = no'
1343 _def_confwin32
='#define WIN32'
1350 _def_stream_cache
="#undef USE_STREAM_CACHE"
1354 _ld_extra
="$_ld_extra -lph"
1357 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1362 TMPLOG
="configure.log"
1363 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1364 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1365 TMPEXE
="$I/mplayer-conf-$RANDOM-$$$_exesuf"
1366 TMPH
="$I/mplayer-conf-$RANDOM-$$.h"
1367 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1370 echo configuration
: $_configuration > "$TMPLOG"
1374 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1375 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1377 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1378 _head
() { head -$1 2>/dev
/null
; }
1380 _head
() { head -n $1 2>/dev
/null
; }
1382 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1383 _tail
() { tail -$1 2>/dev
/null
; }
1385 _tail
() { tail -n $1 2>/dev
/null
; }
1388 # Checking CC version...
1389 if test "$_gcc_check" = yes ; then
1390 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1391 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1392 echocheck
"$_cc version"
1394 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1395 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1396 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1397 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1398 # TODO verify older icc/ecc compatibility
1401 cc_version
="v. ?.??, bad"
1405 cc_version
="$cc_version, ok"
1409 cc_version
="$cc_version, bad"
1413 echores
"$cc_version"
1415 for _cc
in "$_cc" gcc cc
; do
1416 echocheck
"$_cc version"
1418 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1419 cc_version
=`$_cc -dumpversion 2>&1`
1420 if test "$?" -gt 0; then
1421 cc_version
="not found"
1425 cc_version
="v. ?.??, bad"
1428 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1429 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1430 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1431 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1432 cc_version
="$cc_version, ok"
1439 cc_version
="$cc_version, bad"
1443 echores
"$cc_version"
1444 test "$cc_verc_fail" = "no" && break
1447 if test "$cc_verc_fail" = yes ; then
1450 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1452 You are not using a supported compiler. We do not have the time to make sure
1453 everything works with compilers other than the ones we use. Use either the
1454 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1455 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1457 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1458 mplayer and lame (which is used for mencoder). If you get compile errors,
1459 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1460 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1463 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1466 die
"Bad gcc version"
1471 ******************************************************************************
1473 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1474 Ok. You know. Do it.
1476 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1477 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1478 Lame which is used by mencoder produces weird errors, too.
1480 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1481 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1483 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1485 ******************************************************************************
1493 test "$_host_cc" || _host_cc
=$_cc
1496 echocheck
"cross compilation"
1497 if test $_cross_compile = auto
; then
1499 int main(void) { return 0; }
1502 cc_check
&& "$TMPEXE" && _cross_compile
=no
1504 echores
$_cross_compile
1506 if test $_cross_compile = yes; then
1514 # now that we know what compiler should be used for compilation, try to find
1515 # out which assembler is used by the $_cc compiler
1516 if test "$_as" = auto
; then
1517 _as
=`$_cc -print-prog-name=as`
1518 test -z "$_as" && _as
=as
1521 # XXX: this should be ok..
1524 if test "$_runtime_cpudetection" = no
; then
1526 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1527 # FIXME: Remove the cygwin check once AMD CPUs are supported
1528 if test -r /proc
/cpuinfo
&& ! cygwin
; then
1529 # Linux with /proc mounted, extract CPU information from it
1530 _cpuinfo
="cat /proc/cpuinfo"
1531 elif test -r /compat
/linux
/proc
/cpuinfo
&& ! x86_32
; then
1532 # FreeBSD with Linux emulation /proc mounted,
1533 # extract CPU information from it
1534 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1535 elif darwin
&& ! x86_32
; then
1536 # use hostinfo on Darwin
1539 # use 'lsattr' on AIX
1540 _cpuinfo
="lsattr -E -l proc0 -a type"
1542 # all other OSes try to extract CPU information from a small helper
1543 # program cpuinfo instead
1544 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1545 _cpuinfo
="./cpuinfo$_exesuf"
1549 # gather more CPU information
1550 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1551 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1552 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1553 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1554 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1556 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1558 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1559 -e s/xmm/sse/ -e s/kni/sse/`
1561 for ext
in $pparam ; do
1562 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1565 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1566 test $_sse = kernel_check
&& _mmxext
=kernel_check
1568 echocheck
"CPU vendor"
1569 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1571 echocheck
"CPU type"
1575 fi # test "$_runtime_cpudetection" = no
1577 if x86
&& test "$_runtime_cpudetection" = no
; then
1579 if test "$1" = kernel_check
; then
1580 echocheck
"kernel support of $2"
1583 void catch() { exit(1); }
1585 signal(SIGILL, catch);
1586 __asm__ __volatile__ ("$3":::"memory");return(0);
1590 if cc_check
&& tmp_run
; then
1593 _optimizing
="$_optimizing $2"
1598 echo "It seems that your kernel does not correctly support $2."
1599 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1606 extcheck
$_mmx "mmx" "emms"
1607 extcheck
$_mmxext "mmxext" "sfence"
1608 extcheck
$_3dnow "3dnow" "femms"
1609 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1610 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1611 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1612 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1613 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1615 echocheck
"mtrr support"
1616 if test "$_mtrr" = kernel_check
; then
1618 _optimizing
="$_optimizing mtrr"
1622 if test "$_gcc3_ext" != ""; then
1623 # if we had to disable sse/sse2 because the active kernel does not
1624 # support this instruction set extension, we also have to tell
1625 # gcc3 to not generate sse/sse2 instructions for normal C code
1627 int main(void) { return 0; }
1629 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1635 _arch_all
='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L SH3 POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
1636 case "$host_arch" in
1637 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1639 _target_arch_x86
="ARCH_X86 = yes"
1640 _target_arch
="ARCH_X86_32 = yes"
1641 _def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1646 if test "$_runtime_cpudetection" = no
; then
1650 3) proc
=i386 iproc
=386 ;;
1651 4) proc
=i486 iproc
=486 ;;
1652 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1653 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1654 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1656 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1658 elif test "$pmodel" -ge 8; then
1660 elif test "$pmodel" -ge 6; then
1667 # It's a bit difficult to determine the correct type of Family 6
1668 # AMD CPUs just from their signature. Instead, we check directly
1669 # whether it supports SSE.
1670 if test "$_sse" = yes; then
1671 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1674 # Again, gcc treats athlon and athlon-tbird similarly.
1679 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1680 # caught and remedied in the optimization tests below.
1684 *) proc
=k8 iproc
=686 ;;
1689 3) proc
=i386 iproc
=386 ;;
1690 4) proc
=i486 iproc
=486 ;;
1692 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1693 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1699 if test "$pmodel" -ge 15; then
1701 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1703 elif test "$pmodel" -ge 7; then
1705 elif test "$pmodel" -ge 3; then
1712 # A nocona in 32-bit mode has no more capabilities than a prescott.
1713 if test "$pmodel" -ge 3; then
1718 test $_fast_cmov = "auto" && _fast_cmov
=no
1720 *) proc
=prescott iproc
=686 ;;
1726 if test "$pmodel" -ge 8; then
1728 elif test "$pmodel" -ge 4; then
1735 if test "$pmodel" -ge 9; then
1742 *) proc
=i686 iproc
=i686
;;
1747 3) proc
=i386 iproc
=386 ;;
1748 4) proc
=i486 iproc
=486 ;;
1749 *) proc
=i586 iproc
=586 ;;
1753 proc
=i586 iproc
=586 ;;
1755 fi # test "$_runtime_cpudetection" = no
1758 # check that gcc supports our CPU, if not, fall back to earlier ones
1759 # LGB: check -mcpu and -march swithing step by step with enabling
1760 # to fall back till 386.
1762 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1764 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1770 echocheck
"GCC & CPU optimization abilities"
1772 int main(void) { return 0; }
1774 if test "$_runtime_cpudetection" = no
; then
1775 cc_check
-march=native
&& proc
=native
1776 if test "$proc" = "k8"; then
1777 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1779 if test "$proc" = "athlon-xp"; then
1780 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1782 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1783 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1785 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1786 if ! cc_check
-march=$proc $cpuopt=$proc; then
1787 if cc_check
-march=i586
$cpuopt=i686
; then
1794 if test "$proc" = "prescott" ; then
1795 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1797 if test "$proc" = "core2" ; then
1798 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1800 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
1801 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1803 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1804 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1806 if test "$proc" = "i586"; then
1807 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1809 if test "$proc" = "i486" ; then
1810 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1812 if test "$proc" = "i386" ; then
1813 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1815 if test "$proc" = "error" ; then
1816 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1820 elif test "$proc" = "i586-i686"; then
1821 _march
="-march=i586"
1822 _mcpu
="$cpuopt=i686"
1825 _march
="-march=$proc"
1826 _mcpu
="$cpuopt=$proc"
1829 else # if test "$_runtime_cpudetection" = no
1830 _mcpu
="$cpuopt=generic"
1831 # at least i486 required, for bswap instruction
1832 _march
="-march=i486"
1833 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1834 cc_check
$_mcpu || _mcpu
=""
1835 cc_check
$_march $_mcpu || _march
=""
1838 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1839 ## autodetected mcpu/march parameters
1840 if test "$_target" ; then
1841 # TODO: it may be a good idea to check GCC and fall back in all cases
1842 if test "$host_arch" = "i586-i686"; then
1843 _march
="-march=i586"
1844 _mcpu
="$cpuopt=i686"
1846 _march
="-march=$host_arch"
1847 _mcpu
="$cpuopt=$host_arch"
1855 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1856 i686|athlon
*|pentium
*) iproc
=686 ;;
1861 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1872 _target_arch
='ARCH_IA64 = yes'
1882 _target_arch
='ARCH_X86_64 = yes'
1883 _target_arch_x86
="ARCH_X86 = yes"
1884 _def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1887 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1888 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1893 if test "$_runtime_cpudetection" = no
; then
1901 # 64-bit prescotts exist, but as far as GCC is concerned they
1902 # have the same capabilities as a nocona.
1904 test $_fast_cmov = "auto" && _fast_cmov
=no
1911 fi # test "$_runtime_cpudetection" = no
1913 echocheck
"GCC & CPU optimization abilities"
1915 int main(void) { return 0; }
1917 # This is a stripped-down version of the i386 fallback.
1918 if test "$_runtime_cpudetection" = no
; then
1919 cc_check
-march=native
&& proc
=native
1920 # --- AMD processors ---
1921 if test "$proc" = "k8"; then
1922 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1924 # This will fail if gcc version < 3.3, which is ok because earlier
1925 # versions don't really support 64-bit on amd64.
1926 # Is this a valid assumption? -Corey
1927 if test "$proc" = "athlon-xp"; then
1928 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1930 # --- Intel processors ---
1931 if test "$proc" = "core2"; then
1932 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1934 if test "$proc" = "nocona"; then
1935 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1937 if test "$proc" = "pentium4"; then
1938 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1941 _march
="-march=$proc"
1942 _mcpu
="$cpuopt=$proc"
1943 if test "$proc" = "error" ; then
1944 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1948 else # if test "$_runtime_cpudetection" = no
1949 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1950 _march
="-march=x86-64"
1951 _mcpu
="$cpuopt=generic"
1952 cc_check
$_mcpu || _mcpu
="x86-64"
1953 cc_check
$_mcpu || _mcpu
=""
1954 cc_check
$_march $_mcpu || _march
=""
1964 _target_arch
='ARCH_SPARC = yes'
1967 echocheck
"CPU type"
1969 case "`echo $karch`" in
1974 sun4u
) proc
=ultrasparc _vis
='yes' ;;
1989 _target_arch
='ARCH_SPARC = yes'
1998 arm|armv4l|armv5tel
)
2000 _target_arch
='ARCH_ARMV4L = yes'
2010 _target_arch
='ARCH_SH3 = yes'
2020 _def_dcbzl
='#undef HAVE_DCBZL'
2021 _target_arch
='ARCH_POWERPC = yes'
2028 echocheck
"CPU type"
2029 case $system_name in
2031 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
2032 if test -n "`$_cpuinfo | grep altivec`"; then
2033 test $_altivec = auto
&& _altivec
=yes
2037 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
2038 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
2039 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
2040 test $_altivec = auto
&& _altivec
=yes
2044 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2046 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2049 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
2050 test $_altivec = auto
&& _altivec
=yes
2056 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
2059 if test "$_altivec" = yes; then
2060 echores
"$proc altivec"
2066 echocheck
"GCC & CPU optimization abilities"
2068 if test -n "$proc"; then
2070 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2071 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2072 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2073 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2074 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2075 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2076 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2077 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2078 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2081 # gcc 3.1(.1) and up supports 7400 and 7450
2082 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2084 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2085 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2089 # gcc 3.2 and up supports 970
2090 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2092 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2093 _def_dcbzl
='#define HAVE_DCBZL 1' ;;
2097 # gcc 3.3 and up supports POWER4
2098 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2100 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2104 # gcc 3.4 and up supports 440*
2105 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2107 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2108 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2112 # gcc 4.0 and up supports POWER5
2113 if test "$_cc_major" -ge "4"; then
2115 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2121 if test -n "$_mcpu"; then
2122 _optimizing
=`echo $_mcpu | cut -c 8-`
2123 echores
"$_optimizing"
2132 _target_arch
='ARCH_ALPHA = yes'
2136 echocheck
"CPU type"
2139 unsigned long ver, mask;
2140 asm ("implver %0" : "=r" (ver));
2141 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2142 printf("%ld-%x\n", ver, ~mask);
2146 $_cc -o "$TMPEXE" "$TMPC"
2149 0-0) proc
="ev4"; _mvi
="0";;
2150 1-0) proc
="ev5"; _mvi
="0";;
2151 1-1) proc
="ev56"; _mvi
="0";;
2152 1-101) proc
="pca56"; _mvi
="1";;
2153 2-303) proc
="ev6"; _mvi
="1";;
2154 2-307) proc
="ev67"; _mvi
="1";;
2155 2-1307) proc
="ev68"; _mvi
="1";;
2159 echocheck
"GCC & CPU optimization abilities"
2160 if test "$proc" = "ev68" ; then
2161 cc_check
-mcpu=$proc || proc
=ev67
2163 if test "$proc" = "ev67" ; then
2164 cc_check
-mcpu=$proc || proc
=ev6
2171 echocheck
"MVI instruction support in GCC"
2172 if test "$_cc_major" -ge "3" && test "$_mvi" = "1" ; then
2173 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2176 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2177 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2183 _target_arch
='ARCH_SGI_MIPS = yes'
2191 echocheck
"CPU type"
2192 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2193 case "`echo $proc`" in
2194 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2195 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2196 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2197 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2198 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2199 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2201 # gcc < 3.x does not support -mtune.
2202 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2212 _target_arch
='ARCH_PA_RISC = yes'
2222 _target_arch
='ARCH_S390 = yes'
2232 _target_arch
='ARCH_S390X = yes'
2242 _target_arch
='ARCH_VAX = yes'
2252 _target_arch
='ARCH_XTENSA = yes'
2262 _target_arch
='ARCH_GENERIC = yes'
2271 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2272 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2273 die
"unsupported architecture $host_arch"
2275 esac # case "$host_arch" in
2277 if test "$_runtime_cpudetection" = yes ; then
2279 test "$_cmov" != no
&& _cmov
=yes
2281 test "$_mmx" != no
&& _mmx
=yes
2282 test "$_3dnow" != no
&& _3dnow
=yes
2283 test "$_3dnowext" != no
&& _3dnowext
=yes
2284 test "$_mmxext" != no
&& _mmxext
=yes
2285 test "$_sse" != no
&& _sse
=yes
2286 test "$_sse2" != no
&& _sse2
=yes
2287 test "$_ssse3" != no
&& _ssse3
=yes
2288 test "$_mtrr" != no
&& _mtrr
=yes
2297 echocheck
"assembler support of -pipe option"
2299 int main(void) { return 0; }
2301 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2304 echocheck
"compiler support of named assembler arguments"
2306 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2307 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2308 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2310 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2312 echores
$_named_asm_args
2315 if darwin
&& test "$cc_vendor" = "gnu" ; then
2316 echocheck
"GCC support of -mstackrealign"
2317 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
2318 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
2319 # crashes when loading Win32 DLLs. Unfortunately some gcc versions create
2320 # wrong code with this flag, but this can be worked around by adding
2321 # -fno-unit-at-a-time as described in the blog post at
2322 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
2324 __attribute__((noinline)) static int foo3(int i1, int i2, int i3) { return i3; }
2325 int main(void) { return foo3(1,2,3) == 3 ? 0 : 1; }
2327 cc_check
-O4 -mstackrealign && tmp_run
&& _stackrealign
=-mstackrealign
2328 test -z "$_stackrealign" && cc_check
-O4 -mstackrealign -fno-unit-at-a-time \
2329 && tmp_run
&& _stackrealign
="-mstackrealign -fno-unit-at-a-time"
2330 test -n "$_stackrealign" && echores
"yes" || echores
"no"
2331 fi # if darwin && test "$cc_vendor" = "gnu" ; then
2334 # Checking for CFLAGS
2336 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2337 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2339 elif test -z "$CFLAGS" ; then
2340 if test "$cc_vendor" = "intel" ; then
2341 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167 -wd556 -wd144"
2342 elif test "$cc_vendor" != "gnu" ; then
2343 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2345 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2350 if test -n "$LDFLAGS" ; then
2351 _ld_extra
="$_ld_extra $LDFLAGS"
2353 elif test "$cc_vendor" = "intel" ; then
2354 _ld_extra
="$_ld_extra -i-static"
2356 if test -n "$CPPFLAGS" ; then
2357 _inc_extra
="$_inc_extra $CPPFLAGS"
2364 # Checking assembler (_as) compatibility...
2365 # Added workaround for older as that reads from stdin by default - atmos
2366 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2367 echocheck
"assembler ($_as $as_version)"
2369 _pref_as_version
='2.9.1'
2371 if test "$_mmx" = yes ; then
2372 echo 'emms' >> $TMPS
2374 if test "$_3dnow" = yes ; then
2375 _pref_as_version
='2.10.1'
2376 echo 'femms' >> $TMPS
2378 if test "$_3dnowext" = yes ; then
2379 _pref_as_version
='2.10.1'
2380 echo 'pswapd %mm0, %mm0' >> $TMPS
2382 if test "$_mmxext" = yes ; then
2383 _pref_as_version
='2.10.1'
2384 echo 'movntq %mm0, (%eax)' >> $TMPS
2386 if test "$_sse" = yes ; then
2387 _pref_as_version
='2.10.1'
2388 echo 'xorps %xmm0, %xmm0' >> $TMPS
2390 #if test "$_sse2" = yes ; then
2391 # _pref_as_version='2.11'
2392 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2394 if test "$_cmov" = yes ; then
2395 _pref_as_version
='2.10.1'
2396 echo 'cmovb %eax, %ebx' >> $TMPS
2398 if test "$_ssse3" = yes ; then
2399 _pref_as_version
='2.16.92'
2400 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2402 $_as $TMPS -o $TMPEXE > /dev
/null
2>&1 || as_verc_fail
=yes
2404 if test "$as_verc_fail" != yes ; then
2407 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2409 die
"obsolete binutils version"
2414 echocheck
".align is a power of two"
2415 if test "$_asmalign_pot" = auto
; then
2418 main(void) { asm (".align 3"); }
2420 cc_check
&& _asmalign_pot
=yes
2422 if test "$_asmalign_pot" = "yes" ; then
2423 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2425 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2427 echores
$_asmalign_pot
2430 #FIXME: This should happen before the check for CFLAGS..
2433 # check if altivec is supported by the compiler, and how to enable it
2435 _altivec_gcc_flags
=''
2437 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2438 echocheck
"GCC altivec support"
2446 FSF_flags
='-maltivec -mabi=altivec'
2447 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2449 # check for Darwin-style flags first, since
2450 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2451 # accepts but ignores FSF-style flags...
2453 if test -z "$p"; then
2454 cc_check
$Darwin_flags && p
='Darwin'
2456 if test -z "$p"; then
2457 cc_check
$FSF_flags && p
='FSF'
2461 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2462 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2466 if test -z "$p"; then
2469 p
="$p-style ($_altivec_gcc_flags)"
2475 # check if <altivec.h> should be included
2477 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2479 if test "$_altivec" = yes ; then
2480 echocheck
"altivec.h"
2482 #include <altivec.h>
2483 int main(void) { return 0; }
2486 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2487 if test "$_have_altivec_h" = yes ; then
2488 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2490 echores
"$_have_altivec_h"
2493 # disable runtime cpudetection if
2494 # - we cannot generate altivec code
2495 # - altivec is disabled by the user
2497 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2498 _runtime_cpudetection
=no
2501 # show that we are optimizing for altivec (if enabled and supported)
2503 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2504 _optimizing
="$_optimizing altivec"
2507 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2509 if test "$_altivec" = yes ; then
2510 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2511 #_mcpu="$_mcpu $_altivec_gcc_flags"
2512 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2517 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2518 if test $_armv5te = "auto" ; then
2521 __asm__ __volatile__ ("qadd r0, r0, r0");
2525 cc_check
&& _armv5te
=yes
2529 echocheck
"ARMv6 (SIMD instructions)"
2530 if test $_armv6 = "auto" ; then
2532 int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); }
2535 cc_check
&& _armv6
=yes
2539 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2540 if test $_iwmmxt = "auto" ; then
2543 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2547 cc_check
&& _iwmmxt
=yes
2552 _cpuexts_all
='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 IWMMXT MLIB MMI SH4 VIS MVI'
2553 test "$_altivec" = yes && _cpuexts
="ALTIVEC $_cpuexts"
2554 test "$_mmx" = yes && _cpuexts
="MMX $_cpuexts"
2555 test "$_mmxext" = yes && _cpuexts
="MMX2 $_cpuexts"
2556 test "$_3dnow" = yes && _cpuexts
="3DNOW $_cpuexts"
2557 test "$_3dnowext" = yes && _cpuexts
="3DNOWEX $_cpuexts"
2558 test "$_sse" = yes && _cpuexts
="SSE $_cpuexts"
2559 test "$_sse2" = yes && _cpuexts
="SSE2 $_cpuexts"
2560 test "$_ssse3" = yes && _cpuexts
="SSSE3 $_cpuexts"
2561 test "$_cmov" = yes && _cpuexts
="CMOV $_cpuexts"
2562 test "$_fast_cmov" = yes && _cpuexts
="FAST_CMOV $_cpuexts"
2563 test "$_armv5te" = yes && _cpuexts
="ARMV5TE $_cpuexts"
2564 test "$_armv6" = yes && _cpuexts
="ARMV6 $_cpuexts"
2565 test "$_iwmmxt" = yes && _cpuexts
="IWMMXT $_cpuexts"
2566 test "$_vis" = yes && _cpuexts
="VIS $_cpuexts"
2567 test "$_mvi" = yes && _cpuexts
="MVI $_cpuexts"
2569 # Checking kernel version...
2570 if x86_32
&& linux
; then
2572 kernel_version
=`uname -r 2>&1`
2573 echocheck
"$system_name kernel version"
2574 case "$kernel_version" in
2575 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2576 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2577 _k_verc_problem
=yes;;
2579 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2582 if test "$_k_verc_fail" ; then
2583 echores
"$kernel_version, fail"
2584 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2585 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2586 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2587 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2588 echo "2.2.x you must upgrade it to get SSE support!"
2589 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2591 echores
"$kernel_version, ok"
2595 ######################
2596 # MAIN TESTS GO HERE #
2597 ######################
2602 int main(void) { return 0; }
2604 if cc_check
-lposix ; then
2605 _ld_extra
="$_ld_extra -lposix"
2613 int main(void) { return 0; }
2615 if cc_check
-lm ; then
2624 echocheck
"langinfo"
2625 if test "$_langinfo" = auto
; then
2627 #include <langinfo.h>
2628 int main(void) { nl_langinfo(CODESET); return 0; }
2631 cc_check
&& _langinfo
=yes
2633 if test "$_langinfo" = yes ; then
2634 _def_langinfo
='#define USE_LANGINFO 1'
2636 _def_langinfo
='#undef USE_LANGINFO'
2638 echores
"$_langinfo"
2641 echocheck
"language"
2642 test -z "$_language" && _language
=$LINGUAS
2643 _language
=`echo $_language | sed 's/,/ /g'`
2644 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2645 for lang
in $_language ; do
2646 test "$lang" = all
&& lang
=en
2647 if test -f "help/help_mp-${lang}.h" ; then
2651 echo ${_echo_n} "$lang not found, ${_echo_c}"
2652 _language
=`echo $_language | sed "s/$lang *//"`
2655 test -z "$_language" && _language
=en
2656 _mp_help
="help/help_mp-${_language}.h"
2657 test -f $_mp_help || die
"$_mp_help not found"
2658 for lang
in $LANGUAGES ; do
2659 if test -f "DOCS/man/$lang/mplayer.1" ; then
2660 MAN_LANG
="$lang $MAN_LANG"
2663 _doc_lang
=$_language
2664 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2665 echores
"using $_language (man pages: $MAN_LANG)"
2668 echocheck
"enable sighandler"
2669 if test "$_sighandler" = yes ; then
2670 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2672 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2674 echores
"$_sighandler"
2676 echocheck
"runtime cpudetection"
2677 if test "$_runtime_cpudetection" = yes ; then
2678 _optimizing
="Runtime CPU-Detection enabled"
2679 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2681 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2683 echores
"$_runtime_cpudetection"
2686 echocheck
"restrict keyword"
2687 for restrict_keyword
in restrict __restrict __restrict__
; do
2688 echo "void foo(char * $restrict_keyword p); int main(void){}" > $TMPC
2690 _def_restrict_keyword
=$restrict_keyword
2694 if [ -n "$_def_restrict_keyword" ]; then
2695 echores
"$_def_restrict_keyword"
2699 # Avoid infinite recursion loop ("#define restrict restrict")
2700 if [ "$_def_restrict_keyword" != "restrict" ]; then
2701 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2703 _def_restrict_keyword
=""
2707 echocheck
"__builtin_expect"
2708 # GCC branch prediction hint
2711 a = __builtin_expect (a, 10);
2712 return a == 10 ? 0 : 1;
2714 int main(void) { return foo(10) && foo(0); }
2717 cc_check
&& _builtin_expect
=yes
2718 if test "$_builtin_expect" = yes ; then
2719 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2721 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2723 echores
"$_builtin_expect"
2729 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2732 cc_check
-lkstat && _kstat
=yes
2733 if test "$_kstat" = yes ; then
2734 _def_kstat
="#define HAVE_LIBKSTAT 1"
2735 _ld_extra
="$_ld_extra -lkstat"
2737 _def_kstat
="#undef HAVE_LIBKSTAT"
2743 # required for nanosleep on some systems
2746 int main(void) { (void) nanosleep(0, 0); return 0; }
2749 cc_check
-lposix4 && _posix4
=yes
2750 if test "$_posix4" = yes ; then
2751 _ld_extra
="$_ld_extra -lposix4"
2758 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2761 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2762 if test "$_lrintf" = yes ; then
2763 _def_lrintf
="#define HAVE_LRINTF 1"
2765 _def_lrintf
="#undef HAVE_LRINTF"
2773 int main(void) { char a; mkstemp(&a); return 0; }
2776 cc_check
&& _mkstemp
=yes
2777 if test "$_mkstemp" = yes ; then
2778 _def_mkstemp
='#define HAVE_MKSTEMP 1'
2780 _def_mkstemp
='#undef HAVE_MKSTEMP'
2785 echocheck
"nanosleep"
2786 # also check for nanosleep
2789 int main(void) { (void) nanosleep(0, 0); return 0; }
2792 cc_check
&& _nanosleep
=yes
2793 if test "$_nanosleep" = yes ; then
2794 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2796 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2798 echores
"$_nanosleep"
2802 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2803 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2806 #include <sys/socket.h>
2807 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2810 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2811 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2813 if test $_winsock2 = auto
&& ! cygwin
; then
2816 #include <winsock2.h>
2817 int main(void) { (void) gethostbyname(0); return 0; }
2819 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2821 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2825 if test $_winsock2 = yes ; then
2827 _def_winsock2
='#define HAVE_WINSOCK2 1'
2829 _def_winsock2
='#undef HAVE_WINSOCK2'
2834 echocheck
"inet_pton()"
2836 #include <sys/types.h>
2837 #include <sys/socket.h>
2838 #include <arpa/inet.h>
2839 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2841 if test "$_winsock2" = yes ; then
2842 _res_comment
="using winsock2 functions instead"
2844 elif cc_check
$_ld_sock ; then
2845 # NOTE: Linux has libresolv but does not need it
2847 _res_comment
="using $_ld_sock"
2849 elif cc_check
$_ld_sock -lresolv ; then
2850 # NOTE: needed for SunOS at least
2851 _ld_sock
="$_ld_sock -lresolv"
2852 _res_comment
="using $_ld_sock"
2855 _res_comment
="trying inet_aton next"
2858 echocheck
"inet_aton()"
2860 #include <sys/types.h>
2861 #include <sys/socket.h>
2862 #include <arpa/inet.h>
2863 int main(void) { (void) inet_aton(0, 0); return 0; }
2866 if cc_check
$_ld_sock ; then
2867 # NOTE: Linux has libresolv but does not need it
2869 _res_comment
="using $_ld_sock"
2870 elif cc_check
$_ld_sock -lresolv ; then
2871 # NOTE: needed for SunOS at least
2872 _ld_sock
="$_ld_sock -lresolv"
2873 _res_comment
="using $_ld_sock"
2877 _res_comment
="network support disabled"
2879 echores
"$_use_aton"
2882 _def_use_aton
='#undef USE_ATON'
2883 if test "$_use_aton" = yes; then
2884 _def_use_aton
='#define USE_ATON 1'
2888 # FIXME network check
2889 if test "$_network" = yes ; then
2890 _def_network
='#define MPLAYER_NETWORK 1'
2891 _ld_extra
="$_ld_extra $_ld_sock"
2892 _inputmodules
="network $_inputmodules"
2894 _noinputmodules
="network $_noinputmodules"
2895 _def_network
='#undef MPLAYER_NETWORK'
2900 echocheck
"inttypes.h (required)"
2902 #include <inttypes.h>
2903 int main(void) { return 0; }
2906 cc_check
&& _inttypes
=yes
2907 echores
"$_inttypes"
2909 if test "$_inttypes" = no
; then
2910 echocheck
"bitypes.h (inttypes.h predecessor)"
2912 #include <sys/bitypes.h>
2913 int main(void) { return 0; }
2915 cc_check
&& _inttypes
=yes
2916 if test "$_inttypes" = yes ; then
2917 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."
2919 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
2924 echocheck
"int_fastXY_t in inttypes.h"
2926 #include <inttypes.h>
2928 volatile int_fast16_t v= 0;
2932 cc_check
&& _fast_inttypes
=yes
2933 if test "$_fast_inttypes" = yes ; then
2937 _def_fast_inttypes
='
2938 typedef signed char int_fast8_t;
2939 typedef signed int int_fast16_t;
2940 typedef signed int int_fast32_t;
2941 typedef signed long long int_fast64_t;
2942 typedef unsigned char uint_fast8_t;
2943 typedef unsigned int uint_fast16_t;
2944 typedef unsigned int uint_fast32_t;
2945 typedef unsigned long long uint_fast64_t;'
2947 echores
"$_fast_inttypes"
2950 echocheck
"word size"
2951 _mp_wordsize
="#undef MP_WORDSIZE"
2954 #include <sys/types.h>
2955 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2957 cc_check
&& _wordsize
=`$TMPEXE` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2958 echores
"$_wordsize"
2961 echocheck
"malloc.h"
2964 int main(void) { (void) malloc(0); return 0; }
2967 cc_check
&& _malloc
=yes
2968 if test "$_malloc" = yes ; then
2969 _def_malloc
='#define HAVE_MALLOC_H 1'
2971 _def_malloc
='#undef HAVE_MALLOC_H'
2973 # malloc.h emits a warning in FreeBSD and OpenBSD
2974 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2978 echocheck
"memalign()"
2979 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2982 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2985 cc_check
&& _memalign
=yes
2986 if test "$_memalign" = yes ; then
2987 _def_memalign
='#define HAVE_MEMALIGN 1'
2989 _def_memalign
='#undef HAVE_MEMALIGN'
2990 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2991 darwin || _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2993 echores
"$_memalign"
2996 echocheck
"alloca.h"
2999 int main(void) { (void) alloca(0); return 0; }
3002 cc_check
&& _alloca
=yes
3004 _def_alloca
='#define HAVE_ALLOCA_H 1'
3006 _def_alloca
='#undef HAVE_ALLOCA_H'
3013 #include <sys/types.h>
3014 #include <sys/mman.h>
3015 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
3018 cc_check
&& _mman
=yes
3019 if test "$_mman" = yes ; then
3020 _def_mman
='#define HAVE_SYS_MMAN_H 1'
3022 _def_mman
='#undef HAVE_SYS_MMAN_H'
3027 #include <sys/types.h>
3028 #include <sys/mman.h>
3029 int main(void) { void *p = MAP_FAILED; return 0; }
3031 _mman_has_map_failed
=no
3032 cc_check
&& _mman_has_map_failed
=yes
3033 if test "$_mman_has_map_failed" = yes ; then
3034 _def_mman_has_map_failed
=''
3036 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3039 echocheck
"dynamic loader"
3042 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
3045 for _ld_tmp
in "" "-ldl" ; do
3046 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3048 if test "$_dl" = yes ; then
3049 _def_dl
='#define HAVE_LIBDL 1'
3051 _def_dl
='#undef HAVE_LIBDL'
3056 echocheck
"dynamic a/v plugins support"
3057 if test "$_dl" = no
; then
3060 if test "$_dynamic_plugins" = yes ; then
3061 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
3063 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3065 echores
"$_dynamic_plugins"
3068 _def_threads
='#undef HAVE_THREADS'
3071 if test "$_pthreads" = auto
; then
3073 #include <pthread.h>
3074 void* func(void *arg) { return arg; }
3075 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3079 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3080 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3081 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3085 if test "$_pthreads" = yes ; then
3086 _res_comment
="using $_ld_pthread"
3087 _def_pthreads
='#define HAVE_PTHREADS 1'
3088 _def_threads
='#define HAVE_THREADS 1'
3090 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3091 _def_pthreads
='#undef HAVE_PTHREADS'
3092 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3093 mingw32 || _win32dll
=no
3095 echores
"$_pthreads"
3097 echocheck
"w32threads"
3098 if test "$_pthreads" = yes ; then
3099 _res_comment
="using pthread instead"
3102 if test "$_w32threads" = auto
; then
3104 mingw32
&& _w32threads
=yes
3106 test "$_w32threads" = yes && _def_threads
='#define HAVE_THREADS 1'
3107 echores
"$_w32threads"
3111 if test "$_rpath" = yes ; then
3112 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3113 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3120 if test "$_iconv" = auto
; then
3125 #define INBUFSIZE 1024
3126 #define OUTBUFSIZE 4096
3128 char inbuffer[INBUFSIZE];
3129 char outbuffer[OUTBUFSIZE];
3134 char *tocode="UTF-8";
3135 char *fromcode="cp1250";
3136 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3137 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3138 char *iptr=inbuffer;
3139 char *optr=outbuffer;
3140 size_t inleft=numread;
3141 size_t outleft=OUTBUFSIZE;
3142 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3144 write (1, outbuffer, OUTBUFSIZE - outleft);
3147 if (iconv_close(icdsc) == -1)
3153 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3154 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3158 if test "$_iconv" = yes ; then
3159 _def_iconv
='#define USE_ICONV 1'
3161 _def_iconv
='#undef USE_ICONV'
3166 echocheck
"soundcard.h"
3168 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3169 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3170 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3172 #include <$_soundcard_header>
3173 int main(void) { return 0; }
3175 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3178 if test "$_soundcard_h" = yes ; then
3179 if test $_soundcard_header = "sys/soundcard.h"; then
3180 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3182 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3185 echores
"$_soundcard_h"
3188 echocheck
"sys/dvdio.h"
3191 #include <sys/dvdio.h>
3192 int main(void) { return 0; }
3195 cc_check
&& _dvdio
=yes
3196 if test "$_dvdio" = yes ; then
3197 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3199 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3204 echocheck
"sys/cdio.h"
3207 #include <sys/cdio.h>
3208 int main(void) { return 0; }
3211 cc_check
&& _cdio
=yes
3212 if test "$_cdio" = yes ; then
3213 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3215 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3220 echocheck
"linux/cdrom.h"
3222 #include <sys/types.h>
3223 #include <linux/cdrom.h>
3224 int main(void) { return 0; }
3227 cc_check
&& _cdrom
=yes
3228 if test "$_cdrom" = yes ; then
3229 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3231 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3239 int main(void) { return 0; }
3242 cc_check
&& _dvd
=yes
3243 if test "$_dvd" = yes ; then
3244 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3246 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3252 echocheck
"BSDI dvd.h"
3255 int main(void) { return 0; }
3258 cc_check
&& _bsdi_dvd
=yes
3259 if test "$_bsdi_dvd" = yes ; then
3260 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3262 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3264 echores
"$_bsdi_dvd"
3269 # also used by AIX, but AIX does not support VCD and/or libdvdread
3270 echocheck
"HP-UX SCSI header"
3272 #include <sys/scsi.h>
3273 int main(void) { return 0; }
3276 cc_check
&& _hpux_scsi_h
=yes
3277 if test "$_hpux_scsi_h" = yes ; then
3278 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3280 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3282 echores
"$_hpux_scsi_h"
3287 echocheck
"userspace SCSI headers (Solaris)"
3289 # include <unistd.h>
3290 # include <stropts.h>
3291 # include <sys/scsi/scsi_types.h>
3292 # include <sys/scsi/impl/uscsi.h>
3293 int main(void) { return 0; }
3296 cc_check
&& _sol_scsi_h
=yes
3297 if test "$_sol_scsi_h" = yes ; then
3298 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3300 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3302 echores
"$_sol_scsi_h"
3307 if test "$_termcap" = auto
; then
3309 int main(void) { tgetent(); return 0; }
3312 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3313 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3314 && _termcap
=yes && break
3317 if test "$_termcap" = yes ; then
3318 _def_termcap
='#define USE_TERMCAP 1'
3319 _res_comment
="using $_ld_tmp"
3321 _def_termcap
='#undef USE_TERMCAP'
3327 _def_termios
='#undef HAVE_TERMIOS'
3328 _def_termios_h
='#undef HAVE_TERMIOS_H'
3329 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3330 if test "$_termios" = auto
; then
3332 for _termios_header
in "sys/termios.h" "termios.h"; do
3334 #include <$_termios_header>
3335 int main(void) { return 0; }
3337 cc_check
&& _termios
=yes && _res_comment
="$_termios_header" && break
3341 if test "$_termios" = yes ; then
3342 _def_termios
='#define HAVE_TERMIOS 1'
3343 if test "$_termios_header" = "termios.h" ; then
3344 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3346 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3353 if test "$_shm" = auto
; then
3355 #include <sys/types.h>
3356 #include <sys/shm.h>
3357 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3360 cc_check
&& _shm
=yes
3362 if test "$_shm" = yes ; then
3363 _def_shm
='#define HAVE_SHM 1'
3365 _def_shm
='#undef HAVE_SHM'
3370 echocheck
"strsep()"
3373 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3376 cc_check
&& _strsep
=yes
3377 if test "$_strsep" = yes ; then
3378 _def_strsep
='#define HAVE_STRSEP 1'
3381 _def_strsep
='#undef HAVE_STRSEP'
3387 echocheck
"vsscanf()"
3390 int main(void) { vsscanf(0, 0, 0); return 0; }
3393 cc_check
&& _vsscanf
=yes
3394 if test "$_vsscanf" = yes ; then
3395 _def_vsscanf
='#define HAVE_VSSCANF 1'
3398 _def_vsscanf
='#undef HAVE_VSSCANF'
3407 int main(void) { swab(0, 0, 0); return 0; }
3410 cc_check
&& _swab
=yes
3411 if test "$_swab" = yes ; then
3412 _def_swab
='#define HAVE_SWAB 1'
3415 _def_swab
='#undef HAVE_SWAB'
3420 echocheck
"POSIX select()"
3424 #include <sys/types.h>
3426 #include <sys/time.h>
3428 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3431 _def_posix_select
='#undef HAVE_POSIX_SELECT'
3432 cc_check
&& _posix_select
=yes \
3433 && _def_posix_select
='#define HAVE_POSIX_SELECT 1'
3434 echores
"$_posix_select"
3437 echocheck
"gettimeofday()"
3440 #include <sys/time.h>
3441 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3444 cc_check
&& _gettimeofday
=yes
3445 if test "$_gettimeofday" = yes ; then
3446 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3447 _need_gettimeofday
=no
3449 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3450 _need_gettimeofday
=yes
3452 echores
"$_gettimeofday"
3459 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3462 cc_check
&& _glob
=yes
3463 if test "$_glob" = yes ; then
3464 _def_glob
='#define HAVE_GLOB 1'
3467 _def_glob
='#undef HAVE_GLOB'
3473 echocheck
"setenv()"
3476 int main (void){ setenv("","",0); return 0; }
3479 cc_check
&& _setenv
=yes
3480 if test "$_setenv" = yes ; then
3481 _def_setenv
='#define HAVE_SETENV 1'
3484 _def_setenv
='#undef HAVE_SETENV'
3491 echocheck
"sysi86()"
3493 #include <sys/sysi86.h>
3494 int main (void) { sysi86(0); return 0; }
3497 cc_check
&& _sysi86
=yes
3498 if test "$_sysi86" = yes ; then
3499 _def_sysi86
='#define HAVE_SYSI86 1'
3501 #include <sys/sysi86.h>
3502 int main (void) { int sysi86(int, void*); sysi86(0); return 0; }
3504 cc_check
&& _def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3506 _def_sysi86
='#undef HAVE_SYSI86'
3512 echocheck
"sys/sysinfo.h"
3514 #include <sys/sysinfo.h>
3516 struct sysinfo s_info;
3522 cc_check
&& _sys_sysinfo
=yes
3523 if test "$_sys_sysinfo" = yes ; then
3524 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3526 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3528 echores
"$_sys_sysinfo"
3533 echocheck
"Mac OS X APIs"
3534 if test "$_macosx" = auto
; then
3535 productName
=`/usr/bin/sw_vers -productName`
3536 if test "$productName" = "Mac OS X" ||
3537 test "$productName" = "Mac OS X Server" ; then
3541 _def_macosx
='#undef MACOSX'
3542 _noaomodules
="macosx $_noaomodules"
3543 _novomodules
="quartz $_novomodules"
3546 if test "$_macosx" = yes ; then
3548 #include <Carbon/Carbon.h>
3549 #include <QuickTime/QuickTime.h>
3550 #include <CoreAudio/CoreAudio.h>
3554 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3557 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3558 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3559 _def_macosx
='#define MACOSX 1'
3560 _aosrc
="$_aosrc ao_macosx.c"
3561 _aomodules
="macosx $_aomodules"
3562 _vosrc
="$_vosrc vo_quartz.c"
3563 _vomodules
="quartz $_vomodules"
3566 _def_macosx
='#undef MACOSX'
3567 _noaomodules
="macosx $_noaomodules"
3568 _novomodules
="quartz $_novomodules"
3571 #include <Carbon/Carbon.h>
3572 #include <QuartzCore/CoreVideo.h>
3575 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3576 _vosrc
="$_vosrc vo_macosx.m"
3577 _vomodules
="macosx $_vomodules"
3578 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3579 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3580 _macosx_corevideo
=yes
3582 _novomodules
="macosx $_novomodules"
3583 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3584 _macosx_corevideo
=no
3589 echocheck
"Mac OS X Finder Support"
3590 if test "$_macosx_finder_support" = auto
; then
3591 _macosx_finder_support
=$_macosx
3593 if test "$_macosx_finder_support" = yes; then
3594 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3595 _macosx_finder_support
=yes
3597 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3598 _macosx_finder_support
=no
3600 echores
"$_macosx_finder_support"
3602 echocheck
"Mac OS X Bundle file locations"
3603 if test "$_macosx_bundle" = auto
; then
3604 _macosx_bundle
=$_macosx_finder_support
3606 if test "$_macosx_bundle" = yes; then
3607 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3609 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3612 echores
"$_macosx_bundle"
3614 echocheck
"Apple Remote"
3615 if test "$_apple_remote" = auto
; then
3619 #include <IOKit/IOCFPlugIn.h>
3620 int main (int argc, const char * argv[])
3622 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3623 CFMutableDictionaryRef hidMatchDictionary;
3624 IOReturn ioReturnValue;
3626 // Set up a matching dictionary to search the I/O Registry by class.
3627 // name for all HID class devices
3628 hidMatchDictionary = IOServiceMatching("AppleIRController");
3630 // Now search I/O Registry for matching devices.
3631 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault,
3632 hidMatchDictionary, &hidObjectIterator);
3634 // If search is unsuccessful, return nonzero.
3635 if (ioReturnValue != kIOReturnSuccess ||
3636 !IOIteratorIsValid(hidObjectIterator)) {
3642 cc_check
-framework IOKit
&& tmp_run
&& _apple_remote
=yes
3644 if test "$_apple_remote" = yes ; then
3645 _def_apple_remote
='#define HAVE_APPLE_REMOTE 1'
3646 _ld_extra
="$_ld_extra -framework IOKit"
3648 _def_apple_remote
='#undef HAVE_APPLE_REMOTE'
3650 echores
"$_apple_remote"
3655 echocheck
"pkg-config"
3656 _pkg_config
=pkg-config
3657 if `$_pkg_config --version > /dev/null 2>&1`; then
3658 if test "$_ld_static"; then
3659 _pkg_config
="$_pkg_config --static"
3668 echocheck
"Samba support (libsmbclient)"
3669 if test "$_smbsupport" = yes; then
3670 _ld_extra
="$_ld_extra -lsmbclient"
3672 if test "$_smbsupport" = auto
; then
3675 #include <libsmbclient.h>
3676 int main(void) { smbc_opendir("smb://"); return 0; }
3678 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3679 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3680 _smbsupport
=yes && break
3684 if test "$_smbsupport" = yes; then
3685 _def_smbsupport
="#define LIBSMBCLIENT"
3686 _inputmodules
="smb $_inputmodules"
3688 _def_smbsupport
="#undef LIBSMBCLIENT"
3689 _noinputmodules
="smb $_noinputmodules"
3691 echores
"$_smbsupport"
3700 if test "$_tdfxfb" = yes ; then
3701 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3702 _vosrc
="$_vosrc vo_tdfxfb.c"
3703 _vomodules
="tdfxfb $_vomodules"
3705 _def_tdfxfb
='#undef HAVE_TDFXFB'
3706 _novomodules
="tdfxfb $_novomodules"
3711 if test "$_s3fb" = yes ; then
3712 _def_s3fb
='#define HAVE_S3FB 1'
3713 _vosrc
="$_vosrc vo_s3fb.c"
3714 _vomodules
="s3fb $_vomodules"
3716 _def_s3fb
='#undef HAVE_S3FB'
3717 _novomodules
="s3fb $_novomodules"
3722 if test "$_tdfxvid" = yes ; then
3723 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3724 _vosrc
="$_vosrc vo_tdfx_vid.c"
3725 _vomodules
="tdfx_vid $_vomodules"
3727 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3728 _novomodules
="tdfx_vid $_novomodules"
3733 if test "$_xvr100" = auto
; then
3736 #include <sys/fbio.h>
3737 #include <sys/visual_io.h>
3739 struct vis_identifier ident;
3740 struct fbgattr attr;
3742 ioctl(0, VIS_GETIDENTIFIER, &ident);
3743 ioctl(0, FBIOGATTR, &attr);
3747 cc_check
&& _xvr100
=yes
3749 if test "$_xvr100" = yes ; then
3750 _def_xvr100
='#define HAVE_XVR100 1'
3751 _vosrc
="$_vosrc vo_xvr100.c"
3752 _vomodules
="xvr100 $_vomodules"
3754 _def_tdfxvid
='#undef HAVE_XVR100'
3755 _novomodules
="xvr100 $_novomodules"
3760 if test "$_tga" = yes ; then
3761 _def_tga
='#define HAVE_TGA 1'
3762 _vosrc
="$_vosrc vo_tga.c"
3763 _vomodules
="tga $_vomodules"
3765 _def_tga
='#undef HAVE_TGA'
3766 _novomodules
="tga $_novomodules"
3771 echocheck
"md5sum support"
3772 if test "$_md5sum" = yes; then
3773 _def_md5sum
="#define HAVE_MD5SUM"
3774 _vosrc
="$_vosrc vo_md5sum.c"
3775 _vomodules
="md5sum $_vomodules"
3777 _def_md5sum
="#undef HAVE_MD5SUM"
3778 _novomodules
="md5sum $_novomodules"
3784 if test "$_bl" = yes ; then
3785 _def_bl
='#define HAVE_BL 1'
3786 _vosrc
="$_vosrc vo_bl.c"
3787 _vomodules
="bl $_vomodules"
3789 _def_bl
='#undef HAVE_BL'
3790 _novomodules
="bl $_novomodules"
3795 echocheck
"DirectFB"
3796 if test "$_directfb" = auto
; then
3799 #include <directfb.h>
3800 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3802 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3803 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
3804 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3805 _inc_extra
="$_inc_extra $_inc_tmp" && break
3810 expr $1 \
* 65536 + $2 \
* 256 + $3
3813 if test "$_directfb" = yes; then
3815 #include <directfb_version.h>
3817 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3820 if $_cc -E $TMPC $_inc_extra > "$TMPEXE"; then
3821 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()'`
3822 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3823 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3824 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3825 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3826 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3827 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3828 _res_comment
="$_directfb_version"
3829 test "$_dfb_version" -ge `dfb_version 0 9 15` && _dfbmga
=yes
3831 _def_directfb_version
='#undef DIRECTFBVERSION'
3833 _res_comment
="version >=0.9.13 required"
3837 _res_comment
="failed to get version"
3840 echores
"$_directfb"
3842 if test "$_directfb" = yes ; then
3843 _def_directfb
='#define HAVE_DIRECTFB 1'
3844 _vosrc
="$_vosrc vo_directfb2.c"
3845 _vomodules
="directfb $_vomodules"
3846 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3848 _def_directfb
='#undef HAVE_DIRECTFB'
3849 _novomodules
="directfb $_novomodules"
3851 if test "$_dfbmga" = yes; then
3852 _vosrc
="$_vosrc vo_dfbmga.c"
3853 _vomodules
="dfbmga $_vomodules"
3854 _def_dfbmga
='#define HAVE_DFBMGA 1'
3856 _novomodules
="dfbmga $_novomodules"
3857 _def_dfbmga
='#undef HAVE_DFBMGA'
3861 echocheck
"X11 headers presence"
3863 _res_comment
="check if the dev(el) packages are installed"
3864 for I
in `echo $_inc_extra | sed s/-I//g` /usr
/include
; do
3865 if test -f "$I/X11/Xlib.h" ; then
3871 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/openwin
/include
; do
3872 if test -f "$I/X11/Xlib.h" ; then
3873 _inc_extra
="$_inc_extra -I$I"
3875 _res_comment
="using $I"
3879 echores
"$_x11_headers"
3883 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3885 #include <X11/Xlib.h>
3886 #include <X11/Xutil.h>
3887 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3889 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3890 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3892 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3894 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3896 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3897 && _x11
=yes && break
3900 if test "$_x11" = yes ; then
3901 _def_x11
='#define HAVE_X11 1'
3902 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3903 _vomodules
="x11 xover $_vomodules"
3906 _def_x11
='#undef HAVE_X11'
3907 _novomodules
="x11 $_novomodules"
3908 _res_comment
="check if the dev(el) packages are installed"
3909 # disable stuff that depends on X
3910 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
3918 if test "$_x11" = yes ; then
3920 #include <X11/Xmd.h>
3921 #include <X11/Xlib.h>
3922 #include <X11/Xutil.h>
3923 #include <X11/Xatom.h>
3924 #include <X11/extensions/dpms.h>
3926 (void) DPMSQueryExtension(0, 0, 0);
3929 cc_check
-lXdpms && _xdpms3
=yes
3931 #include <X11/Xlib.h>
3932 #include <X11/extensions/dpms.h>
3934 (void) DPMSQueryExtension(0, 0, 0);
3937 cc_check
-lXext && _xdpms4
=yes
3939 if test "$_xdpms4" = yes ; then
3940 _def_xdpms
='#define HAVE_XDPMS 1'
3941 _res_comment
="using Xdpms 4"
3943 elif test "$_xdpms3" = yes ; then
3944 _def_xdpms
='#define HAVE_XDPMS 1'
3945 _libs_mplayer
="$_libs_mplayer -lXdpms"
3946 _res_comment
="using Xdpms 3"
3949 _def_xdpms
='#undef HAVE_XDPMS'
3955 if test "$_xv" = auto
; then
3957 #include <X11/Xlib.h>
3958 #include <X11/extensions/Xvlib.h>
3960 (void) XvGetPortAttribute(0, 0, 0, 0);
3961 (void) XvQueryPortAttributes(0, 0, 0);
3965 cc_check
-lXv && _xv
=yes
3968 if test "$_xv" = yes ; then
3969 _def_xv
='#define HAVE_XV 1'
3970 _libs_mplayer
="$_libs_mplayer -lXv"
3971 _vosrc
="$_vosrc vo_xv.c"
3972 _vomodules
="xv $_vomodules"
3974 _def_xv
='#undef HAVE_XV'
3975 _novomodules
="xv $_novomodules"
3981 if test "$_xv" = yes && test "$_xvmc" != no
; then
3984 #include <X11/Xlib.h>
3985 #include <X11/extensions/Xvlib.h>
3986 #include <X11/extensions/XvMClib.h>
3988 (void) XvMCQueryExtension(0,0,0);
3989 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3992 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3993 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3996 if test "$_xvmc" = yes ; then
3997 _def_xvmc
='#define HAVE_XVMC 1'
3998 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
3999 _vosrc
="$_vosrc vo_xvmc.c"
4000 _vomodules
="xvmc $_vomodules"
4001 _res_comment
="using $_xvmclib"
4003 _def_xvmc
='#undef HAVE_XVMC'
4004 _novomodules
="xvmc $_novomodules"
4005 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
4010 echocheck
"Xinerama"
4011 if test "$_xinerama" = auto
; then
4013 #include <X11/Xlib.h>
4014 #include <X11/extensions/Xinerama.h>
4015 int main(void) { (void) XineramaIsActive(0); return 0; }
4018 cc_check
-lXinerama && _xinerama
=yes
4021 if test "$_xinerama" = yes ; then
4022 _def_xinerama
='#define HAVE_XINERAMA 1'
4023 _libs_mplayer
="$_libs_mplayer -lXinerama"
4025 _def_xinerama
='#undef HAVE_XINERAMA'
4027 echores
"$_xinerama"
4030 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4031 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4032 # named 'X extensions' or something similar.
4033 # This check may be useful for future mplayer versions (to change resolution)
4034 # If you run into problems, remove '-lXxf86vm'.
4036 if test "$_vm" = auto
; then
4038 #include <X11/Xlib.h>
4039 #include <X11/extensions/xf86vmode.h>
4040 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4043 cc_check
-lXxf86vm && _vm
=yes
4045 if test "$_vm" = yes ; then
4046 _def_vm
='#define HAVE_XF86VM 1'
4047 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
4049 _def_vm
='#undef HAVE_XF86VM'
4053 # Check for the presence of special keycodes, like audio control buttons
4054 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4055 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4056 # have these new keycodes.
4057 echocheck
"XF86keysym"
4058 if test "$_xf86keysym" = auto
; then
4061 #include <X11/Xlib.h>
4062 #include <X11/XF86keysym.h>
4063 int main(void) { return XF86XK_AudioPause; }
4065 cc_check
&& _xf86keysym
=yes
4067 if test "$_xf86keysym" = yes ; then
4068 _def_xf86keysym
='#define HAVE_XF86XK 1'
4070 _def_xf86keysym
='#undef HAVE_XF86XK'
4072 echores
"$_xf86keysym"
4075 if test "$_dga2" = auto
&& test "$_x11" = yes ; then
4077 #include <X11/Xlib.h>
4078 #include <X11/extensions/xf86dga.h>
4079 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4082 cc_check
-lXxf86dga && _dga2
=yes
4084 if test "$_dga1" = auto
&& test "$_dga2" = no
&& test "$_vm" = yes ; then
4086 #include <X11/Xlib.h>
4087 #include <X11/extensions/xf86dga.h>
4088 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4091 cc_check
-lXxf86dga -lXxf86vm && _dga1
=yes
4095 _def_dga
='#undef HAVE_DGA'
4096 _def_dga1
='#undef HAVE_DGA1'
4097 _def_dga2
='#undef HAVE_DGA2'
4098 if test "$_dga1" = yes ; then
4100 _def_dga1
='#define HAVE_DGA1 1'
4101 _res_comment
="using DGA 1.0"
4102 elif test "$_dga2" = yes ; then
4104 _def_dga2
='#define HAVE_DGA2 1'
4105 _res_comment
="using DGA 2.0"
4107 if test "$_dga" = yes ; then
4108 _def_dga
='#define HAVE_DGA 1'
4109 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4110 _vosrc
="$_vosrc vo_dga.c"
4111 _vomodules
="dga $_vomodules"
4113 _novomodules
="dga $_novomodules"
4119 if test "$_3dfx" = yes && test "$_dga" = yes ; then
4120 _def_3dfx
='#define HAVE_3DFX 1'
4121 _vosrc
="$_vosrc vo_3dfx.c"
4122 _vomodules
="3dfx $_vomodules"
4124 _def_3dfx
='#undef HAVE_3DFX'
4125 _novomodules
="3dfx $_novomodules"
4131 #Note: this test is run even with --enable-gl since we autodetect linker flags
4132 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4136 #include <windows.h>
4137 #include <GL/glext.h>
4139 #include <X11/Xlib.h>
4145 wglCreateContext(dc);
4147 glXCreateContext(NULL, NULL, NULL, True);
4154 if cc_check
-lGL $_ld_lm ; then
4156 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4157 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4159 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4160 elif cc_check
-DGL_WIN32 -lopengl32 ; then
4163 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4168 if test "$_gl" = yes ; then
4169 _def_gl
='#define HAVE_GL 1'
4170 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4171 if test "$_gl_win32" = yes ; then
4172 _def_gl_win32
='#define GL_WIN32 1'
4173 _vosrc
="$_vosrc w32_common.c"
4174 _res_comment
="win32 version"
4176 _vomodules
="opengl $_vomodules"
4178 _def_gl
='#undef HAVE_GL'
4179 _def_gl_win32
='#undef GL_WIN32'
4180 _novomodules
="opengl $_novomodules"
4187 _def_vidix
='#undef CONFIG_VIDIX'
4188 _def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4189 _vidix_drv_cyberblade
=no
4190 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4192 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4194 _def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4195 _vidix_drv_mach64
=no
4196 _def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4198 _def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4199 _vidix_drv_mga_crtc2
=no
4200 _def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4201 _vidix_drv_nvidia
=no
4202 _def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4204 _def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4206 _def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4207 _vidix_drv_radeon
=no
4208 _def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4209 _vidix_drv_rage128
=no
4210 _def_vidix_drv_savage
='#undef CONFIG_VIDIX_DRV_SAVAGE'
4211 _vidix_drv_savage
=no
4212 _def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4214 _def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4215 _vidix_drv_unichrome
=no
4216 if test "$_vidix_internal" = auto
; then
4218 x86
&& _vidix_internal
=yes
4219 ppc
&& linux
&& _vidix_internal
=yes
4220 alpha
&& linux
&& _vidix_internal
=yes
4221 qnx || beos || darwin
&& _vidix_internal
=no
4223 if test "$_vidix_internal" = yes; then
4224 _res_comment
="internal"
4227 elif test "$_vidix_external" = auto
; then
4230 #include <vidix/vidix.h>
4231 int main(void) { return 0; }
4233 cc_check
-lvidix && _vidix_external
=yes && _res_comment
="external" \
4238 if test "$_vidix" = yes ; then
4239 _def_vidix
='#define CONFIG_VIDIX 1'
4240 _vosrc
="$_vosrc vo_cvidix.c"
4241 _vomodules
="cvidix $_vomodules"
4242 test "$_vidix_drivers" || _vidix_drivers
="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 savage sis unichrome"
4243 test $_ivtv = "yes" || _vidix_drivers
=`echo $_vidix_drivers | sed s/ivtv//`
4245 # some vidix drivers are meant to work on x86 only, discard them elsewhere
4246 x86 || _vidix_drivers
=`echo $_vidix_drivers | sed -e s/cyberblade// -e s/sis// -e s/unichrome//`
4248 for driver
in $_vidix_drivers ; do
4249 uc_driver
=`echo $driver | tr '[a-z]' '[A-Z]'`
4250 eval _vidix_drv_
${driver}=yes
4251 eval _def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4254 _novomodules
="cvidix $_novomodules"
4257 if test "$_vidix_internal" = yes ; then
4258 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
4259 elif test "$_vidix_external" = yes ; then
4260 _libs_mplayer
="$_libs_mplayer -lvidix"
4261 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
4264 if test "$_vidix" = yes && win32
; then
4265 _vosrc
="$_vosrc vo_winvidix.c"
4266 _vomodules
="winvidix $_vomodules"
4267 _libs_mplayer
="$_libs_mplayer -lgdi32"
4269 _novomodules
="winvidix $_novomodules"
4271 if test "$_vidix" = yes && test "$_x11" = yes; then
4272 _vosrc
="$_vosrc vo_xvidix.c"
4273 _vomodules
="xvidix $_vomodules"
4275 _novomodules
="xvidix $_novomodules"
4278 echocheck
"VIDIX PCI device name database"
4279 echores
"$_vidix_pcidb"
4280 if test "$_vidix_pcidb" = yes ; then
4286 echocheck
"/dev/mga_vid"
4287 if test "$_mga" = auto
; then
4289 test -c /dev
/mga_vid
&& _mga
=yes
4291 if test "$_mga" = yes ; then
4292 _def_mga
='#define HAVE_MGA 1'
4293 _vosrc
="$_vosrc vo_mga.c"
4294 _vomodules
="mga $_vomodules"
4296 _def_mga
='#undef HAVE_MGA'
4297 _novomodules
="mga $_novomodules"
4303 if test "$_xmga" = auto
; then
4305 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4307 if test "$_xmga" = yes ; then
4308 _def_xmga
='#define HAVE_XMGA 1'
4309 _vosrc
="$_vosrc vo_xmga.c"
4310 _vomodules
="xmga $_vomodules"
4312 _def_xmga
='#undef HAVE_XMGA'
4313 _novomodules
="xmga $_novomodules"
4319 if test "$_ggi" = auto
; then
4321 #include <ggi/ggi.h>
4322 int main(void) { ggiInit(); return 0; }
4325 cc_check
-lggi && _ggi
=yes
4327 if test "$_ggi" = yes ; then
4328 _def_ggi
='#define HAVE_GGI 1'
4329 _libs_mplayer
="$_libs_mplayer -lggi"
4330 _vosrc
="$_vosrc vo_ggi.c"
4331 _vomodules
="ggi $_vomodules"
4333 _def_ggi
='#undef HAVE_GGI'
4334 _novomodules
="ggi $_novomodules"
4338 echocheck
"GGI extension: libggiwmh"
4339 if test "$_ggiwmh" = auto
; then
4342 #include <ggi/ggi.h>
4343 #include <ggi/wmh.h>
4344 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4346 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4348 # needed to get right output on obscure combination
4349 # like --disable-ggi --enable-ggiwmh
4350 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4351 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4352 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4355 _def_ggiwmh
='#undef HAVE_GGIWMH'
4361 if test "$_aa" = auto
; then
4364 extern struct aa_hardware_params aa_defparams;
4365 extern struct aa_renderparams aa_defrenderparams;
4369 (void) aa_init(0, 0, 0);
4370 c = aa_autoinit(&aa_defparams);
4371 p = aa_getrenderparams();
4372 aa_autoinitkbd(c,0);
4376 for _ld_tmp
in "-laa" ; do
4377 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4380 if test "$_aa" = yes ; then
4381 _def_aa
='#define HAVE_AA 1'
4383 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4385 _vosrc
="$_vosrc vo_aa.c"
4386 _vomodules
="aa $_vomodules"
4388 _def_aa
='#undef HAVE_AA'
4389 _novomodules
="aa $_novomodules"
4395 if test "$_caca" = auto
; then
4397 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4400 #ifdef CACA_API_VERSION_1
4403 int main(void) { (void) caca_init(); return 0; }
4405 cc_check
`caca-config --libs` && _caca
=yes
4408 if test "$_caca" = yes ; then
4409 _def_caca
='#define HAVE_CACA 1'
4410 _inc_extra
="$_inc_extra `caca-config --cflags`"
4411 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4412 _vosrc
="$_vosrc vo_caca.c"
4413 _vomodules
="caca $_vomodules"
4415 _def_caca
='#undef HAVE_CACA'
4416 _novomodules
="caca $_novomodules"
4422 if test "$_svga" = auto
; then
4425 int main(void) { return 0; }
4428 cc_check
-lvga $_ld_lm && _svga
=yes
4430 if test "$_svga" = yes ; then
4431 _def_svga
='#define HAVE_SVGALIB 1'
4432 _libs_mplayer
="$_libs_mplayer -lvga"
4433 _vosrc
="$_vosrc vo_svga.c"
4434 _vomodules
="svga $_vomodules"
4436 _def_svga
='#undef HAVE_SVGALIB'
4437 _novomodules
="svga $_novomodules"
4443 if test "$_fbdev" = auto
; then
4447 if test "$_fbdev" = yes ; then
4448 _def_fbdev
='#define HAVE_FBDEV 1'
4449 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4450 _vomodules
="fbdev $_vomodules"
4452 _def_fbdev
='#undef HAVE_FBDEV'
4453 _novomodules
="fbdev $_novomodules"
4460 if test "$_dvb" = auto
; then
4463 #include <sys/poll.h>
4464 #include <sys/ioctl.h>
4469 #include <ost/dmx.h>
4470 #include <ost/frontend.h>
4471 #include <ost/sec.h>
4472 #include <ost/video.h>
4473 #include <ost/audio.h>
4474 int main(void) {return 0;}
4476 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4477 cc_check
$_inc_tmp && _dvb
=yes && \
4478 _inc_extra
="$_inc_extra $_inc_tmp" && break
4482 if test "$_dvb" = yes ; then
4483 _def_dvb
='#define HAVE_DVB 1'
4484 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4485 _aomodules
="mpegpes(dvb) $_aomodules"
4486 _vomodules
="mpegpes(dvb) $_vomodules"
4489 echocheck
"DVB HEAD"
4490 if test "$_dvbhead" = auto
; then
4494 #include <sys/poll.h>
4495 #include <sys/ioctl.h>
4500 #include <linux/dvb/dmx.h>
4501 #include <linux/dvb/frontend.h>
4502 #include <linux/dvb/video.h>
4503 #include <linux/dvb/audio.h>
4504 int main(void) {return 0;}
4506 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4507 cc_check
$_inc_tmp && _dvbhead
=yes && \
4508 _inc_extra
="$_inc_extra $_inc_tmp" && break
4512 if test "$_dvbhead" = yes ; then
4513 _def_dvb
='#define HAVE_DVB_HEAD 1'
4514 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4515 _aomodules
="mpegpes(dvb) $_aomodules"
4516 _vomodules
="mpegpes(dvb) $_vomodules"
4519 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4520 _def_dvb
='#undef HAVE_DVB'
4521 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4522 _aomodules
="mpegpes(file) $_aomodules"
4523 _vomodules
="mpegpes(file) $_vomodules"
4526 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4528 _inputmodules
="dvb $_inputmodules"
4531 _noinputmodules
="dvb $_noinputmodules"
4536 if test "$_zr" = auto
; then
4537 #36067's seem to identify themselves as 36057PQC's, so the line
4538 #below should work for 36067's and 36057's.
4539 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
4545 if test "$_zr" = yes ; then
4546 if test "$_libavcodec_a" = yes ; then
4547 _def_zr
='#define HAVE_ZR 1'
4548 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
4549 _vomodules
="zr zr2 $_vomodules"
4551 _res_comment
="libavcodec (static) is required by zr, sorry"
4552 _novomodules
="zr $_novomodules"
4553 _def_zr
='#undef HAVE_ZR'
4556 _def_zr
='#undef HAVE_ZR'
4557 _novomodules
="zr zr2 $_novomodules"
4562 echocheck
"PNG support"
4563 if test "$_png" = auto
; then
4566 # Don't check for -lpng on irix since it has its own libpng
4567 # incompatible with the GNU libpng
4568 _res_comment
="disabled on irix (not GNU libpng)"
4574 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4575 printf("libpng: %s\n", png_libpng_ver);
4576 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4579 if cc_check
-lpng -lz $_ld_lm ; then
4583 _res_comment
="mismatch of library and header versions"
4589 if test "$_png" = yes ; then
4590 _def_png
='#define HAVE_PNG 1'
4591 _ld_extra
="$_ld_extra -lpng -lz"
4592 _vosrc
="$_vosrc vo_png.c"
4593 _vomodules
="png $_vomodules"
4595 _def_png
='#undef HAVE_PNG'
4596 _novomodules
="png $_novomodules"
4599 echocheck
"JPEG support"
4600 if test "$_jpeg" = auto
; then
4607 #include <jpeglib.h>
4612 if cc_check
-ljpeg $_ld_lm ; then
4620 if test "$_jpeg" = yes ; then
4621 _def_jpeg
='#define HAVE_JPEG 1'
4622 _vosrc
="$_vosrc vo_jpeg.c"
4623 _vomodules
="jpeg $_vomodules"
4624 _ld_extra
="$_ld_extra -ljpeg"
4626 _def_jpeg
='#undef HAVE_JPEG'
4627 _novomodules
="jpeg $_novomodules"
4632 echocheck
"PNM support"
4633 if test "$_pnm" = yes; then
4634 _def_pnm
="#define HAVE_PNM"
4635 _vosrc
="$_vosrc vo_pnm.c"
4636 _vomodules
="pnm $_vomodules"
4638 _def_pnm
="#undef HAVE_PNM"
4639 _novomodules
="pnm $_novomodules"
4645 echocheck
"GIF support"
4646 # This is to appease people who want to force gif support.
4647 # If it is forced to yes, then we still do checks to determine
4648 # which gif library to use.
4649 if test "$_gif" = yes ; then
4654 if test "$_gif" = auto
; then
4657 #include <gif_lib.h>
4662 for _ld_gif
in "-lungif" "-lgif" ; do
4663 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4667 # If no library was found, and the user wants support forced,
4668 # then we force it on with libgif, as this is the safest
4669 # assumption IMHO. (libungif & libregif both create symbolic
4670 # links to libgif. We also assume that no x11 support is needed,
4671 # because if you are forcing this, then you _should_ know what
4672 # you are doing. [ Besides, package maintainers should never
4673 # have compiled x11 deps into libungif in the first place. ] )
4676 if test "$_force_gif" = yes && test "$_gif" = no
; then
4681 if test "$_gif" = yes ; then
4682 _def_gif
='#define HAVE_GIF 1'
4683 _vosrc
="$_vosrc vo_gif89a.c"
4684 _codecmodules
="gif $_codecmodules"
4685 _vomodules
="gif89a $_vomodules"
4686 _res_comment
="old version, some encoding functions disabled"
4687 _def_gif_4
='#undef HAVE_GIF_4'
4688 _ld_extra
="$_ld_extra $_ld_gif"
4692 #include <gif_lib.h>
4693 void catch() { exit(1); }
4695 signal(SIGSEGV, catch); // catch segfault
4696 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4697 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4701 if cc_check
"$_ld_gif" && tmp_run
; then
4702 _def_gif_4
='#define HAVE_GIF_4 1'
4706 _def_gif
='#undef HAVE_GIF'
4707 _def_gif_4
='#undef HAVE_GIF_4'
4708 _novomodules
="gif89a $_novomodules"
4709 _nocodecmodules
="gif $_nocodecmodules"
4714 case "$_gif" in yes*)
4715 echocheck
"broken giflib workaround"
4716 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4719 #include <gif_lib.h>
4722 printf("UserData is at address %p\n", gif.UserData);
4726 if cc_check
"$_ld_gif" && tmp_run
; then
4727 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4736 echocheck
"VESA support"
4737 if test "$_vesa" = auto
; then
4740 int main(void) { vbeVersion(); return 0; }
4743 cc_check
-lvbe -llrmi && _vesa
=yes
4745 if test "$_vesa" = yes ; then
4746 _def_vesa
='#define HAVE_VESA 1'
4747 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4748 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4749 _vomodules
="vesa $_vomodules"
4751 _def_vesa
='#undef HAVE_VESA'
4752 _novomodules
="vesa $_novomodules"
4762 if test -z "$_sdlconfig" ; then
4763 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4764 _sdlconfig
="sdl-config"
4765 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4766 _sdlconfig
="sdl11-config"
4771 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4774 int main(int argc, char *argv[]) {
4775 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4780 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4781 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4782 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4783 if test "$_sdlversion" -gt 116 ; then
4784 if test "$_sdlversion" -lt 121 ; then
4785 _def_sdlbuggy
='#define BUGGY_SDL'
4787 _def_sdlbuggy
='#undef BUGGY_SDL'
4794 if test "$_sdl" = yes ; then
4795 _def_sdl
='#define HAVE_SDL 1'
4797 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4798 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4800 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4801 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4803 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4804 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4806 _vosrc
="$_vosrc vo_sdl.c"
4807 _vomodules
="sdl $_vomodules"
4808 _aosrc
="$_aosrc ao_sdl.c"
4809 _aomodules
="sdl $_aomodules"
4810 _res_comment
="using $_sdlconfig"
4812 _def_sdl
='#undef HAVE_SDL'
4813 _novomodules
="sdl $_novomodules"
4814 _noaomodules
="sdl $_noaomodules"
4821 echocheck
"Windows waveout"
4822 if test "$_win32waveout" = auto
; then
4824 #include <windows.h>
4825 #include <mmsystem.h>
4826 int main(void) { return 0; }
4829 cc_check
-lwinmm && _win32waveout
=yes
4831 if test "$_win32waveout" = yes ; then
4832 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4833 _libs_mplayer
="$_libs_mplayer -lwinmm"
4834 _aosrc
="$_aosrc ao_win32.c"
4835 _aomodules
="win32 $_aomodules"
4837 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4838 _noaomodules
="win32 $_noaomodules"
4840 echores
"$_win32waveout"
4843 if test "$_directx" = auto
; then
4845 #include <windows.h>
4848 int main(void) { return 0; }
4851 cc_check
-lgdi32 && _directx
=yes
4853 if test "$_directx" = yes ; then
4854 _def_directx
='#define HAVE_DIRECTX 1'
4855 _libs_mplayer
="$_libs_mplayer -lgdi32"
4856 _vosrc
="$_vosrc vo_directx.c"
4857 _vomodules
="directx $_vomodules"
4858 _aosrc
="$_aosrc ao_dsound.c"
4859 _aomodules
="dsound $_aomodules"
4861 _def_directx
='#undef HAVE_DIRECTX'
4862 _novomodules
="directx $_novomodules"
4863 _noaomodules
="dsound $_noaomodules"
4871 if test "$_nas" = auto
; then
4873 #include <audio/audiolib.h>
4874 int main(void) { return 0; }
4877 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4879 if test "$_nas" = yes ; then
4880 _def_nas
='#define HAVE_NAS 1'
4881 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4882 _aosrc
="$_aosrc ao_nas.c"
4883 _aomodules
="nas $_aomodules"
4885 _noaomodules
="nas $_noaomodules"
4886 _def_nas
='#undef HAVE_NAS'
4891 if test "$_dxr2" = auto
; then
4894 #include <dxr2ioctl.h>
4895 int main(void) { return 0; }
4897 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4898 cc_check
$_inc_tmp && _dxr2
=yes && \
4899 _inc_extra
="$_inc_extra $_inc_tmp" && break
4902 if test "$_dxr2" = yes; then
4903 _def_dxr2
='#define HAVE_DXR2 1'
4904 _vosrc
="$_vosrc vo_dxr2.c"
4905 _aosrc
="$_aosrc ao_dxr2.c"
4906 _aomodules
="dxr2 $_aomodules"
4907 _vomodules
="dxr2 $_vomodules"
4909 _def_dxr2
='#undef HAVE_DXR2'
4910 _noaomodules
="dxr2 $_noaomodules"
4911 _novomodules
="dxr2 $_novomodules"
4916 if test "$_dxr3" = auto
; then
4918 #include <linux/em8300.h>
4919 int main(void) { return 0; }
4922 cc_check
&& _dxr3
=yes
4924 if test "$_dxr3" = yes ; then
4925 _def_dxr3
='#define HAVE_DXR3 1'
4926 _vosrc
="$_vosrc vo_dxr3.c"
4927 _vomodules
="dxr3 $_vomodules"
4929 _def_dxr3
='#undef HAVE_DXR3'
4930 _novomodules
="dxr3 $_novomodules"
4935 echocheck
"IVTV TV-Out"
4936 if test "$_ivtv" = auto
; then
4939 #include <inttypes.h>
4940 #include <linux/types.h>
4941 #include <linux/videodev2.h>
4942 #include <linux/ivtv.h>
4943 int main(void) { return 0; }
4946 cc_check
&& _ivtv
=yes
4948 if test "$_ivtv" = yes ; then
4949 _def_ivtv
='#define HAVE_IVTV 1'
4950 _vosrc
="$_vosrc vo_ivtv.c"
4951 _vomodules
="ivtv $_vomodules"
4952 _aosrc
="$_aosrc ao_ivtv.c"
4953 _aomodules
="ivtv $_aomodules"
4955 _def_ivtv
='#undef HAVE_IVTV'
4956 _novomodules
="ivtv $_novomodules"
4957 _noaomodules
="ivtv $_noaomodules"
4962 echocheck
"V4L2 MPEG Decoder"
4963 if test "$_v4l2" = auto
; then
4966 #include <inttypes.h>
4967 #include <linux/types.h>
4968 #include <linux/videodev2.h>
4969 #include <linux/version.h>
4971 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4972 #error kernel headers too old, need 2.6.22
4973 bad_kernel_version();
4975 struct v4l2_ext_controls ctrls;
4976 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4981 cc_check
&& _v4l2
=yes
4983 if test "$_v4l2" = yes ; then
4984 _def_v4l2
='#define HAVE_V4L2_DECODER 1'
4985 _vosrc
="$_vosrc vo_v4l2.c"
4986 _vomodules
="v4l2 $_vomodules"
4987 _aosrc
="$_aosrc ao_v4l2.c"
4988 _aomodules
="v4l2 $_aomodules"
4990 _def_v4l2
='#undef HAVE_V4L2_DECODER'
4991 _novomodules
="v4l2 $_novomodules"
4992 _noaomodules
="v4l2 $_noaomodules"
5003 echocheck
"OSS Audio"
5004 if test "$_ossaudio" = auto
; then
5006 #include <sys/ioctl.h>
5007 #include <$_soundcard_header>
5008 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
5011 cc_check
&& _ossaudio
=yes
5013 if test "$_ossaudio" = yes ; then
5014 _def_ossaudio
='#define USE_OSS_AUDIO 1'
5015 _aosrc
="$_aosrc ao_oss.c"
5016 _aomodules
="oss $_aomodules"
5017 if test "$_linux_devfs" = yes; then
5018 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
5019 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
5022 #include <sys/ioctl.h>
5023 #include <$_soundcard_header>
5024 #ifdef OPEN_SOUND_SYSTEM
5025 int main(void) { return 0; }
5027 #error Not the real thing
5031 cc_check
&& _real_ossaudio
=yes
5032 if test "$_real_ossaudio" = yes; then
5033 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5034 elif netbsd || openbsd
; then
5035 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
5036 _ld_extra
="$_ld_extra -lossaudio"
5038 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
5040 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
5043 _def_ossaudio
='#undef USE_OSS_AUDIO'
5044 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
5045 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
5046 _noaomodules
="oss $_noaomodules"
5048 echores
"$_ossaudio"
5052 if test "$_arts" = auto
; then
5054 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
5058 int main(void) { return 0; }
5060 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
5065 if test "$_arts" = yes ; then
5066 _def_arts
='#define USE_ARTS 1'
5067 _aosrc
="$_aosrc ao_arts.c"
5068 _aomodules
="arts $_aomodules"
5069 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
5070 _inc_extra
="$_inc_extra `artsc-config --cflags`"
5072 _noaomodules
="arts $_noaomodules"
5078 if test "$_esd" = auto
; then
5080 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
5084 int main(void) { int fd = esd_open_sound("test"); return fd; }
5086 cc_check
`esd-config --libs` `esd-config --cflags` && _esd
=yes
5092 if test "$_esd" = yes ; then
5093 _def_esd
='#define USE_ESD 1'
5094 _aosrc
="$_aosrc ao_esd.c"
5095 _aomodules
="esd $_aomodules"
5096 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
5097 _inc_extra
="$_inc_extra `esd-config --cflags`"
5099 echocheck
"esd_get_latency()"
5102 int main(void) { return esd_get_latency(0); }
5104 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
5105 echores
"$_esd_latency"
5107 _def_esd
='#undef USE_ESD'
5108 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
5109 _noaomodules
="esd $_noaomodules"
5113 if test "$_pulse" = auto
; then
5115 if $_pkg_config --exists 'libpulse >= 0.9' ; then
5118 #include <pulse/pulseaudio.h>
5119 int main(void) { return 0; }
5121 cc_check
`$_pkg_config --libs --cflags libpulse` && tmp_run
&& _pulse
=yes
5127 if test "$_pulse" = yes ; then
5128 _def_pulse
='#define USE_PULSE 1'
5129 _aosrc
="$_aosrc ao_pulse.c"
5130 _aomodules
="pulse $_aomodules"
5131 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs libpulse`"
5132 _inc_extra
="$_inc_extra `$_pkg_config --cflags libpulse`"
5134 _def_pulse
='#undef USE_PULSE'
5135 _noaomodules
="pulse $_noaomodules"
5140 if test "$_jack" = auto
; then
5144 #include <jack/jack.h>
5145 int main(void) { jack_client_new("test"); return 0; }
5147 if cc_check
-ljack ; then
5148 _libs_mplayer
="$_libs_mplayer -ljack"
5149 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
5150 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
5151 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
5157 if test "$_jack" = yes ; then
5158 _def_jack
='#define USE_JACK 1'
5159 _aosrc
="$_aosrc ao_jack.c"
5160 _aomodules
="jack $_aomodules"
5162 _noaomodules
="jack $_noaomodules"
5167 if test "$_openal" = auto
; then
5171 #include <OpenAL/al.h>
5176 alSourceQueueBuffers(0, 0, 0);
5177 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5181 for I
in "-lopenal" "-framework OpenAL" ; do
5182 cc_check
$I && _openal
=yes && break
5183 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5185 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
5187 if test "$_openal" = yes ; then
5188 _def_openal
='#define USE_OPENAL 1'
5189 _aosrc
="$_aosrc ao_openal.c"
5190 _aomodules
="openal $_aomodules"
5192 _noaomodules
="openal $_noaomodules"
5196 echocheck
"ALSA audio"
5197 if test "$_alsa" != no
; then
5200 #include <sys/asoundlib.h>
5201 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5202 #error "alsa version != 0.5.x"
5204 int main(void) { return 0; }
5206 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5209 #include <sys/asoundlib.h>
5210 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5211 #error "alsa version != 0.9.x"
5213 int main(void) { return 0; }
5215 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5217 #include <alsa/asoundlib.h>
5218 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5219 #error "alsa version != 0.9.x"
5221 int main(void) { return 0; }
5223 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5226 #include <sys/asoundlib.h>
5227 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5228 #error "alsa version != 1.0.x"
5230 int main(void) { return 0; }
5232 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5234 #include <alsa/asoundlib.h>
5235 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5236 #error "alsa version != 1.0.x"
5238 int main(void) { return 0; }
5240 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5242 _def_alsa5
='#undef HAVE_ALSA5'
5243 _def_alsa9
='#undef HAVE_ALSA9'
5244 _def_alsa1x
='#undef HAVE_ALSA1X'
5245 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5246 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5247 if test "$_alsaver" ; then
5249 if test "$_alsaver" = '0.5.x' ; then
5251 _aosrc
="$_aosrc ao_alsa5.c"
5252 _aomodules
="alsa5 $_aomodules"
5253 _def_alsa5
='#define HAVE_ALSA5 1'
5254 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5255 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5256 elif test "$_alsaver" = '0.9.x-sys' ; then
5258 _aosrc
="$_aosrc ao_alsa.c"
5259 _aomodules
="alsa $_aomodules"
5260 _def_alsa9
='#define HAVE_ALSA9 1'
5261 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5262 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5263 elif test "$_alsaver" = '0.9.x-alsa' ; then
5265 _aosrc
="$_aosrc ao_alsa.c"
5266 _aomodules
="alsa $_aomodules"
5267 _def_alsa9
='#define HAVE_ALSA9 1'
5268 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5269 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5270 elif test "$_alsaver" = '1.0.x-sys' ; then
5272 _aosrc
="$_aosrc ao_alsa.c"
5273 _aomodules
="alsa $_aomodules"
5274 _def_alsa1x
="#define HAVE_ALSA1X 1"
5275 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5276 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5277 elif test "$_alsaver" = '1.0.x-alsa' ; then
5279 _aosrc
="$_aosrc ao_alsa.c"
5280 _aomodules
="alsa $_aomodules"
5281 _def_alsa1x
="#define HAVE_ALSA1X 1"
5282 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5283 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5286 _res_comment
="unknown version"
5288 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5290 _noaomodules
="alsa $_noaomodules"
5295 echocheck
"Sun audio"
5296 if test "$_sunaudio" = auto
; then
5298 #include <sys/types.h>
5299 #include <sys/audioio.h>
5300 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5303 cc_check
&& _sunaudio
=yes
5305 if test "$_sunaudio" = yes ; then
5306 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5307 _aosrc
="$_aosrc ao_sun.c"
5308 _aomodules
="sun $_aomodules"
5310 _def_sunaudio
='#undef USE_SUN_AUDIO'
5311 _noaomodules
="sun $_noaomodules"
5313 echores
"$_sunaudio"
5317 echocheck
"Sun mediaLib"
5318 if test "$_mlib" = auto
; then
5322 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5324 cc_check
-lmlib && _mlib
=yes
5326 test "$_mlib" = yes && _cpuexts
="MLIB $_cpuexts"
5332 echocheck
"SGI audio"
5333 if test "$_sgiaudio" = auto
; then
5334 # check for SGI audio
5336 #include <dmedia/audio.h>
5337 int main(void) { return 0; }
5340 cc_check
&& _sgiaudio
=yes
5342 if test "$_sgiaudio" = "yes" ; then
5343 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5344 _libs_mplayer
="$_libs_mplayer -laudio"
5345 _aosrc
="$_aosrc ao_sgi.c"
5346 _aomodules
="sgi $_aomodules"
5348 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5349 _noaomodules
="sgi $_noaomodules"
5351 echores
"$_sgiaudio"
5355 echocheck
"VCD support"
5356 if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32
; then
5357 _inputmodules
="vcd $_inputmodules"
5358 _def_vcd
='#define HAVE_VCD 1'
5361 _def_vcd
='#undef HAVE_VCD'
5362 _noinputmodules
="vcd $_noinputmodules"
5363 _res_comment
="not supported on this OS"
5371 if test "$_dvdread_internal" = auto
; then
5372 _dvdread_internal
=no
5373 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5374 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5375 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5376 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5377 _dvdread_internal
=yes
5380 elif test "$_dvdread" = auto
; then
5382 if test "$_dl" = yes; then
5384 #include <inttypes.h>
5385 #include <dvdread/dvd_reader.h>
5386 #include <dvdread/ifo_types.h>
5387 #include <dvdread/ifo_read.h>
5388 #include <dvdread/nav_read.h>
5389 int main(void) { return 0; }
5391 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5392 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5396 if test "$_dvdread_internal" = yes; then
5397 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5398 _def_dvdread
='#define USE_DVDREAD 1'
5399 _inputmodules
="dvdread(internal) $_inputmodules"
5401 _res_comment
="internal"
5402 elif test "$_dvdread" = yes; then
5403 _def_dvdread
='#define USE_DVDREAD 1'
5405 _ld_extra
="$_ld_extra -ldvdread"
5406 _inputmodules
="dvdread(external) $_inputmodules"
5407 _res_comment
="external"
5409 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5410 _def_dvdread
='#undef USE_DVDREAD'
5411 _noinputmodules
="dvdread $_noinputmodules"
5416 echocheck
"internal libdvdcss"
5417 if test "$_libdvdcss_internal" = auto
; then
5418 _libdvdcss_internal
=no
5419 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5421 if test "$_libdvdcss_internal" = yes ; then
5422 if linux || netbsd || openbsd || bsdos
; then
5423 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5424 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5426 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5428 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5429 _ld_extra
="$_ld_extra -framework IOKit"
5431 _inputmodules
="libdvdcss(internal) $_inputmodules"
5434 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5436 echores
"$_libdvdcss_internal"
5439 echocheck
"cdparanoia"
5440 if test "$_cdparanoia" = auto
; then
5442 #include <cdda_interface.h>
5443 #include <cdda_paranoia.h>
5444 // This need a better test. How ?
5446 void *test = cdda_verbose_set;
5447 return test == (void *)1;
5451 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5452 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5453 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5456 if test "$_cdparanoia" = yes ; then
5458 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5459 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5461 echores
"$_cdparanoia"
5465 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5468 #include <cdio/version.h>
5469 #include <cdio/cdda.h>
5470 #include <cdio/paranoia.h>
5473 void *test = cdda_verbose_set;
5474 printf("%s\n", CDIO_VERSION);
5475 return test == (void *)1;
5480 for _ld_tmp
in "" "-lwinmm" ; do
5481 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5482 cc_check
$_ld_tmp $_ld_lm \
5483 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5485 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5486 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5487 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5488 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5489 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5492 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5494 _def_libcdio
='#define HAVE_LIBCDIO'
5495 _def_havelibcdio
='yes'
5497 if test "$_cdparanoia" = yes ; then
5498 _res_comment
="using cdparanoia"
5500 _def_libcdio
='#undef HAVE_LIBCDIO'
5501 _def_havelibcdio
='no'
5505 if test "$_cdda" = yes ; then
5506 test $_cddb = auto
&& test $_network = yes && _cddb
=yes
5507 _def_cdparanoia
='#define HAVE_CDDA'
5508 _inputmodules
="cdda $_inputmodules"
5510 _def_cdparanoia
='#undef HAVE_CDDA'
5511 _noinputmodules
="cdda $_noinputmodules"
5514 if test "$_cddb" = yes ; then
5515 _def_cddb
='#define HAVE_CDDB'
5516 _inputmodules
="cddb $_inputmodules"
5519 _def_cddb
='#undef HAVE_CDDB'
5520 _noinputmodules
="cddb $_noinputmodules"
5523 echocheck
"bitmap font support"
5524 if test "$_bitmap_font" = yes ; then
5525 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5527 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5529 echores
"$_bitmap_font"
5532 echocheck
"freetype >= 2.0.9"
5534 # freetype depends on iconv
5535 if test "$_iconv" = no
; then
5537 _res_comment
="iconv support needed"
5540 if test "$_freetype" = auto
; then
5541 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5544 #include <ft2build.h>
5545 #include FT_FREETYPE_H
5546 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5547 #error "Need FreeType 2.0.9 or newer"
5552 FT_Int major=-1,minor=-1,patch=-1;
5553 int err=FT_Init_FreeType(&library);
5555 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5558 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5559 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5560 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5561 (int)major,(int)minor,(int)patch );
5562 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5563 printf("Library and header version mismatch! Fix it in your distribution!\n");
5570 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5575 if test "$_freetype" = yes ; then
5576 _def_freetype
='#define HAVE_FREETYPE'
5577 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5578 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5580 _def_freetype
='#undef HAVE_FREETYPE'
5582 echores
"$_freetype"
5584 if test "$_freetype" = no
; then
5586 _res_comment
="freetype support needed"
5588 echocheck
"fontconfig"
5589 if test "$_fontconfig" = auto
; then
5592 #include <fontconfig/fontconfig.h>
5597 printf("Couldn't initialize fontconfig lib\n");
5605 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5606 _ld_tmp
="-lfontconfig $_ld_tmp"
5607 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5609 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5610 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5611 _ld_tmp
=`$_pkg_config --libs fontconfig`
5612 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5613 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5616 if test "$_fontconfig" = yes ; then
5617 _def_fontconfig
='#define HAVE_FONTCONFIG'
5619 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5621 echores
"$_fontconfig"
5624 echocheck
"SSA/ASS support"
5625 # libass depends on FreeType
5626 if test "$_freetype" = no
; then
5628 _res_comment
="FreeType support needed"
5631 if test "$_ass" = auto
; then
5633 #include <ft2build.h>
5634 #include FT_FREETYPE_H
5635 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5636 #error "Need FreeType 2.1.8 or newer"
5638 int main(void) { return 0; }
5641 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5642 if test "$_ass" = no
; then
5643 _res_comment
="FreeType >= 2.1.8 needed"
5646 if test "$_ass" = yes ; then
5647 _def_ass
='#define USE_ASS'
5649 _def_ass
='#undef USE_ASS'
5654 echocheck
"fribidi with charsets"
5655 if test "$_fribidi" = auto
; then
5656 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5659 /* workaround for fribidi 0.10.4 and below */
5660 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5661 #include <fribidi/fribidi.h>
5664 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5665 printf("Fribidi headers are not consistents with the library!\n");
5672 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5677 if test "$_fribidi" = yes ; then
5678 _def_fribidi
='#define USE_FRIBIDI'
5679 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5680 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5682 _def_fribidi
='#undef USE_FRIBIDI'
5688 if test "$_enca" = auto
; then
5695 langs = enca_get_languages(&langcnt);
5700 cc_check
-lenca $_ld_lm && _enca
=yes
5702 if test "$_enca" = yes ; then
5703 _def_enca
='#define HAVE_ENCA 1'
5704 _ld_extra
="$_ld_extra -lenca"
5706 _def_enca
='#undef HAVE_ENCA'
5714 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5717 cc_check
-lz && _zlib
=yes
5718 if test "$_zlib" = yes ; then
5719 _def_zlib
='#define HAVE_ZLIB 1'
5720 _ld_extra
="$_ld_extra -lz"
5722 _def_zlib
='#undef HAVE_ZLIB'
5723 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
5724 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
5730 if test "$_rtc" = auto
; then
5732 #include <sys/ioctl.h>
5734 #include <linux/rtc.h>
5737 #define RTC_PIE_ON RTCIO_PIE_ON
5739 int main(void) { return RTC_PIE_ON; }
5742 cc_check
&& _rtc
=yes
5745 if test "$_rtc" = yes ; then
5746 _def_rtc
='#define HAVE_RTC 1'
5748 _def_rtc
='#undef HAVE_RTC'
5753 echocheck
"liblzo2 support"
5754 if test "$_liblzo" = auto
; then
5757 #include <lzo/lzo1x.h>
5758 int main(void) { lzo_init();return 0; }
5760 cc_check
-llzo2 && _liblzo
=yes
5762 if test "$_liblzo" = yes ; then
5763 _def_liblzo
='#define USE_LIBLZO 1'
5764 _ld_extra
="$_ld_extra -llzo2"
5765 _codecmodules
="liblzo $_codecmodules"
5767 _def_liblzo
='#undef USE_LIBLZO'
5768 _nocodecmodules
="liblzo $_nocodecmodules"
5773 echocheck
"mad support"
5774 if test "$_mad" = auto
; then
5778 int main(void) { return 0; }
5780 cc_check
-lmad && _mad
=yes
5782 if test "$_mad" = yes ; then
5783 _def_mad
='#define USE_LIBMAD 1'
5784 _ld_extra
="$_ld_extra -lmad"
5785 _codecmodules
="libmad $_codecmodules"
5787 _def_mad
='#undef USE_LIBMAD'
5788 _nocodecmodules
="libmad $_nocodecmodules"
5793 if test "$_twolame" = auto
; then
5795 #include <twolame.h>
5796 int main(void) { twolame_init(); return 0; }
5799 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5801 if test "$_twolame" = yes ; then
5802 _def_twolame
='#define HAVE_TWOLAME 1'
5803 _libs_mencoder
="$_libs_mencoder -ltwolame"
5804 _codecmodules
="twolame $_codecmodules"
5806 _def_twolame
='#undef HAVE_TWOLAME'
5807 _nocodecmodules
="twolame $_nocodecmodules"
5812 if test "$_toolame" = auto
; then
5814 if test "$_twolame" = yes ; then
5815 _res_comment
="disabled by twolame"
5818 #include <toolame.h>
5819 int main(void) { toolame_init(); return 0; }
5821 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5824 if test "$_toolame" = yes ; then
5825 _def_toolame
='#define HAVE_TOOLAME 1'
5826 _libs_mencoder
="$_libs_mencoder -ltoolame"
5827 _codecmodules
="toolame $_codecmodules"
5829 _def_toolame
='#undef HAVE_TOOLAME'
5830 _nocodecmodules
="toolame $_nocodecmodules"
5832 if test "$_toolamedir" ; then
5833 _res_comment
="using $_toolamedir"
5837 echocheck
"OggVorbis support"
5838 if test "$_tremor_internal" = yes; then
5840 elif test "$_tremor_external" = auto
; then
5843 #include <tremor/ivorbiscodec.h>
5844 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5846 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5848 if test "$_libvorbis" = auto
; then
5851 #include <vorbis/codec.h>
5852 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5854 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5856 if test "$_tremor_internal" = yes ; then
5858 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5859 _def_tremor
='#define TREMOR 1'
5860 _codecmodules
="tremor(internal) $_codecmodules"
5861 _res_comment
="internal Tremor"
5862 if test "$_tremor_low" = yes ; then
5863 _res_comment
="internal low accuracy Tremor"
5865 elif test "$_tremor_external" = yes ; then
5867 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5868 _def_tremor
='#define TREMOR 1'
5869 _codecmodules
="tremor(external) $_codecmodules"
5870 _res_comment
="external Tremor"
5871 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5872 elif test "$_libvorbis" = yes ; then
5874 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5875 _codecmodules
="libvorbis $_codecmodules"
5876 _res_comment
="libvorbis"
5877 _ld_extra
="$_ld_extra -lvorbis -logg"
5880 _nocodecmodules
="libvorbis $_nocodecmodules"
5882 if test "$_libvorbis" = no
; then
5883 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
5887 echocheck
"libspeex (version >= 1.1 required)"
5888 if test "$_speex" = auto
; then
5891 #include <speex/speex.h>
5895 speex_decode_int(dec, &bits, dec);
5898 cc_check
-lspeex $_ld_lm && _speex
=yes
5900 if test "$_speex" = yes ; then
5901 _def_speex
='#define HAVE_SPEEX 1'
5902 _ld_extra
="$_ld_extra -lspeex"
5903 _codecmodules
="speex $_codecmodules"
5905 _def_speex
='#undef HAVE_SPEEX'
5906 _nocodecmodules
="speex $_nocodecmodules"
5910 echocheck
"OggTheora support"
5911 if test "$_theora" = auto
; then
5914 #include <theora/theora.h>
5918 /* theora is in flux, make sure that all interface routines and
5919 * datatypes exist and work the way we expect it, so we don't break
5929 theora_info_init (&inf);
5930 theora_comment_init (&tc);
5934 /* we don't want to execute this kind of nonsense; just for making sure
5935 * that compilation works... */
5936 memset(&op, 0, sizeof(op));
5937 r = theora_decode_header (&inf, &tc, &op);
5938 r = theora_decode_init (&st, &inf);
5939 t = theora_granule_time (&st, op.granulepos);
5940 r = theora_decode_packetin (&st, &op);
5941 r = theora_decode_YUVout (&st, &yuv);
5947 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
5948 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5949 && _theora
=yes && break
5951 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5952 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
5953 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5954 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5958 if test "$_theora" = yes ; then
5959 _def_theora
='#define HAVE_OGGTHEORA 1'
5960 _codecmodules
="libtheora $_codecmodules"
5961 # when --enable-theora is forced, we'd better provide a probably sane
5962 # $_ld_theora than nothing
5963 test -z "$_ld_theora" && _ld_extra
="$_ld_extra -ltheora -logg"
5965 _def_theora
='#undef HAVE_OGGTHEORA'
5966 _nocodecmodules
="libtheora $_nocodecmodules"
5970 echocheck
"internal mp3lib support"
5971 if test "$_mp3lib" = yes ; then
5972 _def_mp3lib
='#define USE_MP3LIB 1'
5973 _codecmodules
="mp3lib $_codecmodules"
5975 _def_mp3lib
='#undef USE_MP3LIB'
5976 _nocodecmodules
="mp3lib $_nocodecmodules"
5980 echocheck
"internal liba52 support"
5981 if test "$_liba52" = yes ; then
5982 _def_liba52
='#define USE_LIBA52 1'
5983 _codecmodules
="liba52 $_codecmodules"
5985 _def_liba52
='#undef USE_LIBA52'
5986 _nocodecmodules
="liba52 $_nocodecmodules"
5990 echocheck
"libdca support"
5991 if test "$_libdca" = auto
; then
5994 #include <inttypes.h>
5996 int main(void) { dts_init (0); return 0; }
5998 for _ld_dca
in -ldts -ldca ; do
5999 cc_check
$_ld_dca $_ld_lm && _ld_extra
="$_ld_extra $_ld_dca" \
6000 && _libdca
=yes && break
6003 if test "$_libdca" = yes ; then
6004 _def_libdca
='#define USE_LIBDCA 1'
6005 _codecmodules
="libdca $_codecmodules"
6007 _def_libdca
='#undef USE_LIBDCA'
6008 _nocodecmodules
="libdca $_nocodecmodules"
6012 echocheck
"internal libmpeg2 support"
6013 if test "$_libmpeg2" = yes ; then
6014 _def_libmpeg2
='#define USE_LIBMPEG2 1'
6015 _codecmodules
="libmpeg2 $_codecmodules"
6017 _def_libmpeg2
='#undef USE_LIBMPEG2'
6018 _nocodecmodules
="libmpeg2 $_nocodecmodules"
6020 echores
"$_libmpeg2"
6022 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
6023 if test "$_musepack" = auto
; then
6026 #include <mpcdec/mpcdec.h>
6028 mpc_streaminfo info;
6029 mpc_decoder decoder;
6030 mpc_decoder_set_streaminfo(&decoder, &info);
6031 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6034 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
6036 if test "$_musepack" = yes ; then
6037 _def_musepack
='#define HAVE_MUSEPACK 1'
6038 _ld_extra
="$_ld_extra -lmpcdec"
6039 _codecmodules
="musepack $_codecmodules"
6041 _def_musepack
='#undef HAVE_MUSEPACK'
6042 _nocodecmodules
="musepack $_nocodecmodules"
6044 echores
"$_musepack"
6047 echocheck
"FAAC (AAC encoder) support"
6048 if test "$_faac" = auto
; then
6050 #include <inttypes.h>
6052 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6055 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6056 cc_check
-O4 $_ld_faac $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
6059 if test "$_faac" = yes ; then
6060 _def_faac
="#define HAVE_FAAC 1"
6061 if echo $_libavencoders |
grep -q FAAC
; then
6063 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
6064 _libs_mplayer
="$_libs_mplayer $_ld_faac"
6067 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
6069 _codecmodules
="faac $_codecmodules"
6071 _def_faac
="#undef HAVE_FAAC"
6072 _nocodecmodules
="faac $_nocodecmodules"
6073 _libavencoders
=`echo $_libavencoders | sed -e s/LIBFAAC_ENCODER// `
6075 echores
"$_faac (in libavcodec: $_lavc_faac)"
6078 echocheck
"FAAD2 (AAC) support"
6079 if test "$_faad_internal" = auto
; then
6080 if x86_32
&& test cc_vendor
=gnu
; then
6082 3.1*|
3.2) # ICE/insn with these versions
6084 _res_comment
="broken gcc"
6093 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
6097 #ifndef FAAD_MIN_STREAMSIZE
6098 #error Too old version
6100 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6102 cc_check
-lfaad $_ld_lm && _faad_external
=yes
6105 if test "$_faad_internal" = yes ; then
6106 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
6108 _res_comment
="internal floating-point"
6109 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
6110 elif test "$_faad_external" = yes ; then
6112 _ld_extra
="$_ld_extra -lfaad"
6114 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
6118 if test "$_faad" = yes ; then
6119 _def_faad
='#define HAVE_FAAD 1'
6120 _codecmodules
="faad2 $_codecmodules"
6122 _def_faad
='#undef HAVE_FAAD'
6123 _nocodecmodules
="faad2 $_nocodecmodules"
6128 echocheck
"LADSPA plugin support"
6129 if test "$_ladspa" = auto
; then
6134 const LADSPA_Descriptor *ld = NULL;
6139 cc_check
&& _ladspa
=yes
6141 if test "$_ladspa" = yes; then
6142 _def_ladspa
="#define HAVE_LADSPA"
6143 _afsrc
="$_afsrc af_ladspa.c"
6144 _afmodules
="ladspa $_afmodules"
6146 _def_ladspa
="#undef HAVE_LADSPA"
6147 _noafmodules
="ladspa $_noafmodules"
6152 if test -z "$_codecsdir" ; then
6153 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6154 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6155 if test -d "$dir" ; then
6161 # Fall back on default directory.
6162 if test -z "$_codecsdir" ; then
6163 _codecsdir
="$_libdir/codecs"
6164 mingw32
&& _codecsdir
="codecs"
6168 echocheck
"Win32 codecs"
6169 if test "$_win32dll" = auto
; then
6171 if x86_32
&& ! qnx
; then
6175 if test "$_win32dll" = yes ; then
6176 _def_win32dll
='#define USE_WIN32DLL 1'
6177 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6178 _res_comment
="using $_win32codecsdir"
6180 _def_win32_loader
='#define WIN32_LOADER 1'
6182 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
6183 _res_comment
="using native windows"
6185 _codecmodules
="win32 $_codecmodules"
6187 _def_win32dll
='#undef USE_WIN32DLL'
6188 _def_win32_loader
='#undef WIN32_LOADER'
6189 _nocodecmodules
="win32 $_nocodecmodules"
6191 echores
"$_win32dll"
6194 echocheck
"XAnim codecs"
6195 if test "$_xanim" = auto
; then
6197 _res_comment
="dynamic loader support needed"
6198 if test "$_dl" = yes ; then
6202 if test "$_xanim" = yes ; then
6203 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6204 _def_xanim
='#define USE_XANIM 1'
6205 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6206 _codecmodules
="xanim $_codecmodules"
6207 _res_comment
="using $_xanimcodecsdir"
6209 _def_xanim
='#undef USE_XANIM'
6210 _def_xanim_path
='#undef XACODEC_PATH'
6211 _nocodecmodules
="xanim $_nocodecmodules"
6216 echocheck
"RealPlayer codecs"
6217 if test "$_real" = auto
; then
6219 _res_comment
="dynamic loader support needed"
6220 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6221 (linux || freebsd || netbsd || win32 || darwin
) ; then
6225 if test "$_real" = yes ; then
6226 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6227 _def_real
='#define USE_REALCODECS 1'
6228 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6229 _codecmodules
="real $_codecmodules"
6230 _res_comment
="using $_realcodecsdir"
6232 _def_real
='#undef USE_REALCODECS'
6233 _def_real_path
="#undef REALCODEC_PATH"
6234 _nocodecmodules
="real $_nocodecmodules"
6239 echocheck
"QuickTime codecs"
6240 if test "$_qtx" = auto
; then
6241 test "$_win32dll" = yes || darwin
&& _qtx
=yes
6243 if test "$_qtx" = yes ; then
6244 _def_qtx
='#define USE_QTX_CODECS 1'
6245 _codecmodules
="qtx $_codecmodules"
6247 _def_qtx
='#undef USE_QTX_CODECS'
6248 _nocodecmodules
="qtx $_nocodecmodules"
6252 echocheck
"Nemesi Streaming Media libraries"
6253 if test "$_nemesi" = auto
&& test "$_network" = yes ; then
6255 if $_pkg_config libnemesi
--atleast-version=0.6.3 ; then
6256 _ld_extra
="$_ld_extra `$_pkg_config --libs libnemesi`"
6260 if test "$_nemesi" = yes; then
6262 _def_nemesi
='#define LIBNEMESI 1'
6263 _inputmodules
="nemesi $_inputmodules"
6265 _native_rtsp
="$_network"
6267 _def_nemesi
='#undef LIBNEMESI'
6268 _noinputmodules
="nemesi $_noinputmodules"
6272 echocheck
"LIVE555 Streaming Media libraries"
6273 if test "$_live" = auto
&& test "$_network" = yes ; then
6274 cat > $TMPCPP << EOF
6275 #include <liveMedia.hh>
6276 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6277 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6283 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6284 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6285 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6286 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6287 $_livelibdir/groupsock/libgroupsock.a \
6288 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6289 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6290 $_ld_extra -lstdc++" \
6291 _inc_extraxx
="-I$_livelibdir/liveMedia/include \
6292 -I$_livelibdir/UsageEnvironment/include \
6293 -I$_livelibdir/BasicUsageEnvironment/include \
6294 -I$_livelibdir/groupsock/include" && \
6297 if test "$_live" != yes ; then
6298 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6303 if test "$_live" = yes && test "$_network" = yes; then
6304 _res_comment
="using $_livelibdir"
6305 _def_live
='#define STREAMING_LIVE555 1'
6306 _inputmodules
="live555 $_inputmodules"
6307 elif test "$_live_dist" = yes && test "$_network" = yes; then
6308 _res_comment
="using distribution version"
6310 _def_live
='#define STREAMING_LIVE555 1'
6311 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6312 _inc_extraxx
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6313 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6314 _inputmodules
="live555 $_inputmodules"
6317 _def_live
='#undef STREAMING_LIVE555'
6318 _noinputmodules
="live555 $_noinputmodules"
6323 echocheck
"FFmpeg libavutil"
6324 if test "$_libavutil_a" = auto
; then
6325 if test -d libavutil
; then
6327 _res_comment
="static"
6329 die
"MPlayer will not compile without libavutil in the source tree."
6331 elif test "$_libavutil_so" = auto
; then
6334 #include <ffmpeg/common.h>
6335 int main(void) { ff_gcd(1,1); return 0; }
6337 if $_pkg_config --exists libavutil
; then
6338 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6339 _ld_tmp
=`$_pkg_config --libs libavutil`
6340 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6341 && _libavutil_so
=yes
6342 elif cc_check
-lavutil $_ld_lm ; then
6343 _ld_extra
="$_ld_extra -lavutil"
6345 _res_comment
="using libavutil.so, but static libavutil is recommended"
6349 _def_libavutil
='#undef USE_LIBAVUTIL'
6350 _def_libavutil_a
='#undef USE_LIBAVUTIL_A'
6351 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6352 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
6353 test "$_libavutil" = yes && _def_libavutil
='#define USE_LIBAVUTIL 1'
6354 test "$_libavutil_a" = yes && _def_libavutil_a
='#define USE_LIBAVUTIL_A 1'
6355 test "$_libavutil_so" = yes && _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6356 # neither static nor shared libavutil is available, but it is mandatory ...
6357 if test "$_libavutil" = no
; then
6358 die
"You need static or shared libavutil, MPlayer will not compile without!"
6360 echores
"$_libavutil"
6362 echocheck
"FFmpeg libavcodec"
6363 if test "$_libavcodec_a" = auto
; then
6365 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6367 _res_comment
="static"
6369 elif test "$_libavcodec_so" = auto
; then
6371 _res_comment
="libavcodec.so is discouraged over static libavcodec"
6373 #include <ffmpeg/avcodec.h>
6374 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6376 if $_pkg_config --exists libavcodec
; then
6377 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6378 _ld_tmp
=`$_pkg_config --libs libavcodec`
6379 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6380 && _libavcodec_so
=yes
6381 elif cc_check
-lavcodec $_ld_lm ; then
6382 _ld_extra
="$_ld_extra -lavcodec"
6384 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6388 _def_libavcodec
='#undef USE_LIBAVCODEC'
6389 _def_libavcodec_a
='#undef USE_LIBAVCODEC_A'
6390 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6391 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
6392 test "$_libavcodec" = yes && _def_libavcodec
='#define USE_LIBAVCODEC 1'
6393 test "$_libavcodec_a" = yes && _def_libavcodec_a
='#define USE_LIBAVCODEC_A 1'
6394 test "$_libavcodec_so" = yes && _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6395 test "$_libavcodec_mpegaudio_hp" = yes \
6396 && _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6397 if test "$_libavcodec_a" = yes ; then
6398 _codecmodules
="libavcodec $_codecmodules"
6399 elif test "$_libavcodec_so" = yes ; then
6400 _codecmodules
="libavcodec.so $_codecmodules"
6402 _nocodecmodules
="libavcodec $_nocodecmodules"
6404 echores
"$_libavcodec"
6406 echocheck
"FFmpeg libavformat"
6407 if test "$_libavformat_a" = auto
; then
6409 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6411 _res_comment
="static"
6413 elif test "$_libavformat_so" = auto
; then
6416 #include <ffmpeg/avformat.h>
6417 #include <ffmpeg/opt.h>
6418 int main(void) { av_alloc_format_context(); return 0; }
6420 if $_pkg_config --exists libavformat
; then
6421 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6422 _ld_tmp
=`$_pkg_config --libs libavformat`
6423 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6424 && _libavformat_so
=yes
6425 elif cc_check
$_ld_lm -lavformat ; then
6426 _ld_extra
="$_ld_extra -lavformat"
6428 _res_comment
="using libavformat.so, but static libavformat is recommended"
6432 _def_libavformat
='#undef USE_LIBAVFORMAT'
6433 _def_libavformat_a
='#undef USE_LIBAVFORMAT_A'
6434 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6435 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
6436 test "$_libavformat" = yes && _def_libavformat
='#define USE_LIBAVFORMAT 1'
6437 test "$_libavformat_a" = yes && _def_libavformat_a
='#define USE_LIBAVFORMAT_A 1'
6438 test "$_libavformat_so" = yes \
6439 && _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6440 echores
"$_libavformat"
6442 echocheck
"FFmpeg libpostproc"
6443 if test "$_libpostproc_a" = auto
; then
6445 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6446 _libpostproc_a
='yes'
6447 _res_comment
="static"
6449 elif test "$_libpostproc_so" = auto
; then
6452 #define USE_LIBPOSTPROC 1
6453 #include <inttypes.h>
6454 #include <postproc/postprocess.h>
6455 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6457 if cc_check
-lpostproc $_ld_lm ; then
6458 _ld_extra
="$_ld_extra -lpostproc"
6460 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6464 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6465 _def_libpostproc_a
='#undef USE_LIBPOSTPROC_A'
6466 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6467 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
6468 test "$_libpostproc" = yes && _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6469 test "$_libpostproc_a" = yes && _def_libpostproc_a
='#define USE_LIBPOSTPROC_A 1'
6470 test "$_libpostproc_so" = yes \
6471 && _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6472 echores
"$_libpostproc"
6475 echocheck
"libamr narrowband"
6476 if test "$_libamr_nb" = auto
; then
6479 #include <amrnb/interf_dec.h>
6480 int main(void) { Speech_Decode_Frame_init(); return 0; }
6482 cc_check
-lamrnb && _libamr_nb
=yes
6483 if test "$_libavcodec_a" != yes ; then
6485 _res_comment
="libavcodec (static) is required by libamr_nb, sorry"
6488 if test "$_libamr_nb" = yes ; then
6490 _ld_extra
="$_ld_extra -lamrnb"
6491 _def_libamr
='#define CONFIG_LIBAMR 1'
6492 _def_libamr_nb
='#define CONFIG_LIBAMR_NB 1'
6493 _codecmodules
="libamr_nb $_codecmodules"
6495 _def_libamr_nb
='#undef CONFIG_LIBAMR_NB'
6496 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_NB_DECODER// `
6497 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_NB_ENCODER// `
6498 _nocodecmodules
="libamr_nb $_nocodecmodules"
6500 echores
"$_libamr_nb"
6503 echocheck
"libamr wideband"
6504 if test "$_libamr_wb" = auto
; then
6507 #include <amrwb/dec_if.h>
6508 int main(void) { D_IF_init(); return 0; }
6510 cc_check
-lamrwb && _libamr_wb
=yes
6511 if test "$_libavcodec_a" != yes ; then
6513 _res_comment
="libavcodec (static) is required by libamr_wb, sorry"
6516 if test "$_libamr_wb" = yes ; then
6518 _ld_extra
="$_ld_extra -lamrwb"
6519 _def_libamr
='#define CONFIG_LIBAMR 1'
6520 _def_libamr_wb
='#define CONFIG_LIBAMR_WB 1'
6521 _codecmodules
="libamr_wb $_codecmodules"
6523 _def_libamr_wb
='#undef CONFIG_LIBAMR_WB'
6524 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_WB_DECODER// `
6525 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_WB_ENCODER// `
6526 _nocodecmodules
="libamr_wb $_nocodecmodules"
6528 echores
"$_libamr_wb"
6530 echocheck
"libdv-0.9.5+"
6531 if test "$_libdv" = auto
; then
6534 #include <libdv/dv.h>
6535 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6537 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6539 if test "$_libdv" = yes ; then
6540 _def_libdv
='#define HAVE_LIBDV095 1'
6541 _ld_extra
="$_ld_extra -ldv"
6542 _codecmodules
="libdv $_codecmodules"
6544 _def_libdv
='#undef HAVE_LIBDV095'
6545 _nocodecmodules
="libdv $_nocodecmodules"
6551 if test "$_xvid" = auto
; then
6555 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6557 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6558 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6562 if test "$_xvid" = yes ; then
6563 _def_xvid
='#define HAVE_XVID4 1'
6564 _codecmodules
="xvid $_codecmodules"
6566 _def_xvid
='#undef HAVE_XVID4'
6567 _nocodecmodules
="xvid $_nocodecmodules"
6568 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6572 if test "$_xvid" = yes ; then
6573 echocheck
"XviD two pass plugin"
6576 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6580 _def_lavc_xvid
='#define CONFIG_LIBXVID 1'
6583 _def_lavc_xvid
='#undef CONFIG_LIBXVID'
6584 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6586 echores
"$_lavc_xvid"
6591 if test "$_x264" = auto
; then
6593 #include <inttypes.h>
6596 #error We do not support old versions of x264. Get the latest from SVN.
6598 int main(void) { x264_encoder_open((void*)0); return 0; }
6601 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6602 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6606 if test "$_x264" = yes ; then
6607 _def_x264
='#define HAVE_X264 1'
6608 _codecmodules
="x264 $_codecmodules"
6609 if echo $_libavencoders |
grep -q X264
; then
6611 _def_lavc_x264
='#define CONFIG_LIBX264 1'
6612 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6615 _def_lavc_x264
='#undef CONFIG_LIBX264'
6619 _def_x264
='#undef HAVE_X264'
6620 _def_lavc_x264
='#undef CONFIG_LIBX264'
6621 _nocodecmodules
="x264 $_nocodecmodules"
6622 _libavencoders
=`echo $_libavencoders | sed -e s/LIBX264_ENCODER// `
6624 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6628 if test "$_libnut" = auto
; then
6632 #include <inttypes.h>
6634 int main(void) { (void)nut_error(0); return 0; }
6637 cc_check
-lnut && _libnut
=yes
6640 if test "$_libnut" = yes ; then
6641 _def_libnut
='#define HAVE_LIBNUT 1'
6642 _ld_extra
="$_ld_extra -lnut"
6644 _def_libnut
='#undef HAVE_LIBNUT'
6645 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
6650 # mencoder requires (optional) those libs: libmp3lame
6651 if test "$_mencoder" != no
; then
6653 echocheck
"libmp3lame (for mencoder)"
6655 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6656 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6658 #include <lame/lame.h>
6659 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; }
6661 # Note: libmp3lame usually depends on vorbis
6662 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6663 if test "$_mp3lame" = yes ; then
6664 _def_mp3lame
="#define HAVE_MP3LAME"
6665 _ld_mp3lame
=-lmp3lame
6666 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6668 #include <lame/lame.h>
6669 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6671 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6673 #include <lame/lame.h>
6674 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6676 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6677 if echo $_libavencoders |
grep -q MP3LAME
; then
6679 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6680 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6683 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6686 _def_mp3lame
='#undef HAVE_MP3LAME'
6687 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
6693 echocheck
"mencoder"
6694 _mencoder_flag
='#undef HAVE_MENCODER'
6695 if test "$_mencoder" = yes ; then
6696 _mencoder_flag
='#define HAVE_MENCODER'
6697 _def_muxers
='#define CONFIG_MUXERS 1'
6699 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6700 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6703 echores
"$_mencoder"
6705 echocheck
"fastmemcpy"
6706 # fastmemcpy check is done earlier with tests of CPU & binutils features
6707 if test "$_fastmemcpy" = yes ; then
6708 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6710 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6712 echores
"$_fastmemcpy"
6714 echocheck
"UniquE RAR File Library"
6715 if test "$_unrarlib" = yes ; then
6716 _def_unrarlib
='#define USE_UNRARLIB 1'
6718 _def_unrarlib
='#undef USE_UNRARLIB'
6720 echores
"$_unrarlib"
6722 echocheck
"UnRAR executable"
6723 if test "$_unrar_exec" = auto
; then
6725 mingw32
&& _unrar_exec
="no"
6727 if test "$_unrar_exec" = yes ; then
6728 _def_unrar_exec
='#define USE_UNRAR_EXEC 1'
6730 _def_unrar_exec
='#undef USE_UNRAR_EXEC'
6732 echores
"$_unrar_exec"
6734 echocheck
"TV interface"
6735 if test "$_tv" = yes ; then
6736 _def_tv
='#define USE_TV 1'
6737 _inputmodules
="tv $_inputmodules"
6739 _noinputmodules
="tv $_noinputmodules"
6740 _def_tv
='#undef USE_TV'
6746 echocheck
"*BSD BT848 bt8xx header"
6748 for file in "machine/ioctl_bt848.h" \
6749 "dev/bktr/ioctl_bt848.h" \
6750 "dev/video/bktr/ioctl_bt848.h" \
6751 "dev/ic/bt8xx.h" ; do
6753 #include <sys/types.h>
6754 #include <sys/ioctl.h>
6757 ioctl(0, TVTUNER_GETFREQ, 0);
6763 _ioctl_bt848_h_name
="$file"
6767 if test "$_ioctl_bt848_h" = yes ; then
6768 _def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6769 _res_comment
="using $_ioctl_bt848_h_name"
6771 _def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6773 echores
"$_ioctl_bt848_h"
6775 echocheck
"*BSD ioctl_meteor.h"
6777 for file in "machine/ioctl_meteor.h" \
6778 "dev/bktr/ioctl_meteor.h" \
6779 "dev/video/bktr/ioctl_meteor.h" ; do
6781 #include <sys/types.h>
6784 ioctl(0, METEORSINPUT, 0);
6790 _ioctl_meteor_h_name
="$file"
6794 if test "$_ioctl_meteor_h" = yes ; then
6795 _def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6796 _res_comment
="using $_ioctl_meteor_h_name"
6798 _def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6800 echores
"$_ioctl_meteor_h"
6802 echocheck
"*BSD BrookTree 848 TV interface"
6803 if test "$_tv_bsdbt848" = auto
; then
6805 if test "$_tv" = yes ; then
6807 #include <sys/types.h>
6808 $_def_ioctl_meteor_h_name
6809 $_def_ioctl_bt848_h_name
6810 #ifdef IOCTL_METEOR_H_NAME
6811 #include IOCTL_METEOR_H_NAME
6813 #ifdef IOCTL_BT848_H_NAME
6814 #include IOCTL_BT848_H_NAME
6817 ioctl(0, METEORSINPUT, 0);
6818 ioctl(0, TVTUNER_GETFREQ, 0);
6822 cc_check
&& _tv_bsdbt848
=yes
6825 if test "$_tv_bsdbt848" = yes ; then
6826 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6827 _inputmodules
="tv-bsdbt848 $_inputmodules"
6829 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6830 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6832 echores
"$_tv_bsdbt848"
6836 echocheck
"DirectShow TV interface"
6837 if test "$_tv_dshow" = auto
; then
6839 if test "$_tv" = yes && win32
; then
6844 CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
6848 cc_check
-lole32 -luuid && _tv_dshow
=yes
6851 if test "$_tv_dshow" = yes ; then
6852 _inputmodules
="tv-dshow $_inputmodules"
6853 _def_tv_dshow
='#define HAVE_TV_DSHOW 1'
6854 _ld_extra
="$_ld_extra -lole32 -luuid"
6856 _noinputmodules
="tv-dshow $_noinputmodules"
6857 _def_tv_dshow
='#undef HAVE_TV_DSHOW'
6859 echores
"$_tv_dshow"
6862 echocheck
"Video 4 Linux TV interface"
6863 if test "$_tv_v4l1" = auto
; then
6865 if test "$_tv" = yes && linux
; then
6868 #include <linux/videodev.h>
6869 int main(void) { return 0; }
6871 cc_check
&& _tv_v4l1
=yes
6874 if test "$_tv_v4l1" = yes ; then
6877 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6878 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6879 _inputmodules
="tv-v4l $_inputmodules"
6881 _noinputmodules
="tv-v4l1 $_noinputmodules"
6882 _def_tv_v4l
='#undef HAVE_TV_V4L'
6887 echocheck
"Video 4 Linux 2 TV interface"
6888 if test "$_tv_v4l2" = auto
; then
6890 if test "$_tv" = yes && linux
; then
6893 #include <linux/types.h>
6894 #include <linux/videodev2.h>
6895 int main(void) { return 0; }
6897 cc_check
&& _tv_v4l2
=yes
6900 if test "$_tv_v4l2" = yes ; then
6903 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6904 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6905 _inputmodules
="tv-v4l2 $_inputmodules"
6907 _noinputmodules
="tv-v4l2 $_noinputmodules"
6908 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6913 echocheck
"TV teletext interface"
6914 if test "$_tv_teletext" = auto
; then
6916 if test "$_freetype" = yes && test "$_pthreads" = yes; then
6917 if test "$_tv_v4l2" = yes ||
test "$_v4l" = yes ||
test "$_tv_dshow" = yes; then
6922 if test "$_tv_teletext" = yes ; then
6923 _def_tv_teletext
='#define HAVE_TV_TELETEXT 1'
6924 _inputmodules
="tv-teletext $_inputmodules"
6926 _noinputmodules
="tv-teletext $_noinputmodules"
6927 _def_tv_teletext
='#undef HAVE_TV_TELETEXT'
6929 echores
"$_tv_teletext"
6932 echocheck
"Radio interface"
6933 if test "$_radio" = yes ; then
6934 _def_radio
='#define USE_RADIO 1'
6935 _inputmodules
="radio $_inputmodules"
6936 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6939 if test "$_radio_capture" = yes ; then
6941 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6943 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6946 _noinputmodules
="radio $_noinputmodules"
6947 _def_radio
='#undef USE_RADIO'
6948 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6952 echocheck
"Capture for Radio interface"
6953 echores
"$_radio_capture"
6955 echocheck
"Video 4 Linux 2 Radio interface"
6956 if test "$_radio_v4l2" = auto
; then
6958 if test "$_radio" = yes && linux
; then
6961 #include <linux/types.h>
6962 #include <linux/videodev2.h>
6963 int main(void) { return 0; }
6965 cc_check
&& _radio_v4l2
=yes
6968 if test "$_radio_v4l2" = yes ; then
6969 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6971 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6973 echores
"$_radio_v4l2"
6975 echocheck
"Video 4 Linux Radio interface"
6976 if test "$_radio_v4l" = auto
; then
6978 if test "$_radio" = yes && linux
; then
6981 #include <linux/videodev.h>
6982 int main(void) { return 0; }
6984 cc_check
&& _radio_v4l
=yes
6987 if test "$_radio_v4l" = yes ; then
6988 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6990 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6992 echores
"$_radio_v4l"
6994 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6995 echocheck
"*BSD BrookTree 848 Radio interface"
6998 #include <sys/types.h>
6999 $_def_ioctl_bt848_h_name
7000 #ifdef IOCTL_BT848_H_NAME
7001 #include IOCTL_BT848_H_NAME
7004 ioctl(0, RADIO_GETFREQ, 0);
7008 cc_check
&& _radio_bsdbt848
=yes
7009 echores
"$_radio_bsdbt848"
7010 fi #if bsd && radio && radio_bsdbt848
7012 if test "$_radio_bsdbt848" = yes ; then
7013 _def_radio_bsdbt848
='#define HAVE_RADIO_BSDBT848 1'
7015 _def_radio_bsdbt848
='#undef HAVE_RADIO_BSDBT848'
7018 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
7019 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
7020 die
"Radio driver requires BSD BT848, V4L or V4L2!"
7023 echocheck
"Video 4 Linux 2 MPEG PVR interface"
7024 if test "$_pvr" = auto
; then
7026 if test "$_tv_v4l2" = yes && linux
; then
7029 #include <inttypes.h>
7030 #include <linux/types.h>
7031 #include <linux/videodev2.h>
7032 int main(void) { struct v4l2_ext_controls ext; return 0; }
7034 cc_check
&& _pvr
=yes
7037 if test "$_pvr" = yes ; then
7038 _def_pvr
='#define HAVE_PVR 1'
7039 _inputmodules
="pvr $_inputmodules"
7041 _noinputmodules
="pvr $_noinputmodules"
7042 _def_pvr
='#undef HAVE_PVR'
7047 echocheck
"audio select()"
7048 if test "$_select" = no
; then
7049 _def_select
='#undef HAVE_AUDIO_SELECT'
7050 elif test "$_select" = yes ; then
7051 _def_select
='#define HAVE_AUDIO_SELECT 1'
7057 if ! beos
&& test "$_ftp" = yes ; then
7058 _def_ftp
='#define HAVE_FTP 1'
7059 _inputmodules
="ftp $_inputmodules"
7061 _noinputmodules
="ftp $_noinputmodules"
7062 _def_ftp
='#undef HAVE_FTP'
7066 echocheck
"vstream client"
7067 if test "$_vstream" = auto
; then
7070 #include <vstream-client.h>
7071 void vstream_error(const char *format, ... ) {}
7072 int main(void) { vstream_start(); return 0; }
7074 cc_check
-lvstream-client && _vstream
=yes
7076 if test "$_vstream" = yes ; then
7077 _def_vstream
='#define HAVE_VSTREAM 1'
7078 _inputmodules
="vstream $_inputmodules"
7079 _ld_extra
="$_ld_extra -lvstream-client"
7081 _noinputmodules
="vstream $_noinputmodules"
7082 _def_vstream
='#undef HAVE_VSTREAM'
7087 echocheck
"byte order"
7088 if test "$_big_endian" = auto
; then
7090 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
7091 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
7093 return (int)ascii_name;
7097 if strings $TMPEXE |
grep -l MPlayerBigEndian
>/dev
/null
; then
7103 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
7106 if test "$_big_endian" = yes ; then
7107 _byte_order
='big-endian'
7108 _def_words_endian
='#define WORDS_BIGENDIAN 1'
7110 _byte_order
='little-endian'
7111 _def_words_endian
='#undef WORDS_BIGENDIAN'
7113 echores
"$_byte_order"
7115 echocheck
"OSD menu"
7116 if test "$_menu" = yes ; then
7117 _def_menu
='#define HAVE_MENU 1'
7119 _def_menu
='#undef HAVE_MENU'
7124 echocheck
"Subtitles sorting"
7125 if test "$_sortsub" = yes ; then
7126 _def_sortsub
='#define USE_SORTSUB 1'
7128 _def_sortsub
='#undef USE_SORTSUB'
7133 echocheck
"XMMS inputplugin support"
7134 if test "$_xmms" = yes ; then
7135 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
7136 _xmmsplugindir
=`xmms-config --input-plugin-dir`
7137 _xmmslibdir
=`xmms-config --exec-prefix`/lib
7139 _xmmsplugindir
=/usr
/lib
/xmms
/Input
7140 _xmmslibdir
=/usr
/lib
7143 _def_xmms
='#define HAVE_XMMS 1'
7145 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
7147 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7150 _def_xmms
='#undef HAVE_XMMS'
7155 if test "$_inet6" = auto
; then
7157 #include <sys/types.h>
7158 #if !defined(_WIN32) || defined(__CYGWIN__)
7159 #include <sys/socket.h>
7160 #include <netinet/in.h>
7162 #include <ws2tcpip.h>
7164 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
7167 if cc_check
$_ld_sock ; then
7171 if test "$_inet6" = yes ; then
7172 _def_inet6
='#define HAVE_AF_INET6 1'
7174 _def_inet6
='#undef HAVE_AF_INET6'
7179 echocheck
"gethostbyname2"
7180 if test "$_gethostbyname2" = auto
; then
7182 #include <sys/types.h>
7183 #include <sys/socket.h>
7185 int main(void) { gethostbyname2("", AF_INET); }
7193 if test "$_gethostbyname2" = yes ; then
7194 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
7196 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
7198 echores
"$_gethostbyname2"
7201 # --------------- GUI specific tests begin -------------------
7204 if test "$_gui" = yes ; then
7206 # Required libraries
7207 if test "$_libavcodec" != yes ||
7208 ! echo $_libavdecoders |
grep PNG_DECODER
>/dev
/null
2>&1 ; then
7209 die
"The GUI requires libavcodec with PNG support (needs zlib)."
7212 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7214 echocheck
"XShape extension"
7215 if test "$_xshape" = auto
; then
7218 #include <X11/Xlib.h>
7219 #include <X11/Xproto.h>
7220 #include <X11/Xutil.h>
7221 #include <X11/extensions/shape.h>
7224 char *name = ":0.0";
7227 int eventbase, errorbase;
7228 if (getenv("DISPLAY"))
7229 name=getenv("DISPLAY");
7230 wsDisplay=XOpenDisplay(name);
7231 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7233 XCloseDisplay(wsDisplay);
7237 cc_check
-lXext && _xshape
=yes
7239 if test "$_xshape" = yes ; then
7240 _def_xshape
='#define HAVE_XSHAPE 1'
7242 die
"The GUI requires the X11 extension XShape (which was not found)."
7247 if test "$_gtk1" = no
; then
7249 echocheck
"GTK+ version"
7251 if $_pkg_config gtk
+-2.0
--exists ; then
7252 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7253 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7254 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7258 if $_pkg_config glib-2.0
--exists ; then
7259 echocheck
"glib version"
7260 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7261 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7264 _def_gui
='#define HAVE_NEW_GUI 1'
7265 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7268 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7271 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7276 if test "$_gtk1" = yes ; then
7277 # Check for old GTK (1.2.x)
7278 echocheck
"GTK version"
7279 if test -z "$_gtkconfig" ; then
7280 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7281 _gtkconfig
="gtk-config"
7282 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7283 _gtkconfig
="gtk12-config"
7285 die
"The GUI requires GTK devel packages (which were not found)."
7288 _gtk
=`$_gtkconfig --version 2>&1`
7289 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7290 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7291 echores
"$_gtk (using $_gtkconfig)"
7294 echocheck
"glib version"
7295 if test -z "$_glibconfig" ; then
7296 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7297 _glibconfig
="glib-config"
7298 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7299 _glibconfig
="glib12-config"
7301 die
"The GUI requires GLIB devel packages (which were not found)"
7304 _glib
=`$_glibconfig --version 2>&1`
7305 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7306 echores
"$_glib (using $_glibconfig)"
7308 _def_gui
='#define HAVE_NEW_GUI 1'
7309 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7313 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7314 _def_gui
='#define HAVE_NEW_GUI 1'
7315 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7318 else #if test "$_gui"
7319 _def_gui
='#undef HAVE_NEW_GUI'
7320 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7322 # --------------- GUI specific tests end -------------------
7325 if test "$_charset" = "noconv" ; then
7328 if test "$_charset" ; then
7329 _def_charset
="#define MSG_CHARSET \"$_charset\""
7331 _def_charset
="#undef MSG_CHARSET"
7334 if test "$_charset" = "UTF-8" ; then
7335 # hack to disable conversion in the Makefile
7339 if test "$_charset" ; then
7340 echocheck
"iconv program"
7341 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7342 if test "$?" -ne 0 ; then
7344 echo "No working iconv program found, use "
7345 echo "--charset=UTF-8 to continue anyway."
7346 echo "If you also have problems with iconv library functions use --charset=noconv."
7347 echo "Messages in the GTK-2 interface will be broken then."
7354 #############################################################################
7356 echocheck
"automatic gdb attach"
7357 if test "$_crash_debug" = yes ; then
7358 _def_crash_debug
='#define CRASH_DEBUG 1'
7360 _def_crash_debug
='#undef CRASH_DEBUG'
7363 echores
"$_crash_debug"
7365 echocheck
"compiler support for noexecstack"
7367 int main(void) { return 0; }
7369 if cc_check
-Wl,-z,noexecstack
; then
7370 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7377 # Dynamic linking flags
7378 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7380 bsd
&& _ld_dl_dynamic
='-rdynamic'
7381 if test "$_real" = yes ||
test "$_xanim" = yes && ! win32
&& ! qnx
&& ! darwin
; then
7382 _ld_dl_dynamic
='-rdynamic'
7385 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7386 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7387 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7388 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7390 _def_debug
='#undef MP_DEBUG'
7391 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7393 _def_linux
='#undef TARGET_LINUX'
7394 linux
&& _def_linux
='#define TARGET_LINUX 1'
7397 echocheck
"joystick"
7398 _def_joystick
='#undef HAVE_JOYSTICK'
7399 if test "$_joystick" = yes ; then
7401 # TODO add some check
7402 _def_joystick
='#define HAVE_JOYSTICK 1'
7404 _joystick
="no (unsupported under $system_name)"
7407 echores
"$_joystick"
7410 if test "$_lirc" = auto
; then
7413 #include <lirc/lirc_client.h>
7414 int main(void) { return 0; }
7416 cc_check
-llirc_client && _lirc
=yes
7418 if test "$_lirc" = yes ; then
7419 _def_lirc
='#define HAVE_LIRC 1'
7420 _ld_extra
="$_ld_extra -llirc_client"
7422 _def_lirc
='#undef HAVE_LIRC'
7427 if test "$_lircc" = auto
; then
7430 #include <lirc/lircc.h>
7431 int main(void) { return 0; }
7433 cc_check
-llircc && _lircc
=yes
7435 if test "$_lircc" = yes ; then
7436 _def_lircc
='#define HAVE_LIRCC 1'
7437 _ld_extra
="$_ld_extra -llircc"
7439 _def_lircc
='#undef HAVE_LIRCC'
7444 # Detect maemo development platform libraries availability (http://www.maemo.org),
7445 # they are used when run on Nokia 770
7446 echocheck
"maemo (Nokia 770)"
7447 if test "$_maemo" = auto
; then
7450 #include <libosso.h>
7451 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7453 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7455 if test "$_maemo" = yes ; then
7456 _def_maemo
='#define HAVE_MAEMO 1'
7457 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7458 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7460 _def_maemo
='#undef HAVE_MAEMO'
7465 echocheck
"color console output"
7466 if test "$_color_console" = yes ; then
7467 _def_color_console
='#define MSG_USE_COLORS 1'
7469 _def_color_console
='#undef MSG_USE_COLORS'
7471 echores
"$_color_console"
7473 # linker paths should be the same for mencoder and mplayer
7475 for I
in $_libs_mplayer ; do
7476 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7477 if test -z "$_tmp" ; then
7478 _ld_extra
="$I $_ld_extra"
7480 _ld_tmp
="$_ld_tmp $I"
7483 _libs_mplayer
=$_ld_tmp
7486 #############################################################################
7488 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -shared-libgcc"
7489 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7490 CFLAGS
="$CFLAGS -no-cpp-precomp"
7494 CFLAGS
="$CFLAGS -DNEWLIB -D__USE_INLINE__"
7497 # use flag for HPUX missing setenv()
7498 CFLAGS
="$CFLAGS -DHPUX"
7502 CFLAGS
="$CFLAGS -D_REENTRANT"
7504 # FIXME bsd needs this so maybe other OS'es
7505 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7508 CFLAGS
="$CFLAGS -D__CYGWIN__"
7510 # 64 bit file offsets?
7511 if test "$_largefiles" = yes || freebsd
; then
7512 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7513 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7514 # dvdread support requires this (for off64_t)
7515 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7516 cygwin
&& CFLAGS
="$CFLAGS -DSYS_CYGWIN"
7520 # Make sure config.h gets included.
7521 if test "$_dvdread_internal" = yes ||
test "$_faad_internal" = yes ; then
7522 CFLAGS
="$CFLAGS -DHAVE_CONFIG_H"
7525 CFLAGS
="-I. -I.. -I../libavutil $CFLAGS"
7526 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
7529 int main(void) { return 0; }
7531 if test "$cc_vendor" = "gnu" ; then
7532 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7533 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
7534 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
7538 #this must be the last test to be performed or the ones following it will likely fail
7539 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
7540 # to use its own copy of the library)
7541 echocheck
"DVD support (libdvdnav)"
7542 if test "$_dvdnav" = auto
; then
7543 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7545 if test "$_dvdnav" = auto
; then
7547 #include <inttypes.h>
7549 int main(void) { dvdnav_t *dvd=0; return 0; }
7552 _dvdnavdir
=`$_dvdnavconfig --cflags`
7553 _dvdnavlibs
=`$_dvdnavconfig --libs`
7554 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7556 if test "$_dvdnav" = yes ; then
7558 _def_dvdnav
='#define USE_DVDNAV 1'
7559 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
7560 _ld_extra
="$_ld_extra `$_dvdnavconfig --minilibs`"
7561 _inputmodules
="dvdnav $_inputmodules"
7563 _def_dvdnav
='#undef USE_DVDNAV'
7564 _noinputmodules
="dvdnav $_noinputmodules"
7568 #############################################################################
7569 echo "Creating config.mak"
7570 cat > config.mak
<< EOF
7571 # -------- Generated by configure -----------
7574 MAN_LANG = $MAN_LANG
7575 TARGET_OS = $system_name
7577 prefix = \$(DESTDIR)$_prefix
7578 BINDIR = \$(DESTDIR)$_bindir
7579 DATADIR = \$(DESTDIR)$_datadir
7580 MANDIR = \$(DESTDIR)$_mandir
7581 CONFDIR = \$(DESTDIR)$_confdir
7582 LIBDIR = \$(DESTDIR)$_libdir
7583 # FFmpeg uses libdir instead of LIBDIR
7590 LDCONFIG = $_ldconfig
7592 EXTRA_INC = $_inc_extra
7593 EXTRAXX_INC = $_inc_extra $_inc_extraxx
7594 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7595 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
7596 CFLAG_STACKREALIGN = $_stackrealign
7597 INSTALLSTRIP = $_install_strip
7599 HELP_FILE = $_mp_help
7603 MPLAYER_NETWORK = $_network
7605 STREAMING_LIVE555 = $_live
7606 LIBNEMESI = $_nemesi
7607 NATIVE_RTSP = $_native_rtsp
7609 STREAM_CACHE = $_stream_cache
7612 VIDIX_INTERNAL = $_vidix_internal
7613 VIDIX_EXTERNAL = $_vidix_external
7614 VIDIX_PCIDB = $_vidix_pcidb_val
7621 LIBMPEG2 = $_libmpeg2
7622 TREMOR_INTERNAL = $_tremor_internal
7623 TREMOR_LOW = $_tremor_low
7627 MUSEPACK = $_musepack
7629 UNRARLIB = $_unrarlib
7630 UNRAR_EXEC = $_unrar_exec
7635 EXTRALIBS = $_extra_libs
7636 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7637 EXTRALIBS_MPLAYER = $_libs_mplayer
7638 EXTRALIBS_MENCODER = $_libs_mencoder
7641 HAVE_PTHREADS = $_pthreads
7642 HAVE_W32THREADS = $_w32threads
7644 HAVE_XVMC_ACCEL = $_xvmc
7646 HAVE_SYS_MMAN_H = $_mman
7647 HAVE_POSIX_SELECT = $_posix_select
7649 NEED_GETTIMEOFDAY = $_need_gettimeofday
7650 NEED_GLOB = $_need_glob
7651 NEED_SETENV = $_need_setenv
7652 NEED_SHMEM = $_need_shmem
7653 NEED_STRSEP = $_need_strsep
7654 NEED_SWAB = $_need_swab
7655 NEED_VSSCANF = $_need_vsscanf
7662 LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7671 # input/demuxer/codecs
7672 JOYSTICK = $_joystick
7674 APPLE_REMOTE = $_apple_remote
7679 TV_DSHOW = $_tv_dshow
7680 TV_BSDBT848 = $_tv_bsdbt848
7681 TV_TELETEXT = $_tv_teletext
7682 AUDIO_INPUT = $_audio_input
7686 DVDREAD_INTERNAL = $_dvdread_internal
7687 DVDCSS_INTERNAL = $_libdvdcss_internal
7689 WIN32DLL = $_win32dll
7691 REAL_CODECS = $_real
7692 XANIM_CODECS = $_xanim
7693 LIBAVUTIL = $_libavutil
7694 LIBAVUTIL_A = $_libavutil_a
7695 LIBAVUTIL_SO = $_libavutil_so
7696 LIBAVCODEC = $_libavcodec
7697 LIBAVCODEC_A = $_libavcodec_a
7698 LIBAVCODEC_SO = $_libavcodec_so
7699 LIBAVFORMAT = $_libavformat
7700 LIBAVFORMAT_A = $_libavformat_a
7701 LIBAVFORMAT_SO = $_libavformat_so
7702 LIBPOSTPROC = $_libpostproc
7703 LIBPOSTPROC_A = $_libpostproc_a
7704 LIBPOSTPROC_SO = $_libpostproc_so
7713 MENCODER = $_mencoder
7716 BITMAP_FONT = $_bitmap_font
7717 FREETYPE = $_freetype
7720 LIBVORBIS = $_vorbis
7721 LIBTHEORA = $_theora
7722 FAAD_INTERNAL = $_faad_internal
7723 FAAD_FIXED = $_faad_fixed
7724 LIBSMBCLIENT = $_smbsupport
7725 XMMS_PLUGINS = $_xmms
7727 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7728 MACOSX_BUNDLE = $_macosx_bundle
7729 MACOSX_COREVIDEO = $_macosx_corevideo
7733 CONFIG_LIBAMR=$_libamr
7734 CONFIG_LIBAMR_NB=$_libamr_nb
7735 CONFIG_LIBAMR_WB=$_libamr_wb
7736 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7737 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7738 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7739 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7740 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7741 `echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7742 CONFIG_LIBFAAC=$_lavc_faac
7743 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7744 CONFIG_LIBVORBIS=$_libvorbis
7745 CONFIG_LIBXVID=$_lavc_xvid
7746 CONFIG_LIBX264=$_lavc_x264
7749 CONFIG_ENCODERS=$_mencoder
7750 CONFIG_MUXERS=$_mencoder
7752 RADIO_CAPTURE=$_radio_capture
7753 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7754 VIDIX_IVTV=$_vidix_drv_ivtv
7755 VIDIX_MACH64=$_vidix_drv_mach64
7756 VIDIX_MGA=$_vidix_drv_mga
7757 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7758 VIDIX_NVIDIA=$_vidix_drv_nvidia
7759 VIDIX_PM2=$_vidix_drv_pm2
7760 VIDIX_PM3=$_vidix_drv_pm3
7761 VIDIX_RADEON=$_vidix_drv_radeon
7762 VIDIX_RAGE128=$_vidix_drv_rage128
7763 VIDIX_SAVAGE=$_vidix_drv_savage
7764 VIDIX_SIS=$_vidix_drv_sis
7765 VIDIX_UNICHROME=$_vidix_drv_unichrome
7767 # --- Some stuff for autoconfigure ----
7773 HAVE_MMX2 = $_mmxext
7774 HAVE_3DNOW = $_3dnow
7775 HAVE_3DNOWEX = $_3dnowext
7778 HAVE_ALTIVEC = $_altivec
7779 HAVE_ARMV5TE = $_armv5te
7780 HAVE_ARMV6 = $_armv6
7781 HAVE_IWMMXT = $_iwmmxt
7787 # --- libvo stuff ---
7790 # --- libao2 stuff ---
7793 # --- libaf stuff ---
7798 #############################################################################
7800 ff_config_enable
() {
7802 test -z "$_nprefix" && _nprefix
='CONFIG'
7804 if ` echo $2 | grep -E "(^| )$part($| )" > /dev/null `; then
7805 echo "#define ${_nprefix}_$part 1"
7806 echo "#define ENABLE_$part 1"
7808 echo "#define ENABLE_$part 0"
7813 echo "Creating config.h"
7815 /* -------- This file has been automatically generated by configure ---------
7816 Note: Any changes in it will be lost when you run configure again. */
7818 /* Protect against multiple inclusion */
7819 #ifndef MPLAYER_CONFIG_H
7820 #define MPLAYER_CONFIG_H 1
7822 #define CONFIGURATION "$_configuration"
7824 /* make sure we never get lavformat's poll() emulation, the results are
7825 horrible if the X libs try to actually use it, see MPlayer-users
7826 Message-ID: <45D49541.8060101@infernix.net>
7827 Date: Thu, 15 Feb 2007 18:15:45 +0100
7828 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7830 #define HAVE_SYS_POLL_H 1
7832 /* yes, we have inttypes.h */
7833 #define HAVE_INTTYPES_H 1
7835 /* int_fastXY_t emulation */
7839 #define HAVE_ERRNO_H 1
7841 /* libdvdcss + libdvdread */
7842 #define HAVE_LIMITS_H 1
7844 /* libdvdcss + libfaad2 */
7845 #define HAVE_UNISTD_H 1
7847 /* libfaad2 + libdvdread */
7848 #define STDC_HEADERS 1
7851 #define HAVE_MEMCPY 1
7852 #define HAVE_STRCHR 1
7855 #define HAVE_UINTPTR_T 1
7857 /* name of messages charset */
7860 /* Runtime CPU detection */
7861 $_def_runtime_cpudetection
7863 /* Dynamic a/v plugins */
7864 $_def_dynamic_plugins
7866 /* "restrict" keyword */
7867 $_def_restrict_keyword
7869 /* __builtin_expect branch prediction hint */
7870 $_def_builtin_expect
7871 #ifdef HAVE_BUILTIN_EXPECT
7872 #define likely(x) __builtin_expect ((x) != 0, 1)
7873 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7875 #define likely(x) (x)
7876 #define unlikely(x) (x)
7879 /* attribute(used) as needed by some compilers */
7880 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7881 # define attribute_used __attribute__((used))
7883 # define attribute_used
7886 /* compiler support for named assembler arguments */
7887 $_def_named_asm_args
7889 /* enable/disable SIGHANDLER */
7892 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7895 /* Toggles debugging informations */
7898 /* Toggles color console output */
7901 /* Indicates that libcdio is available for VCD and CD-DA playback */
7904 /* Indicates that Ogle's libdvdread is available for DVD playback */
7907 /* Indicates that dvdread is internal */
7908 $_def_dvdread_internal
7910 /* Additional options for libdvdread/libdvdcss */
7923 /* Common data directory (for fonts, etc) */
7924 #define MPLAYER_DATADIR "$_datadir"
7925 #define MPLAYER_CONFDIR "$_confdir"
7926 #define MPLAYER_LIBDIR "$_libdir"
7928 /* Define this to compile stream-caching support, it can be enabled via
7929 -cache <kilobytes> */
7932 /* Define if you are using XviD library */
7935 /* Define if you are using the X.264 library */
7938 /* Define if you are using libnut */
7941 /* Define to include support for libdv-0.9.5 */
7944 /* If build mencoder */
7947 /* Indicates if libmp3lame is available
7948 Note: for mencoder */
7950 $_def_mp3lame_preset
7951 $_def_mp3lame_preset_medium
7953 /* Undefine this if you do not want to select mono audio (left or right)
7954 with a stereo MPEG layer 2/3 audio stream. The command line option
7955 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7956 right-only), with 0 being the default.
7958 #define USE_FAKE_MONO 1
7960 /* Undefine this if your sound card driver has no working select().
7961 If you have kernel Oops, player hangups, or just no audio, you should
7962 try to recompile MPlayer with this option disabled! */
7965 /* define this to use iconv(3) function to codepage conversions */
7968 /* define this to use nl_langinfo function */
7971 /* define this to use RTC (/dev/rtc) for video timers */
7974 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7975 #define MAX_OUTBURST 65536
7977 /* set up audio OUTBURST. Do not change this! */
7978 #define OUTBURST 512
7980 /* Define this if your system has the header file for the OSS sound interface */
7983 /* Define this if your system has the header file for the OSS sound interface
7984 * in /usr/include */
7987 /* Define this if your system has the sysinfo header */
7990 /* Define this if your system has the "malloc.h" header file */
7993 /* memalign is mapped to malloc if unsupported */
7998 /* assembler handling of .align */
8001 /* Define this if your system has the "alloca.h" header file */
8004 /* Define this if your system has the "sys/mman.h" header file */
8006 $_def_mman_has_map_failed
8008 /* Define this if you have the elf dynamic linker -ldl library */
8011 /* Define this if you have the kstat kernel statistics library */
8014 /* Define this if you have zlib */
8017 #define CONFIG_ZLIB 1
8020 /* Define this if you have shm support */
8023 /* Define this if your system has strsep */
8026 /* Define this if your system has vsscanf */
8029 /* Define this if your system has swab */
8032 /* Define this if your system has posix select */
8035 /* Define this if your system has gettimeofday */
8038 /* Define this if your system has glob */
8041 /* Define this if your system has setenv */
8044 int setenv(const char *name, const char *val, int overwrite);
8047 /* Define this if your system has sysi86 */
8051 /* Define this if your system has pthreads */
8054 /* Define this if you enabled thread support for libavcodec */
8057 #define ENABLE_THREADS 1
8059 #define ENABLE_THREADS 0
8062 /* LIRC (remote control, see www.lirc.org) support: */
8065 /* Apple Remote (remote control, see http://docs.info.apple.com/article.html?artnum=302504) support: */
8068 /* Support for maemo (http://www.maemo.org) */
8072 * LIRCCD (LIRC client daemon)
8073 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
8077 /* DVD navigation support using libdvdnav */
8080 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
8081 #define MPEG12_POSTPROC 1
8083 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
8086 $_def_libpostproc_so
8088 /* Win32 DLL support */
8090 #define WIN32_PATH "$_win32codecsdir"
8092 /* Mac OS X specific features */
8094 $_def_macosx_finder_support
8096 $_def_macosx_corevideo
8098 /* Build our Win32-loader */
8101 /* ffmpeg's libavcodec support (requires libavcodec source) */
8105 $_def_libavcodec_mpegaudio_hp
8107 /* ffmpeg's libavformat support (requires libavformat source) */
8110 $_def_libavformat_so
8116 /* Use libavcodec's decoders */
8117 #define CONFIG_DECODERS 1
8118 /* Use libavcodec's encoders */
8119 #define CONFIG_ENCODERS 1
8121 /* Use libavformat's demuxers */
8122 #define CONFIG_DEMUXERS 1
8123 /* Use libavformat's muxers */
8126 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8127 #define HAVE_EBX_AVAILABLE 1
8129 #define HAVE_EBP_AVAILABLE 1
8132 #define CONFIG_GPL 1
8133 #define ENABLE_SMALL 0
8135 /* Support for grayscale encoding/decoding in FFmpeg (makes color slower) */
8136 #define ENABLE_GRAY 1
8138 /* Use AMR codecs from libavcodec. */
8143 /* Use specific parts from FFmpeg. */
8144 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
8145 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
8146 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
8147 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
8148 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
8149 `ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
8150 `ff_config_enable "$_libavbsfs_all" "$_libavbsfs"`
8157 /* Use codec libs included in mplayer CVS / source dist: */
8163 /* XAnim DLL support */
8165 /* Default search path */
8168 /* RealPlayer DLL support */
8170 /* Default search path */
8173 /* LIVE555 Streaming Media library support */
8176 /* libnemesi Streaming Media library support */
8179 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8182 /* Use unrarlib for Vobsubs */
8185 /* Use UnRAR executable for Vobsubs */
8188 /* gui support, please do not edit this option */
8192 /* Audio output drivers */
8194 $_def_ossaudio_devdsp
8195 $_def_ossaudio_devmixer
8206 $_def_sys_asoundlib_h
8207 $_def_alsa_asoundlib_h
8213 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8215 #undef FAST_OSD_TABLE
8217 /* Enable TV Interface support */
8220 /* Enable Video 4 Linux TV interface support */
8223 /* Enable Video 4 Linux 1 TV interface support */
8226 /* Enable Video 4 Linux 2 TV interface support */
8229 /* Enable DirectShow TV interface support */
8232 /* *BSD BrookTree headers */
8233 $_def_ioctl_meteor_h_name
8234 $_def_ioctl_bt848_h_name
8236 /* Enable *BSD BrookTree TV interface support */
8239 /* Enable TV Teletext Interface support */
8242 /* Enable Radio Interface support */
8245 /* Enable Capture for Radio Interface support */
8248 /* Enable Video 4 Linux Radio interface support */
8251 /* Enable Video 4 Linux 2 Radio interface support */
8254 /* Enable *BSD BrookTree Radio interface support */
8255 $_def_radio_bsdbt848
8257 /* Enable Video 4 Linux 2 MPEG PVR support */
8260 /* Define if your processor stores words with the most significant
8261 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8264 /* Define if your processor can access unaligned data in a fast way */
8265 $_def_fast_unaligned
8267 `ff_config_enable "$_arch_all" "$_arch" "ARCH"`
8269 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8270 have the instruction. */
8273 /* only gcc3 can compile mvi instructions (libmpeg2) */
8274 $_def_gcc_mvi_support
8276 /* Define this for Cygwin build for win32 */
8279 /* Define this to any prefered value from 386 up to infinity with step 100 */
8280 #define __CPU__ $iproc
8289 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8290 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8291 #elif defined(WIN32)
8292 #define DEFAULT_CDROM_DEVICE "D:"
8293 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8294 #elif defined(__APPLE__) || defined(__DARWIN__)
8295 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8296 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8297 #elif defined(__OpenBSD__)
8298 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8299 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8300 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8301 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8302 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8303 #elif defined(__AMIGAOS4__)
8304 #define DEFAULT_CDROM_DEVICE "a1ide.device:2"
8305 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8307 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8308 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8312 /*----------------------------------------------------------------------------
8314 ** NOTE: Instead of modifying these definitions here, use the
8315 ** --enable/--disable options of the ./configure script!
8316 ** See ./configure --help for details.
8318 *---------------------------------------------------------------------------*/
8320 /* C99 lrintf function available */
8323 /* mkstemp support */
8326 /* nanosleep support */
8332 /* termcap flag for getch2.c */
8335 /* termios flag for getch2.c */
8340 /* enable PNG support */
8343 /* enable JPEG support */
8346 /* enable PNM support */
8349 /* enable md5sum support */
8352 /* enable GIF support */
8357 /* enable bitmap font support */
8360 /* enable FreeType support */
8363 /* enable Fontconfig support */
8366 /* enable SSA/ASS support */
8369 /* enable FriBiDi usage */
8372 /* enable ENCA usage */
8375 /* liblzo support */
8378 #define CONFIG_LZO 1
8381 /* libmad support */
8384 /* enable OggVorbis support */
8388 /* enable Speex support */
8391 /* enable musepack support */
8394 /* enable OggTheora support */
8397 /* enable FAAD (AAC) support */
8401 /* enable FAAC (AAC encoder) support */
8404 /* enable LADSPA plugin support */
8407 /* enable network */
8410 /* enable ftp support */
8413 /* enable vstream support */
8416 /* enable winsock2 instead of Unix functions*/
8419 /* define this to use inet_aton() instead of inet_pton() */
8422 /* enables / disables cdparanoia support */
8426 /* enables / disables VIDIX usage */
8428 $_def_vidix_drv_cyberblade
8429 $_def_vidix_drv_ivtv
8430 $_def_vidix_drv_mach64
8432 $_def_vidix_drv_mga_crtc2
8433 $_def_vidix_drv_nvidia
8435 $_def_vidix_drv_radeon
8436 $_def_vidix_drv_rage128
8437 $_def_vidix_drv_savage
8439 $_def_vidix_drv_unichrome
8442 /* enables / disables new input joystick support */
8445 /* enables / disables QTX codecs */
8448 /* enables / disables osd menu */
8451 /* enables / disables subtitles sorting */
8454 /* XMMS input plugin support */
8456 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8458 /* enables inet6 support */
8461 /* do we have gethostbyname2? */
8462 $_def_gethostbyname2
8464 /* Extension defines */
8465 `ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
8467 $_def_altivec_h // enables usage of altivec.h
8469 /* libmpeg2 uses a different feature test macro for mediaLib */
8471 #define LIBMPEG2_MLIB 1
8475 #define SCREEN_SIZE_X 1
8476 #define SCREEN_SIZE_Y 1
8489 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8500 $_def_directfb_version
8525 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8526 #define X11_FULLSCREEN 1
8529 #endif /* MPLAYER_CONFIG_H */
8532 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8533 cmp -s "$TMPH" config.h ||
mv -f "$TMPH" config.h
8535 #############################################################################
8539 Config files successfully generated by ./configure $_configuration !
8541 Install prefix: $_prefix
8542 Data directory: $_datadir
8543 Config direct.: $_confdir
8545 Byte order: $_byte_order
8546 Optimizing for: $_optimizing
8549 Messages/GUI: $_language
8552 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8553 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8558 Enabled optional drivers:
8559 Input: $_inputmodules
8560 Codecs: $_codecmodules
8561 Audio output: $_aomodules
8562 Video output: $_vomodules
8563 Audio filters: $_afmodules
8564 Disabled optional drivers:
8565 Input: $_noinputmodules
8566 Codecs: $_nocodecmodules
8567 Audio output: $_noaomodules
8568 Video output: $_novomodules
8569 Audio filters: $_noafmodules
8571 'config.h' and 'config.mak' contain your configuration options.
8572 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8573 compile *** DO NOT REPORT BUGS if you tweak these files ***
8575 'make' will now compile MPlayer and 'make install' will install it.
8576 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8581 if test "$_mtrr" = yes ; then
8582 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8588 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8589 operating system ($system_name). You may encounter a few files that cannot
8590 be played due to missing open source video/audio codec support.
8597 Check $TMPLOG if you wonder why an autodetection failed (make sure
8598 development headers/packages are installed).
8600 NOTE: The --enable-* parameters unconditionally force options on, completely
8601 skipping autodetection. This behavior is unlike what you may be used to from
8602 autoconf-based configure scripts that can decide to override you. This greater
8603 level of control comes at a price. You may have to provide the correct compiler
8604 and linker flags yourself.
8605 If you used one of these options (except --enable-gui and similar ones that
8606 turn on internal features) and experience a compilation or linking failure,
8607 make sure you have passed the necessary compiler/linker flags to configure.
8609 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8613 if test "$_warn_CFLAGS" = yes; then
8616 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8618 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8620 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8621 To do so, execute 'CFLAGS= ./configure <options>'
8627 rm -f "$TMPEXE" "$TMPC" "$TMPS" "$TMPCPP" "$TMPH"