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 $TMPO $@" >> "$TMPLOG"
67 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPO" "$@" >> "$TMPLOG" 2>&1
75 compile_check
$TMPC $@
79 compile_check
$TMPCPP $@
-lstdc++
83 "$TMPO" >> "$TMPLOG" 2>&1
86 # Display error message, flushes tempfile, exit
91 rm -f "$TMPO" "$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" ; 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;;
161 # not boolean test: implement the posix shell "!" operator for a
163 # usage: not {command}
164 # returns exit status "success" when the execution of "command"
171 # Use this before starting a check
173 echo "============ Checking for $@ ============" >> "$TMPLOG"
174 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
177 # Use this to echo the results of a check
179 if test "$_res_comment" ; then
180 _res_comment
="($_res_comment)"
182 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
183 echo "##########################################" >> "$TMPLOG"
185 echo "$@ $_res_comment"
188 #############################################################################
190 # Check how echo works in this /bin/sh
192 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
193 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
196 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"`
200 Usage: $0 [OPTIONS]...
203 -h, --help display this help and exit
205 Installation directories:
206 --prefix=DIR prefix directory for installation [/usr/local]
207 --bindir=DIR directory for installing binaries [PREFIX/bin]
208 --datadir=DIR directory for installing machine independent
209 data files (skins, etc) [PREFIX/share/mplayer]
210 --mandir=DIR directory for installing man pages [PREFIX/man]
211 --confdir=DIR directory for installing configuration files
213 --libdir=DIR directory for object code libraries [PREFIX/lib]
214 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
215 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
216 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
217 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
220 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
221 --disable-mplayer disable MPlayer compilation [enable]
222 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
223 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
224 --enable-largefiles enable support for files > 2GB [disable]
225 --enable-linux-devfs set default devices to devfs [disable]
226 --enable-termcap use termcap database for key codes [autodetect]
227 --enable-termios use termios database for key codes [autodetect]
228 --disable-iconv disable iconv for encoding conversion [autodetect]
229 --disable-langinfo do not use langinfo [autodetect]
230 --enable-lirc enable LIRC (remote control) support [autodetect]
231 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
232 --enable-joystick enable joystick support [disable]
233 --disable-vm disable X video mode extensions [autodetect]
234 --disable-xf86keysym disable support for multimedia keys [autodetect]
235 --enable-radio enable radio interface [disable]
236 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
237 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
238 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
239 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
240 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
241 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
242 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
243 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
244 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
245 --disable-network disable networking [enable]
246 --enable-winsock2 enable winsock2 [autodetect]
247 --enable-smb enable Samba (SMB) input [autodetect]
248 --enable-live enable LIVE555 Streaming Media [autodetect]
249 --disable-dvdnav disable libdvdnav [autodetect]
250 --disable-dvdread disable libdvdread [autodetect]
251 --disable-dvdread-internal disable internal libdvdread [autodetect]
252 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
253 --disable-cdparanoia disable cdparanoia [autodetect]
254 --disable-cddb disable cddb [autodetect]
255 --disable-bitmap-font disable bitmap font support [enable]
256 --disable-freetype disable FreeType 2 font rendering [autodetect]
257 --disable-fontconfig disable fontconfig font lookup [autodetect]
258 --disable-unrarlib disable Unique RAR File Library [enabled]
259 --enable-menu enable OSD menu (not DVD menu) [disabled]
260 --disable-sortsub disable subtitle sorting [enabled]
261 --enable-fribidi enable the FriBiDi libs [autodetect]
262 --disable-enca disable ENCA charset oracle library [autodetect]
263 --disable-macosx disable Mac OS X specific features [autodetect]
264 --disable-maemo disable maemo specific features [autodetect]
265 --enable-macosx-finder-support enable Mac OS X Finder invocation
266 parameter parsing [disabled]
267 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
268 --disable-inet6 disable IPv6 support [autodetect]
269 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
270 --disable-ftp disable FTP support [enabled]
271 --disable-vstream disable TiVo vstream client support [autodetect]
272 --disable-pthreads disable Posix threads support [autodetect]
273 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
274 --enable-rpath enable runtime linker path for extra libs [disabled]
277 --enable-gif enable GIF support [autodetect]
278 --enable-png enable PNG input/output support [autodetect]
279 --enable-jpeg enable JPEG input/output support [autodetect]
280 --enable-libcdio enable external libcdio [autodetect]
281 --enable-liblzo enable external liblzo [autodetect]
282 --disable-win32dll disable Win32 DLL support [enabled]
283 --disable-qtx disable QuickTime codecs support [enabled]
284 --disable-xanim disable XAnim codecs support [enabled]
285 --disable-real disable RealPlayer codecs support [enabled]
286 --disable-xvid disable XviD [autodetect]
287 --disable-x264 disable x264 [autodetect]
288 --disable-nut disable libnut [autodetect]
289 --disable-libavutil disable static libavutil [autodetect]
290 --disable-libavcodec_a disable static libavcodec [autodetect]
291 --disable-libavformat_a disable static libavformat [autodetect]
292 --disable-libpostproc_a disable static libpostproc [autodetect]
293 --disable-libavutil_so disable shared libavutil [autodetect]
294 --disable-libavcodec_so disable shared libavcodec [autodetect]
295 --disable-libavformat_so disable shared libavformat [autodetect]
296 --disable-libpostproc_so disable shared libpostproc [autodetect]
297 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
298 in libavcodec [enabled]
299 --disable-tremor-internal disable internal Tremor [enabled]
300 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
301 --enable-tremor-external enable external Tremor [autodetect]
302 --disable-libvorbis disable libvorbis support [autodetect]
303 --disable-speex disable Speex support [autodetect]
304 --enable-theora enable OggTheora libraries [autodetect]
305 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
306 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
307 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
308 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
309 --disable-ladspa disable LADSPA plugin support [autodetect]
310 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
311 --disable-mad disable libmad (MPEG audio) support [autodetect]
312 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
313 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
314 --enable-xmms enable XMMS input plugin support [disabled]
315 --enable-libdts enable libdts support [autodetect]
316 --disable-mp3lib disable builtin mp3lib [enabled]
317 --disable-liba52 disable builtin liba52 [enabled]
318 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
319 --disable-musepack disable musepack support [autodetect]
320 --disable-amr_nb disable AMR narrowband, floating-point [autodetect]
321 --disable-amr_wb disable AMR wideband, floating-point [autodetect]
322 --disable-decoder=DECODER disable specified FFmpeg decoder
323 --enable-decoder=DECODER enable specified FFmpeg decoder
324 --disable-encoder=ENCODER disable specified FFmpeg encoder
325 --enable-encoder=ENCODER enable specified FFmpeg encoder
326 --disable-parser=PARSER disable specified FFmpeg parser
327 --enable-parser=PARSER enable specified FFmpeg parser
328 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
329 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
330 --disable-muxer=MUXER disable specified FFmpeg muxer
331 --enable-muxer=MUXER enable specified FFmpeg muxer
334 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
335 --disable-vidix-external disable external VIDIX [for x86 *nix]
336 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
337 Available: all,cyberblade,mach64,mga,mga_crtc2,
338 nvidia,pm2,pm3,radeon,rage128,savage,sis,unichrome
339 --enable-gl enable OpenGL video output [autodetect]
340 --enable-dga[=n] enable DGA [n in {1, 2} ] support [autodetect]
341 --enable-vesa enable VESA video output [autodetect]
342 --enable-svga enable SVGAlib video output [autodetect]
343 --enable-sdl enable SDL video output [autodetect]
344 --enable-aa enable AAlib video output [autodetect]
345 --enable-caca enable CACA video output [autodetect]
346 --enable-ggi enable GGI video output [autodetect]
347 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
348 --enable-directx enable DirectX video output [autodetect]
349 --enable-dxr2 enable DXR2 video output [autodetect]
350 --enable-dxr3 enable DXR3/H+ video output [autodetect]
351 --enable-ivtv enable IVTV TV-Out video output [autodetect]
352 --enable-dvb enable DVB video output [autodetect]
353 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
354 --enable-mga enable mga_vid video output [autodetect]
355 --enable-xmga enable mga_vid X11 video output [autodetect]
356 --enable-xv enable Xv video output [autodetect]
357 --enable-xvmc enable XvMC acceleration [disable]
358 --enable-vm enable XF86VidMode support [autodetect]
359 --enable-xinerama enable Xinerama support [autodetect]
360 --enable-x11 enable X11 video output [autodetect]
361 --enable-xshape enable XShape support [autodetect]
362 --enable-fbdev enable FBDev video output [autodetect]
363 --enable-mlib enable mediaLib video output (Solaris) [disable]
364 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
365 --enable-tdfxfb enable tdfxfb video output [disable]
366 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
367 --enable-directfb enable DirectFB video output [autodetect]
368 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
369 --enable-bl enable Blinkenlights video output [disable]
370 --enable-tdfxvid enable tdfx_vid video output [disable]
371 --disable-tga disable Targa video output [enable]
372 --disable-pnm disable PNM video output [enable]
373 --disable-md5sum disable md5sum video output [enable]
376 --disable-alsa disable ALSA audio output [autodetect]
377 --disable-ossaudio disable OSS audio output [autodetect]
378 --disable-arts disable aRts audio output [autodetect]
379 --disable-esd disable esd audio output [autodetect]
380 --disable-polyp disable Polypaudio audio output [autodetect]
381 --disable-jack disable JACK audio output [autodetect]
382 --disable-openal disable OpenAL audio output [autodetect]
383 --disable-nas disable NAS audio output [autodetect]
384 --disable-sgiaudio disable SGI audio output [autodetect]
385 --disable-sunaudio disable Sun audio output [autodetect]
386 --disable-win32waveout disable Windows waveout audio output [autodetect]
387 --disable-select disable using select() on the audio device [enable]
389 Miscellaneous options:
390 --enable-runtime-cpudetection enable runtime CPU detection [disable]
391 --enable-cross-compile enable cross-compilation [autodetect]
392 --cc=COMPILER C compiler to build MPlayer [gcc]
393 --host-cc=COMPILER C compiler for tools needed while building [gcc]
394 --as=ASSEMBLER assembler to build MPlayer [as]
395 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
396 --enable-static build a statically linked binary
397 --charset=charset convert the console messages to this character set
398 --language=list a white space or comma separated list of languages for
399 translated man pages, the first language is used for
400 messages and the GUI (the environment variable
401 \$LINGUAS is also honored) [en]
402 (Available: $LANGUAGES all)
403 --with-install=PATH path to a custom install program
404 --enable-color-console enable color console output (UNSUPPORTED) [disable]
407 --enable-mmx enable MMX [autodetect]
408 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
409 --enable-3dnow enable 3DNow! [autodetect]
410 --enable-3dnowext enable extended 3DNow! [autodetect]
411 --enable-sse enable SSE [autodetect]
412 --enable-sse2 enable SSE2 [autodetect]
413 --enable-shm enable shm [autodetect]
414 --enable-altivec enable AltiVec (PowerPC) [autodetect]
415 --enable-armv5te enable DSP extensions (ARM) [autodetect]
416 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
417 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
418 --enable-big-endian force byte order to big-endian [autodetect]
419 --enable-debug[=1-3] compile-in debugging information [disable]
420 --enable-profile compile-in profiling information [disable]
421 --disable-sighandler disable sighandler for crashes [enable]
422 --enable-crash-debug enable automatic gdb attach on crash [disable]
423 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
425 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
426 --disable-gcc-check disable gcc version checking [enable]
428 Use these options if autodetection fails (Options marked with (*) accept
429 multiple paths separated by ':'):
430 --extra-libs=FLAGS extra linker flags
431 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
432 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
433 --with-extraincdir=DIR extra header search paths in DIR (*)
434 --with-extralibdir=DIR extra linker search paths in DIR (*)
435 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
437 --with-freetype-config=PATH path to freetype-config
438 --with-fribidi-config=PATH path to fribidi-config
439 --with-glib-config=PATH path to glib*-config
440 --with-gtk-config=PATH path to gtk*-config
441 --with-sdl-config=PATH path to sdl*-config
442 --with-dvdnav-config=PATH path to dvdnav-config
444 This configure script is NOT autoconf-based, even though its output is similar.
445 It will try to autodetect all configuration options. If you --enable an option
446 it will be forcefully turned on, skipping autodetection. This can break
447 compilation, so you need to know what you are doing.
452 # GOTCHA: the variables below defines the default behavior for autodetection
453 # and have - unless stated otherwise - at least 2 states : yes no
454 # If autodetection is available then the third state is: auto
470 test "$CC" && _cc
="$CC"
473 _runtime_cpudetection
=no
481 _libavdecoders_all
=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
482 _libavdecoders
=` echo $_libavdecoders_all | sed -e s/AAC_DECODER// -e s/MPEG4AAC_DECODER// -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// `
483 _libavencoders_all
=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
484 _libavencoders
=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// `
485 _libavparsers_all
=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
486 _libavparsers
=$_libavparsers_all
487 _libavdemuxers_all
=`sed -n 's/^[^#]*DEMUX.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
488 _libavdemuxers
=`echo $_libavdemuxers_all | sed -e s/AUDIO_DEMUXER// -e s/DC1394_DEMUXER// -e s/DV1394_DEMUXER// -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/VIDEO_GRAB_V4L_DEMUXER// -e s/VIDEO_GRAB_BKTR_DEMUXER// -e s/X11_GRAB_DEVICE_DEMUXER// -e s/V4L2_DEMUXER// -e s/LIBNUT_DEMUXER// `
489 _libavmuxers_all
=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
490 _libavmuxers
=`echo $_libavmuxers_all | sed -e s/AUDIO_MUXER// -e s/RTP_MUXER// `
491 _libavprotocols_all
=`sed -n 's/^[^#]*PROTOCOL.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
497 _libavcodec_mpegaudio_hp
=yes
502 _dga
=auto
# 1 2 no auto
504 _xvmc
=no
#auto when complete
543 _tremor_external
=auto
558 _dvdnavconfig
=dvdnav-config
560 _dvdread_internal
=auto
561 _libdvdcss_internal
=auto
570 _mlib
=no
#broken, thus disabled
631 _macosx_finder_support
=no
634 _freetypeconfig
='freetype-config'
636 _fribidiconfig
='fribidi-config'
649 _def_stream_cache
="#define USE_STREAM_CACHE 1"
657 _prefix
=`echo $ac_option | cut -d '=' -f 2`
660 _bindir
=`echo $ac_option | cut -d '=' -f 2`
663 _datadir
=`echo $ac_option | cut -d '=' -f 2`
666 _mandir
=`echo $ac_option | cut -d '=' -f 2`
669 _confdir
=`echo $ac_option | cut -d '=' -f 2`
672 _libdir
=`echo $ac_option | cut -d '=' -f 2`
675 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
678 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
681 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
684 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
686 --with-extraincdir=*)
687 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
689 --with-extralibdir=*)
690 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
694 _install
=`echo $ac_option | cut -d '=' -f 2 `
697 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
701 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
703 --with-freetype-config=*)
704 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
706 --with-fribidi-config=*)
707 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
710 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
712 --with-glib-config=*)
713 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
715 --with-dvdnav-config=*)
716 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
720 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
722 --extra-libs-mplayer=*)
723 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
725 --extra-libs-mencoder=*)
726 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
730 _target
=`echo $ac_option | cut -d '=' -f 2`
733 _cc
=`echo $ac_option | cut -d '=' -f 2`
736 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
739 _as
=`echo $ac_option | cut -d '=' -f 2`
742 _charset
=`echo $ac_option | cut -d '=' -f 2`
745 _language
=`echo $ac_option | cut -d '=' -f 2`
764 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
769 --enable-gcc-check) _gcc_check
=yes ;;
770 --disable-gcc-check) _gcc_check
=no
;;
771 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
772 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
773 --enable-cross-compile) _cross_compile
=yes ;;
774 --disable-cross-compile) _cross_compile
=no
;;
775 --enable-mencoder) _mencoder
=yes ;;
776 --disable-mencoder) _mencoder
=no
;;
777 --enable-mplayer) _mplayer
=yes ;;
778 --disable-mplayer) _mplayer
=no
;;
779 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
780 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
781 --enable-x11) _x11
=yes ;;
782 --disable-x11) _x11
=no
;;
783 --enable-xshape) _xshape
=yes ;;
784 --disable-xshape) _xshape
=no
;;
785 --enable-xv) _xv
=yes ;;
786 --disable-xv) _xv
=no
;;
787 --enable-xvmc) _xvmc
=yes ;;
788 --disable-xvmc) _xvmc
=no
;;
789 --enable-sdl) _sdl
=yes ;;
790 --disable-sdl) _sdl
=no
;;
791 --enable-directx) _directx
=yes ;;
792 --disable-directx) _directx
=no
;;
793 --enable-win32waveout) _win32waveout
=yes ;;
794 --disable-win32waveout) _win32waveout
=no
;;
795 --enable-nas) _nas
=yes ;;
796 --disable-nas) _nas
=no
;;
797 --enable-png) _png
=yes ;;
798 --disable-png) _png
=no
;;
799 --enable-jpeg) _jpeg
=yes ;;
800 --disable-jpeg) _jpeg
=no
;;
801 --enable-pnm) _pnm
=yes ;;
802 --disable-pnm) _pnm
=no
;;
803 --enable-md5sum) _md5sum
=yes ;;
804 --disable-md5sum) _md5sum
=no
;;
805 --enable-gif) _gif
=yes ;;
806 --disable-gif) _gif
=no
;;
807 --enable-gl) _gl
=yes ;;
808 --disable-gl) _gl
=no
;;
809 --enable-ggi) _ggi
=yes ;;
810 --disable-ggi) _ggi
=no
;;
811 --enable-ggiwmh) _ggiwmh
=yes ;;
812 --disable-ggiwmh) _ggiwmh
=no
;;
813 --enable-aa) _aa
=yes ;;
814 --disable-aa) _aa
=no
;;
815 --enable-caca) _caca
=yes ;;
816 --disable-caca) _caca
=no
;;
817 --enable-svga) _svga
=yes ;;
818 --disable-svga) _svga
=no
;;
819 --enable-vesa) _vesa
=yes ;;
820 --disable-vesa) _vesa
=no
;;
821 --enable-fbdev) _fbdev
=yes ;;
822 --disable-fbdev) _fbdev
=no
;;
823 --enable-dvb) _dvb
=yes ;;
824 --disable-dvb) _dvb
=no
;;
825 --enable-dvbhead) _dvbhead
=yes ;;
826 --disable-dvbhead) _dvbhead
=no
;;
827 --enable-dxr2) _dxr2
=yes ;;
828 --disable-dxr2) _dxr2
=no
;;
829 --enable-dxr3) _dxr3
=yes ;;
830 --disable-dxr3) _dxr3
=no
;;
831 --enable-ivtv) _ivtv
=yes ;;
832 --disable-ivtv) _ivtv
=no
;;
833 --enable-iconv) _iconv
=yes ;;
834 --disable-iconv) _iconv
=no
;;
835 --enable-langinfo) _langinfo
=yes ;;
836 --disable-langinfo) _langinfo
=no
;;
837 --enable-rtc) _rtc
=yes ;;
838 --disable-rtc) _rtc
=no
;;
839 --enable-libdv) _libdv
=yes ;;
840 --disable-libdv) _libdv
=no
;;
841 --enable-ossaudio) _ossaudio
=yes ;;
842 --disable-ossaudio) _ossaudio
=no
;;
843 --enable-arts) _arts
=yes ;;
844 --disable-arts) _arts
=no
;;
845 --enable-esd) _esd
=yes ;;
846 --disable-esd) _esd
=no
;;
847 --enable-polyp) _polyp
=yes ;;
848 --disable-polyp) _polyp
=no
;;
849 --enable-jack) _jack
=yes ;;
850 --disable-jack) _jack
=no
;;
851 --enable-openal) _openal
=yes ;;
852 --disable-openal) _openal
=no
;;
853 --enable-mad) _mad
=yes ;;
854 --disable-mad) _mad
=no
;;
855 --enable-toolame) _toolame
=yes ;;
856 --disable-toolame) _toolame
=no
;;
857 --enable-twolame) _twolame
=yes ;;
858 --disable-twolame) _twolame
=no
;;
859 --enable-libcdio) _libcdio
=yes ;;
860 --disable-libcdio) _libcdio
=no
;;
861 --enable-liblzo) _liblzo
=yes ;;
862 --disable-liblzo) _liblzo
=no
;;
863 --enable-libvorbis) _libvorbis
=yes ;;
864 --disable-libvorbis) _libvorbis
=no
;;
865 --enable-speex) _speex
=yes ;;
866 --disable-speex) _speex
=no
;;
867 --enable-tremor-internal) _tremor_internal
=yes ;;
868 --disable-tremor-internal) _tremor_internal
=no
;;
869 --enable-tremor-low) _tremor_low
=yes ;;
870 --disable-tremor-low) _tremor_low
=no
;;
871 --enable-tremor-external) _tremor_external
=yes ;;
872 --disable-tremor-external) _tremor_external
=no
;;
873 --enable-theora) _theora
=yes ;;
874 --disable-theora) _theora
=no
;;
875 --enable-mp3lib) _mp3lib
=yes ;;
876 --disable-mp3lib) _mp3lib
=no
;;
877 --enable-liba52) _liba52
=yes ;;
878 --disable-liba52) _liba52
=no
;;
879 --enable-libdts) _libdts
=yes ;;
880 --disable-libdts) _libdts
=no
;;
881 --enable-libmpeg2) _libmpeg2
=yes ;;
882 --disable-libmpeg2) _libmpeg2
=no
;;
883 --enable-musepack) _musepack
=yes ;;
884 --disable-musepack) _musepack
=no
;;
885 --enable-faad-internal) _faad_internal
=yes ;;
886 --disable-faad-internal) _faad_internal
=no
;;
887 --enable-faad-external) _faad_external
=yes ;;
888 --disable-faad-external) _faad_external
=no
;;
889 --enable-faad-fixed) _faad_fixed
=yes ;;
890 --disable-faad-fixed) _faad_fixed
=no
;;
891 --enable-faac) _faac
=yes ;;
892 --disable-faac) _faac
=no
;;
893 --enable-ladspa) _ladspa
=yes ;;
894 --disable-ladspa) _ladspa
=no
;;
895 --enable-xmms) _xmms
=yes ;;
896 --disable-xmms) _xmms
=no
;;
897 --enable-dvdread) _dvdread
=yes ;;
898 --disable-dvdread) _dvdread
=no
;;
899 --enable-dvdread-internal) _dvdread_internal
=yes ;;
900 --disable-dvdread-internal) _dvdread_internal
=no
;;
901 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
902 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
903 --enable-dvdnav) _dvdnav
=yes ;;
904 --disable-dvdnav) _dvdnav
=no
;;
905 --enable-xanim) _xanim
=yes ;;
906 --disable-xanim) _xanim
=no
;;
907 --enable-real) _real
=yes ;;
908 --disable-real) _real
=no
;;
909 --enable-live) _live
=yes ;;
910 --disable-live) _live
=no
;;
911 --enable-xinerama) _xinerama
=yes ;;
912 --disable-xinerama) _xinerama
=no
;;
913 --enable-mga) _mga
=yes ;;
914 --disable-mga) _mga
=no
;;
915 --enable-xmga) _xmga
=yes ;;
916 --disable-xmga) _xmga
=no
;;
917 --enable-vm) _vm
=yes ;;
918 --disable-vm) _vm
=no
;;
919 --enable-xf86keysym) _xf86keysym
=yes ;;
920 --disable-xf86keysym) _xf86keysym
=no
;;
921 --enable-mlib) _mlib
=yes ;;
922 --disable-mlib) _mlib
=no
;;
923 --enable-sunaudio) _sunaudio
=yes ;;
924 --disable-sunaudio) _sunaudio
=no
;;
925 --enable-sgiaudio) _sgiaudio
=yes ;;
926 --disable-sgiaudio) _sgiaudio
=no
;;
927 --enable-alsa) _alsa
=yes ;;
928 --disable-alsa) _alsa
=no
;;
929 --enable-tv) _tv
=yes ;;
930 --disable-tv) _tv
=no
;;
931 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
932 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
933 --enable-tv-v4l1) _tv_v4l1
=yes ;;
934 --disable-tv-v4l1) _tv_v4l1
=no
;;
935 --enable-tv-v4l2) _tv_v4l2
=yes ;;
936 --disable-tv-v4l2) _tv_v4l2
=no
;;
937 --enable-radio) _radio
=yes ;;
938 --enable-radio-capture) _radio_capture
=yes ;;
939 --disable-radio-capture) _radio_capture
=no
;;
940 --disable-radio) _radio
=no
;;
941 --enable-radio-v4l) _radio_v4l
=yes ;;
942 --disable-radio-v4l) _radio_v4l
=no
;;
943 --enable-radio-v4l2) _radio_v4l2
=yes ;;
944 --disable-radio-v4l2) _radio_v4l2
=no
;;
945 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
946 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
947 --enable-pvr) _pvr
=yes ;;
948 --disable-pvr) _pvr
=no
;;
949 --enable-fastmemcpy) _fastmemcpy
=yes ;;
950 --disable-fastmemcpy) _fastmemcpy
=no
;;
951 --enable-network) _network
=yes ;;
952 --disable-network) _network
=no
;;
953 --enable-winsock2) _winsock2
=yes ;;
954 --disable-winsock2) _winsock2
=no
;;
955 --enable-smb) _smbsupport
=yes ;;
956 --disable-smb) _smbsupport
=no
;;
957 --enable-vidix-internal) _vidix_internal
=yes ;;
958 --disable-vidix-internal) _vidix_internal
=no
;;
959 --enable-vidix-external) _vidix_external
=yes ;;
960 --disable-vidix-external) _vidix_external
=no
;;
961 --with-vidix-drivers=*)
962 _vidix_drivers
=`echo $ac_option | cut -d '=' -f 2`
964 --enable-joystick) _joystick
=yes ;;
965 --disable-joystick) _joystick
=no
;;
966 --enable-xvid) _xvid
=yes ;;
967 --disable-xvid) _xvid
=no
;;
968 --enable-x264) _x264
=yes ;;
969 --disable-x264) _x264
=no
;;
970 --enable-nut) _nut
=yes ;;
971 --disable-nut) _nut
=no
;;
972 --enable-libavutil_a) _libavutil_a
=yes ;;
973 --disable-libavutil_a) _libavutil_a
=no
;;
974 --enable-libavutil_so) _libavutil_so
=yes ;;
975 --disable-libavutil_so) _libavutil_so
=no
;;
976 --enable-libavcodec_a) _libavcodec_a
=yes ;;
977 --disable-libavcodec_a) _libavcodec_a
=no
;;
978 --enable-libavcodec_so) _libavcodec_so
=yes ;;
979 --disable-libavcodec_so) _libavcodec_so
=no
;;
980 --enable-amr_nb) _amr_nb
=yes ;;
981 --disable-amr_nb) _amr_nb
=no
;;
982 --enable-amr_wb) _amr_wb
=yes ;;
983 --disable-amr_wb) _amr_wb
=no
;;
984 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
985 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
986 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
987 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
988 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
989 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
990 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
991 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
992 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
993 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
994 --enable-libavformat_a) _libavformat_a
=yes ;;
995 --disable-libavformat_a) _libavformat_a
=no
;;
996 --enable-libavformat_so) _libavformat_so
=yes ;;
997 --disable-libavformat_so) _libavformat_so
=no
;;
998 --enable-libpostproc_a) _libpostproc_a
=yes ;;
999 --disable-libpostproc_a) _libpostproc_a
=no
;;
1000 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1001 --disable-libpostproc_so) _libpostproc_so
=no
;;
1002 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1003 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1005 --enable-lirc) _lirc
=yes ;;
1006 --disable-lirc) _lirc
=no
;;
1007 --enable-lircc) _lircc
=yes ;;
1008 --disable-lircc) _lircc
=no
;;
1009 --enable-gui) _gui
=yes ;;
1010 --disable-gui) _gui
=no
;;
1011 --enable-gtk1) _gtk1
=yes ;;
1012 --disable-gtk1) _gtk1
=no
;;
1013 --enable-termcap) _termcap
=yes ;;
1014 --disable-termcap) _termcap
=no
;;
1015 --enable-termios) _termios
=yes ;;
1016 --disable-termios) _termios
=no
;;
1017 --enable-3dfx) _3dfx
=yes ;;
1018 --disable-3dfx) _3dfx
=no
;;
1019 --enable-s3fb) _s3fb
=yes ;;
1020 --disable-s3fb) _s3fb
=no
;;
1021 --enable-tdfxfb) _tdfxfb
=yes ;;
1022 --disable-tdfxfb) _tdfxfb
=no
;;
1023 --disable-tdfxvid) _tdfxvid
=no
;;
1024 --enable-tdfxvid) _tdfxvid
=yes ;;
1025 --disable-tga) _tga
=no
;;
1026 --enable-tga) _tga
=yes ;;
1027 --enable-directfb) _directfb
=yes ;;
1028 --disable-directfb) _directfb
=no
;;
1029 --enable-zr) _zr
=yes ;;
1030 --disable-zr) _zr
=no
;;
1031 --enable-bl) _bl
=yes ;;
1032 --disable-bl) _bl
=no
;;
1033 --enable-mtrr) _mtrr
=yes ;;
1034 --disable-mtrr) _mtrr
=no
;;
1035 --enable-largefiles) _largefiles
=yes ;;
1036 --disable-largefiles) _largefiles
=no
;;
1037 --enable-shm) _shm
=yes ;;
1038 --disable-shm) _shm
=no
;;
1039 --enable-select) _select
=yes ;;
1040 --disable-select) _select
=no
;;
1041 --enable-linux-devfs) _linux_devfs
=yes ;;
1042 --disable-linux-devfs) _linux_devfs
=no
;;
1043 --enable-cdparanoia) _cdparanoia
=yes ;;
1044 --disable-cdparanoia) _cdparanoia
=no
;;
1045 --enable-cddb) _cddb
=yes ;;
1046 --disable-cddb) _cddb
=no
;;
1047 --enable-big-endian) _big_endian
=yes ;;
1048 --disable-big-endian) _big_endian
=no
;;
1049 --enable-bitmap-font) _bitmap_font
=yes ;;
1050 --disable-bitmap-font) _bitmap_font
=no
;;
1051 --enable-freetype) _freetype
=yes ;;
1052 --disable-freetype) _freetype
=no
;;
1053 --enable-fontconfig) _fontconfig
=yes ;;
1054 --disable-fontconfig) _fontconfig
=no
;;
1055 --enable-unrarlib) _unrarlib
=yes ;;
1056 --disable-unrarlib) _unrarlib
=no
;;
1057 --enable-ftp) _ftp
=yes ;;
1058 --disable-ftp) _ftp
=no
;;
1059 --enable-vstream) _vstream
=yes ;;
1060 --disable-vstream) _vstream
=no
;;
1061 --enable-pthreads) _pthreads
=yes ;;
1062 --disable-pthreads) _pthreads
=no
;;
1063 --enable-ass) _ass
=yes ;;
1064 --disable-ass) _ass
=no
;;
1065 --enable-rpath) _rpath
=yes ;;
1066 --disable-rpath) _rpath
=no
;;
1067 --enable-color-console) _color_console
=yes ;;
1068 --disable-color-console) _color_console
=no
;;
1070 --enable-fribidi) _fribidi
=yes ;;
1071 --disable-fribidi) _fribidi
=no
;;
1073 --enable-enca) _enca
=yes ;;
1074 --disable-enca) _enca
=no
;;
1076 --enable-inet6) _inet6
=yes ;;
1077 --disable-inet6) _inet6
=no
;;
1079 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1080 --disable-gethostbyname2) _gethostbyname2
=no
;;
1082 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1083 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1084 --disable-dga) _dga
=no
;;
1086 --enable-menu) _menu
=yes ;;
1087 --disable-menu) _menu
=no
;;
1089 --enable-qtx) _qtx
=yes ;;
1090 --disable-qtx) _qtx
=no
;;
1092 --enable-macosx) _macosx
=yes ;;
1093 --disable-macosx) _macosx
=no
;;
1094 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1095 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1096 --enable-macosx-bundle) _macosx_bundle
=yes;;
1097 --disable-macosx-bundle) _macosx_bundle
=no
;;
1099 --enable-maemo) _maemo
=yes ;;
1100 --disable-maemo) _maemo
=no
;;
1102 --enable-sortsub) _sortsub
=yes ;;
1103 --disable-sortsub) _sortsub
=no
;;
1105 --enable-crash-debug) _crash_debug
=yes ;;
1106 --disable-crash-debug) _crash_debug
=no
;;
1107 --enable-sighandler) _sighandler
=yes ;;
1108 --disable-sighandler) _sighandler
=no
;;
1109 --enable-win32dll) _win32dll
=yes ;;
1110 --disable-win32dll) _win32dll
=no
;;
1112 --enable-sse) _sse
=yes ;;
1113 --disable-sse) _sse
=no
;;
1114 --enable-sse2) _sse2
=yes ;;
1115 --disable-sse2) _sse2
=no
;;
1116 --enable-mmxext) _mmxext
=yes ;;
1117 --disable-mmxext) _mmxext
=no
;;
1118 --enable-3dnow) _3dnow
=yes ;;
1119 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1120 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1121 --disable-3dnowext) _3dnowext
=no
;;
1122 --enable-cmov) _cmov
=yes ;;
1123 --disable-cmov) _cmov
=no
;;
1124 --enable-fast-cmov) _fast_cmov
=yes ;;
1125 --disable-fast-cmov) _fast_cmov
=no
;;
1126 --enable-altivec) _altivec
=yes ;;
1127 --disable-altivec) _altivec
=no
;;
1128 --enable-armv5te) _armv5te
=yes ;;
1129 --disable-armv5te) _armv5te
=no
;;
1130 --enable-iwmmxt) _iwmmxt
=yes ;;
1131 --disable-iwmmxt) _iwmmxt
=no
;;
1132 --enable-mmx) _mmx
=yes ;;
1133 --disable-mmx) # 3Dnow! and MMX2 require MMX
1134 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1137 echo "Unknown parameter: $ac_option"
1144 # Atmos: moved this here, to be correct, if --prefix is specified
1145 test -z "$_bindir" && _bindir
="$_prefix/bin"
1146 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1147 test -z "$_mandir" && _mandir
="$_prefix/man"
1148 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1149 test -z "$_libdir" && _libdir
="$_prefix/lib"
1151 # Determine our OS name and CPU architecture
1152 if test -z "$_target" ; then
1154 system_name
=`uname -s 2>&1`
1155 case "$system_name" in
1156 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1167 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1174 system_name
="$system_name-UNKNOWN"
1179 # host's CPU/instruction set
1180 host_arch
=`uname -p 2>&1`
1181 case "$host_arch" in
1182 i386|sparc|ppc|alpha|arm|mips|vax
)
1184 powerpc
) # Darwin returns 'powerpc'
1187 *) # uname -p on Linux returns 'unknown' for the processor type,
1188 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1190 # Maybe uname -m (machine hardware name) returns something we
1193 # x86/x86pc is used by QNX
1194 case "`uname -m 2>&1`" in
1195 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
;;
1196 ia64
) host_arch
=ia64
;;
1198 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1199 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1205 macppc|ppc|ppc64
) host_arch
=ppc
;;
1206 alpha
) host_arch
=alpha
;;
1207 sparc
) host_arch
=sparc
;;
1208 sparc64
) host_arch
=sparc64
;;
1209 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1210 arm
*|zaurus|cats
) host_arch
=arm
;;
1211 s390
) host_arch
=s390
;;
1212 s390x
) host_arch
=s390x
;;
1213 mips
*) host_arch
=mips
;;
1214 vax
) host_arch
=vax
;;
1215 *) host_arch
=UNKNOWN
;;
1219 else # if test -z "$_target"
1220 system_name
=`echo $_target | cut -d '-' -f 2`
1221 case "`echo $system_name | tr A-Z a-z`" in
1222 linux
) system_name
=Linux
;;
1223 freebsd
) system_name
=FreeBSD
;;
1224 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1225 netbsd
) system_name
=NetBSD
;;
1226 bsd
/os
) system_name
=BSD
/OS
;;
1227 openbsd
) system_name
=OpenBSD
;;
1228 sunos
) system_name
=SunOS
;;
1229 qnx
) system_name
=QNX
;;
1230 morphos
) system_name
=MorphOS
;;
1231 amigaos
) system_name
=AmigaOS
;;
1232 mingw32msvc
) system_name
=MINGW32
;;
1234 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1235 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
1238 echo "Detected operating system: $system_name"
1239 echo "Detected host architecture: $host_arch"
1241 if test "$_runtime_cpudetection" = yes && not x86
&& not ppc
; then
1242 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1245 # LGB: temporary files
1246 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1250 TMPLOG
="configure.log"
1252 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1253 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1254 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
1255 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1259 # FIXME: A lot of stuff is installed under /usr/local
1260 # NK: But we should never use this stuff implicitly since we call compiler
1261 # from /usr we should be sure that there no effects from other compilers
1262 # (libraries) which might be installed into /usr/local. Let users use this
1263 # stuff explicitly as command line argument. In other words: It would be
1264 # resonable to have only /usr/include or only /usr/local/include.
1267 _ldconfig
="ldconfig -R"
1271 _ld_extra
="$_ld_extra -L/usr/local/lib"
1272 _inc_extra
="$_inc_extra -I/usr/local/include"
1276 _ld_extra
="$_ld_extra -L/usr/local/lib"
1277 _inc_extra
="$_inc_extra -I/usr/local/include"
1281 _ld_extra
="$_ld_extra -lC"
1284 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
1293 # -lwinmm is always needed for osdep/timer-win2.c
1294 _ld_extra
="$_ld_extra -lwinmm"
1295 _confwin32
='TARGET_WIN32 = yes'
1297 _confwin32
='TARGET_WIN32 = no'
1305 _def_confwin32
='#define WIN32'
1312 _def_stream_cache
="#undef USE_STREAM_CACHE"
1316 _ld_extra
="$_ld_extra -lph"
1319 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1320 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1322 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1323 _head
() { head -$1 2>/dev
/null
; }
1325 _head
() { head -n $1 2>/dev
/null
; }
1327 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1328 _tail
() { tail -$1 2>/dev
/null
; }
1330 _tail
() { tail -n $1 2>/dev
/null
; }
1333 # Checking CC version...
1334 if test "$_gcc_check" = yes ; then
1335 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1336 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1337 echocheck
"$_cc version"
1339 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1340 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1341 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1342 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1343 # TODO verify older icc/ecc compatibility
1346 cc_version
="v. ?.??, bad"
1350 cc_version
="$cc_version, ok"
1354 cc_version
="$cc_version, bad"
1358 echores
"$cc_version"
1360 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
1361 echocheck
"$_cc version"
1363 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1364 cc_version
=`$_cc -dumpversion 2>&1`
1365 if test "$?" -gt 0; then
1366 cc_version
="not found"
1370 cc_version
="v. ?.??, bad"
1373 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1374 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1375 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1376 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1377 cc_version
="$cc_version, ok"
1384 cc_version
="$cc_version, bad"
1388 echores
"$cc_version"
1389 test "$cc_verc_fail" = "no" && break
1392 if test "$cc_verc_fail" = yes ; then
1395 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1397 You are not using a supported compiler. We do not have the time to make sure
1398 everything works with compilers other than the ones we use. Use either the
1399 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1400 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1402 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1403 mplayer and lame (which is used for mencoder). If you get compile errors,
1404 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1405 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1408 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1411 die
"Bad gcc version"
1416 ******************************************************************************
1418 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1419 Ok. You know. Do it.
1421 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1422 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1423 Lame which is used by mencoder produces weird errors, too.
1425 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1426 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1428 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1430 ******************************************************************************
1438 test "$_host_cc" || _host_cc
=$_cc
1441 echocheck
"cross compilation"
1442 if test $_cross_compile = auto
; then
1444 int main() { return 0; }
1447 cc_check
&& "$TMPO" && _cross_compile
=no
1449 echores
$_cross_compile
1451 if test $_cross_compile = yes; then
1459 # now that we know what compiler should be used for compilation, try to find
1460 # out which assembler is used by the $_cc compiler
1461 if test "$_as" = auto
; then
1462 _as
=`$_cc -print-prog-name=as`
1463 test -z "$_as" && _as
=as
1466 # XXX: this should be ok..
1469 if test "$_runtime_cpudetection" = no
; then
1471 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1472 # FIXME: Remove the cygwin check once AMD CPUs are supported
1473 if test -r /proc
/cpuinfo
&& not cygwin
; then
1474 # Linux with /proc mounted, extract CPU information from it
1475 _cpuinfo
="cat /proc/cpuinfo"
1476 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86_32
; then
1477 # FreeBSD with Linux emulation /proc mounted,
1478 # extract CPU information from it
1479 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1480 elif darwin
&& not x86_32
; then
1481 # use hostinfo on Darwin
1484 # use 'lsattr' on AIX
1485 _cpuinfo
="lsattr -E -l proc0 -a type"
1487 # all other OSes try to extract CPU information from a small helper
1488 # program cpuinfo instead
1489 $_cc -o cpuinfo cpuinfo.c
1490 _cpuinfo
="./cpuinfo"
1494 # gather more CPU information
1495 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1496 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1497 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1498 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1499 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1501 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1503 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1504 -e s/xmm/sse/ -e s/kni/sse/`
1506 for ext
in $pparam ; do
1507 eval test \
$_$ext = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1510 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1511 test $_sse = kernel_check
&& _mmxext
=kernel_check
1513 echocheck
"CPU vendor"
1514 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1516 echocheck
"CPU type"
1520 fi # test "$_runtime_cpudetection" = no
1522 if x86
&& test "$_runtime_cpudetection" = no
; then
1524 if test "$1" = kernel_check
; then
1525 echocheck
"kernel support of $2"
1528 void catch() { exit(1); }
1530 signal(SIGILL, catch);
1531 __asm__ __volatile__ ("$3":::"memory");return(0);
1535 if cc_check
&& tmp_run
; then
1538 _optimizing
="$_optimizing $2"
1543 echo "It seems that your kernel does not correctly support $2."
1544 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1551 extcheck
$_mmx "mmx" "emms"
1552 extcheck
$_mmxext "mmxext" "sfence"
1553 extcheck
$_3dnow "3dnow" "femms"
1554 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1555 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1556 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1557 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1559 echocheck
"mtrr support"
1560 if test "$_mtrr" = kernel_check
; then
1562 _optimizing
="$_optimizing mtrr"
1566 if test "$_gcc3_ext" != ""; then
1567 # if we had to disable sse/sse2 because the active kernel does not
1568 # support this instruction set extension, we also have to tell
1569 # gcc3 to not generate sse/sse2 instructions for normal C code
1571 int main(void) { return 0; }
1573 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1578 case "$host_arch" in
1579 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1580 _def_arch_x86
="#define ARCH_X86 1"
1581 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1582 _def_arch
="#define ARCH_X86_32 1"
1583 _target_arch
="TARGET_ARCH_X86_32 = yes"
1588 if test "$_runtime_cpudetection" = no
; then
1592 3) proc
=i386 iproc
=386 ;;
1593 4) proc
=i486 iproc
=486 ;;
1594 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1595 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1596 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1598 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1600 elif test "$pmodel" -ge 8; then
1602 elif test "$pmodel" -ge 6; then
1609 # It's a bit difficult to determine the correct type of Family 6
1610 # AMD CPUs just from their signature. Instead, we check directly
1611 # whether it supports SSE.
1612 if test "$_sse" = yes; then
1613 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1616 # Again, gcc treats athlon and athlon-tbird similarly.
1621 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1622 # caught and remedied in the optimization tests below.
1626 *) proc
=k8 iproc
=686 ;;
1631 3) proc
=i386 iproc
=386 ;;
1632 4) proc
=i486 iproc
=486 ;;
1634 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1635 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1641 if test "$pmodel" -ge 15; then
1643 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1645 elif test "$pmodel" -ge 7; then
1647 elif test "$pmodel" -ge 3; then
1654 # A nocona in 32-bit mode has no more capabilities than a prescott.
1655 if test "$pmodel" -ge 3; then
1661 *) proc
=prescott iproc
=686 ;;
1667 if test "$pmodel" -ge 8; then
1669 elif test "$pmodel" -ge 4; then
1676 if test "$pmodel" -ge 9; then
1683 *) proc
=i686 iproc
=i686
;;
1688 3) proc
=i386 iproc
=386 ;;
1689 4) proc
=i486 iproc
=486 ;;
1690 *) proc
=i586 iproc
=586 ;;
1694 proc
=i586 iproc
=586 ;;
1696 fi # test "$_runtime_cpudetection" = no
1699 # check that gcc supports our CPU, if not, fall back to earlier ones
1700 # LGB: check -mcpu and -march swithing step by step with enabling
1701 # to fall back till 386.
1703 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1705 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1711 echocheck
"GCC & CPU optimization abilities"
1713 int main(void) { return 0; }
1715 if test "$_runtime_cpudetection" = no
; then
1716 if test "$proc" = "k8"; then
1717 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1719 if test "$proc" = "athlon-xp"; then
1720 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1722 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1723 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1725 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1726 if not cc_check
-march=$proc $cpuopt=$proc; then
1727 if cc_check
-march=i586
$cpuopt=i686
; then
1734 if test "$proc" = "prescott" ; then
1735 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1737 if test "$proc" = "core2" ; then
1738 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1740 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
1741 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1743 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1744 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1746 if test "$proc" = "i586"; then
1747 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1749 if test "$proc" = "i486" ; then
1750 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1752 if test "$proc" = "i386" ; then
1753 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1755 if test "$proc" = "error" ; then
1756 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1760 elif test "$proc" = "i586-i686"; then
1761 _march
="-march=i586"
1762 _mcpu
="$cpuopt=i686"
1765 _march
="-march=$proc"
1766 _mcpu
="$cpuopt=$proc"
1769 else # if test "$_runtime_cpudetection" = no
1770 _mcpu
="$cpuopt=generic"
1771 # at least i486 required, for bswap instruction
1772 _march
="-march=i486"
1773 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1774 cc_check
$_mcpu || _mcpu
=""
1775 cc_check
$_march $_mcpu || _march
=""
1778 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1779 ## autodetected mcpu/march parameters
1780 if test "$_target" ; then
1781 # TODO: it may be a good idea to check GCC and fall back in all cases
1782 if test "$host_arch" = "i586-i686"; then
1783 _march
="-march=i586"
1784 _mcpu
="$cpuopt=i686"
1786 _march
="-march=$host_arch"
1787 _mcpu
="$cpuopt=$host_arch"
1795 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1796 i686|athlon
*|pentium
*) iproc
=686 ;;
1801 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1804 pentium4|prescott|nocona
)
1815 _def_arch
='#define ARCH_IA64 1'
1816 _target_arch
='TARGET_ARCH_IA64 = yes'
1825 _def_arch
='#define ARCH_X86_64 1'
1826 _target_arch
='TARGET_ARCH_X86_64 = yes'
1827 _def_arch_x86
="#define ARCH_X86 1"
1828 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1831 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1832 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1837 if test "$_runtime_cpudetection" = no
; then
1845 # 64-bit prescotts exist, but as far as GCC is concerned they
1846 # have the same capabilities as a nocona.
1853 fi # test "$_runtime_cpudetection" = no
1855 echocheck
"GCC & CPU optimization abilities"
1857 int main(void) { return 0; }
1859 # This is a stripped-down version of the i386 fallback.
1860 if test "$_runtime_cpudetection" = no
; then
1861 # --- AMD processors ---
1862 if test "$proc" = "k8"; then
1863 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1865 # This will fail if gcc version < 3.3, which is ok because earlier
1866 # versions don't really support 64-bit on amd64.
1867 # Is this a valid assumption? -Corey
1868 if test "$proc" = "athlon-xp"; then
1869 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1871 # --- Intel processors ---
1872 if test "$proc" = "core2"; then
1873 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1875 if test "$proc" = "nocona"; then
1876 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1878 if test "$proc" = "pentium4"; then
1879 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1882 _march
="-march=$proc"
1883 _mcpu
="$cpuopt=$proc"
1884 if test "$proc" = "error" ; then
1885 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1889 else # if test "$_runtime_cpudetection" = no
1890 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1891 _march
="-march=x86-64"
1892 _mcpu
="$cpuopt=generic"
1893 cc_check
$_mcpu || _mcpu
="x86-64"
1894 cc_check
$_mcpu || _mcpu
=""
1895 cc_check
$_march $_mcpu || _march
=""
1904 _def_arch
='#define ARCH_SPARC 1'
1905 _target_arch
='TARGET_ARCH_SPARC = yes'
1908 echocheck
"CPU type"
1910 case "`echo $karch`" in
1915 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1929 _def_arch
='#define ARCH_SPARC 1'
1930 _target_arch
='TARGET_ARCH_SPARC = yes'
1932 _def_vis
='#define HAVE_VIS = yes'
1940 arm|armv4l|armv5tel
)
1941 _def_arch
='#define ARCH_ARMV4L 1'
1942 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1951 _def_arch
='#define ARCH_POWERPC 1'
1952 _def_dcbzl
='#define NO_DCBZL 1'
1953 _target_arch
='TARGET_ARCH_POWERPC = yes'
1961 echocheck
"CPU type"
1962 case $system_name in
1964 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1965 if test -n "`$_cpuinfo | grep altivec`"; then
1970 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1971 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
1972 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
1977 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1979 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1982 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1989 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
1992 if test "$_altivec" = yes; then
1993 echores
"$proc altivec"
1998 echocheck
"GCC & CPU optimization abilities"
2000 if test -n "$proc"; then
2002 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2003 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2004 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2005 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2006 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2007 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2008 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2009 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2010 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2013 # gcc 3.1(.1) and up supports 7400 and 7450
2014 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2016 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2017 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2021 # gcc 3.2 and up supports 970
2022 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2024 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2025 _def_dcbzl
='#undef NO_DCBZL' ;;
2029 # gcc 3.3 and up supports POWER4
2030 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2032 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2036 # gcc 3.4 and up supports 440*
2037 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2039 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2040 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2044 # gcc 4.0 and up supports POWER5
2045 if test "$_cc_major" -ge "4"; then
2047 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2053 if test -n "$_mcpu"; then
2054 _optimizing
=`echo $_mcpu | cut -c 8-`
2055 echores
"$_optimizing"
2063 _def_arch
='#define ARCH_ALPHA 1'
2064 _target_arch
='TARGET_ARCH_ALPHA = yes'
2068 echocheck
"CPU type"
2071 unsigned long ver, mask;
2072 asm ("implver %0" : "=r" (ver));
2073 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2074 printf("%ld-%x\n", ver, ~mask);
2078 $_cc -o "$TMPO" "$TMPC"
2081 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
2082 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
2083 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
2084 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
2085 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
2086 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
2087 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
2091 echocheck
"GCC & CPU optimization abilities"
2092 if test "$proc" = "ev68" ; then
2093 cc_check
-mcpu=$proc || proc
=ev67
2095 if test "$proc" = "ev67" ; then
2096 cc_check
-mcpu=$proc || proc
=ev6
2103 echocheck
"MVI instruction support in GCC"
2104 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
2105 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2108 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2109 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2114 _def_arch
='#define ARCH_SGI_MIPS 1'
2115 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
2123 echocheck
"CPU type"
2124 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2125 case "`echo $proc`" in
2126 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2127 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2128 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2129 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2130 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2131 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2133 # gcc < 3.x does not support -mtune.
2134 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2143 _def_arch
='#define ARCH_PA_RISC 1'
2144 _target_arch
='TARGET_ARCH_PA_RISC = yes'
2153 _def_arch
='#define ARCH_S390 1'
2154 _target_arch
='TARGET_ARCH_S390 = yes'
2163 _def_arch
='#define ARCH_S390X 1'
2164 _target_arch
='TARGET_ARCH_S390X = yes'
2173 _def_arch
='#define ARCH_VAX 1'
2174 _target_arch
='TARGET_ARCH_VAX = yes'
2183 _def_arch
='#define ARCH_GENERIC 1'
2184 _target_arch
='TARGET_ARCH_GENERIC = yes'
2193 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2194 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2195 die
"unsupported architecture $host_arch"
2197 esac # case "$host_arch" in
2199 if test "$_runtime_cpudetection" = yes ; then
2218 echocheck
"assembler support of -pipe option"
2220 int main(void) { return 0; }
2222 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2225 echocheck
"compiler support of named assembler arguments"
2227 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2228 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2229 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2231 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2233 echores
$_named_asm_args
2236 # Checking for CFLAGS
2238 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2239 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
2240 if test "$_cc_major" -ge "3" ; then
2241 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
2244 elif test -z "$CFLAGS" ; then
2245 if test "$cc_vendor" = "intel" ; then
2246 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2247 elif test "$cc_vendor" != "gnu" ; then
2248 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2250 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2255 if test -n "$LDFLAGS" ; then
2256 _ld_extra
="$_ld_extra $LDFLAGS"
2258 elif test "$cc_vendor" = "intel" ; then
2259 _ld_extra
="$_ld_extra -i-static"
2261 if test -n "$CPPFLAGS" ; then
2262 _inc_extra
="$_inc_extra $CPPFLAGS"
2269 # Checking assembler (_as) compatibility...
2270 # Added workaround for older as that reads from stdin by default - atmos
2271 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2272 echocheck
"assembler ($_as $as_version)"
2274 _pref_as_version
='2.9.1'
2276 if test "$_mmx" = yes ; then
2277 echo 'emms' >> $TMPS
2279 if test "$_3dnow" = yes ; then
2280 _pref_as_version
='2.10.1'
2281 echo 'femms' >> $TMPS
2283 if test "$_3dnowext" = yes ; then
2284 _pref_as_version
='2.10.1'
2285 echo 'pswapd %mm0, %mm0' >> $TMPS
2287 if test "$_mmxext" = yes ; then
2288 _pref_as_version
='2.10.1'
2289 echo 'movntq %mm0, (%eax)' >> $TMPS
2291 if test "$_sse" = yes ; then
2292 _pref_as_version
='2.10.1'
2293 echo 'xorps %xmm0, %xmm0' >> $TMPS
2295 #if test "$_sse2" = yes ; then
2296 # _pref_as_version='2.11'
2297 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2299 if test "$_cmov" = yes ; then
2300 _pref_as_version
='2.10.1'
2301 echo 'cmovb %eax, %ebx' >> $TMPS
2303 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2305 if test "$as_verc_fail" != yes ; then
2308 _res_comment
="Upgrade binutils to ${_pref_as_version} ..."
2310 die
"obsolete binutils version"
2315 echocheck
".align is a power of two"
2316 if test "$_asmalign_pot" = auto
; then
2319 main() { asm (".align 3"); }
2321 cc_check
&& _asmalign_pot
=yes
2323 if test "$_asmalign_pot" = "yes" ; then
2324 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2326 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2328 echores
$_asmalign_pot
2331 #FIXME: This should happen before the check for CFLAGS..
2334 # check if altivec is supported by the compiler, and how to enable it
2336 _altivec_gcc_flags
=''
2338 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2339 echocheck
"GCC altivec support"
2347 FSF_flags
='-maltivec -mabi=altivec'
2348 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2350 # check for Darwin-style flags first, since
2351 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2352 # accepts but ignores FSF-style flags...
2354 if test -z "$p"; then
2355 cc_check
$Darwin_flags && p
='Darwin'
2357 if test -z "$p"; then
2358 cc_check
$FSF_flags && p
='FSF'
2362 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2363 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2367 if test -z "$p"; then
2370 p
="$p-style ($_altivec_gcc_flags)"
2376 # check if <altivec.h> should be included
2378 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2380 if test "$_altivec" = yes ; then
2381 echocheck
"altivec.h"
2383 #include <altivec.h>
2384 int main(void) { return 0; }
2387 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2388 if test "$_have_altivec_h" = yes ; then
2389 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2391 echores
"$_have_altivec_h"
2394 # disable runtime cpudetection if
2395 # - we cannot generate altivec code
2396 # - altivec is disabled by the user
2398 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2399 _runtime_cpudetection
=no
2402 # show that we are optimizing for altivec (if enabled and supported)
2404 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2405 _optimizing
="$_optimizing altivec"
2408 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2410 if test "$_altivec" = yes ; then
2411 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2412 #_mcpu="$_mcpu $_altivec_gcc_flags"
2413 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2416 # setup _def_altivec correctly
2418 if test "$_altivec" = yes ; then
2419 _def_altivec
='#define HAVE_ALTIVEC 1'
2421 _def_altivec
='#undef HAVE_ALTIVEC'
2426 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2427 if test $_armv5te = "auto" ; then
2430 __asm__ __volatile__ ("qadd r0, r0, r0");
2434 cc_check
&& _armv5te
=yes
2438 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2439 if test $_iwmmxt = "auto" ; then
2442 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2446 cc_check
&& _iwmmxt
=yes
2451 _def_mmx
='#undef HAVE_MMX'
2452 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2453 _def_mmxext
='#undef HAVE_MMX2'
2454 test "$_mmxext" = yes && _def_mmxext
='#define HAVE_MMX2 1'
2455 _def_3dnow
='#undef HAVE_3DNOW'
2456 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2457 _def_3dnowext
='#undef HAVE_3DNOWEX'
2458 test "$_3dnowext" = yes && _def_3dnowext
='#define HAVE_3DNOWEX 1'
2459 _def_sse
='#undef HAVE_SSE'
2460 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2461 _def_sse2
='#undef HAVE_SSE2'
2462 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2463 _def_cmov
='#undef HAVE_CMOV'
2464 test "$_cmov" = yes && _def_cmov
='#define HAVE_CMOV 1'
2465 _def_fast_cmov
='#undef HAVE_FAST_CMOV'
2466 test "$_fast_cmov" = yes && _def_fast_cmov
='#define HAVE_FAST_CMOV 1'
2467 _def_armv5te
='#undef HAVE_ARMV5TE'
2468 test "$_armv5te" = yes && _def_armv5te
='#define HAVE_ARMV5TE 1'
2469 _def_iwmmxt
='#undef HAVE_IWMMXT'
2470 test "$_iwmmxt" = yes && _def_iwmmxt
='#define HAVE_IWMMXT 1'
2472 # Checking kernel version...
2473 if x86_32
&& linux
; then
2475 kernel_version
=`uname -r 2>&1`
2476 echocheck
"$system_name kernel version"
2477 case "$kernel_version" in
2478 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2479 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2480 _k_verc_problem
=yes;;
2482 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2485 if test "$_k_verc_fail" ; then
2486 echores
"$kernel_version, fail"
2487 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2488 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2489 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2490 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2491 echo "2.2.x you must upgrade it to get SSE support!"
2492 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2494 echores
"$kernel_version, ok"
2498 if test "$_vidix_internal" = auto
; then
2500 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2501 x86
&& _vidix_internal
=yes
2502 ppc
&& linux
&& _vidix_internal
=yes
2503 alpha
&& linux
&& _vidix_internal
=yes
2504 qnx
&& _vidix_internal
=no
2505 sunos
&& not x86
&& _vidix_internal
=no
2506 beos
&& _vidix_internal
=no
2507 darwin
&& _vidix_internal
=no
2511 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2513 if test "$_vidix_internal" = yes ; then
2516 for _awk
in mawk gawk nawk
; do
2517 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2522 test "$_awk_verc_fail" = yes && _awk
=no
2524 if test "$_awk_verc_fail" = yes; then
2525 echo "VIDIX needs awk, but no working implementation was found!"
2526 echo "Try the GNU version, which can be downloaded from:"
2527 echo "ftp://ftp.gnu.org/gnu/gawk/"
2528 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2533 ######################
2534 # MAIN TESTS GO HERE #
2535 ######################
2538 echocheck
"extra headers"
2539 if test "$_inc_extra" ; then
2540 echores
"$_inc_extra"
2546 echocheck
"extra libs"
2547 if test "$_ld_extra" ; then
2548 echores
"$_ld_extra"
2555 int main(void) { return 0; }
2557 if cc_check
-lposix ; then
2558 _ld_extra
="$_ld_extra -lposix"
2566 int main(void) { return 0; }
2568 if cc_check
-lm ; then
2577 echocheck
"langinfo"
2578 if test "$_langinfo" = auto
; then
2580 #include <langinfo.h>
2581 int main(void) { nl_langinfo(CODESET); return 0; }
2584 cc_check
&& _langinfo
=yes
2586 if test "$_langinfo" = yes ; then
2587 _def_langinfo
='#define USE_LANGINFO 1'
2589 _def_langinfo
='#undef USE_LANGINFO'
2591 echores
"$_langinfo"
2594 echocheck
"language"
2595 test -z "$_language" && _language
=$LINGUAS
2596 _language
=`echo $_language | sed 's/,/ /g'`
2597 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2598 for lang
in $_language ; do
2599 test "$lang" = all
&& lang
=en
2600 if test -f "help/help_mp-${lang}.h" ; then
2604 echo ${_echo_n} "$lang not found, ${_echo_c}"
2605 _language
=`echo $_language | sed "s/$lang *//"`
2608 test -z "$_language" && _language
=en
2609 _mp_help
="help/help_mp-${_language}.h"
2610 test -f $_mp_help || die
"$_mp_help not found"
2611 for lang
in $LANGUAGES ; do
2612 if test -f "DOCS/man/$lang/mplayer.1" ; then
2613 MAN_LANG
="$lang $MAN_LANG"
2616 _doc_lang
=$_language
2617 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2618 echores
"using $_language (man pages: $MAN_LANG)"
2621 echocheck
"enable sighandler"
2622 if test "$_sighandler" = yes ; then
2623 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2625 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2627 echores
"$_sighandler"
2629 echocheck
"runtime cpudetection"
2630 if test "$_runtime_cpudetection" = yes ; then
2631 _optimizing
="Runtime CPU-Detection enabled"
2632 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2634 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2636 echores
"$_runtime_cpudetection"
2639 echocheck
"restrict keyword"
2640 for restrict_keyword
in restrict __restrict __restrict__
; do
2641 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2643 _def_restrict_keyword
=$restrict_keyword
2647 if [ -n "$_def_restrict_keyword" ]; then
2648 echores
"$_def_restrict_keyword"
2652 # Avoid infinite recursion loop ("#define restrict restrict")
2653 if [ "$_def_restrict_keyword" != "restrict" ]; then
2654 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2656 _def_restrict_keyword
=""
2660 echocheck
"__builtin_expect"
2661 # GCC branch prediction hint
2664 a = __builtin_expect (a, 10);
2665 return a == 10 ? 0 : 1;
2667 int main() { return foo(10) && foo(0); }
2670 cc_check
&& _builtin_expect
=yes
2671 if test "$_builtin_expect" = yes ; then
2672 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2674 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2676 echores
"$_builtin_expect"
2682 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2685 cc_check
-lkstat && _kstat
=yes
2686 if test "$_kstat" = yes ; then
2687 _def_kstat
="#define HAVE_LIBKSTAT 1"
2688 _ld_extra
="$_ld_extra -lkstat"
2690 _def_kstat
="#undef HAVE_LIBKSTAT"
2696 # required for nanosleep on some systems
2699 int main(void) { (void) nanosleep(0, 0); return 0; }
2702 cc_check
-lposix4 && _posix4
=yes
2703 if test "$_posix4" = yes ; then
2704 _ld_extra
="$_ld_extra -lposix4"
2711 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2714 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2715 if test "$_lrintf" = yes ; then
2716 _def_lrintf
="#define HAVE_LRINTF 1"
2718 _def_lrintf
="#undef HAVE_LRINTF"
2725 int main(void) { (void) round(0.0); return 0; }
2728 cc_check
$_ld_lm && _round
=yes
2729 if test "$_round" = yes ; then
2730 _def_round
="#define HAVE_ROUND 1"
2732 _def_round
="#undef HAVE_ROUND"
2736 echocheck
"nanosleep"
2737 # also check for nanosleep
2740 int main(void) { (void) nanosleep(0, 0); return 0; }
2743 cc_check
&& _nanosleep
=yes
2744 if test "$_nanosleep" = yes ; then
2745 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2747 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2749 echores
"$_nanosleep"
2753 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2754 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2757 #include <sys/socket.h>
2758 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2761 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2762 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2764 if test $_winsock2 = auto
&& not cygwin
; then
2767 #include <winsock2.h>
2768 int main(void) { (void) gethostbyname(0); return 0; }
2770 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2772 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2776 if test $_winsock2 = yes ; then
2778 _def_winsock2
='#define HAVE_WINSOCK2 1'
2780 _def_winsock2
='#undef HAVE_WINSOCK2'
2785 echocheck
"inet_pton()"
2787 #include <sys/types.h>
2788 #include <sys/socket.h>
2789 #include <arpa/inet.h>
2790 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2792 if test "$_winsock2" = yes ; then
2793 _res_comment
="using winsock2 functions instead"
2795 elif cc_check
$_ld_sock ; then
2796 # NOTE: Linux has libresolv but does not need it
2798 _res_comment
="using $_ld_sock"
2800 elif cc_check
$_ld_sock -lresolv ; then
2801 # NOTE: needed for SunOS at least
2802 _ld_sock
="$_ld_sock -lresolv"
2803 _res_comment
="using $_ld_sock"
2806 _res_comment
="trying inet_aton next"
2809 echocheck
"inet_aton()"
2811 #include <sys/types.h>
2812 #include <sys/socket.h>
2813 #include <arpa/inet.h>
2814 int main(void) { (void) inet_aton(0, 0); return 0; }
2817 if cc_check
$_ld_sock ; then
2818 # NOTE: Linux has libresolv but does not need it
2820 _res_comment
="using $_ld_sock"
2821 elif cc_check
$_ld_sock -lresolv ; then
2822 # NOTE: needed for SunOS at least
2823 _ld_sock
="$_ld_sock -lresolv"
2824 _res_comment
="using $_ld_sock"
2828 _res_comment
="network support disabled"
2830 echores
"$_use_aton"
2833 _def_use_aton
='#undef USE_ATON'
2834 if test "$_use_aton" = yes; then
2835 _def_use_aton
='#define USE_ATON 1'
2839 # FIXME network check
2840 if test "$_network" = yes ; then
2841 _def_network
='#define MPLAYER_NETWORK 1'
2842 _ld_extra
="$_ld_extra $_ld_sock"
2843 _inputmodules
="network $_inputmodules"
2845 _noinputmodules
="network $_noinputmodules"
2846 _def_network
='#undef MPLAYER_NETWORK'
2851 echocheck
"inttypes.h (required)"
2853 #include <inttypes.h>
2854 int main(void) { return 0; }
2857 cc_check
&& _inttypes
=yes
2858 echores
"$_inttypes"
2860 if test "$_inttypes" = no
; then
2861 echocheck
"bitypes.h (inttypes.h predecessor)"
2863 #include <sys/bitypes.h>
2864 int main(void) { return 0; }
2866 cc_check
&& _inttypes
=yes
2867 if test "$_inttypes" = yes ; then
2868 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."
2870 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2875 echocheck
"int_fastXY_t in inttypes.h"
2877 #include <inttypes.h>
2879 volatile int_fast16_t v= 0;
2883 cc_check
&& _fast_inttypes
=yes
2884 if test "$_fast_inttypes" = yes ; then
2888 _def_fast_inttypes
='
2889 typedef signed char int_fast8_t;
2890 typedef signed int int_fast16_t;
2891 typedef signed int int_fast32_t;
2892 typedef signed long long int_fast64_t;
2893 typedef unsigned char uint_fast8_t;
2894 typedef unsigned int uint_fast16_t;
2895 typedef unsigned int uint_fast32_t;
2896 typedef unsigned long long uint_fast64_t;'
2898 echores
"$_fast_inttypes"
2901 echocheck
"word size"
2902 _mp_wordsize
="#undef MP_WORDSIZE"
2905 #include <sys/types.h>
2906 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2908 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2909 echores
"$_wordsize"
2912 echocheck
"stddef.h"
2915 int main(void) { return 0; }
2918 cc_check
&& _stddef
=yes
2919 if test "$_stddef" = yes ; then
2920 _def_stddef
='#define HAVE_STDDEF_H 1'
2922 _def_stddef
='#undef HAVE_STDDEF_H'
2927 echocheck
"malloc.h"
2930 int main(void) { (void) malloc(0); return 0; }
2933 cc_check
&& _malloc
=yes
2934 if test "$_malloc" = yes ; then
2935 _def_malloc
='#define HAVE_MALLOC_H 1'
2937 _def_malloc
='#undef HAVE_MALLOC_H'
2939 # malloc.h emits a warning in FreeBSD and OpenBSD
2940 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2944 echocheck
"memalign()"
2945 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2948 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2951 cc_check
&& _memalign
=yes
2952 if test "$_memalign" = yes ; then
2953 _def_memalign
='#define HAVE_MEMALIGN 1'
2955 _def_memalign
='#undef HAVE_MEMALIGN'
2956 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2957 not darwin
&& _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2959 echores
"$_memalign"
2962 echocheck
"alloca.h"
2965 int main(void) { (void) alloca(0); return 0; }
2968 cc_check
&& _alloca
=yes
2970 _def_alloca
='#define HAVE_ALLOCA_H 1'
2972 _def_alloca
='#undef HAVE_ALLOCA_H'
2979 #include <sys/types.h>
2980 #include <sys/mman.h>
2981 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2984 cc_check
&& _mman
=yes
2985 if test "$_mman" = yes ; then
2986 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2988 _def_mman
='#undef HAVE_SYS_MMAN_H'
2993 #include <sys/types.h>
2994 #include <sys/mman.h>
2995 int main(void) { void *p = MAP_FAILED; return 0; }
2997 _mman_has_map_failed
=no
2998 cc_check
&& _mman_has_map_failed
=yes
2999 if test "$_mman_has_map_failed" = yes ; then
3000 _def_mman_has_map_failed
=''
3002 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
3005 echocheck
"dynamic loader"
3008 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
3011 for _ld_tmp
in "" "-ldl" ; do
3012 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3014 if test "$_dl" = yes ; then
3015 _def_dl
='#define HAVE_LIBDL 1'
3017 _def_dl
='#undef HAVE_LIBDL'
3022 echocheck
"dynamic a/v plugins support"
3023 if test "$_dl" = no
; then
3026 if test "$_dynamic_plugins" = yes ; then
3027 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
3029 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3031 echores
"$_dynamic_plugins"
3034 #echocheck "dynamic linking"
3035 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
3036 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
3038 #int main(void) { return 0; }
3040 #if cc_check -rdynamic ; then
3041 # _ld_dl_dynamic='-rdynamic'
3042 #elif cc_check -Bdynamic ; then
3043 # _ld_dl_dynamic='-Bdynamic'
3044 #elif cc_check ; then
3047 #echores "using $_ld_dl_dynamic"
3049 _def_threads
='#undef HAVE_THREADS'
3052 if test "$_pthreads" = auto
; then
3054 #include <pthread.h>
3055 void* func(void *arg) { return arg; }
3056 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3060 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3061 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3062 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3066 if test "$_pthreads" = yes ; then
3067 _res_comment
="using $_ld_pthread"
3068 _def_pthreads
='#define HAVE_PTHREADS 1'
3069 _def_threads
='#define HAVE_THREADS 1'
3071 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3072 _def_pthreads
='#undef HAVE_PTHREADS'
3073 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3074 if not mingw32
; then
3078 echores
"$_pthreads"
3082 if test "$_rpath" = yes ; then
3083 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3084 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3091 if test "$_iconv" = auto
; then
3092 _iconv_tmp
='#include <iconv.h>'
3098 #define INBUFSIZE 1024
3099 #define OUTBUFSIZE 4096
3101 char inbuffer[INBUFSIZE];
3102 char outbuffer[OUTBUFSIZE];
3107 char *tocode="UTF-8";
3108 char *fromcode="cp1250";
3109 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3110 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3111 char *iptr=inbuffer;
3112 char *optr=outbuffer;
3113 size_t inleft=numread;
3114 size_t outleft=OUTBUFSIZE;
3115 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3117 write (1, outbuffer, OUTBUFSIZE - outleft);
3120 if (iconv_close(icdsc) == -1)
3126 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3127 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3131 if test "$_iconv" = yes ; then
3132 _def_iconv
='#define USE_ICONV 1'
3134 _def_iconv
='#undef USE_ICONV'
3139 echocheck
"sys/soundcard.h"
3141 #include <sys/soundcard.h>
3142 int main(void) { return 0; }
3145 cc_check
&& _sys_soundcard
=yes
3146 if test "$_sys_soundcard" = yes ; then
3147 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3148 _include_soundcard
='#include <sys/soundcard.h>'
3150 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3152 echores
"$_sys_soundcard"
3154 if test "$_sys_soundcard" != yes ; then
3155 echocheck
"soundcard.h"
3157 #include <soundcard.h>
3158 int main(void) { return 0; }
3161 cc_check
&& _soundcard
=yes
3162 if linux ||
test "$_ossaudio" != no
; then
3163 # use soundcard.h on Linux, or when OSS support is enabled
3164 echores
"$_soundcard"
3166 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
3167 _res_comment
= "but ignored!"
3168 echores
"$_soundcard"
3171 if test "$_soundcard" = yes ; then
3172 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3173 _include_soundcard
='#include <soundcard.h>'
3175 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3178 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3182 echocheck
"sys/dvdio.h"
3185 #include <sys/dvdio.h>
3186 int main(void) { return 0; }
3189 cc_check
&& _dvdio
=yes
3190 if test "$_dvdio" = yes ; then
3191 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3193 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3198 echocheck
"sys/cdio.h"
3201 #include <sys/cdio.h>
3202 int main(void) { return 0; }
3205 cc_check
&& _cdio
=yes
3206 if test "$_cdio" = yes ; then
3207 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3209 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3214 echocheck
"linux/cdrom.h"
3216 #include <sys/types.h>
3217 #include <linux/cdrom.h>
3218 int main(void) { return 0; }
3221 cc_check
&& _cdrom
=yes
3222 if test "$_cdrom" = yes ; then
3223 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3225 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3233 int main(void) { return 0; }
3236 cc_check
&& _dvd
=yes
3237 if test "$_dvd" = yes ; then
3238 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3240 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3246 echocheck
"BSDI dvd.h"
3249 int main(void) { return 0; }
3252 cc_check
&& _bsdi_dvd
=yes
3253 if test "$_bsdi_dvd" = yes ; then
3254 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3256 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3258 echores
"$_bsdi_dvd"
3263 # also used by AIX, but AIX does not support VCD and/or libdvdread
3264 echocheck
"HP-UX SCSI header"
3266 #include <sys/scsi.h>
3267 int main(void) { return 0; }
3270 cc_check
&& _hpux_scsi_h
=yes
3271 if test "$_hpux_scsi_h" = yes ; then
3272 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3274 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3276 echores
"$_hpux_scsi_h"
3281 echocheck
"userspace SCSI headers (Solaris)"
3283 # include <unistd.h>
3284 # include <stropts.h>
3285 # include <sys/scsi/scsi_types.h>
3286 # include <sys/scsi/impl/uscsi.h>
3287 int main(void) { return 0; }
3290 cc_check
&& _sol_scsi_h
=yes
3291 if test "$_sol_scsi_h" = yes ; then
3292 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3294 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3296 echores
"$_sol_scsi_h"
3301 if test "$_termcap" = auto
; then
3303 int main(void) { tgetent(); return 0; }
3306 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3307 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3308 && _termcap
=yes && break
3311 if test "$_termcap" = yes ; then
3312 _def_termcap
='#define USE_TERMCAP 1'
3313 _res_comment
="using $_ld_tmp"
3315 _def_termcap
='#undef USE_TERMCAP'
3321 if test "$_termios" = auto
; then
3323 #include <sys/termios.h>
3324 int main(void) { return 0; }
3327 cc_check
&& _termios
=yes
3328 _def_termios_h_name
='sys/termios.h'
3331 if test "$_termios" = auto
; then
3333 #include <termios.h>
3334 int main(void) { return 0; }
3337 cc_check
&& _termios
=yes
3338 _def_termios_h_name
='termios.h'
3341 if test "$_termios" = yes ; then
3342 _def_termios
='#define HAVE_TERMIOS 1'
3343 _def_termios_h
='#undef HAVE_TERMIOS_H'
3344 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3346 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3347 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3348 elif test "$_def_termios_h_name" = 'termios.h' ; then
3349 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3351 _res_comment
="using $_def_termios_h_name"
3353 _def_termios
='#undef HAVE_TERMIOS'
3354 _def_termios_h_name
=''
3361 if test "$_shm" = auto
; then
3363 #include <sys/types.h>
3364 #include <sys/shm.h>
3365 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3368 cc_check
&& _shm
=yes
3370 if test "$_shm" = yes ; then
3371 _def_shm
='#define HAVE_SHM 1'
3373 _def_shm
='#undef HAVE_SHM'
3378 # XXX: FIXME, add runtime checking
3379 echocheck
"linux devfs"
3380 echores
"$_linux_devfs"
3383 echocheck
"scandir()"
3385 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3388 cc_check
&& _scandir
=yes
3389 if test "$_scandir" = yes ; then
3390 _def_scandir
='#define HAVE_SCANDIR 1'
3393 _def_scandir
='#undef HAVE_SCANDIR'
3399 echocheck
"strsep()"
3402 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3405 cc_check
&& _strsep
=yes
3406 if test "$_strsep" = yes ; then
3407 _def_strsep
='#define HAVE_STRSEP 1'
3410 _def_strsep
='#undef HAVE_STRSEP'
3415 echocheck
"strlcpy()"
3418 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3421 cc_check
&& _strlcpy
=yes
3422 if test "$_strlcpy" = yes ; then
3423 _def_strlcpy
='#define HAVE_STRLCPY 1'
3426 _def_strlcpy
='#undef HAVE_STRLCPY'
3431 echocheck
"strlcat()"
3434 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3437 cc_check
&& _strlcat
=yes
3438 if test "$_strlcat" = yes ; then
3439 _def_strlcat
='#define HAVE_STRLCAT 1'
3442 _def_strlcat
='#undef HAVE_STRLCAT'
3447 echocheck
"fseeko()"
3450 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3453 cc_check
&& _fseeko
=yes
3454 if test "$_fseeko" = yes ; then
3455 _def_fseeko
='#define HAVE_FSEEKO 1'
3458 _def_fseeko
='#undef HAVE_FSEEKO'
3463 echocheck
"localtime_r()"
3466 int main( void ) { localtime_r(NULL, NULL); }
3469 cc_check
&& _localtime_r
=yes
3470 if test "$_localtime_r" = yes ; then
3471 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3473 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3475 echores
"$_localtime_r"
3477 echocheck
"vsscanf()"
3480 int main(void) { vsscanf(0, 0, 0); return 0; }
3483 cc_check
&& _vsscanf
=yes
3484 if test "$_vsscanf" = yes ; then
3485 _def_vsscanf
='#define HAVE_VSSCANF 1'
3488 _def_vsscanf
='#undef HAVE_VSSCANF'
3497 int main(void) { swab(0, 0, 0); return 0; }
3500 cc_check
&& _swab
=yes
3501 if test "$_swab" = yes ; then
3502 _def_swab
='#define HAVE_SWAB 1'
3505 _def_swab
='#undef HAVE_SWAB'
3510 echocheck
"POSIX select()"
3514 #include <sys/types.h>
3516 #include <sys/time.h>
3518 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3521 _def_posix_select
='#undef HAVE_POSIX_SELECT'
3522 cc_check
&& _posix_select
=yes \
3523 && _def_posix_select
='#define HAVE_POSIX_SELECT 1'
3524 echores
"$_posix_select"
3527 echocheck
"gettimeofday()"
3530 #include <sys/time.h>
3531 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3534 cc_check
&& _gettimeofday
=yes
3535 if test "$_gettimeofday" = yes ; then
3536 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3537 _need_gettimeofday
=no
3539 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3540 _need_gettimeofday
=yes
3542 echores
"$_gettimeofday"
3549 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3552 cc_check
&& _glob
=yes
3553 if test "$_glob" = yes ; then
3554 _def_glob
='#define HAVE_GLOB 1'
3557 _def_glob
='#undef HAVE_GLOB'
3563 echocheck
"setenv()"
3566 int main (void){ setenv("","",0); return 0; }
3569 cc_check
&& _setenv
=yes
3570 if test "$_setenv" = yes ; then
3571 _def_setenv
='#define HAVE_SETENV 1'
3574 _def_setenv
='#undef HAVE_SETENV'
3581 echocheck
"sysi86()"
3583 #include <sys/sysi86.h>
3584 int main (void) { sysi86(0); return 0; }
3587 cc_check
&& _sysi86
=yes
3588 if test "$_sysi86" = yes ; then
3589 _def_sysi86
='#define HAVE_SYSI86 1'
3591 #include <sys/sysi86.h>
3592 int main (void) { int sysi86(int, void*); sysi86(0); return 0; }
3594 cc_check
&& _def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3596 _def_sysi86
='#undef HAVE_SYSI86'
3602 echocheck
"sys/sysinfo.h"
3604 #include <sys/sysinfo.h>
3606 struct sysinfo s_info;
3612 cc_check
&& _sys_sysinfo
=yes
3613 if test "$_sys_sysinfo" = yes ; then
3614 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3616 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3618 echores
"$_sys_sysinfo"
3623 echocheck
"Mac OS X APIs"
3624 if test "$_macosx" = auto
; then
3625 productName
=`/usr/bin/sw_vers -productName`
3626 if test "$productName" = "Mac OS X" ||
3627 test "$productName" = "Mac OS X Server" ; then
3631 _def_macosx
='#undef MACOSX'
3632 _noaomodules
="macosx $_noaomodules"
3633 _novomodules
="quartz $_novomodules"
3636 if test "$_macosx" = yes ; then
3638 #include <Carbon/Carbon.h>
3639 #include <QuickTime/QuickTime.h>
3640 #include <CoreAudio/CoreAudio.h>
3644 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3647 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3648 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3649 _def_macosx
='#define MACOSX 1'
3650 _aosrc
="$_aosrc ao_macosx.c"
3651 _aomodules
="macosx $_aomodules"
3652 _vosrc
="$_vosrc vo_quartz.c"
3653 _vomodules
="quartz $_vomodules"
3656 _def_macosx
='#undef MACOSX'
3657 _noaomodules
="macosx $_noaomodules"
3658 _novomodules
="quartz $_novomodules"
3661 #include <Carbon/Carbon.h>
3662 #include <QuartzCore/CoreVideo.h>
3665 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3666 _vosrc
="$_vosrc vo_macosx.m"
3667 _vomodules
="macosx $_vomodules"
3668 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3669 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3670 _macosx_corevideo
=yes
3672 _novomodules
="macosx $_novomodules"
3673 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3674 _macosx_corevideo
=no
3679 echocheck
"Mac OS X Finder Support"
3680 if test "$_macosx_finder_support" = auto
; then
3681 _macosx_finder_support
=$_macosx
3683 if test "$_macosx_finder_support" = yes; then
3684 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3685 _macosx_finder_support
=yes
3687 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3688 _macosx_finder_support
=no
3690 echores
"$_macosx_finder_support"
3692 echocheck
"Mac OS X Bundle file locations"
3693 if test "$_macosx_bundle" = auto
; then
3694 _macosx_bundle
=$_macosx_finder_support
3696 if test "$_macosx_bundle" = yes; then
3697 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3699 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3702 echores
"$_macosx_bundle"
3707 echocheck
"pkg-config"
3708 _pkg_config
=pkg-config
3709 if `$_pkg_config --version > /dev/null 2>&1`; then
3717 echocheck
"Samba support (libsmbclient)"
3718 if test "$_smbsupport" = yes; then
3719 _ld_extra
="$_ld_extra -lsmbclient"
3721 if test "$_smbsupport" = auto
; then
3724 #include <libsmbclient.h>
3725 int main(void) { smbc_opendir("smb://"); return 0; }
3727 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3728 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3729 _smbsupport
=yes && break
3733 if test "$_smbsupport" = yes; then
3734 _def_smbsupport
="#define LIBSMBCLIENT"
3735 _inputmodules
="smb $_inputmodules"
3737 _def_smbsupport
="#undef LIBSMBCLIENT"
3738 _noinputmodules
="smb $_noinputmodules"
3740 echores
"$_smbsupport"
3749 if test "$_3dfx" = yes ; then
3750 _def_3dfx
='#define HAVE_3DFX 1'
3751 _vosrc
="$_vosrc vo_3dfx.c"
3752 _vomodules
="3dfx $_vomodules"
3754 _def_3dfx
='#undef HAVE_3DFX'
3755 _novomodules
="3dfx $_novomodules"
3761 if test "$_tdfxfb" = yes ; then
3762 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3763 _vosrc
="$_vosrc vo_tdfxfb.c"
3764 _vomodules
="tdfxfb $_vomodules"
3766 _def_tdfxfb
='#undef HAVE_TDFXFB'
3767 _novomodules
="tdfxfb $_novomodules"
3772 if test "$_s3fb" = yes ; then
3773 _def_s3fb
='#define HAVE_S3FB 1'
3774 _vosrc
="$_vosrc vo_s3fb.c"
3775 _vomodules
="s3fb $_vomodules"
3777 _def_s3fb
='#undef HAVE_S3FB'
3778 _novomodules
="s3fb $_novomodules"
3783 if test "$_tdfxvid" = yes ; then
3784 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3785 _vosrc
="$_vosrc vo_tdfx_vid.c"
3786 _vomodules
="tdfx_vid $_vomodules"
3788 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3789 _novomodules
="tdfx_vid $_novomodules"
3794 if test "$_tga" = yes ; then
3795 _def_tga
='#define HAVE_TGA 1'
3796 _vosrc
="$_vosrc vo_tga.c"
3797 _vomodules
="tga $_vomodules"
3799 _def_tga
='#undef HAVE_TGA'
3800 _novomodules
="tga $_novomodules"
3805 echocheck
"DirectFB"
3806 if test "$_directfb" = auto
; then
3809 #include <directfb.h>
3810 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3812 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3813 -I/usr
/include
/directfb
-I/usr
/local
/include
-I/usr
/include
; do
3814 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3815 _inc_extra
="$_inc_extra $_inc_tmp" && break
3820 expr $1 \
* 65536 + $2 \
* 256 + $3
3823 if test "$_directfb" = yes; then
3825 #include <directfb_version.h>
3827 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3830 if $_cc -E $TMPC $_inc_extra > "$TMPO"; then
3831 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPO" | tr -d '()'`
3832 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3833 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3834 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3835 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3836 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3837 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3838 _res_comment
="$_directfb_version"
3840 _def_directfb_version
='#undef DIRECTFBVERSION'
3842 _res_comment
="version >=0.9.13 required"
3846 _res_comment
="failed to get version"
3849 echores
"$_directfb"
3851 if test "$_directfb" = yes ; then
3852 _def_directfb
='#define HAVE_DIRECTFB 1'
3853 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3854 _vosrc
="$_vosrc vo_directfb2.c"
3855 _vomodules
="directfb $_vomodules"
3856 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3858 _novomodules
="directfb $_novomodules"
3861 if test "$_dfb_version" -ge `dfb_version 0 9 15`; then
3862 _vosrc
="$_vosrc vo_dfbmga.c"
3863 _vomodules
="dfbmga $_vomodules"
3864 _def_dfbmga
='#define HAVE_DFBMGA 1'
3866 _novomodules
="dfbmga $_novomodules"
3867 _def_dfbmga
='#undef HAVE_DFBMGA'
3870 _def_directfb
='#undef HAVE_DIRECTFB'
3871 _novomodules
="dfbmga directfb $_novomodules"
3875 echocheck
"X11 headers presence"
3876 for I
in `echo $_inc_extra | sed s/-I//g` /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3877 if test -f "$I/X11/Xlib.h" ; then
3880 _res_comment
="using $I"
3884 if test -z "$_inc_x11" ; then
3887 _res_comment
="check if the dev(el) packages are installed"
3889 echores
"$_x11_headers"
3893 if test "$_x11" != no
; then
3895 #include <X11/Xlib.h>
3896 #include <X11/Xutil.h>
3897 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3899 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3900 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3902 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3904 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3906 cc_check
$_inc_x11 $_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3907 && _x11
=yes && break
3910 if test "$_x11" = yes ; then
3911 #FIXME: This is ugly as it can duplicate a -I parameter..
3912 _inc_extra
="$_inc_extra $_inc_x11"
3913 _def_x11
='#define HAVE_X11 1'
3914 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3915 _vomodules
="x11 xover $_vomodules"
3918 _def_x11
='#undef HAVE_X11'
3919 _novomodules
="x11 $_novomodules"
3920 _res_comment
="check if the dev(el) packages are installed"
3921 # disable stuff that depends on X
3922 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _dga
=no
3930 if test "$_x11" = yes ; then
3932 #include <X11/Xmd.h>
3933 #include <X11/Xlib.h>
3934 #include <X11/Xutil.h>
3935 #include <X11/Xatom.h>
3936 #include <X11/extensions/dpms.h>
3938 (void) DPMSQueryExtension(0, 0, 0);
3941 cc_check
-lXdpms && _xdpms3
=yes
3943 #include <X11/Xlib.h>
3944 #include <X11/extensions/dpms.h>
3946 (void) DPMSQueryExtension(0, 0, 0);
3949 cc_check
&& _xdpms4
=yes
3951 if test "$_xdpms4" = yes ; then
3952 _def_xdpms
='#define HAVE_XDPMS 1'
3953 _res_comment
="using Xdpms 4"
3955 elif test "$_xdpms3" = yes ; then
3956 _def_xdpms
='#define HAVE_XDPMS 1'
3957 _libs_mplayer
="$_libs_mplayer -lXdpms"
3958 _res_comment
="using Xdpms 3"
3961 _def_xdpms
='#undef HAVE_XDPMS'
3967 if test "$_xv" = auto
; then
3969 #include <X11/Xlib.h>
3970 #include <X11/extensions/Xvlib.h>
3972 (void) XvGetPortAttribute(0, 0, 0, 0);
3973 (void) XvQueryPortAttributes(0, 0, 0);
3977 cc_check
-lXv && _xv
=yes
3980 if test "$_xv" = yes ; then
3981 _def_xv
='#define HAVE_XV 1'
3982 _libs_mplayer
="$_libs_mplayer -lXv"
3983 _vosrc
="$_vosrc vo_xv.c"
3984 _vomodules
="xv $_vomodules"
3986 _def_xv
='#undef HAVE_XV'
3987 _novomodules
="xv $_novomodules"
3993 if test "$_xv" = yes && test "$_xvmc" != no
; then
3996 #include <X11/Xlib.h>
3997 #include <X11/extensions/Xvlib.h>
3998 #include <X11/extensions/XvMClib.h>
4000 (void) XvMCQueryExtension(0,0,0);
4001 (void) XvMCCreateContext(0,0,0,0,0,0,0);
4004 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
4005 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
4008 if test "$_xvmc" = yes ; then
4009 _def_xvmc
='#define HAVE_XVMC 1'
4010 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
4011 _vosrc
="$_vosrc vo_xvmc.c"
4012 _vomodules
="xvmc $_vomodules"
4013 _res_comment
="using $_xvmclib"
4015 _def_xvmc
='#undef HAVE_XVMC'
4016 _novomodules
="xvmc $_novomodules"
4021 echocheck
"Xinerama"
4022 if test "$_xinerama" = auto
; then
4024 #include <X11/Xlib.h>
4025 #include <X11/extensions/Xinerama.h>
4026 int main(void) { (void) XineramaIsActive(0); return 0; }
4029 cc_check
-lXinerama && _xinerama
=yes
4032 if test "$_xinerama" = yes ; then
4033 _def_xinerama
='#define HAVE_XINERAMA 1'
4034 _libs_mplayer
="$_libs_mplayer -lXinerama"
4036 _def_xinerama
='#undef HAVE_XINERAMA'
4038 echores
"$_xinerama"
4041 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4042 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4043 # named 'X extensions' or something similar.
4044 # This check may be useful for future mplayer versions (to change resolution)
4045 # If you run into problems, remove '-lXxf86vm'.
4047 if test "$_vm" = auto
; then
4049 #include <X11/Xlib.h>
4050 #include <X11/extensions/xf86vmode.h>
4051 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4054 cc_check
-lXxf86vm && _vm
=yes
4056 if test "$_vm" = yes ; then
4057 _def_vm
='#define HAVE_XF86VM 1'
4058 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
4060 _def_vm
='#undef HAVE_XF86VM'
4064 # Check for the presence of special keycodes, like audio control buttons
4065 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4066 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4067 # have these new keycodes.
4068 echocheck
"XF86keysym"
4069 if test "$_xf86keysym" = auto
; then
4072 #include <X11/Xlib.h>
4073 #include <X11/XF86keysym.h>
4074 int main(void) { return XF86XK_AudioPause; }
4076 cc_check
&& _xf86keysym
=yes
4078 if test "$_xf86keysym" = yes ; then
4079 _def_xf86keysym
='#define HAVE_XF86XK 1'
4081 _def_xf86keysym
='#undef HAVE_XF86XK'
4083 echores
"$_xf86keysym"
4086 # Version 2 is preferred to version 1 if available
4087 if test "$_dga" = auto
; then
4089 #include <X11/Xlib.h>
4090 #include <X11/extensions/xf86dga.h>
4091 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4094 cc_check
-lXxf86dga -lXxf86vm && _dga
=1
4097 #include <X11/Xlib.h>
4098 #include <X11/extensions/xf86dga.h>
4099 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4101 cc_check
-lXxf86dga && _dga
=2
4104 _def_dga
='#undef HAVE_DGA'
4105 _def_dga2
='#undef HAVE_DGA2'
4106 if test "$_dga" = 1 ; then
4107 _def_dga
='#define HAVE_DGA 1'
4108 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4109 _vosrc
="$_vosrc vo_dga.c"
4110 _vomodules
="dga $_vomodules"
4111 _res_comment
="using DGA 1.0"
4112 elif test "$_dga" = 2 ; then
4113 _def_dga
='#define HAVE_DGA 1'
4114 _def_dga2
='#define HAVE_DGA2 1'
4115 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4116 _vosrc
="$_vosrc vo_dga.c"
4117 _vomodules
="dga $_vomodules"
4118 _res_comment
="using DGA 2.0"
4119 elif test "$_dga" = no
; then
4120 _novomodules
="dga $_novomodules"
4122 die
"DGA version must be 1 or 2"
4128 #Note: this test is run even with --enable-gl since we autodetect linker flags
4129 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4132 int main(void) { return 0; }
4135 if cc_check
-lGL $_ld_lm ; then
4137 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4138 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4140 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4141 elif cc_check
-lopengl32 ; then
4144 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4149 if test "$_gl" = yes ; then
4150 _def_gl
='#define HAVE_GL 1'
4151 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4152 if test "$_gl_win32" = yes ; then
4153 _def_gl_win32
='#define GL_WIN32 1'
4154 _vosrc
="$_vosrc w32_common.c"
4155 _res_comment
="win32 version"
4157 _vomodules
="opengl $_vomodules"
4159 _def_gl
='#undef HAVE_GL'
4160 _def_gl_win32
='#undef GL_WIN32'
4161 _novomodules
="opengl $_novomodules"
4166 echocheck
"/dev/mga_vid"
4167 if test "$_mga" = auto
; then
4169 test -c /dev
/mga_vid
&& _mga
=yes
4171 if test "$_mga" = yes ; then
4172 _def_mga
='#define HAVE_MGA 1'
4173 _vosrc
="$_vosrc vo_mga.c"
4174 _vomodules
="mga $_vomodules"
4176 _def_mga
='#undef HAVE_MGA'
4177 _novomodules
="mga $_novomodules"
4182 # echocheck "syncfb"
4184 # test "$_mga" = yes && _syncfb=yes
4185 # if test "$_syncfb" = yes ; then
4186 # _def_syncfb='#define HAVE_SYNCFB 1'
4187 # _vosrc="$_vosrc vo_syncfb.c"
4189 # _def_syncfb='#undef HAVE_SYNCFB'
4191 # echores "$_syncfb"
4195 if test "$_xmga" = auto
; then
4197 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4199 if test "$_xmga" = yes ; then
4200 _def_xmga
='#define HAVE_XMGA 1'
4201 _vosrc
="$_vosrc vo_xmga.c"
4202 _vomodules
="xmga $_vomodules"
4204 _def_xmga
='#undef HAVE_XMGA'
4205 _novomodules
="xmga $_novomodules"
4211 if test "$_ggi" = auto
; then
4213 #include <ggi/ggi.h>
4214 int main(void) { return 0; }
4217 cc_check
-lggi && _ggi
=yes
4219 if test "$_ggi" = yes ; then
4220 _def_ggi
='#define HAVE_GGI 1'
4221 _libs_mplayer
="$_libs_mplayer -lggi"
4222 _vosrc
="$_vosrc vo_ggi.c"
4223 _vomodules
="ggi $_vomodules"
4225 _def_ggi
='#undef HAVE_GGI'
4226 _novomodules
="ggi $_novomodules"
4230 echocheck
"GGI extension: libggiwmh"
4231 if test "$_ggiwmh" = auto
; then
4234 #include <ggi/ggi.h>
4235 #include <ggi/wmh.h>
4236 int main(void) { return 0; }
4238 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4240 # needed to get right output on obscure combination
4241 # like --disable-ggi --enable-ggiwmh
4242 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4243 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4244 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4247 _def_ggiwmh
='#undef HAVE_GGIWMH'
4253 if test "$_aa" = auto
; then
4256 extern struct aa_hardware_params aa_defparams;
4257 extern struct aa_renderparams aa_defrenderparams;
4261 (void) aa_init(0, 0, 0);
4262 c = aa_autoinit(&aa_defparams);
4263 p = aa_getrenderparams();
4264 aa_autoinitkbd(c,0);
4268 for _ld_tmp
in "-laa" ; do
4269 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4272 if test "$_aa" = yes ; then
4273 _def_aa
='#define HAVE_AA 1'
4275 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4277 _vosrc
="$_vosrc vo_aa.c"
4278 _vomodules
="aa $_vomodules"
4280 _def_aa
='#undef HAVE_AA'
4281 _novomodules
="aa $_novomodules"
4287 if test "$_caca" = auto
; then
4289 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4292 #ifdef CACA_API_VERSION_1
4295 int main(void) { (void) caca_init(); return 0; }
4297 cc_check
`caca-config --libs` && _caca
=yes
4300 if test "$_caca" = yes ; then
4301 _def_caca
='#define HAVE_CACA 1'
4302 _inc_extra
="$_inc_extra `caca-config --cflags`"
4303 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4304 _vosrc
="$_vosrc vo_caca.c"
4305 _vomodules
="caca $_vomodules"
4307 _def_caca
='#undef HAVE_CACA'
4308 _novomodules
="caca $_novomodules"
4314 if test "$_svga" = auto
; then
4317 int main(void) { return 0; }
4320 cc_check
-lvga $_ld_lm && _svga
=yes
4322 if test "$_svga" = yes ; then
4323 _def_svga
='#define HAVE_SVGALIB 1'
4324 _libs_mplayer
="$_libs_mplayer -lvga"
4325 _vosrc
="$_vosrc vo_svga.c"
4326 _vomodules
="svga $_vomodules"
4328 _def_svga
='#undef HAVE_SVGALIB'
4329 _novomodules
="svga $_novomodules"
4335 if test "$_fbdev" = auto
; then
4337 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
4339 if test "$_fbdev" = yes ; then
4340 _def_fbdev
='#define HAVE_FBDEV 1'
4341 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4342 _vomodules
="fbdev $_vomodules"
4344 _def_fbdev
='#undef HAVE_FBDEV'
4345 _novomodules
="fbdev $_novomodules"
4352 if test "$_dvb" = auto
; then
4355 #include <sys/poll.h>
4356 #include <sys/ioctl.h>
4361 #include <ost/dmx.h>
4362 #include <ost/frontend.h>
4363 #include <ost/sec.h>
4364 #include <ost/video.h>
4365 #include <ost/audio.h>
4366 int main(void) {return 0;}
4368 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4369 cc_check
$_inc_tmp && _dvb
=yes && \
4370 _inc_extra
="$_inc_extra $_inc_tmp" && break
4374 if test "$_dvb" = yes ; then
4375 _def_dvb
='#define HAVE_DVB 1'
4376 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4377 _aomodules
="mpegpes(dvb) $_aomodules"
4378 _vomodules
="mpegpes(dvb) $_vomodules"
4381 echocheck
"DVB HEAD"
4382 if test "$_dvbhead" = auto
; then
4386 #include <sys/poll.h>
4387 #include <sys/ioctl.h>
4392 #include <linux/dvb/dmx.h>
4393 #include <linux/dvb/frontend.h>
4394 #include <linux/dvb/video.h>
4395 #include <linux/dvb/audio.h>
4396 int main(void) {return 0;}
4398 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4399 cc_check
$_inc_tmp && _dvbhead
=yes && \
4400 _inc_extra
="$_inc_extra $_inc_tmp" && break
4404 if test "$_dvbhead" = yes ; then
4405 _def_dvb
='#define HAVE_DVB_HEAD 1'
4406 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4407 _aomodules
="mpegpes(dvb) $_aomodules"
4408 _vomodules
="mpegpes(dvb) $_vomodules"
4411 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4412 _def_dvb
='#undef HAVE_DVB'
4413 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4414 _aomodules
="mpegpes(file) $_aomodules"
4415 _vomodules
="mpegpes(file) $_vomodules"
4418 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4420 _inputmodules
="dvb $_inputmodules"
4423 _noinputmodules
="dvb $_noinputmodules"
4426 echocheck
"PNG support"
4427 if test "$_png" = auto
; then
4430 # Don't check for -lpng on irix since it has its own libpng
4431 # incompatible with the GNU libpng
4432 _res_comment
="disabled on irix (not GNU libpng)"
4438 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4439 printf("libpng: %s\n", png_libpng_ver);
4440 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4443 if cc_check
-lpng -lz $_ld_lm ; then
4447 _res_comment
="mismatch of library and header versions"
4453 if test "$_png" = yes ; then
4454 _def_png
='#define HAVE_PNG 1'
4455 _ld_extra
="$_ld_extra -lpng -lz"
4456 _vosrc
="$_vosrc vo_png.c"
4457 _vomodules
="png $_vomodules"
4459 _def_png
='#undef HAVE_PNG'
4460 _novomodules
="png $_novomodules"
4463 echocheck
"JPEG support"
4464 if test "$_jpeg" = auto
; then
4471 #include <jpeglib.h>
4476 if cc_check
-ljpeg $_ld_lm ; then
4484 if test "$_jpeg" = yes ; then
4485 _def_jpeg
='#define HAVE_JPEG 1'
4486 _vosrc
="$_vosrc vo_jpeg.c"
4487 _vomodules
="jpeg $_vomodules"
4488 _ld_extra
="$_ld_extra -ljpeg"
4490 _def_jpeg
='#undef HAVE_JPEG'
4491 _novomodules
="jpeg $_novomodules"
4496 echocheck
"PNM support"
4497 if test "$_pnm" = yes; then
4498 _def_pnm
="#define HAVE_PNM"
4499 _vosrc
="$_vosrc vo_pnm.c"
4500 _vomodules
="pnm $_vomodules"
4502 _def_pnm
="#undef HAVE_PNM"
4503 _novomodules
="pnm $_novomodules"
4509 echocheck
"GIF support"
4510 # This is to appease people who want to force gif support.
4511 # If it is forced to yes, then we still do checks to determine
4512 # which gif library to use.
4513 if test "$_gif" = yes ; then
4518 if test "$_gif" = auto
; then
4521 #include <gif_lib.h>
4526 for _ld_gif
in "-lungif" "-lgif" ; do
4527 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4531 # If no library was found, and the user wants support forced,
4532 # then we force it on with libgif, as this is the safest
4533 # assumption IMHO. (libungif & libregif both create symbolic
4534 # links to libgif. We also assume that no x11 support is needed,
4535 # because if you are forcing this, then you _should_ know what
4536 # you are doing. [ Besides, package maintainers should never
4537 # have compiled x11 deps into libungif in the first place. ] )
4540 if test "$_force_gif" = yes && test "$_gif" = no
; then
4545 if test "$_gif" = yes ; then
4546 _def_gif
='#define HAVE_GIF 1'
4547 _vosrc
="$_vosrc vo_gif89a.c"
4548 _codecmodules
="gif $_codecmodules"
4549 _vomodules
="gif89a $_vomodules"
4550 _res_comment
="old version, some encoding functions disabled"
4551 _def_gif_4
='#undef HAVE_GIF_4'
4552 _ld_extra
="$_ld_extra $_ld_gif"
4556 #include <gif_lib.h>
4557 void catch() { exit(1); }
4559 signal(SIGSEGV, catch); // catch segfault
4560 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4561 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4565 if cc_check
"$_ld_gif" && tmp_run
; then
4566 _def_gif_4
='#define HAVE_GIF_4 1'
4570 _def_gif
='#undef HAVE_GIF'
4571 _def_gif_4
='#undef HAVE_GIF_4'
4572 _novomodules
="gif89a $_novomodules"
4573 _nocodecmodules
="gif $_nocodecmodules"
4578 case "$_gif" in yes*)
4579 echocheck
"broken giflib workaround"
4580 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4583 #include <gif_lib.h>
4586 printf("UserData is at address %p\n", gif.UserData);
4590 if cc_check
"$_ld_gif" && tmp_run
; then
4591 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4600 echocheck
"VESA support"
4601 if test "$_vesa" = auto
; then
4604 int main(void) { vbeVersion(); return 0; }
4607 cc_check
-lvbe -llrmi && _vesa
=yes
4609 if test "$_vesa" = yes ; then
4610 _def_vesa
='#define HAVE_VESA 1'
4611 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4612 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4613 _vomodules
="vesa $_vomodules"
4615 _def_vesa
='#undef HAVE_VESA'
4616 _novomodules
="vesa $_novomodules"
4626 if test -z "$_sdlconfig" ; then
4627 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4628 _sdlconfig
="sdl-config"
4629 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4630 _sdlconfig
="sdl11-config"
4635 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4638 int main(int argc, char *argv[]) { return 0; }
4641 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4642 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4643 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4644 if test "$_sdlversion" -gt 116 ; then
4645 if test "$_sdlversion" -lt 121 ; then
4646 _def_sdlbuggy
='#define BUGGY_SDL'
4648 _def_sdlbuggy
='#undef BUGGY_SDL'
4655 if test "$_sdl" = yes ; then
4656 _def_sdl
='#define HAVE_SDL 1'
4658 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4659 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4661 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4662 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4664 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4665 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4667 _vosrc
="$_vosrc vo_sdl.c"
4668 _vomodules
="sdl $_vomodules"
4669 _aosrc
="$_aosrc ao_sdl.c"
4670 _aomodules
="sdl $_aomodules"
4671 _res_comment
="using $_sdlconfig"
4673 _def_sdl
='#undef HAVE_SDL'
4674 _novomodules
="sdl $_novomodules"
4675 _noaomodules
="sdl $_noaomodules"
4682 echocheck
"Windows waveout"
4683 if test "$_win32waveout" = auto
; then
4685 #include <windows.h>
4686 #include <mmsystem.h>
4687 int main(void) { return 0; }
4690 cc_check
-lwinmm && _win32waveout
=yes
4692 if test "$_win32waveout" = yes ; then
4693 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4694 _libs_mplayer
="$_libs_mplayer -lwinmm"
4695 _aosrc
="$_aosrc ao_win32.c"
4696 _aomodules
="win32 $_aomodules"
4698 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4699 _noaomodules
="win32 $_noaomodules"
4701 echores
"$_win32waveout"
4704 if test "$_directx" = auto
; then
4706 #include <windows.h>
4709 int main(void) { return 0; }
4712 cc_check
-lgdi32 && _directx
=yes
4714 if test "$_directx" = yes ; then
4715 _def_directx
='#define HAVE_DIRECTX 1'
4716 _libs_mplayer
="$_libs_mplayer -lgdi32"
4717 _vosrc
="$_vosrc vo_directx.c"
4718 _vomodules
="directx $_vomodules"
4719 _aosrc
="$_aosrc ao_dsound.c"
4720 _aomodules
="dsound $_aomodules"
4722 _def_directx
='#undef HAVE_DIRECTX'
4723 _novomodules
="directx $_novomodules"
4724 _noaomodules
="dsound $_noaomodules"
4732 if test "$_nas" = auto
; then
4734 #include <audio/audiolib.h>
4735 int main(void) { return 0; }
4738 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4740 if test "$_nas" = yes ; then
4741 _def_nas
='#define HAVE_NAS 1'
4742 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4743 _aosrc
="$_aosrc ao_nas.c"
4744 _aomodules
="nas $_aomodules"
4746 _noaomodules
="nas $_noaomodules"
4747 _def_nas
='#undef HAVE_NAS'
4752 if test "$_dxr2" = auto
; then
4755 #include <dxr2ioctl.h>
4756 int main(void) { return 0; }
4758 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4759 cc_check
$_inc_tmp && _dxr2
=yes && \
4760 _inc_extra
="$_inc_extra $_inc_tmp" && break
4763 if test "$_dxr2" = yes; then
4764 _def_dxr2
='#define HAVE_DXR2 1'
4765 _vosrc
="$_vosrc vo_dxr2.c"
4766 _aosrc
="$_aosrc ao_dxr2.c"
4767 _aomodules
="dxr2 $_aomodules"
4768 _vomodules
="dxr2 $_vomodules"
4770 _def_dxr2
='#undef HAVE_DXR2'
4771 _noaomodules
="dxr2 $_noaomodules"
4772 _novomodules
="dxr2 $_novomodules"
4777 if test "$_dxr3" = auto
; then
4779 #include <linux/em8300.h>
4780 int main(void) { return 0; }
4783 cc_check
&& _dxr3
=yes
4785 if test "$_dxr3" = yes ; then
4786 _def_dxr3
='#define HAVE_DXR3 1'
4787 _vosrc
="$_vosrc vo_dxr3.c"
4788 _vomodules
="dxr3 $_vomodules"
4790 _def_dxr3
='#undef HAVE_DXR3'
4791 _novomodules
="dxr3 $_novomodules"
4796 echocheck
"IVTV TV-Out"
4797 if test "$_ivtv" = auto
; then
4800 #include <inttypes.h>
4801 #include <linux/types.h>
4802 #include <linux/videodev2.h>
4803 #include <linux/ivtv.h>
4804 int main(void) { return 0; }
4807 cc_check
&& _ivtv
=yes
4809 if test "$_ivtv" = yes ; then
4810 _def_ivtv
='#define HAVE_IVTV 1'
4811 _vosrc
="$_vosrc vo_ivtv.c"
4812 _vomodules
="ivtv $_vomodules"
4813 _aosrc
="$_aosrc ao_ivtv.c"
4814 _aomodules
="ivtv $_aomodules"
4816 _def_ivtv
='#undef HAVE_IVTV'
4817 _novomodules
="ivtv $_novomodules"
4818 _noaomodules
="ivtv $_noaomodules"
4829 echocheck
"OSS Audio"
4830 if test "$_ossaudio" = auto
; then
4832 #include <sys/ioctl.h>
4834 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4837 cc_check
&& _ossaudio
=yes
4839 if test "$_ossaudio" = yes ; then
4840 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4841 _aosrc
="$_aosrc ao_oss.c"
4842 _aomodules
="oss $_aomodules"
4843 if test "$_linux_devfs" = yes; then
4844 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4845 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4848 #include <sys/ioctl.h>
4850 #ifdef OPEN_SOUND_SYSTEM
4851 int main(void) { return 0; }
4853 #error Not the real thing
4857 cc_check
&& _real_ossaudio
=yes
4858 if test "$_real_ossaudio" = yes; then
4859 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4860 elif netbsd || openbsd
; then
4861 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4862 _ld_extra
="$_ld_extra -lossaudio"
4864 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4866 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4869 _def_ossaudio
='#undef USE_OSS_AUDIO'
4870 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4871 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4872 _noaomodules
="oss $_noaomodules"
4874 echores
"$_ossaudio"
4878 if test "$_arts" = auto
; then
4880 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4884 int main(void) { return 0; }
4886 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4891 if test "$_arts" = yes ; then
4892 _def_arts
='#define USE_ARTS 1'
4893 _aosrc
="$_aosrc ao_arts.c"
4894 _aomodules
="arts $_aomodules"
4895 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
4896 _inc_extra
="$_inc_extra `artsc-config --cflags`"
4898 _noaomodules
="arts $_noaomodules"
4904 if test "$_esd" = auto
; then
4906 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4910 int main(void) { return 0; }
4912 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
4918 if test "$_esd" = yes ; then
4919 _def_esd
='#define USE_ESD 1'
4920 _aosrc
="$_aosrc ao_esd.c"
4921 _aomodules
="esd $_aomodules"
4922 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
4923 _inc_extra
="$_inc_extra `esd-config --cflags`"
4925 echocheck
"esd_get_latency()"
4928 int main(void) { return esd_get_latency(0); }
4930 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4931 echores
"$_esd_latency"
4933 _def_esd
='#undef USE_ESD'
4934 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4935 _noaomodules
="esd $_noaomodules"
4939 if test "$_polyp" = auto
; then
4941 if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
4944 #include <polyp/polyplib.h>
4945 #include <polyp/mainloop.h>
4946 #include <polyp/polyplib-error.h>
4947 int main(void) { return 0; }
4949 cc_check
`$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
4955 if test "$_polyp" = yes ; then
4956 _def_polyp
='#define USE_POLYP 1'
4957 _aosrc
="$_aosrc ao_polyp.c"
4958 _aomodules
="polyp $_aomodules"
4959 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`"
4960 _inc_extra
="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
4962 _def_polyp
='#undef USE_POLYP'
4963 _noaomodules
="polyp $_noaomodules"
4968 if test "$_jack" = auto
; then
4972 #include <jack/jack.h>
4973 int main(void) { jack_client_new("test"); return 0; }
4975 if cc_check
-ljack ; then
4976 _libs_mplayer
="$_libs_mplayer -ljack"
4977 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
4978 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
4979 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
4985 if test "$_jack" = yes ; then
4986 _def_jack
='#define USE_JACK 1'
4987 _aosrc
="$_aosrc ao_jack.c"
4988 _aomodules
="jack $_aomodules"
4990 _noaomodules
="jack $_noaomodules"
4995 if test "$_openal" = auto
; then
4999 #include <OpenAL/al.h>
5004 alSourceQueueBuffers(0, 0, 0);
5005 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5009 for I
in "-lopenal" "-framework OpenAL" ; do
5010 cc_check
$I && _openal
=yes && break
5011 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5013 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
5015 if test "$_openal" = yes ; then
5016 _def_openal
='#define USE_OPENAL 1'
5017 _aosrc
="$_aosrc ao_openal.c"
5018 _aomodules
="openal $_aomodules"
5020 _noaomodules
="openal $_noaomodules"
5024 echocheck
"ALSA audio"
5025 if test "$_alsa" != no
; then
5028 #include <sys/asoundlib.h>
5029 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5030 #error "alsa version != 0.5.x"
5032 int main(void) { return 0; }
5034 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5037 #include <sys/asoundlib.h>
5038 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5039 #error "alsa version != 0.9.x"
5041 int main(void) { return 0; }
5043 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5045 #include <alsa/asoundlib.h>
5046 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5047 #error "alsa version != 0.9.x"
5049 int main(void) { return 0; }
5051 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5054 #include <sys/asoundlib.h>
5055 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5056 #error "alsa version != 1.0.x"
5058 int main(void) { return 0; }
5060 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5062 #include <alsa/asoundlib.h>
5063 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5064 #error "alsa version != 1.0.x"
5066 int main(void) { return 0; }
5068 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5070 _def_alsa5
='#undef HAVE_ALSA5'
5071 _def_alsa9
='#undef HAVE_ALSA9'
5072 _def_alsa1x
='#undef HAVE_ALSA1X'
5073 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5074 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5075 if test "$_alsaver" ; then
5077 if test "$_alsaver" = '0.5.x' ; then
5079 _aosrc
="$_aosrc ao_alsa5.c"
5080 _aomodules
="alsa5 $_aomodules"
5081 _def_alsa5
='#define HAVE_ALSA5 1'
5082 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5083 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5084 elif test "$_alsaver" = '0.9.x-sys' ; then
5086 _aosrc
="$_aosrc ao_alsa.c"
5087 _aomodules
="alsa $_aomodules"
5088 _def_alsa9
='#define HAVE_ALSA9 1'
5089 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5090 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5091 elif test "$_alsaver" = '0.9.x-alsa' ; then
5093 _aosrc
="$_aosrc ao_alsa.c"
5094 _aomodules
="alsa $_aomodules"
5095 _def_alsa9
='#define HAVE_ALSA9 1'
5096 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5097 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5098 elif test "$_alsaver" = '1.0.x-sys' ; then
5100 _aosrc
="$_aosrc ao_alsa.c"
5101 _aomodules
="alsa $_aomodules"
5102 _def_alsa1x
="#define HAVE_ALSA1X 1"
5103 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5104 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5105 elif test "$_alsaver" = '1.0.x-alsa' ; then
5107 _aosrc
="$_aosrc ao_alsa.c"
5108 _aomodules
="alsa $_aomodules"
5109 _def_alsa1x
="#define HAVE_ALSA1X 1"
5110 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5111 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5114 _res_comment
="unknown version"
5116 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5118 _noaomodules
="alsa $_noaomodules"
5123 echocheck
"Sun audio"
5124 if test "$_sunaudio" = auto
; then
5126 #include <sys/types.h>
5127 #include <sys/audioio.h>
5128 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5131 cc_check
&& _sunaudio
=yes
5133 if test "$_sunaudio" = yes ; then
5134 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5135 _aosrc
="$_aosrc ao_sun.c"
5136 _aomodules
="sun $_aomodules"
5138 _def_sunaudio
='#undef USE_SUN_AUDIO'
5139 _noaomodules
="sun $_noaomodules"
5141 echores
"$_sunaudio"
5145 echocheck
"Sun mediaLib"
5146 if test "$_mlib" = auto
; then
5150 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5152 cc_check
-lmlib && _mlib
=yes
5154 if test "$_mlib" = yes ; then
5155 _def_mlib
='#define HAVE_MLIB 1'
5157 _def_mlib
='#undef HAVE_MLIB'
5164 echocheck
"SGI audio"
5165 if test "$_sgiaudio" = auto
; then
5166 # check for SGI audio
5168 #include <dmedia/audio.h>
5169 int main(void) { return 0; }
5172 cc_check
&& _sgiaudio
=yes
5174 if test "$_sgiaudio" = "yes" ; then
5175 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5176 _libs_mplayer
="$_libs_mplayer -laudio"
5177 _aosrc
="$_aosrc ao_sgi.c"
5178 _aomodules
="sgi $_aomodules"
5180 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5181 _noaomodules
="sgi $_noaomodules"
5183 echores
"$_sgiaudio"
5187 echocheck
"VCD support"
5188 if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32
; then
5189 _inputmodules
="vcd $_inputmodules"
5190 _def_vcd
='#define HAVE_VCD 1'
5193 _def_vcd
='#undef HAVE_VCD'
5194 _noinputmodules
="vcd $_noinputmodules"
5195 _res_comment
="not supported on this OS"
5200 echocheck
"DVD support (libdvdnav)"
5201 if test "$_dvdnav" = auto
; then
5202 $_dvdnavconfig --version >> $TMPLOG 2>&1 || _dvdnav
=no
5204 if test "$_dvdnav" = auto
; then
5206 #include <inttypes.h>
5208 int main(void) { dvdnav_t *dvd=0; return 0; }
5211 _dvdnavdir
=`$_dvdnavconfig --cflags`
5212 _dvdnavlibs
=`$_dvdnavconfig --libs`
5213 _dvdnavvsn
=`$_dvdnavconfig --version | sed "s/\.//g"`
5214 _dvdnavmajor
=`echo $_dvdnavvsn | cut -d. -f2`
5215 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
5216 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
5218 if test "$_dvdnav" = yes ; then
5220 _def_dvdnav
='#define USE_DVDNAV 1'
5221 _ld_extra
="$_ld_extra `$_dvdnavconfig --libs`"
5222 _dvdnav_version
=`$_dvdnavconfig --version | sed "s/\.//g"`
5223 _def_dvdnav_version
="#define DVDNAVVERSION $_dvdnav_version"
5224 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
5225 _inputmodules
="dvdnav $_inputmodules"
5227 #disable dvdread checks: dvdread will be enabled using dvdnav's version of dvdread
5228 _dvdread_internal
=no
5231 _def_dvdnav
='#undef USE_DVDNAV'
5232 _noinputmodules
="dvdnav $_noinputmodules"
5238 if test "$_dvdread_internal" = auto
; then
5239 _dvdread_internal
=no
5240 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5241 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5242 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5243 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5244 _dvdread_internal
=yes
5246 _res_comment
="internal"
5248 elif test "$_dvdread" = auto
; then
5250 if test "$_dl" = yes; then
5252 #include <inttypes.h>
5253 #include <dvdread/dvd_reader.h>
5254 #include <dvdread/ifo_types.h>
5255 #include <dvdread/ifo_read.h>
5256 #include <dvdread/nav_read.h>
5257 int main(void) { return 0; }
5259 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5260 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5264 if test "$_dvdread_internal" = yes; then
5265 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5266 _def_dvdread
='#define USE_DVDREAD 1'
5267 _inputmodules
="dvdread(internal) $_inputmodules"
5269 elif test "$_dvdread" = yes; then
5270 _def_dvdread
='#define USE_DVDREAD 1'
5272 if test "$_dvdnav" != yes; then
5273 _ld_extra
="$_ld_extra -ldvdread"
5274 _inputmodules
="dvdread(external) $_inputmodules"
5275 _res_comment
="external"
5277 _inputmodules
="dvdread(from dvdnav) $_inputmodules"
5278 _res_comment
="from dvdnav"
5281 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5282 _def_dvdread
='#undef USE_DVDREAD'
5283 _noinputmodules
="dvdread $_noinputmodules"
5288 echocheck
"internal libdvdcss"
5289 if test "$_libdvdcss_internal" = auto
; then
5290 _libdvdcss_internal
=no
5291 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5293 if test "$_libdvdcss_internal" = yes ; then
5294 if linux || netbsd || openbsd || bsdos
; then
5295 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5296 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5298 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5300 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5301 _ld_extra
="$_ld_extra -framework IOKit"
5303 _inputmodules
="libdvdcss(internal) $_inputmodules"
5306 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5308 echores
"$_libdvdcss_internal"
5311 echocheck
"cdparanoia"
5312 if test "$_cdparanoia" = auto
; then
5314 #include <cdda_interface.h>
5315 #include <cdda_paranoia.h>
5316 // This need a better test. How ?
5318 void *test = cdda_verbose_set;
5319 return test == (void *)1;
5323 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5324 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5325 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5328 if test "$_cdparanoia" = yes ; then
5330 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5331 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5333 echores
"$_cdparanoia"
5337 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5340 #include <cdio/version.h>
5341 #include <cdio/cdda.h>
5342 #include <cdio/paranoia.h>
5345 void *test = cdda_verbose_set;
5346 printf("%s\n", CDIO_VERSION);
5347 return test == (void *)1;
5352 for _ld_tmp
in "" "-lwinmm" ; do
5353 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5354 cc_check
$_ld_tmp $_ld_lm \
5355 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5357 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5358 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5359 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5360 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5361 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5364 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5366 _def_libcdio
='#define HAVE_LIBCDIO'
5367 _def_havelibcdio
='yes'
5369 if test "$_cdparanoia" = yes ; then
5370 _res_comment
="using cdparanoia"
5372 _def_libcdio
='#undef HAVE_LIBCDIO'
5373 _def_havelibcdio
='no'
5377 if test "$_cdda" = yes ; then
5378 test $_cddb = auto
&& test $_network = yes && not darwin
&& _cddb
=yes
5379 _def_cdparanoia
='#define HAVE_CDDA'
5380 _inputmodules
="cdda $_inputmodules"
5382 _def_cdparanoia
='#undef HAVE_CDDA'
5383 _noinputmodules
="cdda $_noinputmodules"
5386 if test "$_cddb" = yes ; then
5387 _def_cddb
='#define HAVE_CDDB'
5388 _inputmodules
="cddb $_inputmodules"
5391 _def_cddb
='#undef HAVE_CDDB'
5392 _noinputmodules
="cddb $_noinputmodules"
5395 echocheck
"bitmap font support"
5396 if test "$_bitmap_font" = yes ; then
5397 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5399 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5401 echores
"$_bitmap_font"
5404 echocheck
"freetype >= 2.0.9"
5406 # freetype depends on iconv
5407 if test "$_iconv" = no
; then
5409 _res_comment
="iconv support needed"
5412 if test "$_freetype" = auto
; then
5413 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5416 #include <ft2build.h>
5417 #include FT_FREETYPE_H
5418 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5419 #error "Need FreeType 2.0.9 or newer"
5424 FT_Int major=-1,minor=-1,patch=-1;
5425 int err=FT_Init_FreeType(&library);
5427 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5430 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5431 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5432 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5433 (int)major,(int)minor,(int)patch );
5434 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5435 printf("Library and header version mismatch! Fix it in your distribution!\n");
5442 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5447 if test "$_freetype" = yes ; then
5448 _def_freetype
='#define HAVE_FREETYPE'
5449 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5450 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5452 _def_freetype
='#undef HAVE_FREETYPE'
5454 echores
"$_freetype"
5456 if test "$_freetype" = no
; then
5458 _res_comment
="freetype support needed"
5460 echocheck
"fontconfig"
5461 if test "$_fontconfig" = auto
; then
5464 #include <fontconfig/fontconfig.h>
5469 printf("Couldn't initialize fontconfig lib\n");
5477 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5478 _ld_tmp
="-lfontconfig $_ld_tmp"
5479 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5481 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5482 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5483 _ld_tmp
=`$_pkg_config --libs fontconfig`
5484 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5485 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5488 if test "$_fontconfig" = yes ; then
5489 _def_fontconfig
='#define HAVE_FONTCONFIG'
5491 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5493 echores
"$_fontconfig"
5496 echocheck
"SSA/ASS support"
5497 # libass depends on FreeType
5498 if test "$_freetype" = no
; then
5500 _res_comment
="FreeType support needed"
5503 if test "$_ass" = auto
; then
5505 #include <ft2build.h>
5506 #include FT_FREETYPE_H
5507 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5508 #error "Need FreeType 2.1.8 or newer"
5510 int main() { return 0; }
5513 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5514 if test "$_ass" = no
; then
5515 _res_comment
="FreeType >= 2.1.8 needed"
5518 if test "$_ass" = yes ; then
5519 _def_ass
='#define USE_ASS'
5521 _def_ass
='#undef USE_ASS'
5526 echocheck
"fribidi with charsets"
5527 if test "$_fribidi" = auto
; then
5528 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5531 /* workaround for fribidi 0.10.4 and below */
5532 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5533 #include <fribidi/fribidi.h>
5536 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5537 printf("Fribidi headers are not consistents with the library!\n");
5544 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5549 if test "$_fribidi" = yes ; then
5550 _def_fribidi
='#define USE_FRIBIDI'
5551 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5552 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5554 _def_fribidi
='#undef USE_FRIBIDI'
5560 if test "$_enca" = auto
; then
5567 langs = enca_get_languages(&langcnt);
5572 cc_check
-lenca $_ld_lm && _enca
=yes
5574 if test "$_enca" = yes ; then
5575 _def_enca
='#define HAVE_ENCA 1'
5576 _ld_extra
="$_ld_extra -lenca"
5578 _def_enca
='#undef HAVE_ENCA'
5586 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5589 cc_check
-lz && _zlib
=yes
5590 if test "$_zlib" = yes ; then
5591 _def_zlib
='#define HAVE_ZLIB 1'
5592 _ld_extra
="$_ld_extra -lz"
5594 _def_zlib
='#undef HAVE_ZLIB'
5600 if test "$_rtc" = auto
; then
5602 #include <sys/ioctl.h>
5604 #include <linux/rtc.h>
5607 #define RTC_PIE_ON RTCIO_PIE_ON
5609 int main(void) { return RTC_PIE_ON; }
5612 cc_check
&& _rtc
=yes
5615 if test "$_rtc" = yes ; then
5616 _def_rtc
='#define HAVE_RTC 1'
5618 _def_rtc
='#undef HAVE_RTC'
5623 echocheck
"liblzo2 support"
5624 if test "$_liblzo" = auto
; then
5627 #include <lzo/lzo1x.h>
5628 int main(void) { lzo_init();return 0; }
5630 cc_check
-llzo2 && _liblzo
=yes
5632 if test "$_liblzo" = yes ; then
5633 _def_liblzo
='#define USE_LIBLZO 1'
5634 _ld_extra
="$_ld_extra -llzo2"
5635 _codecmodules
="liblzo $_codecmodules"
5637 _def_liblzo
='#undef USE_LIBLZO'
5638 _nocodecmodules
="liblzo $_nocodecmodules"
5643 echocheck
"mad support"
5644 if test "$_mad" = auto
; then
5648 int main(void) { return 0; }
5650 cc_check
-lmad && _mad
=yes
5652 if test "$_mad" = yes ; then
5653 _def_mad
='#define USE_LIBMAD 1'
5654 _ld_extra
="$_ld_extra -lmad"
5655 _codecmodules
="libmad $_codecmodules"
5657 _def_mad
='#undef USE_LIBMAD'
5658 _nocodecmodules
="libmad $_nocodecmodules"
5663 if test "$_twolame" = auto
; then
5665 #include <twolame.h>
5666 int main(void) { twolame_init(); return 0; }
5669 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5671 if test "$_twolame" = yes ; then
5672 _def_twolame
='#define HAVE_TWOLAME 1'
5673 _libs_mencoder
="$_libs_mencoder -ltwolame"
5674 _codecmodules
="twolame $_codecmodules"
5676 _def_twolame
='#undef HAVE_TWOLAME'
5677 _nocodecmodules
="twolame $_nocodecmodules"
5682 if test "$_toolame" = auto
; then
5684 if test "$_twolame" = yes ; then
5685 _res_comment
="disabled by twolame"
5688 #include <toolame.h>
5689 int main(void) { toolame_init(); return 0; }
5691 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5694 if test "$_toolame" = yes ; then
5695 _def_toolame
='#define HAVE_TOOLAME 1'
5696 _libs_mencoder
="$_libs_mencoder -ltoolame"
5697 _codecmodules
="toolame $_codecmodules"
5699 _def_toolame
='#undef HAVE_TOOLAME'
5700 _nocodecmodules
="toolame $_nocodecmodules"
5702 if test "$_toolamedir" ; then
5703 _res_comment
="using $_toolamedir"
5707 echocheck
"OggVorbis support"
5708 if test "$_tremor_internal" = yes; then
5710 elif test "$_tremor_external" = auto
; then
5713 #include <tremor/ivorbiscodec.h>
5714 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5716 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5718 if test "$_libvorbis" = auto
; then
5721 #include <vorbis/codec.h>
5722 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5724 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5726 if test "$_tremor_internal" = yes ; then
5728 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5729 _def_tremor
='#define TREMOR 1'
5730 _codecmodules
="tremor(internal) $_codecmodules"
5731 _res_comment
="internal Tremor"
5732 if test "$_tremor_low" = yes ; then
5733 _res_comment
="internal low accuracy Tremor"
5735 elif test "$_tremor_external" = yes ; then
5737 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5738 _def_tremor
='#define TREMOR 1'
5739 _codecmodules
="tremor(external) $_codecmodules"
5740 _res_comment
="external Tremor"
5741 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5742 elif test "$_libvorbis" = yes ; then
5744 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5745 _codecmodules
="libvorbis $_codecmodules"
5746 _res_comment
="libvorbis"
5747 _ld_extra
="$_ld_extra -lvorbis -logg"
5750 _nocodecmodules
="libvorbis $_nocodecmodules"
5754 echocheck
"libspeex (version >= 1.1 required)"
5755 if test "$_speex" = auto
; then
5758 #include <speex/speex.h>
5762 speex_decode_int(dec, &bits, dec);
5765 cc_check
-lspeex $_ld_lm && _speex
=yes
5767 if test "$_speex" = yes ; then
5768 _def_speex
='#define HAVE_SPEEX 1'
5769 _ld_extra
="$_ld_extra -lspeex"
5770 _codecmodules
="speex $_codecmodules"
5772 _def_speex
='#undef HAVE_SPEEX'
5773 _nocodecmodules
="speex $_nocodecmodules"
5777 echocheck
"OggTheora support"
5778 if test "$_theora" = auto
; then
5781 #include <theora/theora.h>
5785 /* theora is in flux, make sure that all interface routines and
5786 * datatypes exist and work the way we expect it, so we don't break
5796 theora_info_init (&inf);
5797 theora_comment_init (&tc);
5801 /* we don't want to execute this kind of nonsense; just for making sure
5802 * that compilation works... */
5803 memset(&op, 0, sizeof(op));
5804 r = theora_decode_header (&inf, &tc, &op);
5805 r = theora_decode_init (&st, &inf);
5806 t = theora_granule_time (&st, op.granulepos);
5807 r = theora_decode_packetin (&st, &op);
5808 r = theora_decode_YUVout (&st, &yuv);
5814 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5815 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5816 && _theora
=yes && break
5818 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5819 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5820 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5821 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5825 if test "$_theora" = yes ; then
5826 _def_theora
='#define HAVE_OGGTHEORA 1'
5827 _codecmodules
="libtheora $_codecmodules"
5828 # when --enable-theora is forced, we'd better provide a probably sane
5829 # $_ld_theora than nothing
5830 test -z "$_ld_theora" && _ld_extra
="$_ld_extra -ltheora -logg"
5832 _def_theora
='#undef HAVE_OGGTHEORA'
5833 _nocodecmodules
="libtheora $_nocodecmodules"
5837 echocheck
"mp3lib support"
5838 if test "$_mp3lib" = yes ; then
5839 _def_mp3lib
='#define USE_MP3LIB 1'
5840 _codecmodules
="mp3lib $_codecmodules"
5842 _def_mp3lib
='#undef USE_MP3LIB'
5843 _nocodecmodules
="mp3lib $_nocodecmodules"
5847 echocheck
"liba52 support"
5848 if test "$_liba52" = yes ; then
5849 _def_liba52
='#define USE_LIBA52 1'
5850 _codecmodules
="liba52 $_codecmodules"
5852 _def_liba52
='#undef USE_LIBA52'
5853 _nocodecmodules
="liba52 $_nocodecmodules"
5857 echocheck
"libdts support"
5858 if test "$_libdts" = auto
; then
5861 #include <inttypes.h>
5863 int main(void) { dts_init (0); return 0; }
5865 cc_check
-ldts $_ld_lm && _libdts
=yes
5867 if test "$_libdts" = yes ; then
5868 _def_libdts
='#define CONFIG_LIBDTS 1'
5869 _ld_extra
="$_ld_extra -ldts"
5870 _codecmodules
="libdts $_codecmodules"
5872 _def_libdts
='#undef CONFIG_LIBDTS'
5873 _nocodecmodules
="libdts $_nocodecmodules"
5877 echocheck
"libmpeg2 support"
5878 if test "$_libmpeg2" = yes ; then
5879 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5880 _codecmodules
="libmpeg2 $_codecmodules"
5882 _def_libmpeg2
='#undef USE_LIBMPEG2'
5883 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5885 echores
"$_libmpeg2"
5887 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5888 if test "$_musepack" = auto
; then
5891 #include <mpcdec/mpcdec.h>
5893 mpc_streaminfo info;
5894 mpc_decoder decoder;
5895 mpc_decoder_set_streaminfo(&decoder, &info);
5896 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5899 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5901 if test "$_musepack" = yes ; then
5902 _def_musepack
='#define HAVE_MUSEPACK 1'
5903 _ld_extra
="$_ld_extra -lmpcdec"
5904 _codecmodules
="musepack $_codecmodules"
5906 _def_musepack
='#undef HAVE_MUSEPACK'
5907 _nocodecmodules
="musepack $_nocodecmodules"
5909 echores
"$_musepack"
5912 echocheck
"FAAC (AAC encoder) support"
5913 if test "$_faac" = auto
; then
5915 #include <inttypes.h>
5917 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5920 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5921 cc_check
-O4 $_ld_faac $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
5924 if test "$_faac" = yes ; then
5925 _def_faac
="#define HAVE_FAAC 1"
5926 if echo $_libavencoders |
grep -q FAAC
; then
5928 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
5929 _libs_mplayer
="$_libs_mplayer $_ld_faac"
5932 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
5934 _codecmodules
="faac $_codecmodules"
5936 _def_faac
="#undef HAVE_FAAC"
5937 _nocodecmodules
="faac $_nocodecmodules"
5939 echores
"$_faac (in libavcodec: $_lavc_faac)"
5942 echocheck
"FAAD2 (AAC) support"
5943 if test "$_faad_internal" = auto
; then
5944 if x86_32
&& test cc_vendor
=gnu
; then
5946 3.1*|
3.2) # ICE/insn with these versions
5948 _res_comment
="broken gcc"
5957 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
5961 #ifndef FAAD_MIN_STREAMSIZE
5962 #error Too old version
5964 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5966 cc_check
-lfaad $_ld_lm && _faad_external
=yes
5969 if test "$_faad_internal" = yes ; then
5970 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
5972 _res_comment
="internal floating-point"
5973 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
5974 elif test "$_faad_external" = yes ; then
5976 _ld_extra
="$_ld_extra -lfaad"
5978 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
5982 if test "$_faad" = yes ; then
5983 _def_faad
='#define HAVE_FAAD 1'
5984 _codecmodules
="faad2 $_codecmodules"
5986 _def_faad
='#undef HAVE_FAAD'
5987 _nocodecmodules
="faad2 $_nocodecmodules"
5992 echocheck
"LADSPA plugin support"
5993 if test "$_ladspa" = auto
; then
5998 const LADSPA_Descriptor *ld = NULL;
6003 cc_check
&& _ladspa
=yes
6005 if test "$_ladspa" = yes; then
6006 _def_ladspa
="#define HAVE_LADSPA"
6007 _afsrc
="$_afsrc af_ladspa.c"
6008 _afmodules
="ladspa $_afmodules"
6010 _def_ladspa
="#undef HAVE_LADSPA"
6011 _noafmodules
="ladspa $_noafmodules"
6016 if test -z "$_codecsdir" ; then
6017 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6018 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6019 if test -d "$dir" ; then
6025 # Fall back on default directory.
6026 if test -z "$_codecsdir" ; then
6027 _codecsdir
="$_libdir/codecs"
6028 mingw32
&& _codecsdir
="codecs"
6032 echocheck
"Win32 codecs"
6033 if test "$_win32dll" = auto
; then
6035 if x86_32
&& not qnx
; then
6039 if test "$_win32dll" = yes ; then
6040 _def_win32dll
='#define USE_WIN32DLL 1'
6041 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6042 _res_comment
="using $_win32codecsdir"
6044 _def_win32_loader
='#define WIN32_LOADER 1'
6046 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
6047 _res_comment
="using native windows"
6049 _codecmodules
="win32 $_codecmodules"
6051 _def_win32dll
='#undef USE_WIN32DLL'
6052 _def_win32_loader
='#undef WIN32_LOADER'
6053 _nocodecmodules
="win32 $_nocodecmodules"
6055 echores
"$_win32dll"
6058 echocheck
"XAnim codecs"
6059 if test "$_xanim" = auto
; then
6061 _res_comment
="dynamic loader support needed"
6062 if test "$_dl" = yes ; then
6066 if test "$_xanim" = yes ; then
6067 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6068 _def_xanim
='#define USE_XANIM 1'
6069 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6070 _codecmodules
="xanim $_codecmodules"
6071 _res_comment
="using $_xanimcodecsdir"
6073 _def_xanim
='#undef USE_XANIM'
6074 _def_xanim_path
='#undef XACODEC_PATH'
6075 _nocodecmodules
="xanim $_nocodecmodules"
6080 echocheck
"RealPlayer codecs"
6081 if test "$_real" = auto
; then
6083 _res_comment
="dynamic loader support needed"
6084 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6085 (linux || freebsd || netbsd || win32 || darwin
) ; then
6089 if test "$_real" = yes ; then
6090 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6091 _def_real
='#define USE_REALCODECS 1'
6092 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6093 _codecmodules
="real $_codecmodules"
6094 _res_comment
="using $_realcodecsdir"
6096 _def_real
='#undef USE_REALCODECS'
6097 _def_real_path
="#undef REALCODEC_PATH"
6098 _nocodecmodules
="real $_nocodecmodules"
6103 echocheck
"LIVE555 Streaming Media libraries"
6104 if test "$_live" = auto
&& test "$_network" = yes ; then
6105 cat > $TMPCPP << EOF
6106 #include <liveMedia.hh>
6107 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6108 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6114 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6115 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6116 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6117 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6118 $_livelibdir/groupsock/libgroupsock.a \
6119 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6120 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6121 $_ld_extra -lstdc++" \
6122 _inc_extraxx
="-I$_livelibdir/liveMedia/include \
6123 -I$_livelibdir/UsageEnvironment/include \
6124 -I$_livelibdir/BasicUsageEnvironment/include \
6125 -I$_livelibdir/groupsock/include" && \
6128 if test "$_live" != yes ; then
6129 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6134 if test "$_live" = yes && test "$_network" = yes ; then
6135 _res_comment
="using $_livelibdir"
6136 _def_live
='#define STREAMING_LIVE555 1'
6137 _inputmodules
="live555 $_inputmodules"
6138 elif test "$_live_dist" = yes && test "$_network" = yes ; then
6139 _res_comment
="using distribution version"
6141 _def_live
='#define STREAMING_LIVE555 1'
6142 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6143 _inc_extraxx
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6144 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6145 _inputmodules
="live555 $_inputmodules"
6147 _def_live
='#undef STREAMING_LIVE555'
6148 _noinputmodules
="live555 $_noinputmodules"
6153 echocheck
"FFmpeg libavutil"
6154 if test "$_libavutil_a" = auto
; then
6155 if test -d libavutil
; then
6157 _res_comment
="static"
6159 die
"MPlayer will not compile without libavutil in the source tree."
6161 elif test "$_libavutil_so" = auto
; then
6164 #include <ffmpeg/common.h>
6165 int main(void) { ff_gcd(1,1); return 0; }
6167 if $_pkg_config --exists libavutil
; then
6168 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6169 _ld_tmp
=`$_pkg_config --libs libavutil`
6170 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6171 && _libavutil_so
=yes
6172 elif cc_check
-lavutil $_ld_lm ; then
6173 _ld_extra
="$_ld_extra -lavutil"
6175 _res_comment
="using libavutil.so, but static libavutil is recommended"
6179 _def_libavutil
='#undef USE_LIBAVUTIL'
6180 _def_libavutil_a
='#undef USE_LIBAVUTIL_A'
6181 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6182 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
6183 test "$_libavutil" = yes && _def_libavutil
='#define USE_LIBAVUTIL 1'
6184 test "$_libavutil_a" = yes && _def_libavutil_a
='#define USE_LIBAVUTIL_A 1'
6185 test "$_libavutil_so" = yes && _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6186 # neither static nor shared libavutil is available, but it is mandatory ...
6187 if test "$_libavutil" = no
; then
6188 die
"You need static or shared libavutil, MPlayer will not compile without!"
6190 echores
"$_libavutil"
6192 echocheck
"FFmpeg libavcodec"
6193 if test "$_libavcodec_a" = auto
; then
6195 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6197 _res_comment
="static"
6199 elif test "$_libavcodec_so" = auto
; then
6201 _res_comment
="libavcodec.so is discouraged over static libavcodec"
6203 #include <ffmpeg/avcodec.h>
6204 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6206 if $_pkg_config --exists libavcodec
; then
6207 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6208 _ld_tmp
=`$_pkg_config --libs libavcodec`
6209 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6210 && _libavcodec_so
=yes
6211 elif cc_check
-lavcodec $_ld_lm ; then
6212 _ld_extra
="$_ld_extra -lavcodec"
6214 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6218 _def_libavcodec
='#undef USE_LIBAVCODEC'
6219 _def_libavcodec_a
='#undef USE_LIBAVCODEC_A'
6220 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6221 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
6222 test "$_libavcodec" = yes && _def_libavcodec
='#define USE_LIBAVCODEC 1'
6223 test "$_libavcodec_a" = yes && _def_libavcodec_a
='#define USE_LIBAVCODEC_A 1'
6224 test "$_libavcodec_so" = yes && _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6225 test "$_libavcodec_mpegaudio_hp" = yes \
6226 && _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6227 if test "$_libavcodec_a" = yes ; then
6228 _codecmodules
="libavcodec $_codecmodules"
6229 elif test "$_libavcodec_so" = yes ; then
6230 _codecmodules
="libavcodec.so $_codecmodules"
6232 _nocodecmodules
="libavcodec $_nocodecmodules"
6234 echores
"$_libavcodec"
6236 echocheck
"FFmpeg libavformat"
6237 if test "$_libavformat_a" = auto
; then
6239 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6241 _res_comment
="static"
6243 elif test "$_libavformat_so" = auto
; then
6246 #include <ffmpeg/avformat.h>
6247 #include <ffmpeg/opt.h>
6248 int main(void) { av_alloc_format_context(); return 0; }
6250 if $_pkg_config --exists libavformat
; then
6251 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6252 _ld_tmp
=`$_pkg_config --libs libavformat`
6253 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6254 && _libavformat_so
=yes
6255 elif cc_check
$_ld_lm -lavformat ; then
6256 _ld_extra
="$_ld_extra -lavformat"
6258 _res_comment
="using libavformat.so, but static libavformat is recommended"
6262 _def_libavformat
='#undef USE_LIBAVFORMAT'
6263 _def_libavformat_a
='#undef USE_LIBAVFORMAT_A'
6264 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6265 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
6266 test "$_libavformat" = yes && _def_libavformat
='#define USE_LIBAVFORMAT 1'
6267 test "$_libavformat_a" = yes && _def_libavformat_a
='#define USE_LIBAVFORMAT_A 1'
6268 test "$_libavformat_so" = yes \
6269 && _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6270 echores
"$_libavformat"
6272 echocheck
"FFmpeg libpostproc"
6273 if test "$_libpostproc_a" = auto
; then
6275 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6276 _libpostproc_a
='yes'
6277 _res_comment
="static"
6279 elif test "$_libpostproc_so" = auto
; then
6282 #define USE_LIBPOSTPROC 1
6283 #include <inttypes.h>
6284 #include <postproc/postprocess.h>
6285 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6287 if cc_check
-lpostproc $_ld_lm ; then
6288 _ld_extra
="$_ld_extra -lpostproc"
6290 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6294 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6295 _def_libpostproc_a
='#undef USE_LIBPOSTPROC_A'
6296 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6297 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
6298 test "$_libpostproc" = yes && _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6299 test "$_libpostproc_a" = yes && _def_libpostproc_a
='#define USE_LIBPOSTPROC_A 1'
6300 test "$_libpostproc_so" = yes \
6301 && _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6302 echores
"$_libpostproc"
6305 echocheck
"md5sum support"
6306 if test "$_md5sum" = yes; then
6307 _def_md5sum
="#define HAVE_MD5SUM"
6308 _vosrc
="$_vosrc vo_md5sum.c"
6309 _vomodules
="md5sum $_vomodules"
6311 _def_md5sum
="#undef HAVE_MD5SUM"
6312 _novomodules
="md5sum $_novomodules"
6316 echocheck
"AMR narrowband"
6317 if test "$_amr_nb" = auto
; then
6320 #include <amrnb/interf_dec.h>
6321 int main(void) { Speech_Decode_Frame_init(); return 0; }
6323 cc_check
-lamrnb && _amr_nb
=yes
6324 if test "$_libavcodec_a" != yes ; then
6326 _res_comment
="libavcodec (static) is required by amr_nb, sorry"
6329 if test "$_amr_nb" = yes ; then
6331 _ld_extra
="$_ld_extra -lamrnb"
6332 _def_amr
='#define CONFIG_AMR 1'
6333 _def_amr_nb
='#define CONFIG_AMR_NB 1'
6335 _def_amr_nb
='#undef CONFIG_AMR_NB'
6339 if test "$_amr_nb" = yes ; then
6340 _codecmodules
="amr_nb $_codecmodules"
6342 _nocodecmodules
="amr_nb $_nocodecmodules"
6345 echocheck
"AMR wideband"
6346 if test "$_amr_wb" = auto
; then
6349 #include <amrwb/dec_if.h>
6350 int main(void) { D_IF_init(); return 0; }
6352 cc_check
-lamrwb && _amr_wb
=yes
6353 if test "$_libavcodec_a" != yes ; then
6355 _res_comment
="libavcodec (static) is required by amr_wb, sorry"
6358 if test "$_amr_wb" = yes ; then
6360 _ld_extra
="$_ld_extra -lamrwb"
6361 _def_amr
='#define CONFIG_AMR 1'
6362 _def_amr_wb
='#define CONFIG_AMR_WB 1'
6363 _codecmodules
="amr_wb $_codecmodules"
6365 _def_amr_wb
='#undef CONFIG_AMR_WB'
6366 _nocodecmodules
="amr_wb $_nocodecmodules"
6370 echocheck
"libdv-0.9.5+"
6371 if test "$_libdv" = auto
; then
6374 #include <libdv/dv.h>
6375 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6377 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6379 if test "$_libdv" = yes ; then
6380 _def_libdv
='#define HAVE_LIBDV095 1'
6381 _ld_extra
="$_ld_extra -ldv"
6382 _codecmodules
="libdv $_codecmodules"
6384 _def_libdv
='#undef HAVE_LIBDV095'
6385 _nocodecmodules
="libdv $_nocodecmodules"
6390 if test "$_zr" = auto
; then
6391 #36067's seem to identify themselves as 36057PQC's, so the line
6392 #below should work for 36067's and 36057's.
6393 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
6399 if test "$_zr" = yes ; then
6400 if test "$_libavcodec_a" = yes ; then
6401 _def_zr
='#define HAVE_ZR 1'
6402 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6403 _vomodules
="zr zr2 $_vomodules"
6405 _res_comment
="libavcodec (static) is required by zr, sorry"
6406 _novomodules
="zr $_novomodules"
6407 _def_zr
='#undef HAVE_ZR'
6410 _def_zr
='#undef HAVE_ZR'
6411 _novomodules
="zr zr2 $_novomodules"
6416 if test "$_bl" = yes ; then
6417 _def_bl
='#define HAVE_BL 1'
6418 _vosrc
="$_vosrc vo_bl.c"
6419 _vomodules
="bl $_vomodules"
6421 _def_bl
='#undef HAVE_BL'
6422 _novomodules
="bl $_novomodules"
6428 if test "$_xvid" = auto
; then
6432 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6434 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6435 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6439 if test "$_xvid" = yes ; then
6440 _def_xvid
='#define HAVE_XVID4 1'
6441 _codecmodules
="xvid $_codecmodules"
6443 _def_xvid
='#undef HAVE_XVID4'
6444 _nocodecmodules
="xvid $_nocodecmodules"
6448 if test "$_xvid" = yes ; then
6449 echocheck
"XviD two pass plugin"
6452 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6456 _def_lavc_xvid
='#define CONFIG_XVID 1'
6459 _def_lavc_xvid
='#undef CONFIG_XVID'
6461 echores
"$_lavc_xvid"
6466 if test "$_x264" = auto
; then
6468 #include <inttypes.h>
6471 #error We do not support old versions of x264. Get the latest from SVN.
6473 int main(void) { x264_encoder_open((void*)0); return 0; }
6476 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6477 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6481 if test "$_x264" = yes ; then
6483 _def_x264
='#define HAVE_X264 1'
6484 _codecmodules
="x264 $_codecmodules"
6485 if echo $_libavencoders |
grep -q X264
; then
6487 _def_lavc_x264
='#define CONFIG_X264 1'
6488 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6491 _def_lavc_x264
='#undef CONFIG_X264'
6496 _def_x264
='#undef HAVE_X264'
6497 _def_lavc_x264
='#undef CONFIG_X264'
6498 _nocodecmodules
="x264 $_nocodecmodules"
6500 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6504 if test "$_nut" = auto
; then
6508 #include <inttypes.h>
6510 int main(void) { (void)nut_error(0); return 0; }
6513 cc_check
-lnut && _nut
=yes
6516 if test "$_nut" = yes ; then
6517 _def_nut
='#define HAVE_LIBNUT 1'
6518 _ld_extra
="$_ld_extra -lnut"
6520 _def_nut
='#undef HAVE_LIBNUT'
6525 # mencoder requires (optional) those libs: libmp3lame
6526 if test "$_mencoder" != no
; then
6528 echocheck
"libmp3lame (for mencoder)"
6530 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6531 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6533 #include <lame/lame.h>
6534 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; }
6536 # Note: libmp3lame usually depends on vorbis
6537 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6538 if test "$_mp3lame" = yes ; then
6539 _def_mp3lame
="#define HAVE_MP3LAME"
6540 _ld_mp3lame
=-lmp3lame
6541 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6543 #include <lame/lame.h>
6544 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6546 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6548 #include <lame/lame.h>
6549 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6551 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6552 if echo $_libavencoders |
grep -q MP3LAME
; then
6554 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6555 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6558 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6561 _def_mp3lame
='#undef HAVE_MP3LAME'
6567 echocheck
"mencoder"
6568 _mencoder_flag
='#undef HAVE_MENCODER'
6569 if test "$_mencoder" = yes ; then
6570 _mencoder_flag
='#define HAVE_MENCODER'
6571 _def_muxers
='#define CONFIG_MUXERS 1'
6573 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6574 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6577 echores
"$_mencoder"
6579 echocheck
"fastmemcpy"
6580 # fastmemcpy check is done earlier with tests of CPU & binutils features
6581 if test "$_fastmemcpy" = yes ; then
6582 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6584 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6586 echores
"$_fastmemcpy"
6588 echocheck
"UniquE RAR File Library"
6589 if test "$_unrarlib" = yes ; then
6590 _def_unrarlib
='#define USE_UNRARLIB 1'
6592 _def_unrarlib
='#undef USE_UNRARLIB'
6594 echores
"$_unrarlib"
6596 echocheck
"TV interface"
6597 if test "$_tv" = yes ; then
6598 _def_tv
='#define USE_TV 1'
6599 _inputmodules
="tv $_inputmodules"
6601 _noinputmodules
="tv $_noinputmodules"
6602 _def_tv
='#undef USE_TV'
6608 echocheck
"*BSD BT848 bt8xx header"
6610 for file in "machine/ioctl_bt848.h" \
6611 "dev/bktr/ioctl_bt848.h" \
6612 "dev/video/bktr/ioctl_bt848.h" \
6613 "dev/ic/bt8xx.h" ; do
6615 #include <sys/types.h>
6618 ioctl(0, TVTUNER_GETFREQ, 0);
6624 _ioctl_bt848_h_name
="$file"
6628 if test "$_ioctl_bt848_h" = yes ; then
6629 _def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6630 _res_comment
="using $_ioctl_bt848_h_name"
6632 _def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6634 echores
"$_ioctl_bt848_h"
6636 echocheck
"*BSD ioctl_meteor.h"
6638 for file in "machine/ioctl_meteor.h" \
6639 "dev/bktr/ioctl_meteor.h" \
6640 "dev/video/bktr/ioctl_meteor.h" ; do
6642 #include <sys/types.h>
6645 ioctl(0, METEORSINPUT, 0);
6651 _ioctl_meteor_h_name
="$file"
6655 if test "$_ioctl_meteor_h" = yes ; then
6656 _def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6657 _res_comment
="using $_ioctl_meteor_h_name"
6659 _def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6661 echores
"$_ioctl_meteor_h"
6663 echocheck
"*BSD BrookTree 848 TV interface"
6664 if test "$_tv_bsdbt848" = auto
; then
6666 if test "$_tv" = yes ; then
6668 #include <sys/types.h>
6669 $_def_ioctl_meteor_h_name
6670 $_def_ioctl_bt848_h_name
6671 #ifdef IOCTL_METEOR_H_NAME
6672 #include IOCTL_METEOR_H_NAME
6674 #ifdef IOCTL_BT848_H_NAME
6675 #include IOCTL_BT848_H_NAME
6678 ioctl(0, METEORSINPUT, 0);
6679 ioctl(0, TVTUNER_GETFREQ, 0);
6683 cc_check
&& _tv_bsdbt848
=yes
6686 if test "$_tv_bsdbt848" = yes ; then
6687 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6688 _inputmodules
="tv-bsdbt848 $_inputmodules"
6690 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6691 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6693 echores
"$_tv_bsdbt848"
6697 echocheck
"Video 4 Linux TV interface"
6698 if test "$_tv_v4l1" = auto
; then
6700 if test "$_tv" = yes && linux
; then
6703 #include <linux/videodev.h>
6704 int main(void) { return 0; }
6706 cc_check
&& _tv_v4l1
=yes
6709 if test "$_tv_v4l1" = yes ; then
6712 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6713 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6714 _inputmodules
="tv-v4l $_inputmodules"
6716 _noinputmodules
="tv-v4l1 $_noinputmodules"
6717 _def_tv_v4l
='#undef HAVE_TV_V4L'
6722 echocheck
"Video 4 Linux 2 TV interface"
6723 if test "$_tv_v4l2" = auto
; then
6725 if test "$_tv" = yes && linux
; then
6728 #include <linux/types.h>
6729 #include <linux/videodev2.h>
6730 int main(void) { return 0; }
6732 cc_check
&& _tv_v4l2
=yes
6735 if test "$_tv_v4l2" = yes ; then
6738 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6739 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6740 _inputmodules
="tv-v4l2 $_inputmodules"
6742 _noinputmodules
="tv-v4l2 $_noinputmodules"
6743 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6748 echocheck
"Radio interface"
6749 if test "$_radio" = yes ; then
6750 _def_radio
='#define USE_RADIO 1'
6751 _inputmodules
="radio $_inputmodules"
6752 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6755 if test "$_radio_capture" = yes ; then
6757 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6759 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6762 _noinputmodules
="radio $_noinputmodules"
6763 _def_radio
='#undef USE_RADIO'
6764 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6768 echocheck
"Capture for Radio interface"
6769 echores
"$_radio_capture"
6771 echocheck
"Video 4 Linux 2 Radio interface"
6772 if test "$_radio_v4l2" = auto
; then
6774 if test "$_radio" = yes && linux
; then
6777 #include <linux/types.h>
6778 #include <linux/videodev2.h>
6779 int main(void) { return 0; }
6781 cc_check
&& _radio_v4l2
=yes
6784 if test "$_radio_v4l2" = yes ; then
6785 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6787 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6789 echores
"$_radio_v4l2"
6791 echocheck
"Video 4 Linux Radio interface"
6792 if test "$_radio_v4l" = auto
; then
6794 if test "$_radio" = yes && linux
; then
6797 #include <linux/videodev.h>
6798 int main(void) { return 0; }
6800 cc_check
&& _radio_v4l
=yes
6803 if test "$_radio_v4l" = yes ; then
6804 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6806 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6808 echores
"$_radio_v4l"
6810 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6811 echocheck
"*BSD BrookTree 848 Radio interface"
6814 #include <sys/types.h>
6815 $_def_ioctl_bt848_h_name
6816 #ifdef IOCTL_BT848_H_NAME
6817 #include IOCTL_BT848_H_NAME
6820 ioctl(0, RADIO_GETFREQ, 0);
6824 cc_check
&& _radio_bsdbt848
=yes
6825 echores
"$_radio_bsdbt848"
6826 fi #if bsd && radio && radio_bsdbt848
6828 if test "$_radio_bsdbt848" = yes ; then
6829 _def_radio_bsdbt848
='#define HAVE_RADIO_BSDBT848 1'
6831 _def_radio_bsdbt848
='#undef HAVE_RADIO_BSDBT848'
6834 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6835 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6836 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6839 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6840 if test "$_pvr" = auto
; then
6842 if test "$_tv_v4l2" = yes && linux
; then
6845 #include <inttypes.h>
6846 #include <linux/types.h>
6847 #include <linux/videodev2.h>
6848 int main(void) { struct v4l2_ext_controls ext; return 0; }
6850 cc_check
&& _pvr
=yes
6853 if test "$_pvr" = yes ; then
6854 _def_pvr
='#define HAVE_PVR 1'
6855 _inputmodules
="pvr $_inputmodules"
6857 _noinputmodules
="pvr $_noinputmodules"
6858 _def_pvr
='#undef HAVE_PVR'
6863 echocheck
"audio select()"
6864 if test "$_select" = no
; then
6865 _def_select
='#undef HAVE_AUDIO_SELECT'
6866 elif test "$_select" = yes ; then
6867 _def_select
='#define HAVE_AUDIO_SELECT 1'
6873 if not beos
&& test "$_ftp" = yes ; then
6874 _def_ftp
='#define HAVE_FTP 1'
6875 _inputmodules
="ftp $_inputmodules"
6877 _noinputmodules
="ftp $_noinputmodules"
6878 _def_ftp
='#undef HAVE_FTP'
6882 echocheck
"vstream client"
6883 if test "$_vstream" = auto
; then
6886 #include <vstream-client.h>
6887 void vstream_error(const char *format, ... ) {}
6888 int main(void) { vstream_start(); return 0; }
6890 cc_check
-lvstream-client && _vstream
=yes
6892 if test "$_vstream" = yes ; then
6893 _def_vstream
='#define HAVE_VSTREAM 1'
6894 _inputmodules
="vstream $_inputmodules"
6895 _ld_extra
="$_ld_extra -lvstream-client"
6897 _noinputmodules
="vstream $_noinputmodules"
6898 _def_vstream
='#undef HAVE_VSTREAM'
6903 echocheck
"byte order"
6904 if test "$_big_endian" = auto
; then
6906 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6907 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6909 return (int)ascii_name;
6913 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6919 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
6922 if test "$_big_endian" = yes ; then
6923 _byte_order
='big-endian'
6924 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6926 _byte_order
='little-endian'
6927 _def_words_endian
='#undef WORDS_BIGENDIAN'
6929 echores
"$_byte_order"
6931 echocheck
"OSD menu"
6932 if test "$_menu" = yes ; then
6933 _def_menu
='#define HAVE_MENU 1'
6935 _def_menu
='#undef HAVE_MENU'
6940 echocheck
"QuickTime codecs"
6941 if test "$_qtx" = auto
; then
6942 test "$_win32dll" = yes || darwin
&& _qtx
=yes
6944 if test "$_qtx" = yes ; then
6945 _def_qtx
='#define USE_QTX_CODECS 1'
6946 _codecmodules
="qtx $_codecmodules"
6948 _def_qtx
='#undef USE_QTX_CODECS'
6949 _nocodecmodules
="qtx $_nocodecmodules"
6954 echocheck
"Subtitles sorting"
6955 if test "$_sortsub" = yes ; then
6956 _def_sortsub
='#define USE_SORTSUB 1'
6958 _def_sortsub
='#undef USE_SORTSUB'
6963 echocheck
"XMMS inputplugin support"
6964 if test "$_xmms" = yes ; then
6965 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6966 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6967 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6969 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6970 _xmmslibdir
=/usr
/lib
6973 _def_xmms
='#define HAVE_XMMS 1'
6975 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
6977 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6980 _def_xmms
='#undef HAVE_XMMS'
6985 if test "$_inet6" = auto
; then
6987 #include <sys/types.h>
6988 #include <sys/socket.h>
6989 #include <netinet/in.h>
6990 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6997 if test "$_inet6" = yes ; then
6998 _def_inet6
='#define HAVE_AF_INET6 1'
7000 _def_inet6
='#undef HAVE_AF_INET6'
7005 echocheck
"gethostbyname2"
7006 if test "$_gethostbyname2" = auto
; then
7008 #include <sys/types.h>
7009 #include <sys/socket.h>
7011 int main(void) { gethostbyname2("", AF_INET); }
7019 if test "$_gethostbyname2" = yes ; then
7020 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
7022 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
7024 echores
"$_gethostbyname2"
7027 # --------------- GUI specific tests begin -------------------
7030 if test "$_gui" = yes ; then
7032 # Required libraries
7033 test "$_png" != yes && die
"The GUI requires PNG support, please install libpng and libpng-dev packages."
7035 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7037 echocheck
"XShape extension"
7038 if test "$_xshape" = auto
; then
7041 #include <X11/Xlib.h>
7042 #include <X11/Xproto.h>
7043 #include <X11/Xutil.h>
7044 #include <X11/extensions/shape.h>
7047 char *name = ":0.0";
7050 int eventbase, errorbase;
7051 if (getenv("DISPLAY"))
7052 name=getenv("DISPLAY");
7053 wsDisplay=XOpenDisplay(name);
7054 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7056 XCloseDisplay(wsDisplay);
7060 cc_check
&& _xshape
=yes
7062 if test "$_xshape" = yes ; then
7063 _def_xshape
='#define HAVE_XSHAPE 1'
7065 die
"The GUI requires the X11 extension XShape (which was not found)."
7070 if test "$_gtk1" = no
; then
7072 echocheck
"GTK+ version"
7074 if $_pkg_config gtk
+-2.0
--exists ; then
7075 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7076 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7077 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7081 if $_pkg_config glib-2.0
--exists ; then
7082 echocheck
"glib version"
7083 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7084 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7087 _def_gui
='#define HAVE_NEW_GUI 1'
7088 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7091 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7094 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7099 if test "$_gtk1" = yes ; then
7100 # Check for old GTK (1.2.x)
7101 echocheck
"GTK version"
7102 if test -z "$_gtkconfig" ; then
7103 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7104 _gtkconfig
="gtk-config"
7105 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7106 _gtkconfig
="gtk12-config"
7108 die
"The GUI requires GTK devel packages (which were not found)."
7111 _gtk
=`$_gtkconfig --version 2>&1`
7112 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7113 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7114 echores
"$_gtk (using $_gtkconfig)"
7117 echocheck
"glib version"
7118 if test -z "$_glibconfig" ; then
7119 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7120 _glibconfig
="glib-config"
7121 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7122 _glibconfig
="glib12-config"
7124 die
"The GUI requires GLIB devel packages (which were not found)"
7127 _glib
=`$_glibconfig --version 2>&1`
7128 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7129 echores
"$_glib (using $_glibconfig)"
7131 _def_gui
='#define HAVE_NEW_GUI 1'
7132 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7136 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7137 _def_gui
='#define HAVE_NEW_GUI 1'
7138 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7141 else #if test "$_gui"
7142 _def_gui
='#undef HAVE_NEW_GUI'
7143 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7145 # --------------- GUI specific tests end -------------------
7148 if test "$_charset" = "noconv" ; then
7151 if test "$_charset" ; then
7152 _def_charset
="#define MSG_CHARSET \"$_charset\""
7154 _def_charset
="#undef MSG_CHARSET"
7157 if test "$_charset" = "UTF-8" ; then
7158 # hack to disable conversion in the Makefile
7162 if test "$_charset" ; then
7163 echocheck
"iconv program"
7164 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7165 if test "$?" -ne 0 ; then
7167 echo "No working iconv program found, use "
7168 echo "--charset=UTF-8 to continue anyway."
7169 echo "If you also have problems with iconv library functions use --charset=noconv."
7170 echo "Messages in the GTK-2 interface will be broken then."
7177 #############################################################################
7179 echocheck
"automatic gdb attach"
7180 if test "$_crash_debug" = yes ; then
7181 _def_crash_debug
='#define CRASH_DEBUG 1'
7183 _def_crash_debug
='#undef CRASH_DEBUG'
7186 echores
"$_crash_debug"
7188 echocheck
"compiler support for noexecstack"
7190 int main(void) { return 0; }
7192 if cc_check
-Wl,-z,noexecstack
; then
7193 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7199 echocheck
"ftello()"
7200 # if we don't have ftello use the osdep/ compatibility module
7203 #include <sys/types.h>
7204 int main (void) { ftello(stdin); return 0; }
7207 cc_check
&& _ftello
=yes
7208 if test "$_ftello" = yes ; then
7209 _def_ftello
='#define HAVE_FTELLO 1'
7212 _def_ftello
='#undef HAVE_FTELLO'
7217 # Dynamic linking flags
7218 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7220 bsd
&& _ld_dl_dynamic
='-rdynamic'
7221 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
&& not darwin
; then
7222 _ld_dl_dynamic
='-rdynamic'
7225 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7226 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7227 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7228 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7230 _def_debug
='#undef MP_DEBUG'
7231 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7233 _def_linux
='#undef TARGET_LINUX'
7234 linux
&& _def_linux
='#define TARGET_LINUX 1'
7236 # TODO cleanup the VIDIX stuff here
7237 echocheck
"VIDIX (internal)"
7238 echores
"$_vidix_internal"
7240 echocheck
"VIDIX (external)"
7241 if test "$_vidix_external" = auto
; then
7244 #include <vidix/vidix.h>
7245 int main(void) { return 0; }
7247 cc_check
-lvidix && _vidix_external
=yes
7249 echores
"$_vidix_external"
7251 if test "$_vidix_internal" = yes ||
test "$_vidix_external" = yes ; then
7253 _def_vidix
='#define CONFIG_VIDIX 1'
7256 _def_vidix
='#undef CONFIG_VIDIX'
7259 if test "$_vidix" = yes ; then
7260 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e cyberblade`; then
7261 _def_vidix_drv_cyberblade
='#define CONFIG_VIDIX_DRV_CYBERBLADE 1'
7262 _vidix_drv_cyberblade
=yes
7264 _def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
7265 _vidix_drv_cyberblade
=no
7267 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e mach64`; then
7268 _def_vidix_drv_mach64
='#define CONFIG_VIDIX_DRV_MACH64 1'
7269 _vidix_drv_mach64
=yes
7271 _def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
7272 _vidix_drv_mach64
=no
7274 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e mga`; then
7275 _def_vidix_drv_mga
='#define CONFIG_VIDIX_DRV_MGA 1'
7278 _def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
7281 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e mga_crtc2`; then
7282 _def_vidix_drv_mga_crtc2
='#define CONFIG_VIDIX_DRV_MGA_CRTC2 1'
7283 _vidix_drv_mga_crtc2
=yes
7285 _def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
7286 _vidix_drv_mga_crtc2
=no
7288 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e nvidia`; then
7289 _def_vidix_drv_nvidia
='#define CONFIG_VIDIX_DRV_NVIDIA 1'
7290 _vidix_drv_nvidia
=yes
7292 _def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
7293 _vidix_drv_nvidia
=no
7295 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e pm2`; then
7296 _def_vidix_drv_pm2
='#define CONFIG_VIDIX_DRV_PM2 1'
7299 _def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
7302 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e pm3`; then
7303 _def_vidix_drv_pm3
='#define CONFIG_VIDIX_DRV_PM3 1'
7306 _def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
7309 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e radeon`; then
7310 _def_vidix_drv_radeon
='#define CONFIG_VIDIX_DRV_RADEON 1'
7311 _vidix_drv_radeon
=yes
7313 _def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
7314 _vidix_drv_radeon
=no
7316 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e rage128`; then
7317 _def_vidix_drv_rage128
='#define CONFIG_VIDIX_DRV_RAGE128 1'
7318 _vidix_drv_rage128
=yes
7320 _def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
7321 _vidix_drv_rage128
=no
7323 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e savage`; then
7324 _def_vidix_drv_savage
='#define CONFIG_VIDIX_DRV_SAVAGE 1'
7325 _vidix_drv_savage
=yes
7327 _def_vidix_drv_savage
='#undef CONFIG_VIDIX_DRV_SAVAGE'
7328 _vidix_drv_savage
=no
7330 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e sis`; then
7331 _def_vidix_drv_sis
='#define CONFIG_VIDIX_DRV_SIS 1'
7334 _def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
7337 if test "$_vidix_drivers" = all ||
test `echo "$_vidix_drivers" | grep -e unichrome`; then
7338 _def_vidix_drv_unichrome
='#define CONFIG_VIDIX_DRV_UNICHROME 1'
7339 _vidix_drv_unichrome
=yes
7341 _def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
7342 _vidix_drv_unichrome
=no
7346 if test "$_vidix_internal" = yes ; then
7347 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
7348 elif test "$_vidix_external" = yes ; then
7349 _libs_mplayer
="$_libs_mplayer -lvidix"
7350 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
7353 if test "$_vidix" = yes; then
7354 _vosrc
="$_vosrc vo_cvidix.c"
7355 _vomodules
="cvidix $_vomodules"
7357 _novomodules
="cvidix $_novomodules"
7359 if test "$_vidix" = yes && win32
; then
7360 _vosrc
="$_vosrc vo_winvidix.c"
7361 _vomodules
="winvidix $_vomodules"
7362 _libs_mplayer
="$_libs_mplayer -lgdi32"
7364 _novomodules
="winvidix $_novomodules"
7366 if test "$_vidix" = yes && test "$_x11" = yes; then
7367 _vosrc
="$_vosrc vo_xvidix.c"
7368 _vomodules
="xvidix $_vomodules"
7370 _novomodules
="xvidix $_novomodules"
7373 echocheck
"joystick"
7374 _def_joystick
='#undef HAVE_JOYSTICK'
7375 if test "$_joystick" = yes ; then
7377 # TODO add some check
7378 _def_joystick
='#define HAVE_JOYSTICK 1'
7380 _joystick
="no (unsupported under $system_name)"
7383 echores
"$_joystick"
7386 if test "$_lirc" = auto
; then
7389 #include <lirc/lirc_client.h>
7390 int main(void) { return 0; }
7392 cc_check
-llirc_client && _lirc
=yes
7394 if test "$_lirc" = yes ; then
7395 _def_lirc
='#define HAVE_LIRC 1'
7396 _ld_extra
="$_ld_extra -llirc_client"
7398 _def_lirc
='#undef HAVE_LIRC'
7403 if test "$_lircc" = auto
; then
7406 #include <lirc/lircc.h>
7407 int main(void) { return 0; }
7409 cc_check
-llircc && _lircc
=yes
7411 if test "$_lircc" = yes ; then
7412 _def_lircc
='#define HAVE_LIRCC 1'
7413 _ld_extra
="$_ld_extra -llircc"
7415 _def_lircc
='#undef HAVE_LIRCC'
7420 # Detect maemo development platform libraries availability (http://www.maemo.org),
7421 # they are used when run on Nokia 770
7422 echocheck
"maemo (Nokia 770)"
7423 if test "$_maemo" = auto
; then
7426 #include <libosso.h>
7427 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7429 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7431 if test "$_maemo" = yes ; then
7432 _def_maemo
='#define HAVE_MAEMO 1'
7433 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7434 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7436 _def_maemo
='#undef HAVE_MAEMO'
7441 echocheck
"color console output"
7442 if test "$_color_console" = yes ; then
7443 _def_color_console
='#define MSG_USE_COLORS 1'
7445 _def_color_console
='#undef MSG_USE_COLORS'
7447 echores
"$_color_console"
7449 # linker paths should be the same for mencoder and mplayer
7451 for I
in $_libs_mplayer ; do
7452 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7453 if test -z "$_tmp" ; then
7454 _ld_extra
="$I $_ld_extra"
7456 _ld_tmp
="$_ld_tmp $I"
7459 _libs_mplayer
=$_ld_tmp
7462 #############################################################################
7464 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN -shared-libgcc"
7465 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7466 CFLAGS
="$CFLAGS -no-cpp-precomp"
7470 CFLAGS
="$CFLAGS -DNEWLIB -D__USE_INLINE__ -DSYS_AMIGAOS4"
7473 # use flag for HPUX missing setenv()
7474 CFLAGS
="$CFLAGS -DHPUX"
7478 CFLAGS
="$CFLAGS -D_REENTRANT"
7480 # FIXME bsd needs this so maybe other OS'es
7481 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7484 CFLAGS
="$CFLAGS -D__CYGWIN__ -DSYS_CYGWIN"
7486 # 64 bit file offsets?
7487 if test "$_largefiles" = yes || freebsd
; then
7488 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7489 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7490 # dvdread support requires this (for off64_t)
7491 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7495 CFLAGS
="-I. -I.. -I../libavutil $CFLAGS"
7496 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
7499 int main() { return 0; }
7501 if cc_check
-Wdeclaration-after-statement ; then
7502 CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7505 #############################################################################
7506 # Take care of ffmpeg dependencies
7507 if test "$_zlib" = no
; then
7508 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
7509 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
7511 if test "$_amr_nb" = no
; then
7512 _libavdecoders
=`echo $_libavdecoders | sed -e s/AMR_NB_DECODER// `
7513 _libavencoders
=`echo $_libavencoders | sed -e s/AMR_NB_ENCODER// `
7515 if test "$_amr_wb" = no
; then
7516 _libavdecoders
=`echo $_libavdecoders | sed -e s/AMR_WB_DECODER// `
7517 _libavencoders
=`echo $_libavencoders | sed -e s/AMR_WB_ENCODER// `
7519 if test "$_libdts" = no
; then
7520 _libavdecoders
=`echo $_libavdecoders | sed -e s/DTS_DECODER// `
7522 if test "$_xvmc" = no
; then
7523 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
7525 if test "$_x264" = no ||
test "$_lavc_x264" = no
; then
7526 _libavencoders
=`echo $_libavencoders | sed -e s/X264_ENCODER// `
7528 if test "$_xvid" = no ||
test "$_lavc_xvid" = no
; then
7529 _libavencoders
=`echo $_libavencoders | sed -e s/XVID_ENCODER// `
7531 if test "$_faac" = no ||
test "$_lavc_faac" = no
; then
7532 _libavencoders
=`echo $_libavencoders | sed -e s/FAAC_ENCODER// `
7534 if test "$_mp3lame" = no ||
test "$_lavc_mp3lame" = no
; then
7535 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
7537 if test "$_libvorbis" = no
; then
7538 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
7539 _libavmuxers
=`echo $_libavmuxers | sed -e s/OGG_MUXER// `
7541 if test "$_nut" = no
; then
7542 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
7545 #############################################################################
7546 echo "Creating config.mak"
7547 cat > config.mak
<< EOF
7548 # -------- Generated by configure -----------
7551 MAN_LANG = $MAN_LANG
7552 TARGET_OS = $system_name
7554 prefix = \$(DESTDIR)$_prefix
7555 BINDIR = \$(DESTDIR)$_bindir
7556 DATADIR = \$(DESTDIR)$_datadir
7557 MANDIR = \$(DESTDIR)$_mandir
7558 CONFDIR = \$(DESTDIR)$_confdir
7559 LIBDIR = \$(DESTDIR)$_libdir
7560 # FFmpeg uses libdir instead of LIBDIR
7567 LDCONFIG = $_ldconfig
7569 EXTRA_INC = $_inc_extra
7570 EXTRAXX_INC = $_inc_extra $_inc_extraxx
7571 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7572 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
7573 INSTALLSTRIP = $_install_strip
7575 HELP_FILE = $_mp_help
7579 MPLAYER_NETWORK = $_network
7581 STREAMING_LIVE555 = $_live
7583 STREAM_CACHE = $_stream_cache
7586 VIDIX_INTERNAL = $_vidix_internal
7587 VIDIX_EXTERNAL = $_vidix_external
7594 LIBMPEG2 = $_libmpeg2
7595 TREMOR_INTERNAL = $_tremor_internal
7596 TREMOR_LOW = $_tremor_low
7600 MUSEPACK = $_musepack
7602 UNRARLIB = $_unrarlib
7607 EXTRALIBS = $_extra_libs
7608 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7609 EXTRALIBS_MPLAYER = $_libs_mplayer
7610 EXTRALIBS_MENCODER = $_libs_mencoder
7613 HAVE_PTHREADS = $_pthreads
7615 HAVE_XVMC_ACCEL = $_xvmc
7617 HAVE_SYS_MMAN_H = $_mman
7618 HAVE_POSIX_SELECT = $_posix_select
7620 NEED_FSEEKO = $_need_fseeko
7621 NEED_FTELLO = $_need_ftello
7622 NEED_GETTIMEOFDAY = $_need_gettimeofday
7623 NEED_GLOB = $_need_glob
7624 NEED_SCANDIR = $_need_scandir
7625 NEED_SETENV = $_need_setenv
7626 NEED_SHMEM = $_need_shmem
7627 NEED_STRLCAT = $_need_strlcat
7628 NEED_STRLCPY = $_need_strlcpy
7629 NEED_STRSEP = $_need_strsep
7630 NEED_SWAB = $_need_swab
7631 NEED_VSSCANF = $_need_vsscanf
7638 LIB=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7647 # input/demuxer/codecs
7648 JOYSTICK = $_joystick
7654 TV_BSDBT848 = $_tv_bsdbt848
7655 AUDIO_INPUT = $_audio_input
7659 DVDREAD_INTERNAL = $_dvdread_internal
7660 DVDCSS_INTERNAL = $_libdvdcss_internal
7662 WIN32DLL = $_win32dll
7664 REAL_CODECS = $_real
7665 XANIM_CODECS = $_xanim
7666 LIBAVUTIL = $_libavutil
7667 LIBAVUTIL_A = $_libavutil_a
7668 LIBAVUTIL_SO = $_libavutil_so
7669 LIBAVCODEC = $_libavcodec
7670 LIBAVCODEC_A = $_libavcodec_a
7671 LIBAVCODEC_SO = $_libavcodec_so
7672 LIBAVFORMAT = $_libavformat
7673 LIBAVFORMAT_A = $_libavformat_a
7674 LIBAVFORMAT_SO = $_libavformat_so
7675 LIBPOSTPROC = $_libpostproc
7676 LIBPOSTPROC_A = $_libpostproc_a
7677 LIBPOSTPROC_SO = $_libpostproc_so
7684 CONFIG_LIBDTS = $_libdts
7686 MENCODER = $_mencoder
7689 BITMAP_FONT = $_bitmap_font
7690 FREETYPE = $_freetype
7693 LIBVORBIS = $_vorbis
7694 LIBTHEORA = $_theora
7695 FAAD_INTERNAL = $_faad_internal
7696 FAAD_FIXED = $_faad_fixed
7697 LIBSMBCLIENT = $_smbsupport
7698 XMMS_PLUGINS = $_xmms
7700 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7701 MACOSX_BUNDLE = $_macosx_bundle
7702 MACOSX_COREVIDEO = $_macosx_corevideo
7707 CONFIG_AMR_NB=$_amr_nb
7708 CONFIG_AMR_WB=$_amr_wb
7709 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7710 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7711 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7712 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7713 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7714 CONFIG_LIBFAAC=$_lavc_faac
7715 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7716 CONFIG_XVID=$_lavc_xvid
7717 CONFIG_X264=$_lavc_x264
7720 CONFIG_ENCODERS=$_mencoder
7721 CONFIG_MUXERS=$_mencoder
7723 RADIO_CAPTURE=$_radio_capture
7724 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7725 VIDIX_MACH64=$_vidix_drv_mach64
7726 VIDIX_MGA=$_vidix_drv_mga
7727 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7728 VIDIX_NVIDIA=$_vidix_drv_nvidia
7729 VIDIX_PM2=$_vidix_drv_pm2
7730 VIDIX_PM3=$_vidix_drv_pm3
7731 VIDIX_RADEON=$_vidix_drv_radeon
7732 VIDIX_RAGE128=$_vidix_drv_rage128
7733 VIDIX_SAVAGE=$_vidix_drv_savage
7734 VIDIX_SIS=$_vidix_drv_sis
7735 VIDIX_UNICHROME=$_vidix_drv_unichrome
7737 # --- Some stuff for autoconfigure ----
7743 TARGET_MMX2 = $_mmxext
7744 TARGET_3DNOW = $_3dnow
7745 TARGET_3DNOWEX = $_3dnowext
7747 TARGET_CMOV = $_cmov
7748 TARGET_ALTIVEC = $_altivec
7749 TARGET_ARMV5TE = $_armv5te
7750 TARGET_IWMMXT = $_iwmmxt
7752 TARGET_BUILTIN_VECTOR = $_builtin_vector
7753 TARGET_BUILTIN_3DNOW = $_mm3dnow
7758 # --- libvo stuff ---
7761 # --- libao2 stuff ---
7764 # --- libaf stuff ---
7769 #############################################################################
7771 ff_config_enable
() {
7773 if ` echo $2 | grep $part > /dev/null `; then
7774 echo "#define CONFIG_$part 1"
7775 echo "#define ENABLE_$part 1"
7777 echo "#define ENABLE_$part 0"
7782 echo "Creating config.h"
7783 cat > config.h
<< EOF
7784 /* -------- This file has been automatically generated by configure ---------
7785 Note: Any changes in it will be lost when you run configure again. */
7787 /* Protect against multiple inclusion */
7788 #ifndef MPLAYER_CONFIG_H
7789 #define MPLAYER_CONFIG_H 1
7791 #define CONFIGURATION "$_configuration"
7793 /* make sure we never get lavformat's poll() emulation, the results are
7794 horrible if the X libs try to actually use it, see MPlayer-users
7795 Message-ID: <45D49541.8060101@infernix.net>
7796 Date: Thu, 15 Feb 2007 18:15:45 +0100
7797 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7799 #define HAVE_SYS_POLL_H 1
7801 /* use GNU internationalization */
7804 /* name of messages charset */
7807 /* Runtime CPU detection */
7808 $_def_runtime_cpudetection
7810 /* Dynamic a/v plugins */
7811 $_def_dynamic_plugins
7813 /* "restrict" keyword */
7814 $_def_restrict_keyword
7816 /* __builtin_expect branch prediction hint */
7817 $_def_builtin_expect
7818 #ifdef HAVE_BUILTIN_EXPECT
7819 #define likely(x) __builtin_expect ((x) != 0, 1)
7820 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7822 #define likely(x) (x)
7823 #define unlikely(x) (x)
7826 /* attribute(used) as needed by some compilers */
7827 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7828 # define attribute_used __attribute__((used))
7830 # define attribute_used
7833 /* compiler support for named assembler arguments */
7834 $_def_named_asm_args
7836 #define PREFIX "$_prefix"
7838 /* enable/disable SIGHANDLER */
7841 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7844 /* Toggles debugging informations */
7847 /* Toggles color console output */
7850 /* Indicates that libcdio is available for VCD and CD-DA playback */
7853 /* Indicates that Ogle's libdvdread is available for DVD playback */
7856 /* Indicates that dvdread is internal */
7857 $_def_dvdread_internal
7859 /* Additional options for libdvdread/libdvdcss */
7873 /* Common data directory (for fonts, etc) */
7874 #define MPLAYER_DATADIR "$_datadir"
7875 #define MPLAYER_CONFDIR "$_confdir"
7876 #define MPLAYER_LIBDIR "$_libdir"
7878 /* Define this to compile stream-caching support, it can be enabled via
7879 -cache <kilobytes> */
7882 /* Define if you are using XviD library */
7885 /* Define if you are using the X.264 library */
7888 /* Define if you are using libnut */
7891 /* Define to include support for libdv-0.9.5 */
7894 /* If build mencoder */
7897 /* Indicates if libmp3lame is available
7898 Note: for mencoder */
7900 $_def_mp3lame_preset
7901 $_def_mp3lame_preset_medium
7903 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7904 (use -bps or -nobps commandline option for run-time method selection)
7905 -bps gives better sync for vbr mp3 audio, it is now default */
7906 #define AVI_SYNC_BPS 1
7908 /* Undefine this if you do not want to select mono audio (left or right)
7909 with a stereo MPEG layer 2/3 audio stream. The command line option
7910 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7911 right-only), with 0 being the default.
7913 #define USE_FAKE_MONO 1
7915 /* Undefine this if your sound card driver has no working select().
7916 If you have kernel Oops, player hangups, or just no audio, you should
7917 try to recompile MPlayer with this option disabled! */
7920 /* define this to use iconv(3) function to codepage conversions */
7923 /* define this to use nl_langinfo function */
7926 /* define this to use RTC (/dev/rtc) for video timers */
7929 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7930 #define MAX_OUTBURST 65536
7932 /* set up audio OUTBURST. Do not change this! */
7933 #define OUTBURST 512
7935 /* Define this if your system has the header file for the OSS sound interface */
7938 /* Define this if your system has the header file for the OSS sound interface
7939 * in /usr/include */
7942 /* Define this if your system has the sysinfo header */
7945 /* Define this if your system has ftello() */
7949 /* Need these for FILE and off_t an config.h is usually before other includes*/
7951 #include <sys/types.h>
7952 off_t ftello(FILE *);
7955 /* Define this if your system has the "malloc.h" header file */
7958 /* memalign is mapped to malloc if unsupported */
7963 /* assembler handling of .align */
7966 /* Define this if your system has the "alloca.h" header file */
7969 /* Define this if your system has the "sys/mman.h" header file */
7971 $_def_mman_has_map_failed
7973 /* Define this if you have the elf dynamic linker -ldl library */
7976 /* Define this if you have the kstat kernel statistics library */
7979 /* Define this if you have zlib */
7982 #define CONFIG_ZLIB 1
7985 /* Define this if you have shm support */
7988 /* Define this if your system has scandir & alphasort */
7991 /* Define this if your system has strsep */
7994 /* Define this if your system has strlcpy */
7996 #ifndef HAVE_STRLCPY
7997 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
8000 /* Define this if your system has strlcat */
8002 #ifndef HAVE_STRLCAT
8003 unsigned int strlcat (char *dest, const char *src, unsigned int size);
8006 /* Define this if your system has fseeko */
8009 /* Need these for FILE and off_t an config.h is usually before other includes*/
8011 #include <sys/types.h>
8012 int fseeko(FILE *, off_t, int);
8017 /* Define this if your system has vsscanf */
8020 /* Define this if your system has swab */
8023 /* Define this if your system has posix select */
8026 /* Define this if your system has gettimeofday */
8029 /* Define this if your system has glob */
8032 /* Define this if your system has setenv */
8035 int setenv(const char *name, const char *val, int overwrite);
8038 /* Define this if your system has sysi86 */
8042 /* Define this if your system has pthreads */
8045 /* Define this if you enabled thread support for libavcodec */
8048 /* LIRC (remote control, see www.lirc.org) support: */
8051 /* Support for maemo (http://www.maemo.org) */
8055 * LIRCCD (LIRC client daemon)
8056 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
8060 /* DVD navigation support using libdvdnav */
8062 $_def_dvdnav_version
8064 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
8065 #define MPEG12_POSTPROC 1
8067 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
8070 $_def_libpostproc_so
8072 /* Win32 DLL support */
8074 #define WIN32_PATH "$_win32codecsdir"
8076 /* Mac OS X specific features */
8078 $_def_macosx_finder_support
8080 $_def_macosx_corevideo
8082 /* Build our Win32-loader */
8085 /* ffmpeg's libavcodec support (requires libavcodec source) */
8089 $_def_libavcodec_mpegaudio_hp
8091 /* ffmpeg's libavformat support (requires libavformat source) */
8094 $_def_libavformat_so
8100 /* Use libavcodec's decoders */
8101 #define CONFIG_DECODERS 1
8102 /* Use libavcodec's encoders */
8103 #define CONFIG_ENCODERS 1
8105 /* Use libavformat's demuxers */
8106 #define CONFIG_DEMUXERS 1
8107 /* Use libavformat's muxers */
8110 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8111 #define HAVE_EBX_AVAILABLE 1
8112 #define HAVE_EBP_AVAILABLE 1
8114 #define CONFIG_GPL 1
8116 /* Use AMR codecs from libavcodec. */
8121 /* Use specific parts from FFmpeg. */
8122 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
8123 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
8124 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
8125 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
8126 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
8127 `ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
8134 /* Use codec libs included in mplayer CVS / source dist: */
8140 /* XAnim DLL support */
8142 /* Default search path */
8145 /* RealPlayer DLL support */
8147 /* Default search path */
8150 /* LIVE555 Streaming Media library support */
8153 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8156 /* Use unrarlib for Vobsubs */
8159 /* gui support, please do not edit this option */
8163 /* Audio output drivers */
8165 $_def_ossaudio_devdsp
8166 $_def_ossaudio_devmixer
8177 $_def_sys_asoundlib_h
8178 $_def_alsa_asoundlib_h
8184 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8186 #undef FAST_OSD_TABLE
8188 /* Enable TV Interface support */
8191 /* Enable Video 4 Linux TV interface support */
8194 /* Enable Video 4 Linux 1 TV interface support */
8197 /* Enable Video 4 Linux 2 TV interface support */
8200 /* *BSD BrookTree headers */
8201 $_def_ioctl_meteor_h_name
8202 $_def_ioctl_bt848_h_name
8204 /* Enable *BSD BrookTree TV interface support */
8207 /* Enable Radio Interface support */
8210 /* Enable Capture for Radio Interface support */
8213 /* Enable Video 4 Linux Radio interface support */
8216 /* Enable Video 4 Linux 2 Radio interface support */
8219 /* Enable *BSD BrookTree Radio interface support */
8220 $_def_radio_bsdbt848
8222 /* Enable Video 4 Linux 2 MPEG PVR support */
8225 /* Define if your processor stores words with the most significant
8226 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8232 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8233 have the instruction. */
8236 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
8237 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
8243 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
8248 /* only gcc3 can compile mvi instructions */
8249 $_def_gcc_mvi_support
8251 /* Define this for Cygwin build for win32 */
8254 /* Define this to any prefered value from 386 up to infinity with step 100 */
8255 #define __CPU__ $iproc
8264 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8265 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8267 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8268 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8269 #elif defined(WIN32)
8270 #define DEFAULT_CDROM_DEVICE "D:"
8271 #define DEFAULT_DVD_DEVICE "D:"
8272 #elif defined(SYS_DARWIN)
8273 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8274 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8275 #elif defined(__OpenBSD__)
8276 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8277 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8278 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8279 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8280 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8281 #elif defined(SYS_AMIGAOS4)
8282 #define DEFAULT_CDROM_DEVICE "a1ide.device:2"
8283 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8285 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8286 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8290 /*----------------------------------------------------------------------------
8292 ** NOTE: Instead of modifying these definitions here, use the
8293 ** --enable/--disable options of the ./configure script!
8294 ** See ./configure --help for details.
8296 *---------------------------------------------------------------------------*/
8298 /* C99 lrintf function available */
8301 /* round function is available */
8304 /* yes, we have inttypes.h */
8305 #define HAVE_INTTYPES_H 1
8307 /* int_fastXY_t emulation */
8310 /* nanosleep support */
8316 /* termcap flag for getch2.c */
8319 /* termios flag for getch2.c */
8324 /* enable PNG support */
8327 /* enable JPEG support */
8330 /* enable PNM support */
8333 /* enable md5sum support */
8336 /* enable GIF support */
8341 /* enable bitmap font support */
8344 /* enable FreeType support */
8347 /* enable Fontconfig support */
8350 /* enable SSA/ASS support */
8353 /* enable FriBiDi usage */
8356 /* enable ENCA usage */
8359 /* liblzo support */
8362 #define CONFIG_LZO 1
8365 /* libmad support */
8368 /* enable OggVorbis support */
8372 /* enable Speex support */
8375 /* enable musepack support */
8378 /* enable OggTheora support */
8381 /* enable FAAD (AAC) support */
8385 /* enable FAAC (AAC encoder) support */
8388 /* enable LADSPA plugin support */
8391 /* enable network */
8394 /* enable ftp support */
8397 /* enable vstream support */
8400 /* enable winsock2 instead of Unix functions*/
8403 /* define this to use inet_aton() instead of inet_pton() */
8406 /* enables / disables cdparanoia support */
8410 /* enables / disables VIDIX usage */
8412 $_def_vidix_drv_cyberblade
8413 $_def_vidix_drv_mach64
8415 $_def_vidix_drv_mga_crtc2
8416 $_def_vidix_drv_nvidia
8418 $_def_vidix_drv_radeon
8419 $_def_vidix_drv_rage128
8420 $_def_vidix_drv_savage
8422 $_def_vidix_drv_unichrome
8425 /* enables / disables new input joystick support */
8428 /* enables / disables QTX codecs */
8431 /* enables / disables osd menu */
8434 /* enables / disables subtitles sorting */
8437 /* XMMS input plugin support */
8439 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8441 /* enables inet6 support */
8444 /* do we have gethostbyname2? */
8445 $_def_gethostbyname2
8447 /* Extension defines */
8448 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
8449 $_def_3dnowext // only define if you have 3DNOWEXT (AMD Athlon, etc.)
8450 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
8451 $_def_mmxext // only define if you have MMX2 (Athlon/PIII/4/CelII)
8452 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
8453 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
8454 $_def_cmov // only define if you have CMOV (i686+, without VIA C3)
8455 $_def_fast_cmov // only define if CMOV is fast
8456 $_def_altivec // only define if you have Altivec (G4)
8457 $_def_armv5te // only define if you have Enhanced DSP Extensions (ARM)
8458 $_def_iwmmxt // only define if you have XScale IWMMX (ARM)
8460 $_def_altivec_h // enables usage of altivec.h
8462 $_def_mlib // Sun mediaLib, available only on solaris
8463 $_def_vis // only define if you have VIS ( ultrasparc )
8465 /* libmpeg2 uses a different feature test macro for mediaLib */
8467 #define LIBMPEG2_MLIB 1
8471 #define SCREEN_SIZE_X 1
8472 #define SCREEN_SIZE_Y 1
8484 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8494 $_def_directfb_version
8519 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8520 #define X11_FULLSCREEN 1
8523 #endif /* MPLAYER_CONFIG_H */
8526 #############################################################################
8530 Config files successfully generated by ./configure $_configuration !
8532 Install prefix: $_prefix
8533 Data directory: $_datadir
8534 Config direct.: $_confdir
8536 Byte order: $_byte_order
8537 Optimizing for: $_optimizing
8540 Messages/GUI: $_language
8543 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8544 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8549 Enabled optional drivers:
8550 Input: $_inputmodules
8551 Codecs: $_codecmodules
8552 Audio output: $_aomodules
8553 Video output: $_vomodules
8554 Audio filters: $_afmodules
8555 Disabled optional drivers:
8556 Input: $_noinputmodules
8557 Codecs: $_nocodecmodules
8558 Audio output: $_noaomodules
8559 Video output: $_novomodules
8560 Audio filters: $_noafmodules
8562 'config.h' and 'config.mak' contain your configuration options.
8563 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8564 compile *** DO NOT REPORT BUGS if you tweak these files ***
8566 'make' will now compile MPlayer and 'make install' will install it.
8567 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8572 if test "$_mtrr" = yes ; then
8573 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8579 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8580 operating system ($system_name). You may encounter a few files that cannot
8581 be played due to missing open source video/audio codec support.
8588 Check $TMPLOG if you wonder why an autodetection failed (make sure
8589 development headers/packages are installed).
8591 NOTE: The --enable-* parameters unconditionally force options on, completely
8592 skipping autodetection. This behavior is unlike what you may be used to from
8593 autoconf-based configure scripts that can decide to override you. This greater
8594 level of control comes at a price. You may have to provide the correct compiler
8595 and linker flags yourself.
8596 If you used one of these options (except --enable-gui and similar ones that
8597 turn on internal features) and experience a compilation or linking failure,
8598 make sure you have passed the necessary compiler/linker flags to configure.
8600 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8604 if test "$_warn_CFLAGS" = yes; then
8607 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8609 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8611 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8612 To do so, execute 'CFLAGS= ./configure <options>'
8618 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"