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
70 echo "ldd $TMPO" >> "$TMPLOG"
71 $_ldd "$TMPO" >> "$TMPLOG" 2>&1
77 compile_check
$TMPC $@
81 compile_check
$TMPCPP $@
-lstdc++
85 "$TMPO" >> "$TMPLOG" 2>&1
88 # Display error message, flushes tempfile, exit
93 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
94 echo "Check \"$TMPLOG\" if you do not understand why it failed."
98 # OS test booleans functions
100 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
102 linux
() { issystem
"Linux" ; return "$?" ; }
103 sunos
() { issystem
"SunOS" ; return "$?" ; }
104 hpux
() { issystem
"HP-UX" ; return "$?" ; }
105 irix
() { issystem
"IRIX" ; return "$?" ; }
106 aix
() { issystem
"AIX" ; return "$?" ; }
107 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
108 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; return "$?" ; }
109 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
110 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
111 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
112 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
113 qnx
() { issystem
"QNX" ; return "$?" ; }
114 darwin
() { issystem
"Darwin" ; return "$?" ; }
115 gnu
() { issystem
"GNU" ; return "$?" ; }
116 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
117 morphos
() { issystem
"MorphOS" ; return "$?" ; }
118 win32
() { cygwin || mingw32
; return "$?" ; }
119 beos
() { issystem
"BEOS" ; return "$?" ; }
121 # arch test boolean functions
122 # x86/x86pc is used by QNX
125 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
132 x86_64|amd64
) return 0 ;;
162 # not boolean test: implement the posix shell "!" operator for a
164 # usage: not {command}
165 # returns exit status "success" when the execution of "command"
172 # Use this before starting a check
174 echo "============ Checking for $@ ============" >> "$TMPLOG"
175 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
178 # Use this to echo the results of a check
180 if test "$_res_comment" ; then
181 _res_comment
="($_res_comment)"
183 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
184 echo "##########################################" >> "$TMPLOG"
186 echo "$@ $_res_comment"
189 #############################################################################
191 # Check how echo works in this /bin/sh
193 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
194 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
197 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"`
201 Usage: $0 [OPTIONS]...
204 -h, --help display this help and exit
206 Installation directories:
207 --prefix=DIR prefix directory for installation [/usr/local]
208 --bindir=DIR directory for installing binaries [PREFIX/bin]
209 --datadir=DIR directory for installing machine independent
210 data files (skins, etc) [PREFIX/share/mplayer]
211 --mandir=DIR directory for installing man pages [PREFIX/man]
212 --confdir=DIR directory for installing configuration files
214 --libdir=DIR directory for object code libraries [PREFIX/lib]
215 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
216 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
217 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
218 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
221 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
222 --disable-mplayer disable MPlayer compilation [enable]
223 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
224 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
225 --enable-largefiles enable support for files > 2GB [disable]
226 --enable-linux-devfs set default devices to devfs [disable]
227 --enable-termcap use termcap database for key codes [autodetect]
228 --enable-termios use termios database for key codes [autodetect]
229 --disable-iconv disable iconv for encoding conversion [autodetect]
230 --disable-langinfo do not use langinfo [autodetect]
231 --enable-lirc enable LIRC (remote control) support [autodetect]
232 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
233 --enable-joystick enable joystick support [disable]
234 --disable-vm disable X video mode extensions [autodetect]
235 --disable-xf86keysym disable support for multimedia keys [autodetect]
236 --enable-radio enable radio interface [disable]
237 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
238 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
239 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
240 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
241 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
242 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
243 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
244 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
245 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
246 --disable-network disable networking [enable]
247 --enable-winsock2 enable winsock2 [autodetect]
248 --enable-smb enable Samba (SMB) input [autodetect]
249 --enable-live enable LIVE555 Streaming Media [autodetect]
250 --disable-dvdnav disable libdvdnav [autodetect]
251 --disable-dvdread disable libdvdread [autodetect]
252 --disable-dvdread-internal disable internal libdvdread [autodetect]
253 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
254 --disable-cdparanoia disable cdparanoia [autodetect]
255 --disable-cddb disable cddb [autodetect]
256 --disable-bitmap-font disable bitmap font support [enable]
257 --disable-freetype disable FreeType 2 font rendering [autodetect]
258 --disable-fontconfig disable fontconfig font lookup [autodetect]
259 --disable-unrarlib disable Unique RAR File Library [enabled]
260 --enable-menu enable OSD menu (not DVD menu) [disabled]
261 --disable-sortsub disable subtitle sorting [enabled]
262 --enable-fribidi enable the FriBiDi libs [autodetect]
263 --disable-enca disable ENCA charset oracle library [autodetect]
264 --disable-macosx disable Mac OS X specific features [autodetect]
265 --disable-maemo disable maemo specific features [autodetect]
266 --enable-macosx-finder-support enable Mac OS X Finder invocation
267 parameter parsing [disabled]
268 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
269 --disable-inet6 disable IPv6 support [autodetect]
270 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
271 --disable-ftp disable FTP support [enabled]
272 --disable-vstream disable TiVo vstream client support [autodetect]
273 --disable-pthreads disable Posix threads support [autodetect]
274 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
275 --enable-rpath enable runtime linker path for extra libs [disabled]
278 --enable-gif enable GIF support [autodetect]
279 --enable-png enable PNG input/output support [autodetect]
280 --enable-jpeg enable JPEG input/output support [autodetect]
281 --enable-libcdio enable external libcdio [autodetect]
282 --enable-liblzo enable external liblzo [autodetect]
283 --disable-win32 disable Win32 DLL support [enabled]
284 --disable-qtx disable QuickTime codecs support [enabled]
285 --disable-xanim disable XAnim codecs support [enabled]
286 --disable-real disable RealPlayer codecs support [enabled]
287 --disable-xvid disable XviD [autodetect]
288 --disable-x264 disable x264 [autodetect]
289 --disable-nut disable libnut [autodetect]
290 --disable-libavutil disable libavutil [autodetect]
291 --disable-libavcodec disable libavcodec [autodetect]
292 --disable-libavformat disable libavformat [autodetect]
293 --disable-libpostproc disable libpostproc [autodetect]
294 --disable-libavutil_so disable shared libavutil [autodetect]
295 --disable-libavcodec_so disable shared libavcodec [autodetect]
296 --disable-libavformat_so disable shared libavformat [autodetect]
297 --disable-libpostproc_so disable shared libpostproc [autodetect]
298 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
299 in libavcodec [enabled]
300 --disable-tremor-internal disable internal Tremor [enabled]
301 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
302 --enable-tremor-external enable external Tremor [autodetect]
303 --disable-libvorbis disable libvorbis support [autodetect]
304 --disable-speex disable Speex support [autodetect]
305 --enable-theora enable OggTheora libraries [autodetect]
306 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
307 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
308 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
309 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
310 --disable-ladspa disable LADSPA plugin support [autodetect]
311 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
312 --disable-mad disable libmad (MPEG audio) support [autodetect]
313 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
314 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
315 --enable-xmms enable XMMS input plugin support [disabled]
316 --enable-libdts enable libdts support [autodetect]
317 --disable-mp3lib disable builtin mp3lib [enabled]
318 --disable-liba52 disable builtin liba52 [enabled]
319 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
320 --disable-musepack disable musepack support [autodetect]
321 --disable-amr_nb disable AMR narrowband, floating-point [autodetect]
322 --disable-amr_nb-fixed disable AMR narrowband, fixed-point [autodetect]
323 --disable-amr_wb disable AMR wideband, floating-point [autodetect]
324 --disable-decoder=DECODER disable specified FFmpeg decoder
325 --enable-decoder=DECODER enable specified FFmpeg decoder
326 --disable-encoder=ENCODER disable specified FFmpeg encoder
327 --enable-encoder=ENCODER enable specified FFmpeg encoder
328 --disable-parser=PARSER disable specified FFmpeg parser
329 --enable-parser=PARSER enable specified FFmpeg parser
330 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
331 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
332 --disable-muxer=MUXER disable specified FFmpeg muxer
333 --enable-muxer=MUXER enable specified FFmpeg muxer
336 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
337 --disable-vidix-external disable external VIDIX [for x86 *nix]
338 --enable-gl enable OpenGL video output [autodetect]
339 --enable-dga[=n] enable DGA [n in {1, 2} ] support [autodetect]
340 --enable-vesa enable VESA video output [autodetect]
341 --enable-svga enable SVGAlib video output [autodetect]
342 --enable-sdl enable SDL video output [autodetect]
343 --enable-aa enable AAlib video output [autodetect]
344 --enable-caca enable CACA video output [autodetect]
345 --enable-ggi enable GGI video output [autodetect]
346 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
347 --enable-directx enable DirectX video output [autodetect]
348 --enable-dxr2 enable DXR2 video output [autodetect]
349 --enable-dxr3 enable DXR3/H+ video output [autodetect]
350 --enable-ivtv enable IVTV TV-Out video output [autodetect]
351 --enable-dvb enable DVB video output [autodetect]
352 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
353 --enable-mga enable mga_vid video output [autodetect]
354 --enable-xmga enable mga_vid X11 video output [autodetect]
355 --enable-xv enable Xv video output [autodetect]
356 --enable-xvmc enable XvMC acceleration [disable]
357 --enable-vm enable XF86VidMode support [autodetect]
358 --enable-xinerama enable Xinerama support [autodetect]
359 --enable-x11 enable X11 video output [autodetect]
360 --enable-xshape enable XShape support [autodetect]
361 --enable-fbdev enable FBDev video output [autodetect]
362 --enable-mlib enable mediaLib video output (Solaris) [disable]
363 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
364 --enable-tdfxfb enable tdfxfb video output [disable]
365 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
366 --enable-directfb enable DirectFB video output [autodetect]
367 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
368 --enable-bl enable Blinkenlights video output [disable]
369 --enable-tdfxvid enable tdfx_vid video output [disable]
370 --disable-tga disable Targa video output [enable]
371 --disable-pnm disable PNM video output [enable]
372 --disable-md5sum disable md5sum video output [enable]
375 --disable-alsa disable ALSA audio output [autodetect]
376 --disable-ossaudio disable OSS audio output [autodetect]
377 --disable-arts disable aRts audio output [autodetect]
378 --disable-esd disable esd audio output [autodetect]
379 --disable-polyp disable Polypaudio audio output [autodetect]
380 --disable-jack disable JACK audio output [autodetect]
381 --disable-openal disable OpenAL audio output [autodetect]
382 --disable-nas disable NAS audio output [autodetect]
383 --disable-sgiaudio disable SGI audio output [autodetect]
384 --disable-sunaudio disable Sun audio output [autodetect]
385 --disable-win32waveout disable Windows waveout audio output [autodetect]
386 --disable-select disable using select() on the audio device [enable]
388 Miscellaneous options:
389 --enable-runtime-cpudetection enable runtime CPU detection [disable]
390 --enable-cross-compile enable cross-compilation [autodetect]
391 --cc=COMPILER C compiler to build MPlayer [gcc]
392 --host-cc=COMPILER C compiler for tools needed while building [gcc]
393 --as=ASSEMBLER assembler to build MPlayer [as]
394 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
395 --enable-static build a statically linked binary
396 --charset=charset convert the console messages to this character set
397 --language=list a white space or comma separated list of languages for
398 translated man pages, the first language is used for
399 messages and the GUI (the environment variable
400 \$LINGUAS is also honored) [en]
401 (Available: $LANGUAGES all)
402 --with-install=PATH path to a custom install program
403 --enable-color-console enable color console output (UNSUPPORTED) [disable]
406 --enable-mmx enable MMX [autodetect]
407 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
408 --enable-3dnow enable 3DNow! [autodetect]
409 --enable-3dnowext enable extended 3DNow! [autodetect]
410 --enable-sse enable SSE [autodetect]
411 --enable-sse2 enable SSE2 [autodetect]
412 --enable-shm enable shm [autodetect]
413 --enable-altivec enable AltiVec (PowerPC) [autodetect]
414 --enable-armv5te enable DSP extensions (ARM) [autodetect]
415 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
416 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
417 --enable-big-endian force byte order to big-endian [autodetect]
418 --enable-debug[=1-3] compile-in debugging information [disable]
419 --enable-profile compile-in profiling information [disable]
420 --disable-sighandler disable sighandler for crashes [enable]
421 --enable-crash-debug enable automatic gdb attach on crash [disable]
422 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
424 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
425 --disable-gcc-check disable gcc version checking [enable]
427 Use these options if autodetection fails (Options marked with (*) accept
428 multiple paths separated by ':'):
429 --extra-libs=FLAGS extra linker flags
430 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
431 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
432 --with-extraincdir=DIR extra header search paths in DIR (*)
433 --with-extralibdir=DIR extra linker search paths in DIR (*)
434 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
436 --with-freetype-config=PATH path to freetype-config
437 --with-fribidi-config=PATH path to fribidi-config
438 --with-glib-config=PATH path to glib*-config
439 --with-gtk-config=PATH path to gtk*-config
440 --with-sdl-config=PATH path to sdl*-config
441 --with-dvdnav-config=PATH path to dvdnav-config
443 This configure script is NOT autoconf-based, even though its output is similar.
444 It will try to autodetect all configuration options. If you --enable an option
445 it will be forcefully turned on, skipping autodetection. This can break
446 compilation, so you need to know what you are doing.
451 # GOTCHA: the variables below defines the default behavior for autodetection
452 # and have - unless stated otherwise - at least 2 states : yes no
453 # If autodetection is available then the third state is: auto
469 test "$CC" && _cc
="$CC"
472 _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_DEVICE_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// `
496 _libavcodec_mpegaudio_hp
=yes
501 _dga
=auto
# 1 2 no auto
503 _xvmc
=no
#auto when complete
542 _tremor_external
=auto
557 _dvdnavconfig
=dvdnav-config
559 _dvdread_internal
=auto
560 _libdvdcss_internal
=auto
569 _mlib
=no
#broken, thus disabled
629 _macosx_finder_support
=no
632 _freetypeconfig
='freetype-config'
634 _fribidiconfig
='fribidi-config'
647 _def_stream_cache
="#define USE_STREAM_CACHE 1"
654 _prefix
=`echo $ac_option | cut -d '=' -f 2`
657 _bindir
=`echo $ac_option | cut -d '=' -f 2`
660 _datadir
=`echo $ac_option | cut -d '=' -f 2`
663 _mandir
=`echo $ac_option | cut -d '=' -f 2`
666 _confdir
=`echo $ac_option | cut -d '=' -f 2`
669 _libdir
=`echo $ac_option | cut -d '=' -f 2`
672 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
675 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
678 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
681 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
683 --with-extraincdir=*)
684 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
686 --with-extralibdir=*)
687 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
691 _install
=`echo $ac_option | cut -d '=' -f 2 `
694 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
698 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
700 --with-freetype-config=*)
701 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
703 --with-fribidi-config=*)
704 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
707 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
709 --with-glib-config=*)
710 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
712 --with-dvdnav-config=*)
713 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
717 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
719 --extra-libs-mplayer=*)
720 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
722 --extra-libs-mencoder=*)
723 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
727 _target
=`echo $ac_option | cut -d '=' -f 2`
730 _cc
=`echo $ac_option | cut -d '=' -f 2`
733 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
736 _as
=`echo $ac_option | cut -d '=' -f 2`
739 _charset
=`echo $ac_option | cut -d '=' -f 2`
742 _language
=`echo $ac_option | cut -d '=' -f 2`
761 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
766 --enable-gcc-check) _gcc_check
=yes ;;
767 --disable-gcc-check) _gcc_check
=no
;;
768 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
769 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
770 --enable-cross-compile) _cross_compile
=yes ;;
771 --disable-cross-compile) _cross_compile
=no
;;
772 --enable-mencoder) _mencoder
=yes ;;
773 --disable-mencoder) _mencoder
=no
;;
774 --enable-mplayer) _mplayer
=yes ;;
775 --disable-mplayer) _mplayer
=no
;;
776 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
777 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
778 --enable-x11) _x11
=yes ;;
779 --disable-x11) _x11
=no
;;
780 --enable-xshape) _xshape
=yes ;;
781 --disable-xshape) _xshape
=no
;;
782 --enable-xv) _xv
=yes ;;
783 --disable-xv) _xv
=no
;;
784 --enable-xvmc) _xvmc
=yes ;;
785 --disable-xvmc) _xvmc
=no
;;
786 --enable-sdl) _sdl
=yes ;;
787 --disable-sdl) _sdl
=no
;;
788 --enable-directx) _directx
=yes ;;
789 --disable-directx) _directx
=no
;;
790 --enable-win32waveout) _win32waveout
=yes ;;
791 --disable-win32waveout) _win32waveout
=no
;;
792 --enable-nas) _nas
=yes ;;
793 --disable-nas) _nas
=no
;;
794 --enable-png) _png
=yes ;;
795 --disable-png) _png
=no
;;
796 --enable-jpeg) _jpeg
=yes ;;
797 --disable-jpeg) _jpeg
=no
;;
798 --enable-pnm) _pnm
=yes ;;
799 --disable-pnm) _pnm
=no
;;
800 --enable-md5sum) _md5sum
=yes ;;
801 --disable-md5sum) _md5sum
=no
;;
802 --enable-gif) _gif
=yes ;;
803 --disable-gif) _gif
=no
;;
804 --enable-gl) _gl
=yes ;;
805 --disable-gl) _gl
=no
;;
806 --enable-ggi) _ggi
=yes ;;
807 --disable-ggi) _ggi
=no
;;
808 --enable-ggiwmh) _ggiwmh
=yes ;;
809 --disable-ggiwmh) _ggiwmh
=no
;;
810 --enable-aa) _aa
=yes ;;
811 --disable-aa) _aa
=no
;;
812 --enable-caca) _caca
=yes ;;
813 --disable-caca) _caca
=no
;;
814 --enable-svga) _svga
=yes ;;
815 --disable-svga) _svga
=no
;;
816 --enable-vesa) _vesa
=yes ;;
817 --disable-vesa) _vesa
=no
;;
818 --enable-fbdev) _fbdev
=yes ;;
819 --disable-fbdev) _fbdev
=no
;;
820 --enable-dvb) _dvb
=yes ;;
821 --disable-dvb) _dvb
=no
;;
822 --enable-dvbhead) _dvbhead
=yes ;;
823 --disable-dvbhead) _dvbhead
=no
;;
824 --enable-dxr2) _dxr2
=yes ;;
825 --disable-dxr2) _dxr2
=no
;;
826 --enable-dxr3) _dxr3
=yes ;;
827 --disable-dxr3) _dxr3
=no
;;
828 --enable-ivtv) _ivtv
=yes ;;
829 --disable-ivtv) _ivtv
=no
;;
830 --enable-iconv) _iconv
=yes ;;
831 --disable-iconv) _iconv
=no
;;
832 --enable-langinfo) _langinfo
=yes ;;
833 --disable-langinfo) _langinfo
=no
;;
834 --enable-rtc) _rtc
=yes ;;
835 --disable-rtc) _rtc
=no
;;
836 --enable-libdv) _libdv
=yes ;;
837 --disable-libdv) _libdv
=no
;;
838 --enable-ossaudio) _ossaudio
=yes ;;
839 --disable-ossaudio) _ossaudio
=no
;;
840 --enable-arts) _arts
=yes ;;
841 --disable-arts) _arts
=no
;;
842 --enable-esd) _esd
=yes ;;
843 --disable-esd) _esd
=no
;;
844 --enable-polyp) _polyp
=yes ;;
845 --disable-polyp) _polyp
=no
;;
846 --enable-jack) _jack
=yes ;;
847 --disable-jack) _jack
=no
;;
848 --enable-openal) _openal
=yes ;;
849 --disable-openal) _openal
=no
;;
850 --enable-mad) _mad
=yes ;;
851 --disable-mad) _mad
=no
;;
852 --enable-toolame) _toolame
=yes ;;
853 --disable-toolame) _toolame
=no
;;
854 --enable-twolame) _twolame
=yes ;;
855 --disable-twolame) _twolame
=no
;;
856 --enable-libcdio) _libcdio
=yes ;;
857 --disable-libcdio) _libcdio
=no
;;
858 --enable-liblzo) _liblzo
=yes ;;
859 --disable-liblzo) _liblzo
=no
;;
860 --enable-libvorbis) _libvorbis
=yes ;;
861 --disable-libvorbis) _libvorbis
=no
;;
862 --enable-speex) _speex
=yes ;;
863 --disable-speex) _speex
=no
;;
864 --enable-tremor-internal) _tremor_internal
=yes ;;
865 --disable-tremor-internal) _tremor_internal
=no
;;
866 --enable-tremor-low) _tremor_low
=yes ;;
867 --disable-tremor-low) _tremor_low
=no
;;
868 --enable-tremor-external) _tremor_external
=yes ;;
869 --disable-tremor-external) _tremor_external
=no
;;
870 --enable-theora) _theora
=yes ;;
871 --disable-theora) _theora
=no
;;
872 --enable-mp3lib) _mp3lib
=yes ;;
873 --disable-mp3lib) _mp3lib
=no
;;
874 --enable-liba52) _liba52
=yes ;;
875 --disable-liba52) _liba52
=no
;;
876 --enable-libdts) _libdts
=yes ;;
877 --disable-libdts) _libdts
=no
;;
878 --enable-libmpeg2) _libmpeg2
=yes ;;
879 --disable-libmpeg2) _libmpeg2
=no
;;
880 --enable-musepack) _musepack
=yes ;;
881 --disable-musepack) _musepack
=no
;;
882 --enable-faad-internal) _faad_internal
=yes ;;
883 --disable-faad-internal) _faad_internal
=no
;;
884 --enable-faad-external) _faad_external
=yes ;;
885 --disable-faad-external) _faad_external
=no
;;
886 --enable-faad-fixed) _faad_fixed
=yes ;;
887 --disable-faad-fixed) _faad_fixed
=no
;;
888 --enable-faac) _faac
=yes ;;
889 --disable-faac) _faac
=no
;;
890 --enable-ladspa) _ladspa
=yes ;;
891 --disable-ladspa) _ladspa
=no
;;
892 --enable-xmms) _xmms
=yes ;;
893 --disable-xmms) _xmms
=no
;;
894 --enable-dvdread) _dvdread
=yes ;;
895 --disable-dvdread) _dvdread
=no
;;
896 --enable-dvdread-internal) _dvdread_internal
=yes ;;
897 --disable-dvdread-internal) _dvdread_internal
=no
;;
898 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
899 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
900 --enable-dvdnav) _dvdnav
=yes ;;
901 --disable-dvdnav) _dvdnav
=no
;;
902 --enable-xanim) _xanim
=yes ;;
903 --disable-xanim) _xanim
=no
;;
904 --enable-real) _real
=yes ;;
905 --disable-real) _real
=no
;;
906 --enable-live) _live
=yes ;;
907 --disable-live) _live
=no
;;
908 --enable-xinerama) _xinerama
=yes ;;
909 --disable-xinerama) _xinerama
=no
;;
910 --enable-mga) _mga
=yes ;;
911 --disable-mga) _mga
=no
;;
912 --enable-xmga) _xmga
=yes ;;
913 --disable-xmga) _xmga
=no
;;
914 --enable-vm) _vm
=yes ;;
915 --disable-vm) _vm
=no
;;
916 --enable-xf86keysym) _xf86keysym
=yes ;;
917 --disable-xf86keysym) _xf86keysym
=no
;;
918 --enable-mlib) _mlib
=yes ;;
919 --disable-mlib) _mlib
=no
;;
920 --enable-sunaudio) _sunaudio
=yes ;;
921 --disable-sunaudio) _sunaudio
=no
;;
922 --enable-sgiaudio) _sgiaudio
=yes ;;
923 --disable-sgiaudio) _sgiaudio
=no
;;
924 --enable-alsa) _alsa
=yes ;;
925 --disable-alsa) _alsa
=no
;;
926 --enable-tv) _tv
=yes ;;
927 --disable-tv) _tv
=no
;;
928 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
929 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
930 --enable-tv-v4l1) _tv_v4l1
=yes ;;
931 --disable-tv-v4l1) _tv_v4l1
=no
;;
932 --enable-tv-v4l2) _tv_v4l2
=yes ;;
933 --disable-tv-v4l2) _tv_v4l2
=no
;;
934 --enable-radio) _radio
=yes ;;
935 --enable-radio-capture) _radio_capture
=yes ;;
936 --disable-radio-capture) _radio_capture
=no
;;
937 --disable-radio) _radio
=no
;;
938 --enable-radio-v4l) _radio_v4l
=yes ;;
939 --disable-radio-v4l) _radio_v4l
=no
;;
940 --enable-radio-v4l2) _radio_v4l2
=yes ;;
941 --disable-radio-v4l2) _radio_v4l2
=no
;;
942 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
943 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
944 --enable-pvr) _pvr
=yes ;;
945 --disable-pvr) _pvr
=no
;;
946 --enable-fastmemcpy) _fastmemcpy
=yes ;;
947 --disable-fastmemcpy) _fastmemcpy
=no
;;
948 --enable-network) _network
=yes ;;
949 --disable-network) _network
=no
;;
950 --enable-winsock2) _winsock2
=yes ;;
951 --disable-winsock2) _winsock2
=no
;;
952 --enable-smb) _smbsupport
=yes ;;
953 --disable-smb) _smbsupport
=no
;;
954 --enable-vidix-internal) _vidix_internal
=yes ;;
955 --disable-vidix-internal) _vidix_internal
=no
;;
956 --enable-vidix-external) _vidix_external
=yes ;;
957 --disable-vidix-external) _vidix_external
=no
;;
958 --enable-joystick) _joystick
=yes ;;
959 --disable-joystick) _joystick
=no
;;
960 --enable-xvid) _xvid
=yes ;;
961 --disable-xvid) _xvid
=no
;;
962 --enable-x264) _x264
=yes ;;
963 --disable-x264) _x264
=no
;;
964 --enable-nut) _nut
=yes ;;
965 --disable-nut) _nut
=no
;;
966 --enable-libavutil) _libavutil
=yes ;;
967 --disable-libavutil) _libavutil
=no
;;
968 --enable-libavutil_so) _libavutil_so
=yes ;;
969 --disable-libavutil_so) _libavutil_so
=no
;;
970 --enable-libavcodec) _libavcodec
=yes ;;
971 --disable-libavcodec) _libavcodec
=no
;;
972 --enable-libavcodec_so) _libavcodec_so
=yes ;;
973 --disable-libavcodec_so) _libavcodec_so
=no
;;
974 --enable-amr_nb) _amr_nb
=yes ;;
975 --disable-amr_nb) _amr_nb
=no
;;
976 --enable-amr_nb-fixed) _amr_nb_fixed
=yes ;;
977 --disable-amr_nb-fixed) _amr_nb_fixed
=no
;;
978 --enable-amr_wb) _amr_wb
=yes ;;
979 --disable-amr_wb) _amr_wb
=no
;;
980 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
981 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
982 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
983 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
984 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
985 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
986 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
987 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
988 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
989 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
990 --enable-libavformat) _libavformat
=yes;;
991 --disable-libavformat) _libavformat
=no
;;
992 --enable-libavformat_so) _libavformat_so
=yes ;;
993 --disable-libavformat_so) _libavformat_so
=no
;;
994 --enable-libpostproc) _libpostproc
=yes ;;
995 --disable-libpostproc) _libpostproc
=no
;;
996 --enable-libpostproc_so) _libpostproc_so
=yes ;;
997 --disable-libpostproc_so) _libpostproc_so
=no
;;
998 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
999 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1001 --enable-lirc) _lirc
=yes ;;
1002 --disable-lirc) _lirc
=no
;;
1003 --enable-lircc) _lircc
=yes ;;
1004 --disable-lircc) _lircc
=no
;;
1005 --enable-gui) _gui
=yes ;;
1006 --disable-gui) _gui
=no
;;
1007 --enable-gtk1) _gtk1
=yes ;;
1008 --disable-gtk1) _gtk1
=no
;;
1009 --enable-termcap) _termcap
=yes ;;
1010 --disable-termcap) _termcap
=no
;;
1011 --enable-termios) _termios
=yes ;;
1012 --disable-termios) _termios
=no
;;
1013 --enable-3dfx) _3dfx
=yes ;;
1014 --disable-3dfx) _3dfx
=no
;;
1015 --enable-s3fb) _s3fb
=yes ;;
1016 --disable-s3fb) _s3fb
=no
;;
1017 --enable-tdfxfb) _tdfxfb
=yes ;;
1018 --disable-tdfxfb) _tdfxfb
=no
;;
1019 --disable-tdfxvid) _tdfxvid
=no
;;
1020 --enable-tdfxvid) _tdfxvid
=yes ;;
1021 --disable-tga) _tga
=no
;;
1022 --enable-tga) _tga
=yes ;;
1023 --enable-directfb) _directfb
=yes ;;
1024 --disable-directfb) _directfb
=no
;;
1025 --enable-zr) _zr
=yes ;;
1026 --disable-zr) _zr
=no
;;
1027 --enable-bl) _bl
=yes ;;
1028 --disable-bl) _bl
=no
;;
1029 --enable-mtrr) _mtrr
=yes ;;
1030 --disable-mtrr) _mtrr
=no
;;
1031 --enable-largefiles) _largefiles
=yes ;;
1032 --disable-largefiles) _largefiles
=no
;;
1033 --enable-shm) _shm
=yes ;;
1034 --disable-shm) _shm
=no
;;
1035 --enable-select) _select
=yes ;;
1036 --disable-select) _select
=no
;;
1037 --enable-linux-devfs) _linux_devfs
=yes ;;
1038 --disable-linux-devfs) _linux_devfs
=no
;;
1039 --enable-cdparanoia) _cdparanoia
=yes ;;
1040 --disable-cdparanoia) _cdparanoia
=no
;;
1041 --enable-cddb) _cddb
=yes ;;
1042 --disable-cddb) _cddb
=no
;;
1043 --enable-big-endian) _big_endian
=yes ;;
1044 --disable-big-endian) _big_endian
=no
;;
1045 --enable-bitmap-font) _bitmap_font
=yes ;;
1046 --disable-bitmap-font) _bitmap_font
=no
;;
1047 --enable-freetype) _freetype
=yes ;;
1048 --disable-freetype) _freetype
=no
;;
1049 --enable-fontconfig) _fontconfig
=yes ;;
1050 --disable-fontconfig) _fontconfig
=no
;;
1051 --enable-unrarlib) _unrarlib
=yes ;;
1052 --disable-unrarlib) _unrarlib
=no
;;
1053 --enable-ftp) _ftp
=yes ;;
1054 --disable-ftp) _ftp
=no
;;
1055 --enable-vstream) _vstream
=yes ;;
1056 --disable-vstream) _vstream
=no
;;
1057 --enable-pthreads) _pthreads
=yes ;;
1058 --disable-pthreads) _pthreads
=no
;;
1059 --enable-ass) _ass
=yes ;;
1060 --disable-ass) _ass
=no
;;
1061 --enable-rpath) _rpath
=yes ;;
1062 --disable-rpath) _rpath
=no
;;
1063 --enable-color-console) _color_console
=yes ;;
1064 --disable-color-console) _color_console
=no
;;
1066 --enable-fribidi) _fribidi
=yes ;;
1067 --disable-fribidi) _fribidi
=no
;;
1069 --enable-enca) _enca
=yes ;;
1070 --disable-enca) _enca
=no
;;
1072 --enable-inet6) _inet6
=yes ;;
1073 --disable-inet6) _inet6
=no
;;
1075 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1076 --disable-gethostbyname2) _gethostbyname2
=no
;;
1078 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1079 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1080 --disable-dga) _dga
=no
;;
1082 --enable-menu) _menu
=yes ;;
1083 --disable-menu) _menu
=no
;;
1085 --enable-qtx) _qtx
=yes ;;
1086 --disable-qtx) _qtx
=no
;;
1088 --enable-macosx) _macosx
=yes ;;
1089 --disable-macosx) _macosx
=no
;;
1090 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1091 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1092 --enable-macosx-bundle) _macosx_bundle
=yes;;
1093 --disable-macosx-bundle) _macosx_bundle
=no
;;
1095 --enable-maemo) _maemo
=yes ;;
1096 --disable-maemo) _maemo
=no
;;
1098 --enable-sortsub) _sortsub
=yes ;;
1099 --disable-sortsub) _sortsub
=no
;;
1101 --enable-crash-debug) _crash_debug
=yes ;;
1102 --disable-crash-debug) _crash_debug
=no
;;
1103 --enable-sighandler) _sighandler
=yes ;;
1104 --disable-sighandler) _sighandler
=no
;;
1105 --enable-win32) _win32
=yes ;;
1106 --disable-win32) _win32
=no
;;
1108 --enable-sse) _sse
=yes ;;
1109 --disable-sse) _sse
=no
;;
1110 --enable-sse2) _sse2
=yes ;;
1111 --disable-sse2) _sse2
=no
;;
1112 --enable-mmxext) _mmxext
=yes ;;
1113 --disable-mmxext) _mmxext
=no
;;
1114 --enable-3dnow) _3dnow
=yes ;;
1115 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1116 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1117 --disable-3dnowext) _3dnowext
=no
;;
1118 --enable-cmov) _cmov
=yes ;;
1119 --disable-cmov) _cmov
=no
;;
1120 --enable-altivec) _altivec
=yes ;;
1121 --disable-altivec) _altivec
=no
;;
1122 --enable-armv5te) _armv5te
=yes ;;
1123 --disable-armv5te) _armv5te
=no
;;
1124 --enable-iwmmxt) _iwmmxt
=yes ;;
1125 --disable-iwmmxt) _iwmmxt
=no
;;
1126 --enable-mmx) _mmx
=yes ;;
1127 --disable-mmx) # 3Dnow! and MMX2 require MMX
1128 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1131 echo "Unknown parameter: $ac_option"
1138 # Atmos: moved this here, to be correct, if --prefix is specified
1139 test -z "$_bindir" && _bindir
="$_prefix/bin"
1140 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1141 test -z "$_mandir" && _mandir
="$_prefix/man"
1142 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1143 test -z "$_libdir" && _libdir
="$_prefix/lib"
1145 # Determine our OS name and CPU architecture
1146 if test -z "$_target" ; then
1148 system_name
=`uname -s 2>&1`
1149 case "$system_name" in
1150 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX
)
1161 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1168 system_name
="$system_name-UNKNOWN"
1173 # host's CPU/instruction set
1174 host_arch
=`uname -p 2>&1`
1175 case "$host_arch" in
1176 i386|sparc|ppc|alpha|arm|mips|vax
)
1178 powerpc
) # Darwin returns 'powerpc'
1181 *) # uname -p on Linux returns 'unknown' for the processor type,
1182 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1184 # Maybe uname -m (machine hardware name) returns something we
1187 # x86/x86pc is used by QNX
1188 case "`uname -m 2>&1`" in
1189 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
;;
1190 ia64
) host_arch
=ia64
;;
1192 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1193 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1199 macppc|ppc|ppc64
) host_arch
=ppc
;;
1200 alpha
) host_arch
=alpha
;;
1201 sparc
) host_arch
=sparc
;;
1202 sparc64
) host_arch
=sparc64
;;
1203 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1204 arm
*|zaurus|cats
) host_arch
=arm
;;
1205 s390
) host_arch
=s390
;;
1206 s390x
) host_arch
=s390x
;;
1207 mips
*) host_arch
=mips
;;
1208 vax
) host_arch
=vax
;;
1209 *) host_arch
=UNKNOWN
;;
1213 else # if test -z "$_target"
1214 system_name
=`echo $_target | cut -d '-' -f 2`
1215 case "`echo $system_name | tr A-Z a-z`" in
1216 linux
) system_name
=Linux
;;
1217 freebsd
) system_name
=FreeBSD
;;
1218 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1219 netbsd
) system_name
=NetBSD
;;
1220 bsd
/os
) system_name
=BSD
/OS
;;
1221 openbsd
) system_name
=OpenBSD
;;
1222 sunos
) system_name
=SunOS
;;
1223 qnx
) system_name
=QNX
;;
1224 morphos
) system_name
=MorphOS
;;
1225 mingw32msvc
) system_name
=MINGW32
;;
1227 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1228 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
1231 echo "Detected operating system: $system_name"
1232 echo "Detected host architecture: $host_arch"
1234 if test "$_runtime_cpudetection" = yes && not x86
&& not ppc
; then
1235 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1238 # LGB: temporary files
1239 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1243 TMPLOG
="configure.log"
1245 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1246 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1247 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
1248 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1252 # FIXME: A lot of stuff is installed under /usr/local
1253 # NK: But we should never use this stuff implicitly since we call compiler
1254 # from /usr we should be sure that there no effects from other compilers
1255 # (libraries) which might be installed into /usr/local. Let users use this
1256 # stuff explicitly as command line argument. In other words: It would be
1257 # resonable to have only /usr/include or only /usr/local/include.
1260 _ldconfig
="ldconfig -R"
1264 _ld_extra
="$_ld_extra -L/usr/local/lib"
1265 _inc_extra
="$_inc_extra -I/usr/local/include"
1270 _ld_extra
="$_ld_extra -L/usr/local/lib"
1271 _inc_extra
="$_inc_extra -I/usr/local/include"
1275 _ld_extra
="$_ld_extra -lC"
1278 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
1287 # -lwinmm is always needed for osdep/timer-win2.c
1288 _ld_extra
="$_ld_extra -lwinmm"
1293 _def_stream_cache
="#undef USE_STREAM_CACHE"
1296 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1297 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1299 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1300 _head
() { head -$1 2>/dev
/null
; }
1302 _head
() { head -n $1 2>/dev
/null
; }
1304 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1305 _tail
() { tail -$1 2>/dev
/null
; }
1307 _tail
() { tail -n $1 2>/dev
/null
; }
1310 # Checking CC version...
1311 if test "$_gcc_check" = yes ; then
1312 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1313 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1314 echocheck
"$_cc version"
1316 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1317 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1318 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1319 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1320 # TODO verify older icc/ecc compatibility
1323 cc_version
="v. ?.??, bad"
1327 cc_version
="$cc_version, ok"
1331 cc_version
="$cc_version, bad"
1335 echores
"$cc_version"
1337 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
1338 echocheck
"$_cc version"
1340 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1341 cc_version
=`$_cc -dumpversion 2>&1`
1342 if test "$?" -gt 0; then
1343 cc_version
="not found"
1347 cc_version
="v. ?.??, bad"
1350 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1351 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1352 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1353 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1354 cc_version
="$cc_version, ok"
1361 cc_version
="$cc_version, bad"
1365 echores
"$cc_version"
1366 test "$cc_verc_fail" = "no" && break
1369 if test "$cc_verc_fail" = yes ; then
1372 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1374 You are not using a supported compiler. We do not have the time to make sure
1375 everything works with compilers other than the ones we use. Use either the
1376 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1377 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1379 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1380 mplayer and lame (which is used for mencoder). If you get compile errors,
1381 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1382 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1385 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1388 die
"Bad gcc version"
1393 ******************************************************************************
1395 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1396 Ok. You know. Do it.
1398 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1399 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1400 Lame which is used by mencoder produces weird errors, too.
1402 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1403 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1405 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1407 ******************************************************************************
1415 test "$_host_cc" || _host_cc
=$_cc
1418 echocheck
"cross compilation"
1419 if test $_cross_compile = auto
; then
1421 int main() { return 0; }
1424 cc_check
&& "$TMPO" && _cross_compile
=no
1426 echores
$_cross_compile
1428 if test $_cross_compile = yes; then
1436 # now that we know what compiler should be used for compilation, try to find
1437 # out which assembler is used by the $_cc compiler
1438 if test "$_as" = auto
; then
1439 _as
=`$_cc -print-prog-name=as`
1440 test -z "$_as" && _as
=as
1443 # XXX: this should be ok..
1446 if test "$_runtime_cpudetection" = no
; then
1448 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1449 # FIXME: Remove the cygwin check once AMD CPUs are supported
1450 if test -r /proc
/cpuinfo
&& not cygwin
; then
1451 # Linux with /proc mounted, extract CPU information from it
1452 _cpuinfo
="cat /proc/cpuinfo"
1453 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86_32
; then
1454 # FreeBSD with Linux emulation /proc mounted,
1455 # extract CPU information from it
1456 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1457 elif darwin
&& not x86_32
; then
1458 # use hostinfo on Darwin
1461 # use 'lsattr' on AIX
1462 _cpuinfo
="lsattr -E -l proc0 -a type"
1464 # all other OSes try to extract CPU information from a small helper
1465 # program TOOLS/cpuinfo instead
1466 $_cc -o TOOLS
/cpuinfo TOOLS
/cpuinfo.c
1467 _cpuinfo
="TOOLS/cpuinfo"
1471 # gather more CPU information
1472 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1473 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1474 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1475 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1476 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1478 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1480 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1481 -e s/xmm/sse/ -e s/kni/sse/`
1483 for ext
in $pparam ; do
1484 eval test \
$_$ext = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1487 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1488 test $_sse = kernel_check
&& _mmxext
=kernel_check
1490 echocheck
"CPU vendor"
1491 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1493 echocheck
"CPU type"
1497 fi # test "$_runtime_cpudetection" = no
1500 case "$host_arch" in
1501 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1502 _def_arch_x86
="#define ARCH_X86 1"
1503 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1504 _def_arch
="#define ARCH_X86_32 1"
1505 _target_arch
="TARGET_ARCH_X86_32 = yes"
1510 if test "$_runtime_cpudetection" = no
; then
1514 3) proc
=i386 iproc
=386 ;;
1515 4) proc
=i486 iproc
=486 ;;
1516 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1517 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1518 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1520 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1522 elif test "$pmodel" -ge 8; then
1524 elif test "$pmodel" -ge 6; then
1531 # It's a bit difficult to determine the correct type of Family 6
1532 # AMD CPUs just from their signature. Instead, we check directly
1533 # whether it supports SSE.
1534 if test "$_sse" = yes; then
1535 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1538 # Again, gcc treats athlon and athlon-tbird similarly.
1543 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1544 # caught and remedied in the optimization tests below.
1548 *) proc
=k8 iproc
=686 ;;
1553 3) proc
=i386 iproc
=386 ;;
1554 4) proc
=i486 iproc
=486 ;;
1556 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1557 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1563 if test "$pmodel" -eq 15; then
1565 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1567 elif test "$pmodel" -ge 7; then
1569 elif test "$pmodel" -ge 3; then
1576 # A nocona in 32-bit mode has no more capabilities than a prescott.
1577 if test "$pmodel" -ge 3; then
1583 *) proc
=prescott iproc
=686 ;;
1589 if test "$pmodel" -ge 8; then
1591 elif test "$pmodel" -ge 4; then
1598 if test "$pmodel" -ge 9; then
1605 *) proc
=i686 iproc
=i686
;;
1610 3) proc
=i386 iproc
=386 ;;
1611 4) proc
=i486 iproc
=486 ;;
1612 *) proc
=i586 iproc
=586 ;;
1616 proc
=i586 iproc
=586 ;;
1618 fi # test "$_runtime_cpudetection" = no
1621 # check that gcc supports our CPU, if not, fall back to earlier ones
1622 # LGB: check -mcpu and -march swithing step by step with enabling
1623 # to fall back till 386.
1625 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1627 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1633 echocheck
"GCC & CPU optimization abilities"
1635 int main(void) { return 0; }
1637 if test "$_runtime_cpudetection" = no
; then
1638 if test "$proc" = "k8"; then
1639 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1641 if test "$proc" = "athlon-xp"; then
1642 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1644 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1645 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1647 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1648 if not cc_check
-march=$proc $cpuopt=$proc; then
1649 if cc_check
-march=i586
$cpuopt=i686
; then
1656 if test "$proc" = "prescott" ; then
1657 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1659 if test "$proc" = "core2" ; then
1660 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1662 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
1663 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1665 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1666 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1668 if test "$proc" = "i586"; then
1669 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1671 if test "$proc" = "i486" ; then
1672 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1674 if test "$proc" = "i386" ; then
1675 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1677 if test "$proc" = "error" ; then
1678 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1682 elif test "$proc" = "i586-i686"; then
1683 _march
="-march=i586"
1684 _mcpu
="$cpuopt=i686"
1687 _march
="-march=$proc"
1688 _mcpu
="$cpuopt=$proc"
1691 else # if test "$_runtime_cpudetection" = no
1692 # i686 is probably the most common CPU - optimize for it
1693 _mcpu
="$cpuopt=i686"
1694 # at least i486 required, for bswap instruction
1695 _march
="-march=i486"
1696 cc_check
$_mcpu || _mcpu
=""
1697 cc_check
$_march $_mcpu || _march
=""
1700 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1701 ## autodetected mcpu/march parameters
1702 if test "$_target" ; then
1703 # TODO: it may be a good idea to check GCC and fall back in all cases
1704 if test "$host_arch" = "i586-i686"; then
1705 _march
="-march=i586"
1706 _mcpu
="$cpuopt=i686"
1708 _march
="-march=$host_arch"
1709 _mcpu
="$cpuopt=$host_arch"
1717 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1718 i686|athlon
*|pentium
*) iproc
=686 ;;
1727 _def_arch
='#define ARCH_IA64 1'
1728 _target_arch
='TARGET_ARCH_IA64 = yes'
1737 _def_arch
='#define ARCH_X86_64 1'
1738 _target_arch
='TARGET_ARCH_X86_64 = yes'
1739 _def_arch_x86
="#define ARCH_X86 1"
1740 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1743 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1744 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1749 if test "$_runtime_cpudetection" = no
; then
1757 # 64-bit prescotts exist, but as far as GCC is concerned they
1758 # have the same capabilities as a nocona.
1765 fi # test "$_runtime_cpudetection" = no
1767 echocheck
"GCC & CPU optimization abilities"
1769 int main(void) { return 0; }
1771 # This is a stripped-down version of the i386 fallback.
1772 if test "$_runtime_cpudetection" = no
; then
1773 # --- AMD processors ---
1774 if test "$proc" = "k8"; then
1775 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1777 # This will fail if gcc version < 3.3, which is ok because earlier
1778 # versions don't really support 64-bit on amd64.
1779 # Is this a valid assumption? -Corey
1780 if test "$proc" = "athlon-xp"; then
1781 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1783 # --- Intel processors ---
1784 if test "$proc" = "core2"; then
1785 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1787 if test "$proc" = "nocona"; then
1788 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1790 if test "$proc" = "pentium4"; then
1791 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1794 _march
="-march=$proc"
1795 _mcpu
="$cpuopt=$proc"
1796 if test "$proc" = "error" ; then
1797 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1801 else # if test "$_runtime_cpudetection" = no
1802 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1803 _march
="-march=x86-64"
1804 _mcpu
="$cpuopt=x86-64"
1805 cc_check
$_mcpu || _mcpu
=""
1806 cc_check
$_march $_mcpu || _march
=""
1815 _def_arch
='#define ARCH_SPARC 1'
1816 _target_arch
='TARGET_ARCH_SPARC = yes'
1819 echocheck
"CPU type"
1821 case "`echo $karch`" in
1826 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1840 _def_arch
='#define ARCH_SPARC 1'
1841 _target_arch
='TARGET_ARCH_SPARC = yes'
1843 _def_vis
='#define HAVE_VIS = yes'
1851 arm|armv4l|armv5tel
)
1852 _def_arch
='#define ARCH_ARMV4L 1'
1853 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1862 _def_arch
='#define ARCH_POWERPC 1'
1863 _def_dcbzl
='#define NO_DCBZL 1'
1864 _target_arch
='TARGET_ARCH_POWERPC = yes'
1872 echocheck
"CPU type"
1873 case $system_name in
1875 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1876 if test -n "`$_cpuinfo | grep altivec`"; then
1881 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1882 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
1883 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
1888 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1890 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1893 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1900 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
1903 if test "$_altivec" = yes; then
1904 echores
"$proc altivec"
1909 echocheck
"GCC & CPU optimization abilities"
1911 if test -n "$proc"; then
1913 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1914 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1915 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1916 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1917 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1918 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1919 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
1920 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
1921 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
1924 # gcc 3.1(.1) and up supports 7400 and 7450
1925 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
1927 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1928 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1932 # gcc 3.2 and up supports 970
1933 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1935 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
1936 _def_dcbzl
='#undef NO_DCBZL' ;;
1940 # gcc 3.3 and up supports POWER4
1941 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1943 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
1947 # gcc 3.4 and up supports 440*
1948 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
1950 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
1951 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
1955 # gcc 4.0 and up supports POWER5
1956 if test "$_cc_major" -ge "4"; then
1958 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
1964 if test -n "$_mcpu"; then
1965 _optimizing
=`echo $_mcpu | cut -c 8-`
1966 echores
"$_optimizing"
1974 _def_arch
='#define ARCH_ALPHA 1'
1975 _target_arch
='TARGET_ARCH_ALPHA = yes'
1979 echocheck
"CPU type"
1982 unsigned long ver, mask;
1983 asm ("implver %0" : "=r" (ver));
1984 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1985 printf("%ld-%x\n", ver, ~mask);
1989 $_cc -o "$TMPO" "$TMPC"
1992 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
1993 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
1994 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
1995 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
1996 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
1997 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
1998 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
2002 echocheck
"GCC & CPU optimization abilities"
2003 if test "$proc" = "ev68" ; then
2004 cc_check
-mcpu=$proc || proc
=ev67
2006 if test "$proc" = "ev67" ; then
2007 cc_check
-mcpu=$proc || proc
=ev6
2014 echocheck
"MVI instruction support in GCC"
2015 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
2016 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2019 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2020 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2025 _def_arch
='#define ARCH_SGI_MIPS 1'
2026 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
2034 echocheck
"CPU type"
2035 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2036 case "`echo $proc`" in
2037 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2038 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2039 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2040 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2041 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2042 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2044 # gcc < 3.x does not support -mtune.
2045 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2054 _def_arch
='#define ARCH_PA_RISC 1'
2055 _target_arch
='TARGET_ARCH_PA_RISC = yes'
2064 _def_arch
='#define ARCH_S390 1'
2065 _target_arch
='TARGET_ARCH_S390 = yes'
2074 _def_arch
='#define ARCH_S390X 1'
2075 _target_arch
='TARGET_ARCH_S390X = yes'
2084 _def_arch
='#define ARCH_VAX 1'
2085 _target_arch
='TARGET_ARCH_VAX = yes'
2094 _def_arch
='#define ARCH_GENERIC 1'
2095 _target_arch
='TARGET_ARCH_GENERIC = yes'
2104 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2105 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2106 die
"unsupported architecture $host_arch"
2108 esac # case "$host_arch" in
2110 if test "$_runtime_cpudetection" = yes ; then
2127 if x86
&& test "$_runtime_cpudetection" = no
; then
2129 if test "$1" = kernel_check
; then
2130 echocheck
"kernel support of $2"
2133 void catch() { exit(1); }
2135 signal(SIGILL, catch);
2136 __asm__ __volatile__ ("$3":::"memory");return(0);
2140 if cc_check
&& tmp_run
; then
2143 _optimizing
="$_optimizing $2"
2148 echo "It seems that your kernel does not correctly support $2."
2149 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
2156 extcheck
$_mmx "mmx" "emms"
2157 extcheck
$_mmxext "mmxext" "sfence"
2158 extcheck
$_3dnow "3dnow" "femms"
2159 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
2160 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
2161 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
2162 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
2164 echocheck
"mtrr support"
2165 if test "$_mtrr" = kernel_check
; then
2167 _optimizing
="$_optimizing mtrr"
2171 if test "$_gcc3_ext" != ""; then
2172 # if we had to disable sse/sse2 because the active kernel does not
2173 # support this instruction set extension, we also have to tell
2174 # gcc3 to not generate sse/sse2 instructions for normal C code
2176 int main(void) { return 0; }
2178 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
2184 echocheck
"assembler support of -pipe option"
2186 int main(void) { return 0; }
2188 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2191 echocheck
"compiler support of named assembler arguments"
2193 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2194 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2195 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2197 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2199 echores
$_named_asm_args
2202 # Checking for CFLAGS
2204 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2205 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
2206 if test "$_cc_major" -ge "3" ; then
2207 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
2210 elif test -z "$CFLAGS" ; then
2211 if test "$cc_vendor" = "intel" ; then
2212 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2213 elif test "$cc_vendor" != "gnu" ; then
2214 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2216 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2221 if test -n "$LDFLAGS" ; then
2222 _ld_extra
="$_ld_extra $LDFLAGS"
2224 elif test "$cc_vendor" = "intel" ; then
2225 _ld_extra
="$_ld_extra -i-static"
2227 if test -n "$CPPFLAGS" ; then
2228 _inc_extra
="$_inc_extra $CPPFLAGS"
2235 # Checking assembler (_as) compatibility...
2236 # Added workaround for older as that reads from stdin by default - atmos
2237 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2238 echocheck
"assembler ($_as $as_version)"
2240 _pref_as_version
='2.9.1'
2242 if test "$_mmx" = yes ; then
2243 echo 'emms' >> $TMPS
2245 if test "$_3dnow" = yes ; then
2246 _pref_as_version
='2.10.1'
2247 echo 'femms' >> $TMPS
2249 if test "$_3dnowext" = yes ; then
2250 _pref_as_version
='2.10.1'
2251 echo 'pswapd %mm0, %mm0' >> $TMPS
2253 if test "$_mmxext" = yes ; then
2254 _pref_as_version
='2.10.1'
2255 echo 'movntq %mm0, (%eax)' >> $TMPS
2257 if test "$_sse" = yes ; then
2258 _pref_as_version
='2.10.1'
2259 echo 'xorps %xmm0, %xmm0' >> $TMPS
2261 #if test "$_sse2" = yes ; then
2262 # _pref_as_version='2.11'
2263 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2265 if test "$_cmov" = yes ; then
2266 _pref_as_version
='2.10.1'
2267 echo 'cmovb %eax, %ebx' >> $TMPS
2269 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2271 if test "$as_verc_fail" != yes ; then
2274 _res_comment
="Upgrade binutils to ${_pref_as_version} ..."
2276 die
"obsolete binutils version"
2281 echocheck
".align is a power of two"
2282 if test "$_asmalign_pot" = auto
; then
2285 main() { asm (".align 3"); }
2287 cc_check
&& _asmalign_pot
=yes
2289 if test "$_asmalign_pot" = "yes" ; then
2290 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2292 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2294 echores
$_asmalign_pot
2297 #FIXME: This should happen before the check for CFLAGS..
2300 # check if altivec is supported by the compiler, and how to enable it
2302 _altivec_gcc_flags
=''
2304 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2305 echocheck
"GCC altivec support"
2313 FSF_flags
='-maltivec -mabi=altivec'
2314 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2316 # check for Darwin-style flags first, since
2317 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2318 # accepts but ignores FSF-style flags...
2320 if test -z "$p"; then
2321 cc_check
$Darwin_flags && p
='Darwin'
2323 if test -z "$p"; then
2324 cc_check
$FSF_flags && p
='FSF'
2328 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2329 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2333 if test -z "$p"; then
2336 p
="$p-style ($_altivec_gcc_flags)"
2342 # check if <altivec.h> should be included
2344 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2346 if test "$_altivec" = yes ; then
2347 echocheck
"altivec.h"
2349 #include <altivec.h>
2350 int main(void) { return 0; }
2353 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2354 if test "$_have_altivec_h" = yes ; then
2355 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2357 echores
"$_have_altivec_h"
2360 # disable runtime cpudetection if
2361 # - we cannot generate altivec code
2362 # - altivec is disabled by the user
2364 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2365 _runtime_cpudetection
=no
2368 # show that we are optimizing for altivec (if enabled and supported)
2370 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2371 _optimizing
="$_optimizing altivec"
2374 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2376 if test "$_altivec" = yes ; then
2377 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2378 #_mcpu="$_mcpu $_altivec_gcc_flags"
2379 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2382 # setup _def_altivec correctly
2384 if test "$_altivec" = yes ; then
2385 _def_altivec
='#define HAVE_ALTIVEC 1'
2387 _def_altivec
='#undef HAVE_ALTIVEC'
2392 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2393 if test $_armv5te = "auto" ; then
2396 __asm__ __volatile__ ("qadd r0, r0, r0");
2400 cc_check
&& _armv5te
=yes
2404 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2405 if test $_iwmmxt = "auto" ; then
2408 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2412 cc_check
&& _iwmmxt
=yes
2417 _def_mmx
='#undef HAVE_MMX'
2418 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2419 _def_mmxext
='#undef HAVE_MMX2'
2420 test "$_mmxext" = yes && _def_mmxext
='#define HAVE_MMX2 1'
2421 _def_3dnow
='#undef HAVE_3DNOW'
2422 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2423 _def_3dnowext
='#undef HAVE_3DNOWEX'
2424 test "$_3dnowext" = yes && _def_3dnowext
='#define HAVE_3DNOWEX 1'
2425 _def_sse
='#undef HAVE_SSE'
2426 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2427 _def_sse2
='#undef HAVE_SSE2'
2428 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2429 _def_cmov
='#undef HAVE_CMOV'
2430 test "$_cmov" = yes && _def_cmov
='#define HAVE_CMOV 1'
2431 _def_armv5te
='#undef HAVE_ARMV5TE'
2432 test "$_armv5te" = yes && _def_armv5te
='#define HAVE_ARMV5TE 1'
2433 _def_iwmmxt
='#undef HAVE_IWMMXT'
2434 test "$_iwmmxt" = yes && _def_iwmmxt
='#define HAVE_IWMMXT 1'
2436 # Checking kernel version...
2437 if x86_32
&& linux
; then
2439 kernel_version
=`uname -r 2>&1`
2440 echocheck
"$system_name kernel version"
2441 case "$kernel_version" in
2442 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2443 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2444 _k_verc_problem
=yes;;
2446 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2449 if test "$_k_verc_fail" ; then
2450 echores
"$kernel_version, fail"
2451 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2452 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2453 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2454 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2455 echo "2.2.x you must upgrade it to get SSE support!"
2456 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2458 echores
"$kernel_version, ok"
2462 if test "$_vidix_internal" = auto
; then
2464 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2465 x86
&& _vidix_internal
=yes
2466 ppc
&& linux
&& _vidix_internal
=yes
2467 alpha
&& linux
&& _vidix_internal
=yes
2468 qnx
&& _vidix_internal
=no
2469 sunos
&& _vidix_internal
=no
2470 beos
&& _vidix_internal
=no
2471 darwin
&& _vidix_internal
=no
2475 # On QNX we must link to libph - Gabucino
2477 _ld_extra
="$_ld_extra -lph"
2480 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2482 if test "$_vidix_internal" = yes ; then
2485 for _awk
in mawk gawk nawk
awk; do
2486 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2491 test "$_awk_verc_fail" = yes && _awk
=no
2493 if test "$_awk_verc_fail" = yes; then
2494 echo "VIDIX needs awk, but no working implementation was found!"
2495 echo "Try the GNU version, which can be downloaded from:"
2496 echo "ftp://ftp.gnu.org/gnu/gawk/"
2497 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2502 ######################
2503 # MAIN TESTS GO HERE #
2504 ######################
2507 echocheck
"extra headers"
2508 if test "$_inc_extra" ; then
2509 echores
"$_inc_extra"
2515 echocheck
"extra libs"
2516 if test "$_ld_extra" ; then
2517 echores
"$_ld_extra"
2524 int main(void) { return 0; }
2526 if cc_check
-lposix ; then
2527 _ld_extra
="$_ld_extra -lposix"
2535 int main(void) { return 0; }
2537 if cc_check
-lm ; then
2546 echocheck
"langinfo"
2547 if test "$_langinfo" = auto
; then
2549 #include <langinfo.h>
2550 int main(void) { nl_langinfo(CODESET); return 0; }
2553 cc_check
&& _langinfo
=yes
2555 if test "$_langinfo" = yes ; then
2556 _def_langinfo
='#define USE_LANGINFO 1'
2558 _def_langinfo
='#undef USE_LANGINFO'
2560 echores
"$_langinfo"
2563 echocheck
"language"
2564 test -z "$_language" && _language
=$LINGUAS
2565 _language
=`echo $_language | sed 's/,/ /g'`
2566 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2567 for lang
in $_language ; do
2568 test "$lang" = all
&& lang
=en
2569 if test -f "help/help_mp-${lang}.h" ; then
2573 echo ${_echo_n} "$lang not found, ${_echo_c}"
2574 _language
=`echo $_language | sed "s/$lang *//"`
2577 test -z "$_language" && _language
=en
2578 _mp_help
="help/help_mp-${_language}.h"
2579 test -f $_mp_help || die
"$_mp_help not found"
2580 for lang
in $LANGUAGES ; do
2581 if test -f "DOCS/man/$lang/mplayer.1" ; then
2582 MAN_LANG
="$lang $MAN_LANG"
2585 _doc_lang
=$_language
2586 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2587 echores
"using $_language (man pages: $MAN_LANG)"
2590 echocheck
"enable sighandler"
2591 if test "$_sighandler" = yes ; then
2592 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2594 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2596 echores
"$_sighandler"
2598 echocheck
"runtime cpudetection"
2599 if test "$_runtime_cpudetection" = yes ; then
2600 _optimizing
="Runtime CPU-Detection enabled"
2601 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2603 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2605 echores
"$_runtime_cpudetection"
2608 echocheck
"restrict keyword"
2609 for restrict_keyword
in restrict __restrict __restrict__
; do
2610 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2612 _def_restrict_keyword
=$restrict_keyword
2616 if [ -n "$_def_restrict_keyword" ]; then
2617 echores
"$_def_restrict_keyword"
2621 # Avoid infinite recursion loop ("#define restrict restrict")
2622 if [ "$_def_restrict_keyword" != "restrict" ]; then
2623 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2625 _def_restrict_keyword
=""
2629 echocheck
"__builtin_expect"
2630 # GCC branch prediction hint
2633 a = __builtin_expect (a, 10);
2634 return a == 10 ? 0 : 1;
2636 int main() { return foo(10) && foo(0); }
2639 cc_check
&& _builtin_expect
=yes
2640 if test "$_builtin_expect" = yes ; then
2641 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2643 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2645 echores
"$_builtin_expect"
2651 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2654 cc_check
-lkstat && _kstat
=yes
2655 if test "$_kstat" = yes ; then
2656 _def_kstat
="#define HAVE_LIBKSTAT 1"
2657 _ld_extra
="$_ld_extra -lkstat"
2659 _def_kstat
="#undef HAVE_LIBKSTAT"
2665 # required for nanosleep on some systems
2668 int main(void) { (void) nanosleep(0, 0); return 0; }
2671 cc_check
-lposix4 && _posix4
=yes
2672 if test "$_posix4" = yes ; then
2673 _ld_extra
="$_ld_extra -lposix4"
2680 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2683 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2684 if test "$_lrintf" = yes ; then
2685 _def_lrintf
="#define HAVE_LRINTF 1"
2687 _def_lrintf
="#undef HAVE_LRINTF"
2694 int main(void) { (void) round(0.0); return 0; }
2697 cc_check
$_ld_lm && _round
=yes
2698 if test "$_round" = yes ; then
2699 _def_round
="#define HAVE_ROUND 1"
2701 _def_round
="#undef HAVE_ROUND"
2705 echocheck
"nanosleep"
2706 # also check for nanosleep
2709 int main(void) { (void) nanosleep(0, 0); return 0; }
2712 cc_check
&& _nanosleep
=yes
2713 if test "$_nanosleep" = yes ; then
2714 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2716 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2718 echores
"$_nanosleep"
2722 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2723 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2726 #include <sys/socket.h>
2727 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2730 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2731 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2733 if test $_winsock2 = auto
&& not cygwin
; then
2736 #include <winsock2.h>
2737 int main(void) { (void) gethostbyname(0); return 0; }
2739 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2741 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2745 if test $_winsock2 = yes ; then
2747 _def_winsock2
='#define HAVE_WINSOCK2 1'
2749 _def_winsock2
='#undef HAVE_WINSOCK2'
2754 echocheck
"inet_pton()"
2756 #include <sys/types.h>
2757 #include <sys/socket.h>
2758 #include <arpa/inet.h>
2759 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2761 if test "$_winsock2" = yes ; then
2762 _res_comment
="using winsock2 functions instead"
2764 elif cc_check
$_ld_sock ; then
2765 # NOTE: Linux has libresolv but does not need it
2767 _res_comment
="using $_ld_sock"
2769 elif cc_check
$_ld_sock -lresolv ; then
2770 # NOTE: needed for SunOS at least
2771 _ld_sock
="$_ld_sock -lresolv"
2772 _res_comment
="using $_ld_sock"
2775 _res_comment
="trying inet_aton next"
2778 echocheck
"inet_aton()"
2780 #include <sys/types.h>
2781 #include <sys/socket.h>
2782 #include <arpa/inet.h>
2783 int main(void) { (void) inet_aton(0, 0); return 0; }
2786 if cc_check
$_ld_sock ; then
2787 # NOTE: Linux has libresolv but does not need it
2789 _res_comment
="using $_ld_sock"
2790 elif cc_check
$_ld_sock -lresolv ; then
2791 # NOTE: needed for SunOS at least
2792 _ld_sock
="$_ld_sock -lresolv"
2793 _res_comment
="using $_ld_sock"
2797 _res_comment
="network support disabled"
2799 echores
"$_use_aton"
2802 _def_use_aton
='#undef USE_ATON'
2803 if test "$_use_aton" = yes; then
2804 _def_use_aton
='#define USE_ATON 1'
2808 # FIXME network check
2809 if test "$_network" = yes ; then
2810 _def_network
='#define MPLAYER_NETWORK 1'
2811 _ld_extra
="$_ld_extra $_ld_sock"
2812 _inputmodules
="network $_inputmodules"
2814 _noinputmodules
="network $_noinputmodules"
2815 _def_network
='#undef MPLAYER_NETWORK'
2820 echocheck
"inttypes.h (required)"
2822 #include <inttypes.h>
2823 int main(void) { return 0; }
2826 cc_check
&& _inttypes
=yes
2827 echores
"$_inttypes"
2829 if test "$_inttypes" = no
; then
2830 echocheck
"bitypes.h (inttypes.h predecessor)"
2832 #include <sys/bitypes.h>
2833 int main(void) { return 0; }
2835 cc_check
&& _inttypes
=yes
2836 if test "$_inttypes" = yes ; then
2837 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."
2839 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2844 echocheck
"int_fastXY_t in inttypes.h"
2846 #include <inttypes.h>
2848 volatile int_fast16_t v= 0;
2852 cc_check
&& _fast_inttypes
=yes
2853 if test "$_fast_inttypes" = yes ; then
2857 _def_fast_inttypes
='
2858 typedef signed char int_fast8_t;
2859 typedef signed int int_fast16_t;
2860 typedef signed int int_fast32_t;
2861 typedef signed long long int_fast64_t;
2862 typedef unsigned char uint_fast8_t;
2863 typedef unsigned int uint_fast16_t;
2864 typedef unsigned int uint_fast32_t;
2865 typedef unsigned long long uint_fast64_t;'
2867 echores
"$_fast_inttypes"
2870 echocheck
"word size"
2871 _mp_wordsize
="#undef MP_WORDSIZE"
2874 #include <sys/types.h>
2875 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2877 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2878 echores
"$_wordsize"
2881 echocheck
"stddef.h"
2884 int main(void) { return 0; }
2887 cc_check
&& _stddef
=yes
2888 if test "$_stddef" = yes ; then
2889 _def_stddef
='#define HAVE_STDDEF_H 1'
2891 _def_stddef
='#undef HAVE_STDDEF_H'
2896 echocheck
"malloc.h"
2899 int main(void) { (void) malloc(0); return 0; }
2902 cc_check
&& _malloc
=yes
2903 if test "$_malloc" = yes ; then
2904 _def_malloc
='#define HAVE_MALLOC_H 1'
2906 _def_malloc
='#undef HAVE_MALLOC_H'
2908 # malloc.h emits a warning in FreeBSD and OpenBSD
2909 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2913 echocheck
"memalign()"
2914 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2917 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2920 cc_check
&& _memalign
=yes
2921 if test "$_memalign" = yes ; then
2922 _def_memalign
='#define HAVE_MEMALIGN 1'
2924 _def_memalign
='#undef HAVE_MEMALIGN'
2925 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2926 not darwin
&& _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2928 echores
"$_memalign"
2931 echocheck
"alloca.h"
2934 int main(void) { (void) alloca(0); return 0; }
2937 cc_check
&& _alloca
=yes
2939 _def_alloca
='#define HAVE_ALLOCA_H 1'
2941 _def_alloca
='#undef HAVE_ALLOCA_H'
2948 #include <sys/types.h>
2949 #include <sys/mman.h>
2950 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2953 cc_check
&& _mman
=yes
2954 if test "$_mman" = yes ; then
2955 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2957 _def_mman
='#undef HAVE_SYS_MMAN_H'
2962 #include <sys/types.h>
2963 #include <sys/mman.h>
2964 int main(void) { void *p = MAP_FAILED; return 0; }
2966 _mman_has_map_failed
=no
2967 cc_check
&& _mman_has_map_failed
=yes
2968 if test "$_mman_has_map_failed" = yes ; then
2969 _def_mman_has_map_failed
=''
2971 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2974 echocheck
"dynamic loader"
2977 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2980 for _ld_tmp
in "" "-ldl" ; do
2981 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
2983 if test "$_dl" = yes ; then
2984 _def_dl
='#define HAVE_LIBDL 1'
2986 _def_dl
='#undef HAVE_LIBDL'
2991 echocheck
"dynamic a/v plugins support"
2992 if test "$_dl" = no
; then
2995 if test "$_dynamic_plugins" = yes ; then
2996 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
2998 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3000 echores
"$_dynamic_plugins"
3003 #echocheck "dynamic linking"
3004 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
3005 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
3007 #int main(void) { return 0; }
3009 #if cc_check -rdynamic ; then
3010 # _ld_dl_dynamic='-rdynamic'
3011 #elif cc_check -Bdynamic ; then
3012 # _ld_dl_dynamic='-Bdynamic'
3013 #elif cc_check ; then
3016 #echores "using $_ld_dl_dynamic"
3018 _def_threads
='#undef HAVE_THREADS'
3021 if test "$_pthreads" = auto
; then
3023 #include <pthread.h>
3024 void* func(void *arg) { return arg; }
3025 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3029 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3030 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3031 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3035 if test "$_pthreads" = yes ; then
3036 _res_comment
="using $_ld_pthread"
3037 _def_pthreads
='#define HAVE_PTHREADS 1'
3038 _def_threads
='#define HAVE_THREADS 1'
3040 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3041 _def_pthreads
='#undef HAVE_PTHREADS'
3042 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3043 if not mingw32
; then
3047 echores
"$_pthreads"
3051 if test "$_rpath" = yes ; then
3052 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3053 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3060 if test "$_iconv" = auto
; then
3061 _iconv_tmp
='#include <iconv.h>'
3067 #define INBUFSIZE 1024
3068 #define OUTBUFSIZE 4096
3070 char inbuffer[INBUFSIZE];
3071 char outbuffer[OUTBUFSIZE];
3076 char *tocode="UTF-8";
3077 char *fromcode="cp1250";
3078 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3079 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3080 char *iptr=inbuffer;
3081 char *optr=outbuffer;
3082 size_t inleft=numread;
3083 size_t outleft=OUTBUFSIZE;
3084 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3086 write (1, outbuffer, OUTBUFSIZE - outleft);
3089 if (iconv_close(icdsc) == -1)
3095 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3096 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3100 if test "$_iconv" = yes ; then
3101 _def_iconv
='#define USE_ICONV 1'
3103 _def_iconv
='#undef USE_ICONV'
3108 echocheck
"sys/soundcard.h"
3110 #include <sys/soundcard.h>
3111 int main(void) { return 0; }
3114 cc_check
&& _sys_soundcard
=yes
3115 if test "$_sys_soundcard" = yes ; then
3116 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3117 _include_soundcard
='#include <sys/soundcard.h>'
3119 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3121 echores
"$_sys_soundcard"
3123 if test "$_sys_soundcard" != yes ; then
3124 echocheck
"soundcard.h"
3126 #include <soundcard.h>
3127 int main(void) { return 0; }
3130 cc_check
&& _soundcard
=yes
3131 if linux ||
test "$_ossaudio" != no
; then
3132 # use soundcard.h on Linux, or when OSS support is enabled
3133 echores
"$_soundcard"
3135 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
3136 _res_comment
= "but ignored!"
3137 echores
"$_soundcard"
3140 if test "$_soundcard" = yes ; then
3141 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3142 _include_soundcard
='#include <soundcard.h>'
3144 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3147 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3151 echocheck
"sys/dvdio.h"
3154 #include <sys/dvdio.h>
3155 int main(void) { return 0; }
3158 cc_check
&& _dvdio
=yes
3159 if test "$_dvdio" = yes ; then
3160 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3162 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3167 echocheck
"sys/cdio.h"
3170 #include <sys/cdio.h>
3171 int main(void) { return 0; }
3174 cc_check
&& _cdio
=yes
3175 if test "$_cdio" = yes ; then
3176 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3178 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3183 echocheck
"linux/cdrom.h"
3185 #include <sys/types.h>
3186 #include <linux/cdrom.h>
3187 int main(void) { return 0; }
3190 cc_check
&& _cdrom
=yes
3191 if test "$_cdrom" = yes ; then
3192 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3194 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3202 int main(void) { return 0; }
3205 cc_check
&& _dvd
=yes
3206 if test "$_dvd" = yes ; then
3207 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3209 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3215 echocheck
"BSDI dvd.h"
3218 int main(void) { return 0; }
3221 cc_check
&& _bsdi_dvd
=yes
3222 if test "$_bsdi_dvd" = yes ; then
3223 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3225 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3227 echores
"$_bsdi_dvd"
3232 # also used by AIX, but AIX does not support VCD and/or libdvdread
3233 echocheck
"HP-UX SCSI header"
3235 #include <sys/scsi.h>
3236 int main(void) { return 0; }
3239 cc_check
&& _hpux_scsi_h
=yes
3240 if test "$_hpux_scsi_h" = yes ; then
3241 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3243 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3245 echores
"$_hpux_scsi_h"
3250 echocheck
"userspace SCSI headers (Solaris)"
3252 # include <unistd.h>
3253 # include <stropts.h>
3254 # include <sys/scsi/scsi_types.h>
3255 # include <sys/scsi/impl/uscsi.h>
3256 int main(void) { return 0; }
3259 cc_check
&& _sol_scsi_h
=yes
3260 if test "$_sol_scsi_h" = yes ; then
3261 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3263 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3265 echores
"$_sol_scsi_h"
3270 if test "$_termcap" = auto
; then
3272 int main(void) { tgetent(); return 0; }
3275 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3276 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3277 && _termcap
=yes && break
3280 if test "$_termcap" = yes ; then
3281 _def_termcap
='#define USE_TERMCAP 1'
3282 _res_comment
="using $_ld_tmp"
3284 _def_termcap
='#undef USE_TERMCAP'
3290 if test "$_termios" = auto
; then
3292 #include <sys/termios.h>
3293 int main(void) { return 0; }
3296 cc_check
&& _termios
=yes
3297 _def_termios_h_name
='sys/termios.h'
3300 if test "$_termios" = auto
; then
3302 #include <termios.h>
3303 int main(void) { return 0; }
3306 cc_check
&& _termios
=yes
3307 _def_termios_h_name
='termios.h'
3310 if test "$_termios" = yes ; then
3311 _def_termios
='#define HAVE_TERMIOS 1'
3312 _def_termios_h
='#undef HAVE_TERMIOS_H'
3313 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3315 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3316 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3317 elif test "$_def_termios_h_name" = 'termios.h' ; then
3318 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3320 _res_comment
="using $_def_termios_h_name"
3322 _def_termios
='#undef HAVE_TERMIOS'
3323 _def_termios_h_name
=''
3330 if test "$_shm" = auto
; then
3332 #include <sys/types.h>
3333 #include <sys/shm.h>
3334 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3337 cc_check
&& _shm
=yes
3339 if test "$_shm" = yes ; then
3340 _def_shm
='#define HAVE_SHM 1'
3342 _def_shm
='#undef HAVE_SHM'
3347 # XXX: FIXME, add runtime checking
3348 echocheck
"linux devfs"
3349 echores
"$_linux_devfs"
3352 echocheck
"scandir()"
3354 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3357 cc_check
&& _scandir
=yes
3358 if test "$_scandir" = yes ; then
3359 _def_scandir
='#define HAVE_SCANDIR 1'
3362 _def_scandir
='#undef HAVE_SCANDIR'
3368 echocheck
"strsep()"
3371 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3374 cc_check
&& _strsep
=yes
3375 if test "$_strsep" = yes ; then
3376 _def_strsep
='#define HAVE_STRSEP 1'
3379 _def_strsep
='#undef HAVE_STRSEP'
3384 echocheck
"strlcpy()"
3387 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3390 cc_check
&& _strlcpy
=yes
3391 if test "$_strlcpy" = yes ; then
3392 _def_strlcpy
='#define HAVE_STRLCPY 1'
3395 _def_strlcpy
='#undef HAVE_STRLCPY'
3400 echocheck
"strlcat()"
3403 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3406 cc_check
&& _strlcat
=yes
3407 if test "$_strlcat" = yes ; then
3408 _def_strlcat
='#define HAVE_STRLCAT 1'
3411 _def_strlcat
='#undef HAVE_STRLCAT'
3416 echocheck
"fseeko()"
3419 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3422 cc_check
&& _fseeko
=yes
3423 if test "$_fseeko" = yes ; then
3424 _def_fseeko
='#define HAVE_FSEEKO 1'
3427 _def_fseeko
='#undef HAVE_FSEEKO'
3432 echocheck
"localtime_r()"
3435 int main( void ) { localtime_r(NULL, NULL); }
3438 cc_check
&& _localtime_r
=yes
3439 if test "$_localtime_r" = yes ; then
3440 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3442 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3444 echores
"$_localtime_r"
3446 echocheck
"vsscanf()"
3449 int main(void) { vsscanf(0, 0, 0); return 0; }
3452 cc_check
&& _vsscanf
=yes
3453 if test "$_vsscanf" = yes ; then
3454 _def_vsscanf
='#define HAVE_VSSCANF 1'
3457 _def_vsscanf
='#undef HAVE_VSSCANF'
3466 int main(void) { swab(0, 0, 0); return 0; }
3469 cc_check
&& _swab
=yes
3470 if test "$_swab" = yes ; then
3471 _def_swab
='#define HAVE_SWAB 1'
3474 _def_swab
='#undef HAVE_SWAB'
3479 echocheck
"POSIX select()"
3483 #include <sys/types.h>
3485 #include <sys/time.h>
3487 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3490 cc_check
&& _posix_select
=yes
3491 if test "$_posix_select" = no
; then
3492 _def_no_posix_select
='#define HAVE_NO_POSIX_SELECT 1'
3494 _def_no_posix_select
='#undef HAVE_NO_POSIX_SELECT'
3496 echores
"$_posix_select"
3499 echocheck
"gettimeofday()"
3502 #include <sys/time.h>
3503 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3506 cc_check
&& _gettimeofday
=yes
3507 if test "$_gettimeofday" = yes ; then
3508 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3509 _need_gettimeofday
=no
3511 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3512 _need_gettimeofday
=yes
3514 echores
"$_gettimeofday"
3521 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3524 cc_check
&& _glob
=yes
3525 if test "$_glob" = yes ; then
3526 _def_glob
='#define HAVE_GLOB 1'
3529 _def_glob
='#undef HAVE_GLOB'
3535 echocheck
"setenv()"
3538 int main (void){ setenv("","",0); return 0; }
3541 cc_check
&& _setenv
=yes
3542 if test "$_setenv" = yes ; then
3543 _def_setenv
='#define HAVE_SETENV 1'
3546 _def_setenv
='#undef HAVE_SETENV'
3553 echocheck
"sysi86()"
3555 #include <sys/sysi86.h>
3556 int main (void) { sysi86(0); return 0; }
3559 cc_check
&& _sysi86
=yes
3560 if test "$_sysi86" = yes ; then
3561 _def_sysi86
='#define HAVE_SYSI86 1'
3563 _def_sysi86
='#undef HAVE_SYSI86'
3569 echocheck
"sys/sysinfo.h"
3571 #include <sys/sysinfo.h>
3573 struct sysinfo s_info;
3579 cc_check
&& _sys_sysinfo
=yes
3580 if test "$_sys_sysinfo" = yes ; then
3581 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3583 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3585 echores
"$_sys_sysinfo"
3590 echocheck
"Mac OS X APIs"
3591 if test "$_macosx" = auto
; then
3592 productName
=`/usr/bin/sw_vers -productName`
3593 if test "$productName" = "Mac OS X" ||
3594 test "$productName" = "Mac OS X Server" ; then
3598 _def_macosx
='#undef MACOSX'
3599 _noaomodules
="macosx $_noaomodules"
3600 _novomodules
="quartz $_novomodules"
3603 if test "$_macosx" = yes ; then
3605 #include <Carbon/Carbon.h>
3606 #include <QuickTime/QuickTime.h>
3607 #include <CoreAudio/CoreAudio.h>
3611 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3614 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3615 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3616 _def_macosx
='#define MACOSX 1'
3617 _aosrc
="$_aosrc ao_macosx.c"
3618 _aomodules
="macosx $_aomodules"
3619 _vosrc
="$_vosrc vo_quartz.c"
3620 _vomodules
="quartz $_vomodules"
3623 _def_macosx
='#undef MACOSX'
3624 _noaomodules
="macosx $_noaomodules"
3625 _novomodules
="quartz $_novomodules"
3628 #include <Carbon/Carbon.h>
3629 #include <QuartzCore/CoreVideo.h>
3632 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3633 _vosrc
="$_vosrc vo_macosx.m"
3634 _vomodules
="macosx $_vomodules"
3635 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3636 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3637 _macosx_corevideo
=yes
3639 _novomodules
="macosx $_novomodules"
3640 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3641 _macosx_corevideo
=no
3646 echocheck
"Mac OS X Finder Support"
3647 if test "$_macosx_finder_support" = auto
; then
3648 _macosx_finder_support
=$_macosx
3650 if test "$_macosx_finder_support" = yes; then
3651 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3652 _macosx_finder_support
=yes
3654 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3655 _macosx_finder_support
=no
3657 echores
"$_macosx_finder_support"
3659 echocheck
"Mac OS X Bundle file locations"
3660 if test "$_macosx_bundle" = auto
; then
3661 _macosx_bundle
=$_macosx_finder_support
3663 if test "$_macosx_bundle" = yes; then
3664 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3666 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3669 echores
"$_macosx_bundle"
3674 echocheck
"pkg-config"
3675 _pkg_config
=pkg-config
3676 if `$_pkg_config --version > /dev/null 2>&1`; then
3684 echocheck
"Samba support (libsmbclient)"
3685 if test "$_smbsupport" = yes; then
3686 _ld_extra
="$_ld_extra -lsmbclient"
3688 if test "$_smbsupport" = auto
; then
3691 #include <libsmbclient.h>
3692 int main(void) { smbc_opendir("smb://"); return 0; }
3694 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3695 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3696 _smbsupport
=yes && break
3700 if test "$_smbsupport" = yes; then
3701 _def_smbsupport
="#define LIBSMBCLIENT"
3702 _inputmodules
="smb $_inputmodules"
3704 _def_smbsupport
="#undef LIBSMBCLIENT"
3705 _noinputmodules
="smb $_noinputmodules"
3707 echores
"$_smbsupport"
3716 if test "$_3dfx" = yes ; then
3717 _def_3dfx
='#define HAVE_3DFX 1'
3718 _vosrc
="$_vosrc vo_3dfx.c"
3719 _vomodules
="3dfx $_vomodules"
3721 _def_3dfx
='#undef HAVE_3DFX'
3722 _novomodules
="3dfx $_novomodules"
3728 if test "$_tdfxfb" = yes ; then
3729 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3730 _vosrc
="$_vosrc vo_tdfxfb.c"
3731 _vomodules
="tdfxfb $_vomodules"
3733 _def_tdfxfb
='#undef HAVE_TDFXFB'
3734 _novomodules
="tdfxfb $_novomodules"
3739 if test "$_s3fb" = yes ; then
3740 _def_s3fb
='#define HAVE_S3FB 1'
3741 _vosrc
="$_vosrc vo_s3fb.c"
3742 _vomodules
="s3fb $_vomodules"
3744 _def_s3fb
='#undef HAVE_S3FB'
3745 _novomodules
="s3fb $_novomodules"
3750 if test "$_tdfxvid" = yes ; then
3751 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3752 _vosrc
="$_vosrc vo_tdfx_vid.c"
3753 _vomodules
="tdfx_vid $_vomodules"
3755 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3756 _novomodules
="tdfx_vid $_novomodules"
3761 if test "$_tga" = yes ; then
3762 _def_tga
='#define HAVE_TGA 1'
3763 _vosrc
="$_vosrc vo_tga.c"
3764 _vomodules
="tga $_vomodules"
3766 _def_tga
='#undef HAVE_TGA'
3767 _novomodules
="tga $_novomodules"
3772 echocheck
"DirectFB"
3773 if test "$_directfb" = auto
; then
3776 #include <directfb.h>
3777 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3779 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3780 -I/usr
/include
/directfb
-I/usr
/local
/include
-I/usr
/include
; do
3781 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3782 _inc_extra
="$_inc_extra $_inc_tmp" && break
3787 expr $1 \
* 65536 + $2 \
* 256 + $3
3790 if test "$_directfb" = yes; then
3792 #include <directfb_version.h>
3794 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3797 if $_cc -E $TMPC $_inc_extra > "$TMPO"; then
3798 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPO" | tr -d '()'`
3799 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3800 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3801 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3802 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3803 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3804 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3805 _res_comment
="$_directfb_version"
3807 _def_directfb_version
='#undef DIRECTFBVERSION'
3809 _res_comment
="version >=0.9.13 required"
3813 _res_comment
="failed to get version"
3816 echores
"$_directfb"
3818 if test "$_directfb" = yes ; then
3819 _def_directfb
='#define HAVE_DIRECTFB 1'
3820 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3821 _vosrc
="$_vosrc vo_directfb2.c"
3822 _vomodules
="directfb $_vomodules"
3823 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3825 _novomodules
="directfb $_novomodules"
3828 if test "$_dfb_version" -ge `dfb_version 0 9 15`; then
3829 _vosrc
="$_vosrc vo_dfbmga.c"
3830 _vomodules
="dfbmga $_vomodules"
3831 _def_dfbmga
='#define HAVE_DFBMGA 1'
3833 _novomodules
="dfbmga $_novomodules"
3834 _def_dfbmga
='#undef HAVE_DFBMGA'
3837 _def_directfb
='#undef HAVE_DIRECTFB'
3838 _novomodules
="dfbmga directfb $_novomodules"
3842 echocheck
"X11 headers presence"
3843 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
3844 if test -f "$I/X11/Xlib.h" ; then
3847 _res_comment
="using $I"
3851 if test -z "$_inc_x11" ; then
3854 _res_comment
="check if the dev(el) packages are installed"
3856 echores
"$_x11_headers"
3860 if test "$_x11" != no
; then
3862 #include <X11/Xlib.h>
3863 #include <X11/Xutil.h>
3864 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3866 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3867 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3869 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3871 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3873 cc_check
$_inc_x11 $_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3874 && _x11
=yes && break
3877 if test "$_x11" = yes ; then
3878 #FIXME: This is ugly as it can duplicate a -I parameter..
3879 _inc_extra
="$_inc_extra $_inc_x11"
3880 _def_x11
='#define HAVE_X11 1'
3881 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3882 _vomodules
="x11 xover $_vomodules"
3885 _def_x11
='#undef HAVE_X11'
3886 _novomodules
="x11 $_novomodules"
3887 _res_comment
="check if the dev(el) packages are installed"
3888 # disable stuff that depends on X
3889 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _dga
=no
3897 if test "$_x11" = yes ; then
3899 #include <X11/Xmd.h>
3900 #include <X11/Xlib.h>
3901 #include <X11/Xutil.h>
3902 #include <X11/Xatom.h>
3903 #include <X11/extensions/dpms.h>
3905 (void) DPMSQueryExtension(0, 0, 0);
3908 cc_check
-lXdpms && _xdpms3
=yes
3910 #include <X11/Xlib.h>
3911 #include <X11/extensions/dpms.h>
3913 (void) DPMSQueryExtension(0, 0, 0);
3916 cc_check
&& _xdpms4
=yes
3918 if test "$_xdpms4" = yes ; then
3919 _def_xdpms
='#define HAVE_XDPMS 1'
3920 _res_comment
="using Xdpms 4"
3922 elif test "$_xdpms3" = yes ; then
3923 _def_xdpms
='#define HAVE_XDPMS 1'
3924 _libs_mplayer
="$_libs_mplayer -lXdpms"
3925 _res_comment
="using Xdpms 3"
3928 _def_xdpms
='#undef HAVE_XDPMS'
3934 if test "$_xv" = auto
; then
3936 #include <X11/Xlib.h>
3937 #include <X11/extensions/Xvlib.h>
3939 (void) XvGetPortAttribute(0, 0, 0, 0);
3940 (void) XvQueryPortAttributes(0, 0, 0);
3944 cc_check
-lXv && _xv
=yes
3947 if test "$_xv" = yes ; then
3948 _def_xv
='#define HAVE_XV 1'
3949 _libs_mplayer
="$_libs_mplayer -lXv"
3950 _vosrc
="$_vosrc vo_xv.c"
3951 _vomodules
="xv $_vomodules"
3953 _def_xv
='#undef HAVE_XV'
3954 _novomodules
="xv $_novomodules"
3960 if test "$_xv" = yes && test "$_xvmc" != no
; then
3963 #include <X11/Xlib.h>
3964 #include <X11/extensions/Xvlib.h>
3965 #include <X11/extensions/XvMClib.h>
3967 (void) XvMCQueryExtension(0,0,0);
3968 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3971 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3972 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3975 if test "$_xvmc" = yes ; then
3976 _def_xvmc
='#define HAVE_XVMC 1'
3977 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
3978 _vosrc
="$_vosrc vo_xvmc.c"
3979 _vomodules
="xvmc $_vomodules"
3980 _res_comment
="using $_xvmclib"
3982 _def_xvmc
='#undef HAVE_XVMC'
3983 _novomodules
="xvmc $_novomodules"
3988 echocheck
"Xinerama"
3989 if test "$_xinerama" = auto
; then
3991 #include <X11/Xlib.h>
3992 #include <X11/extensions/Xinerama.h>
3993 int main(void) { (void) XineramaIsActive(0); return 0; }
3996 cc_check
-lXinerama && _xinerama
=yes
3999 if test "$_xinerama" = yes ; then
4000 _def_xinerama
='#define HAVE_XINERAMA 1'
4001 _libs_mplayer
="$_libs_mplayer -lXinerama"
4003 _def_xinerama
='#undef HAVE_XINERAMA'
4005 echores
"$_xinerama"
4008 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4009 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4010 # named 'X extensions' or something similar.
4011 # This check may be useful for future mplayer versions (to change resolution)
4012 # If you run into problems, remove '-lXxf86vm'.
4014 if test "$_vm" = auto
; then
4016 #include <X11/Xlib.h>
4017 #include <X11/extensions/xf86vmode.h>
4018 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4021 cc_check
-lXxf86vm && _vm
=yes
4023 if test "$_vm" = yes ; then
4024 _def_vm
='#define HAVE_XF86VM 1'
4025 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
4027 _def_vm
='#undef HAVE_XF86VM'
4031 # Check for the presence of special keycodes, like audio control buttons
4032 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4033 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4034 # have these new keycodes.
4035 echocheck
"XF86keysym"
4036 if test "$_xf86keysym" = auto
; then
4039 #include <X11/Xlib.h>
4040 #include <X11/XF86keysym.h>
4041 int main(void) { return XF86XK_AudioPause; }
4043 cc_check
&& _xf86keysym
=yes
4045 if test "$_xf86keysym" = yes ; then
4046 _def_xf86keysym
='#define HAVE_XF86XK 1'
4048 _def_xf86keysym
='#undef HAVE_XF86XK'
4050 echores
"$_xf86keysym"
4053 # Version 2 is preferred to version 1 if available
4054 if test "$_dga" = auto
; then
4056 #include <X11/Xlib.h>
4057 #include <X11/extensions/xf86dga.h>
4058 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4061 cc_check
-lXxf86dga -lXxf86vm && _dga
=1
4064 #include <X11/Xlib.h>
4065 #include <X11/extensions/xf86dga.h>
4066 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4068 cc_check
-lXxf86dga && _dga
=2
4071 _def_dga
='#undef HAVE_DGA'
4072 _def_dga2
='#undef HAVE_DGA2'
4073 if test "$_dga" = 1 ; then
4074 _def_dga
='#define HAVE_DGA 1'
4075 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4076 _vosrc
="$_vosrc vo_dga.c"
4077 _vomodules
="dga $_vomodules"
4078 _res_comment
="using DGA 1.0"
4079 elif test "$_dga" = 2 ; then
4080 _def_dga
='#define HAVE_DGA 1'
4081 _def_dga2
='#define HAVE_DGA2 1'
4082 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4083 _vosrc
="$_vosrc vo_dga.c"
4084 _vomodules
="dga $_vomodules"
4085 _res_comment
="using DGA 2.0"
4086 elif test "$_dga" = no
; then
4087 _novomodules
="dga $_novomodules"
4089 die
"DGA version must be 1 or 2"
4095 #Note: this test is run even with --enable-gl since we autodetect linker flags
4096 if (test "$_x11" = yes || win32
&& test "$_macosx" != yes) && test "$_gl" != no
; then
4099 int main(void) { return 0; }
4102 if cc_check
-lGL $_ld_lm ; then
4104 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4105 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4107 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4108 elif cc_check
-lopengl32 ; then
4111 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4116 if test "$_gl" = yes ; then
4117 _def_gl
='#define HAVE_GL 1'
4118 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4119 if test "$_gl_win32" = yes ; then
4120 _def_gl_win32
='#define GL_WIN32 1'
4121 _vosrc
="$_vosrc w32_common.c"
4122 _res_comment
="win32 version"
4124 _vomodules
="opengl $_vomodules"
4126 _def_gl
='#undef HAVE_GL'
4127 _def_gl_win32
='#undef GL_WIN32'
4128 _novomodules
="opengl $_novomodules"
4133 echocheck
"/dev/mga_vid"
4134 if test "$_mga" = auto
; then
4136 test -c /dev
/mga_vid
&& _mga
=yes
4138 if test "$_mga" = yes ; then
4139 _def_mga
='#define HAVE_MGA 1'
4140 _vosrc
="$_vosrc vo_mga.c"
4141 _vomodules
="mga $_vomodules"
4143 _def_mga
='#undef HAVE_MGA'
4144 _novomodules
="mga $_novomodules"
4149 # echocheck "syncfb"
4151 # test "$_mga" = yes && _syncfb=yes
4152 # if test "$_syncfb" = yes ; then
4153 # _def_syncfb='#define HAVE_SYNCFB 1'
4154 # _vosrc="$_vosrc vo_syncfb.c"
4156 # _def_syncfb='#undef HAVE_SYNCFB'
4158 # echores "$_syncfb"
4162 if test "$_xmga" = auto
; then
4164 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4166 if test "$_xmga" = yes ; then
4167 _def_xmga
='#define HAVE_XMGA 1'
4168 _vosrc
="$_vosrc vo_xmga.c"
4169 _vomodules
="xmga $_vomodules"
4171 _def_xmga
='#undef HAVE_XMGA'
4172 _novomodules
="xmga $_novomodules"
4178 if test "$_ggi" = auto
; then
4180 #include <ggi/ggi.h>
4181 int main(void) { return 0; }
4184 cc_check
-lggi && _ggi
=yes
4186 if test "$_ggi" = yes ; then
4187 _def_ggi
='#define HAVE_GGI 1'
4188 _libs_mplayer
="$_libs_mplayer -lggi"
4189 _vosrc
="$_vosrc vo_ggi.c"
4190 _vomodules
="ggi $_vomodules"
4192 _def_ggi
='#undef HAVE_GGI'
4193 _novomodules
="ggi $_novomodules"
4197 echocheck
"GGI extension: libggiwmh"
4198 if test "$_ggiwmh" = auto
; then
4201 #include <ggi/ggi.h>
4202 #include <ggi/wmh.h>
4203 int main(void) { return 0; }
4205 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4207 # needed to get right output on obscure combination
4208 # like --disable-ggi --enable-ggiwmh
4209 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4210 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4211 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4214 _def_ggiwmh
='#undef HAVE_GGIWMH'
4220 if test "$_aa" = auto
; then
4223 extern struct aa_hardware_params aa_defparams;
4224 extern struct aa_renderparams aa_defrenderparams;
4228 (void) aa_init(0, 0, 0);
4229 c = aa_autoinit(&aa_defparams);
4230 p = aa_getrenderparams();
4231 aa_autoinitkbd(c,0);
4235 for _ld_tmp
in "-laa" ; do
4236 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4239 if test "$_aa" = yes ; then
4240 _def_aa
='#define HAVE_AA 1'
4242 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4244 _vosrc
="$_vosrc vo_aa.c"
4245 _vomodules
="aa $_vomodules"
4247 _def_aa
='#undef HAVE_AA'
4248 _novomodules
="aa $_novomodules"
4254 if test "$_caca" = auto
; then
4256 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4259 #ifdef CACA_API_VERSION_1
4262 int main(void) { (void) caca_init(); return 0; }
4264 cc_check
`caca-config --libs` && _caca
=yes
4267 if test "$_caca" = yes ; then
4268 _def_caca
='#define HAVE_CACA 1'
4269 _inc_extra
="$_inc_extra `caca-config --cflags`"
4270 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4271 _vosrc
="$_vosrc vo_caca.c"
4272 _vomodules
="caca $_vomodules"
4274 _def_caca
='#undef HAVE_CACA'
4275 _novomodules
="caca $_novomodules"
4281 if test "$_svga" = auto
; then
4284 int main(void) { return 0; }
4287 cc_check
-lvga $_ld_lm && _svga
=yes
4289 if test "$_svga" = yes ; then
4290 _def_svga
='#define HAVE_SVGALIB 1'
4291 _libs_mplayer
="$_libs_mplayer -lvga"
4292 _vosrc
="$_vosrc vo_svga.c"
4293 _vomodules
="svga $_vomodules"
4295 _def_svga
='#undef HAVE_SVGALIB'
4296 _novomodules
="svga $_novomodules"
4302 if test "$_fbdev" = auto
; then
4304 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
4306 if test "$_fbdev" = yes ; then
4307 _def_fbdev
='#define HAVE_FBDEV 1'
4308 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4309 _vomodules
="fbdev $_vomodules"
4311 _def_fbdev
='#undef HAVE_FBDEV'
4312 _novomodules
="fbdev $_novomodules"
4319 if test "$_dvb" = auto
; then
4322 #include <sys/poll.h>
4323 #include <sys/ioctl.h>
4328 #include <ost/dmx.h>
4329 #include <ost/frontend.h>
4330 #include <ost/sec.h>
4331 #include <ost/video.h>
4332 #include <ost/audio.h>
4333 int main(void) {return 0;}
4335 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4336 cc_check
$_inc_tmp && _dvb
=yes && \
4337 _inc_extra
="$_inc_extra $_inc_tmp" && break
4341 if test "$_dvb" = yes ; then
4342 _def_dvb
='#define HAVE_DVB 1'
4343 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4344 _aomodules
="mpegpes(dvb) $_aomodules"
4345 _vomodules
="mpegpes(dvb) $_vomodules"
4348 echocheck
"DVB HEAD"
4349 if test "$_dvbhead" = auto
; then
4353 #include <sys/poll.h>
4354 #include <sys/ioctl.h>
4359 #include <linux/dvb/dmx.h>
4360 #include <linux/dvb/frontend.h>
4361 #include <linux/dvb/video.h>
4362 #include <linux/dvb/audio.h>
4363 int main(void) {return 0;}
4365 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4366 cc_check
$_inc_tmp && _dvbhead
=yes && \
4367 _inc_extra
="$_inc_extra $_inc_tmp" && break
4371 if test "$_dvbhead" = yes ; then
4372 _def_dvb
='#define HAVE_DVB_HEAD 1'
4373 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4374 _aomodules
="mpegpes(dvb) $_aomodules"
4375 _vomodules
="mpegpes(dvb) $_vomodules"
4378 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4379 _def_dvb
='#undef HAVE_DVB'
4380 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4381 _aomodules
="mpegpes(file) $_aomodules"
4382 _vomodules
="mpegpes(file) $_vomodules"
4385 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4387 _inputmodules
="dvb $_inputmodules"
4390 _noinputmodules
="dvb $_noinputmodules"
4393 echocheck
"PNG support"
4394 if test "$_png" = auto
; then
4397 # Don't check for -lpng on irix since it has its own libpng
4398 # incompatible with the GNU libpng
4399 _res_comment
="disabled on irix (not GNU libpng)"
4405 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4406 printf("libpng: %s\n", png_libpng_ver);
4407 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4410 if cc_check
-lpng -lz $_ld_lm ; then
4414 _res_comment
="mismatch of library and header versions"
4420 if test "$_png" = yes ; then
4421 _def_png
='#define HAVE_PNG 1'
4422 _ld_extra
="$_ld_extra -lpng -lz"
4423 _vosrc
="$_vosrc vo_png.c"
4424 _vomodules
="png $_vomodules"
4426 _def_png
='#undef HAVE_PNG'
4427 _novomodules
="png $_novomodules"
4430 echocheck
"JPEG support"
4431 if test "$_jpeg" = auto
; then
4438 #include <jpeglib.h>
4443 if cc_check
-ljpeg $_ld_lm ; then
4451 if test "$_jpeg" = yes ; then
4452 _def_jpeg
='#define HAVE_JPEG 1'
4453 _vosrc
="$_vosrc vo_jpeg.c"
4454 _vomodules
="jpeg $_vomodules"
4455 _ld_extra
="$_ld_extra -ljpeg"
4457 _def_jpeg
='#undef HAVE_JPEG'
4458 _novomodules
="jpeg $_novomodules"
4463 echocheck
"PNM support"
4464 if test "$_pnm" = yes; then
4465 _def_pnm
="#define HAVE_PNM"
4466 _vosrc
="$_vosrc vo_pnm.c"
4467 _vomodules
="pnm $_vomodules"
4469 _def_pnm
="#undef HAVE_PNM"
4470 _novomodules
="pnm $_novomodules"
4476 echocheck
"GIF support"
4477 # This is to appease people who want to force gif support.
4478 # If it is forced to yes, then we still do checks to determine
4479 # which gif library to use.
4480 if test "$_gif" = yes ; then
4485 if test "$_gif" = auto
; then
4488 #include <gif_lib.h>
4493 for _ld_gif
in "-lungif" "-lgif" ; do
4494 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4498 # If no library was found, and the user wants support forced,
4499 # then we force it on with libgif, as this is the safest
4500 # assumption IMHO. (libungif & libregif both create symbolic
4501 # links to libgif. We also assume that no x11 support is needed,
4502 # because if you are forcing this, then you _should_ know what
4503 # you are doing. [ Besides, package maintainers should never
4504 # have compiled x11 deps into libungif in the first place. ] )
4507 if test "$_force_gif" = yes && test "$_gif" = no
; then
4512 if test "$_gif" = yes ; then
4513 _def_gif
='#define HAVE_GIF 1'
4514 _vosrc
="$_vosrc vo_gif89a.c"
4515 _codecmodules
="gif $_codecmodules"
4516 _vomodules
="gif89a $_vomodules"
4517 _res_comment
="old version, some encoding functions disabled"
4518 _def_gif_4
='#undef HAVE_GIF_4'
4519 _ld_extra
="$_ld_extra $_ld_gif"
4523 #include <gif_lib.h>
4524 void catch() { exit(1); }
4526 signal(SIGSEGV, catch); // catch segfault
4527 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4528 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4532 if cc_check
"$_ld_gif" && tmp_run
; then
4533 _def_gif_4
='#define HAVE_GIF_4 1'
4537 _def_gif
='#undef HAVE_GIF'
4538 _def_gif_4
='#undef HAVE_GIF_4'
4539 _novomodules
="gif89a $_novomodules"
4540 _nocodecmodules
="gif $_nocodecmodules"
4545 case "$_gif" in yes*)
4546 echocheck
"broken giflib workaround"
4547 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4550 #include <gif_lib.h>
4553 printf("UserData is at address %p\n", gif.UserData);
4557 if cc_check
"$_ld_gif" && tmp_run
; then
4558 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4567 echocheck
"VESA support"
4568 if test "$_vesa" = auto
; then
4571 int main(void) { vbeVersion(); return 0; }
4574 cc_check
-lvbe -llrmi && _vesa
=yes
4576 if test "$_vesa" = yes ; then
4577 _def_vesa
='#define HAVE_VESA 1'
4578 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4579 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4580 _vomodules
="vesa $_vomodules"
4582 _def_vesa
='#undef HAVE_VESA'
4583 _novomodules
="vesa $_novomodules"
4593 if test -z "$_sdlconfig" ; then
4594 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4595 _sdlconfig
="sdl-config"
4596 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4597 _sdlconfig
="sdl11-config"
4602 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4605 int main(int argc, char *argv[]) { return 0; }
4608 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4609 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4610 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4611 if test "$_sdlversion" -gt 116 ; then
4612 if test "$_sdlversion" -lt 121 ; then
4613 _def_sdlbuggy
='#define BUGGY_SDL'
4615 _def_sdlbuggy
='#undef BUGGY_SDL'
4622 if test "$_sdl" = yes ; then
4623 _def_sdl
='#define HAVE_SDL 1'
4625 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4626 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4628 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4629 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4631 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4632 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4634 _vosrc
="$_vosrc vo_sdl.c"
4635 _vomodules
="sdl $_vomodules"
4636 _aosrc
="$_aosrc ao_sdl.c"
4637 _aomodules
="sdl $_aomodules"
4638 _res_comment
="using $_sdlconfig"
4640 _def_sdl
='#undef HAVE_SDL'
4641 _novomodules
="sdl $_novomodules"
4642 _noaomodules
="sdl $_noaomodules"
4649 echocheck
"Windows waveout"
4650 if test "$_win32waveout" = auto
; then
4652 #include <windows.h>
4653 #include <mmsystem.h>
4654 int main(void) { return 0; }
4657 cc_check
-lwinmm && _win32waveout
=yes
4659 if test "$_win32waveout" = yes ; then
4660 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4661 _libs_mplayer
="$_libs_mplayer -lwinmm"
4662 _aosrc
="$_aosrc ao_win32.c"
4663 _aomodules
="win32 $_aomodules"
4665 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4666 _noaomodules
="win32 $_noaomodules"
4668 echores
"$_win32waveout"
4671 if test "$_directx" = auto
; then
4673 #include <windows.h>
4676 int main(void) { return 0; }
4679 cc_check
-lgdi32 && _directx
=yes
4681 if test "$_directx" = yes ; then
4682 _def_directx
='#define HAVE_DIRECTX 1'
4683 _libs_mplayer
="$_libs_mplayer -lgdi32"
4684 _vosrc
="$_vosrc vo_directx.c"
4685 _vomodules
="directx $_vomodules"
4686 _aosrc
="$_aosrc ao_dsound.c"
4687 _aomodules
="dsound $_aomodules"
4689 _def_directx
='#undef HAVE_DIRECTX'
4690 _novomodules
="directx $_novomodules"
4691 _noaomodules
="dsound $_noaomodules"
4699 if test "$_nas" = auto
; then
4701 #include <audio/audiolib.h>
4702 int main(void) { return 0; }
4705 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4707 if test "$_nas" = yes ; then
4708 _def_nas
='#define HAVE_NAS 1'
4709 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4710 _aosrc
="$_aosrc ao_nas.c"
4711 _aomodules
="nas $_aomodules"
4713 _noaomodules
="nas $_noaomodules"
4714 _def_nas
='#undef HAVE_NAS'
4719 if test "$_dxr2" = auto
; then
4722 #include <dxr2ioctl.h>
4723 int main(void) { return 0; }
4725 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4726 cc_check
$_inc_tmp && _dxr2
=yes && \
4727 _inc_extra
="$_inc_extra $_inc_tmp" && break
4730 if test "$_dxr2" = yes; then
4731 _def_dxr2
='#define HAVE_DXR2 1'
4732 _vosrc
="$_vosrc vo_dxr2.c"
4733 _aosrc
="$_aosrc ao_dxr2.c"
4734 _aomodules
="dxr2 $_aomodules"
4735 _vomodules
="dxr2 $_vomodules"
4737 _def_dxr2
='#undef HAVE_DXR2'
4738 _noaomodules
="dxr2 $_noaomodules"
4739 _novomodules
="dxr2 $_novomodules"
4744 if test "$_dxr3" = auto
; then
4746 #include <linux/em8300.h>
4747 int main(void) { return 0; }
4750 cc_check
&& _dxr3
=yes
4752 if test "$_dxr3" = yes ; then
4753 _def_dxr3
='#define HAVE_DXR3 1'
4754 _vosrc
="$_vosrc vo_dxr3.c"
4755 _vomodules
="dxr3 $_vomodules"
4757 _def_dxr3
='#undef HAVE_DXR3'
4758 _novomodules
="dxr3 $_novomodules"
4763 echocheck
"IVTV TV-Out"
4764 if test "$_ivtv" = auto
; then
4767 #include <inttypes.h>
4768 #include <linux/types.h>
4769 #include <linux/videodev2.h>
4770 #include <linux/ivtv.h>
4771 int main(void) { return 0; }
4774 cc_check
&& _ivtv
=yes
4776 if test "$_ivtv" = yes ; then
4777 _def_ivtv
='#define HAVE_IVTV 1'
4778 _vosrc
="$_vosrc vo_ivtv.c"
4779 _vomodules
="ivtv $_vomodules"
4780 _aosrc
="$_aosrc ao_ivtv.c"
4781 _aomodules
="ivtv $_aomodules"
4783 _def_ivtv
='#undef HAVE_IVTV'
4784 _novomodules
="ivtv $_novomodules"
4785 _noaomodules
="ivtv $_noaomodules"
4796 echocheck
"OSS Audio"
4797 if test "$_ossaudio" = auto
; then
4799 #include <sys/ioctl.h>
4801 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4804 cc_check
&& _ossaudio
=yes
4806 if test "$_ossaudio" = yes ; then
4807 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4808 _aosrc
="$_aosrc ao_oss.c"
4809 _aomodules
="oss $_aomodules"
4810 if test "$_linux_devfs" = yes; then
4811 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4812 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4815 #include <sys/ioctl.h>
4817 #ifdef OPEN_SOUND_SYSTEM
4818 int main(void) { return 0; }
4820 #error Not the real thing
4824 cc_check
&& _real_ossaudio
=yes
4825 if test "$_real_ossaudio" = yes; then
4826 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4827 elif netbsd || openbsd
; then
4828 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4829 _ld_extra
="$_ld_extra -lossaudio"
4831 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4833 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4836 _def_ossaudio
='#undef USE_OSS_AUDIO'
4837 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4838 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4839 _noaomodules
="oss $_noaomodules"
4841 echores
"$_ossaudio"
4845 if test "$_arts" = auto
; then
4847 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4851 int main(void) { return 0; }
4853 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4858 if test "$_arts" = yes ; then
4859 _def_arts
='#define USE_ARTS 1'
4860 _aosrc
="$_aosrc ao_arts.c"
4861 _aomodules
="arts $_aomodules"
4862 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
4863 _inc_extra
="$_inc_extra `artsc-config --cflags`"
4865 _noaomodules
="arts $_noaomodules"
4871 if test "$_esd" = auto
; then
4873 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4877 int main(void) { return 0; }
4879 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
4885 if test "$_esd" = yes ; then
4886 _def_esd
='#define USE_ESD 1'
4887 _aosrc
="$_aosrc ao_esd.c"
4888 _aomodules
="esd $_aomodules"
4889 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
4890 _inc_extra
="$_inc_extra `esd-config --cflags`"
4892 echocheck
"esd_get_latency()"
4895 int main(void) { return esd_get_latency(0); }
4897 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4898 echores
"$_esd_latency"
4900 _def_esd
='#undef USE_ESD'
4901 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4902 _noaomodules
="esd $_noaomodules"
4906 if test "$_polyp" = auto
; then
4908 if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
4911 #include <polyp/polyplib.h>
4912 #include <polyp/mainloop.h>
4913 #include <polyp/polyplib-error.h>
4914 int main(void) { return 0; }
4916 cc_check
`$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
4922 if test "$_polyp" = yes ; then
4923 _def_polyp
='#define USE_POLYP 1'
4924 _aosrc
="$_aosrc ao_polyp.c"
4925 _aomodules
="polyp $_aomodules"
4926 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`"
4927 _inc_extra
="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
4929 _def_polyp
='#undef USE_POLYP'
4930 _noaomodules
="polyp $_noaomodules"
4935 if test "$_jack" = auto
; then
4939 #include <jack/jack.h>
4940 int main(void) { jack_client_new("test"); return 0; }
4942 if cc_check
-ljack ; then
4943 _libs_mplayer
="$_libs_mplayer -ljack"
4944 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
4945 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
4946 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
4952 if test "$_jack" = yes ; then
4953 _def_jack
='#define USE_JACK 1'
4954 _aosrc
="$_aosrc ao_jack.c"
4955 _aomodules
="jack $_aomodules"
4957 _noaomodules
="jack $_noaomodules"
4962 if test "$_openal" = auto
; then
4966 #include <OpenAL/al.h>
4971 alSourceQueueBuffers(0, 0, 0);
4972 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
4976 for I
in "-lopenal" "-framework OpenAL" ; do
4977 cc_check
$I && _openal
=yes && break
4978 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
4980 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
4982 if test "$_openal" = yes ; then
4983 _def_openal
='#define USE_OPENAL 1'
4984 _aosrc
="$_aosrc ao_openal.c"
4985 _aomodules
="openal $_aomodules"
4987 _noaomodules
="openal $_noaomodules"
4991 echocheck
"ALSA audio"
4992 if test "$_alsa" != no
; then
4995 #include <sys/asoundlib.h>
4996 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
4997 #error "alsa version != 0.5.x"
4999 int main(void) { return 0; }
5001 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5004 #include <sys/asoundlib.h>
5005 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5006 #error "alsa version != 0.9.x"
5008 int main(void) { return 0; }
5010 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5012 #include <alsa/asoundlib.h>
5013 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5014 #error "alsa version != 0.9.x"
5016 int main(void) { return 0; }
5018 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5021 #include <sys/asoundlib.h>
5022 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5023 #error "alsa version != 1.0.x"
5025 int main(void) { return 0; }
5027 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5029 #include <alsa/asoundlib.h>
5030 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5031 #error "alsa version != 1.0.x"
5033 int main(void) { return 0; }
5035 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5037 _def_alsa5
='#undef HAVE_ALSA5'
5038 _def_alsa9
='#undef HAVE_ALSA9'
5039 _def_alsa1x
='#undef HAVE_ALSA1X'
5040 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5041 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5042 if test "$_alsaver" ; then
5044 if test "$_alsaver" = '0.5.x' ; then
5046 _aosrc
="$_aosrc ao_alsa5.c"
5047 _aomodules
="alsa5 $_aomodules"
5048 _def_alsa5
='#define HAVE_ALSA5 1'
5049 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5050 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5051 elif test "$_alsaver" = '0.9.x-sys' ; then
5053 _aosrc
="$_aosrc ao_alsa.c"
5054 _aomodules
="alsa $_aomodules"
5055 _def_alsa9
='#define HAVE_ALSA9 1'
5056 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5057 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5058 elif test "$_alsaver" = '0.9.x-alsa' ; then
5060 _aosrc
="$_aosrc ao_alsa.c"
5061 _aomodules
="alsa $_aomodules"
5062 _def_alsa9
='#define HAVE_ALSA9 1'
5063 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5064 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5065 elif test "$_alsaver" = '1.0.x-sys' ; then
5067 _aosrc
="$_aosrc ao_alsa.c"
5068 _aomodules
="alsa $_aomodules"
5069 _def_alsa1x
="#define HAVE_ALSA1X 1"
5070 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5071 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5072 elif test "$_alsaver" = '1.0.x-alsa' ; then
5074 _aosrc
="$_aosrc ao_alsa.c"
5075 _aomodules
="alsa $_aomodules"
5076 _def_alsa1x
="#define HAVE_ALSA1X 1"
5077 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5078 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5081 _res_comment
="unknown version"
5083 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5085 _noaomodules
="alsa $_noaomodules"
5090 echocheck
"Sun audio"
5091 if test "$_sunaudio" = auto
; then
5093 #include <sys/types.h>
5094 #include <sys/audioio.h>
5095 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5098 cc_check
&& _sunaudio
=yes
5100 if test "$_sunaudio" = yes ; then
5101 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5102 _aosrc
="$_aosrc ao_sun.c"
5103 _aomodules
="sun $_aomodules"
5105 _def_sunaudio
='#undef USE_SUN_AUDIO'
5106 _noaomodules
="sun $_noaomodules"
5108 echores
"$_sunaudio"
5112 echocheck
"Sun mediaLib"
5113 if test "$_mlib" = auto
; then
5117 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5119 cc_check
-lmlib && _mlib
=yes
5121 if test "$_mlib" = yes ; then
5122 _def_mlib
='#define HAVE_MLIB 1'
5124 _def_mlib
='#undef HAVE_MLIB'
5131 echocheck
"SGI audio"
5132 if test "$_sgiaudio" = auto
; then
5133 # check for SGI audio
5135 #include <dmedia/audio.h>
5136 int main(void) { return 0; }
5139 cc_check
&& _sgiaudio
=yes
5141 if test "$_sgiaudio" = "yes" ; then
5142 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5143 _libs_mplayer
="$_libs_mplayer -laudio"
5144 _aosrc
="$_aosrc ao_sgi.c"
5145 _aomodules
="sgi $_aomodules"
5147 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5148 _noaomodules
="sgi $_noaomodules"
5150 echores
"$_sgiaudio"
5154 echocheck
"VCD support"
5155 if linux || bsdos || freebsd || netbsd || sunos || darwin
; then
5156 _inputmodules
="vcd $_inputmodules"
5157 _def_vcd
='#define HAVE_VCD 1'
5160 _def_vcd
='#undef HAVE_VCD'
5161 _noinputmodules
="vcd $_noinputmodules"
5162 _res_comment
="not supported on this OS"
5167 echocheck
"DVD support (libdvdnav)"
5168 if test "$_dvdnav" = auto
; then
5169 $_dvdnavconfig --version >> $TMPLOG 2>&1 || _dvdnav
=no
5171 if test "$_dvdnav" = auto
; then
5174 int main(void) { dvdnav_t *dvd=0; return 0; }
5177 _dvdnavdir
=`$_dvdnavconfig --cflags`
5178 _dvdnavlibs
=`$_dvdnavconfig --libs`
5179 _dvdnavvsn
=`$_dvdnavconfig --version | sed "s/\.//g"`
5180 _dvdnavmajor
=`echo $_dvdnavvsn | cut -d. -f2`
5181 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
5182 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
5184 if test "$_dvdnav" = yes ; then
5186 _def_dvdnav
='#define USE_DVDNAV 1'
5187 _ld_extra
="$_ld_extra `$_dvdnavconfig --libs`"
5188 _dvdnav_version
=`$_dvdnavconfig --version | sed "s/\.//g"`
5189 _def_dvdnav_version
="#define DVDNAVVERSION $_dvdnav_version"
5190 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
5191 _inputmodules
="dvdnav $_inputmodules"
5193 #disable dvdread checks: dvdread will be enabled using dvdnav's version of dvdread
5194 _dvdread_internal
=no
5197 _def_dvdnav
='#undef USE_DVDNAV'
5198 _noinputmodules
="dvdnav $_noinputmodules"
5204 if test "$_dvdread_internal" = auto
; then
5205 _dvdread_internal
=no
5206 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5207 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5208 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5209 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5210 _dvdread_internal
=yes
5212 _res_comment
="internal"
5214 elif test "$_dvdread" = auto
; then
5216 if test "$_dl" = yes; then
5218 #include <inttypes.h>
5219 #include <dvdread/dvd_reader.h>
5220 #include <dvdread/ifo_types.h>
5221 #include <dvdread/ifo_read.h>
5222 #include <dvdread/nav_read.h>
5223 int main(void) { return 0; }
5225 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5226 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5230 if test "$_dvdread_internal" = yes; then
5231 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5232 _def_dvdread
='#define USE_DVDREAD 1'
5233 _inputmodules
="dvdread $_inputmodules"
5235 elif test "$_dvdread" = yes; then
5236 _def_dvdread
='#define USE_DVDREAD 1'
5237 _inputmodules
="dvdread $_inputmodules"
5239 test "$_dvdnav" != yes && _ld_extra
="$_ld_extra -ldvdread"
5241 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5242 _def_dvdread
='#undef USE_DVDREAD'
5243 _noinputmodules
="dvdread $_noinputmodules"
5248 echocheck
"internal libdvdcss"
5249 if test "$_libdvdcss_internal" = auto
; then
5250 _libdvdcss_internal
=no
5251 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5253 if test "$_libdvdcss_internal" = yes ; then
5254 if linux || netbsd || openbsd || bsdos
; then
5255 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5256 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5258 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5260 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5261 _ld_extra
="$_ld_extra -framework IOKit"
5263 _inputmodules
="libdvdcss $_inputmodules"
5265 _noinputmodules
="libdvdcss $_noinputmodules"
5267 echores
"$_libdvdcss_internal"
5270 echocheck
"cdparanoia"
5271 if test "$_cdparanoia" = auto
; then
5273 #include <cdda_interface.h>
5274 #include <cdda_paranoia.h>
5275 // This need a better test. How ?
5277 void *test = cdda_verbose_set;
5278 return test == (void *)1;
5282 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5283 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5284 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5287 if test "$_cdparanoia" = yes ; then
5289 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5290 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5292 echores
"$_cdparanoia"
5296 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5299 #include <cdio/version.h>
5300 #include <cdio/cdda.h>
5301 #include <cdio/paranoia.h>
5304 void *test = cdda_verbose_set;
5305 printf("%s\n", CDIO_VERSION);
5306 return test == (void *)1;
5311 for _ld_tmp
in "" "-lwinmm" ; do
5312 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5313 cc_check
$_ld_tmp $_ld_lm \
5314 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5316 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5317 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5318 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5319 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5320 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5323 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5325 _def_libcdio
='#define HAVE_LIBCDIO'
5326 _def_havelibcdio
='yes'
5328 if test "$_cdparanoia" = yes ; then
5329 _res_comment
="using cdparanoia"
5331 _def_libcdio
='#undef HAVE_LIBCDIO'
5332 _def_havelibcdio
='no'
5336 if test "$_cdda" = yes ; then
5337 test $_cddb = auto
&& test $_network = yes && not darwin
&& _cddb
=yes
5338 _def_cdparanoia
='#define HAVE_CDDA'
5339 _inputmodules
="cdda $_inputmodules"
5341 _def_cdparanoia
='#undef HAVE_CDDA'
5342 _noinputmodules
="cdda $_noinputmodules"
5345 if test "$_cddb" = yes ; then
5346 _def_cddb
='#define HAVE_CDDB'
5347 _inputmodules
="cddb $_inputmodules"
5350 _def_cddb
='#undef HAVE_CDDB'
5351 _noinputmodules
="cddb $_noinputmodules"
5354 echocheck
"bitmap font support"
5355 if test "$_bitmap_font" = yes ; then
5356 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5358 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5360 echores
"$_bitmap_font"
5363 echocheck
"freetype >= 2.0.9"
5365 # freetype depends on iconv
5366 if test "$_iconv" = no
; then
5368 _res_comment
="iconv support needed"
5371 if test "$_freetype" = auto
; then
5372 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5375 #include <ft2build.h>
5376 #include FT_FREETYPE_H
5377 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5378 #error "Need FreeType 2.0.9 or newer"
5383 FT_Int major=-1,minor=-1,patch=-1;
5384 int err=FT_Init_FreeType(&library);
5386 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5389 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5390 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5391 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5392 (int)major,(int)minor,(int)patch );
5393 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5394 printf("Library and header version mismatch! Fix it in your distribution!\n");
5401 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5406 if test "$_freetype" = yes ; then
5407 _def_freetype
='#define HAVE_FREETYPE'
5408 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5409 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5411 _def_freetype
='#undef HAVE_FREETYPE'
5413 echores
"$_freetype"
5415 if test "$_freetype" = no
; then
5417 _res_comment
="freetype support needed"
5419 echocheck
"fontconfig"
5420 if test "$_fontconfig" = auto
; then
5423 #include <fontconfig/fontconfig.h>
5428 printf("Couldn't initialize fontconfig lib\n");
5436 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5437 _ld_tmp
="-lfontconfig $_ld_tmp"
5438 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5440 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5441 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5442 _ld_tmp
=`$_pkg_config --libs fontconfig`
5443 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5444 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5447 if test "$_fontconfig" = yes ; then
5448 _def_fontconfig
='#define HAVE_FONTCONFIG'
5450 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5452 echores
"$_fontconfig"
5455 echocheck
"SSA/ASS support"
5456 # libass depends on FreeType
5457 if test "$_freetype" = no
; then
5459 _res_comment
="FreeType support needed"
5462 if test "$_ass" = auto
; then
5464 #include <ft2build.h>
5465 #include FT_FREETYPE_H
5466 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5467 #error "Need FreeType 2.1.8 or newer"
5469 int main() { return 0; }
5472 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5473 if test "$_ass" = no
; then
5474 _res_comment
="FreeType >= 2.1.8 needed"
5477 if test "$_ass" = yes ; then
5478 _def_ass
='#define USE_ASS'
5480 _def_ass
='#undef USE_ASS'
5485 echocheck
"fribidi with charsets"
5486 if test "$_fribidi" = auto
; then
5487 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5490 /* workaround for fribidi 0.10.4 and below */
5491 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5492 #include <fribidi/fribidi.h>
5495 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5496 printf("Fribidi headers are not consistents with the library!\n");
5503 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5508 if test "$_fribidi" = yes ; then
5509 _def_fribidi
='#define USE_FRIBIDI'
5510 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5511 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5513 _def_fribidi
='#undef USE_FRIBIDI'
5519 if test "$_enca" = auto
; then
5526 langs = enca_get_languages(&langcnt);
5531 cc_check
-lenca $_ld_lm && _enca
=yes
5533 if test "$_enca" = yes ; then
5534 _def_enca
='#define HAVE_ENCA 1'
5535 _ld_extra
="$_ld_extra -lenca"
5537 _def_enca
='#undef HAVE_ENCA'
5545 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5548 cc_check
-lz && _zlib
=yes
5549 if test "$_zlib" = yes ; then
5550 _def_zlib
='#define HAVE_ZLIB 1'
5551 _ld_extra
="$_ld_extra -lz"
5553 _def_zlib
='#undef HAVE_ZLIB'
5559 if test "$_rtc" = auto
; then
5561 #include <sys/ioctl.h>
5563 #include <linux/rtc.h>
5566 #define RTC_PIE_ON RTCIO_PIE_ON
5568 int main(void) { return RTC_PIE_ON; }
5571 cc_check
&& _rtc
=yes
5574 if test "$_rtc" = yes ; then
5575 _def_rtc
='#define HAVE_RTC 1'
5577 _def_rtc
='#undef HAVE_RTC'
5582 echocheck
"liblzo2 support"
5583 if test "$_liblzo" = auto
; then
5586 #include <lzo/lzo1x.h>
5587 int main(void) { lzo_init();return 0; }
5589 cc_check
-llzo2 && _liblzo
=yes
5591 if test "$_liblzo" = yes ; then
5592 _def_liblzo
='#define USE_LIBLZO 1'
5593 _ld_extra
="$_ld_extra -llzo2"
5594 _codecmodules
="liblzo $_codecmodules"
5596 _def_liblzo
='#undef USE_LIBLZO'
5597 _nocodecmodules
="liblzo $_nocodecmodules"
5602 echocheck
"mad support"
5603 if test "$_mad" = auto
; then
5607 int main(void) { return 0; }
5609 cc_check
-lmad && _mad
=yes
5611 if test "$_mad" = yes ; then
5612 _def_mad
='#define USE_LIBMAD 1'
5613 _ld_extra
="$_ld_extra -lmad"
5614 _codecmodules
="libmad $_codecmodules"
5616 _def_mad
='#undef USE_LIBMAD'
5617 _nocodecmodules
="libmad $_nocodecmodules"
5622 if test "$_twolame" = auto
; then
5624 #include <twolame.h>
5625 int main(void) { twolame_init(); return 0; }
5628 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5630 if test "$_twolame" = yes ; then
5631 _def_twolame
='#define HAVE_TWOLAME 1'
5632 _libs_mencoder
="$_libs_mencoder -ltwolame"
5633 _codecmodules
="twolame $_codecmodules"
5635 _def_twolame
='#undef HAVE_TWOLAME'
5636 _nocodecmodules
="twolame $_nocodecmodules"
5641 if test "$_toolame" = auto
; then
5643 if test "$_twolame" = yes ; then
5644 _res_comment
="disabled by twolame"
5647 #include <toolame.h>
5648 int main(void) { toolame_init(); return 0; }
5650 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5653 if test "$_toolame" = yes ; then
5654 _def_toolame
='#define HAVE_TOOLAME 1'
5655 _libs_mencoder
="$_libs_mencoder -ltoolame"
5656 _codecmodules
="toolame $_codecmodules"
5658 _def_toolame
='#undef HAVE_TOOLAME'
5659 _nocodecmodules
="toolame $_nocodecmodules"
5661 if test "$_toolamedir" ; then
5662 _res_comment
="using $_toolamedir"
5666 echocheck
"OggVorbis support"
5667 if test "$_tremor_internal" = yes; then
5669 elif test "$_tremor_external" = auto
; then
5672 #include <tremor/ivorbiscodec.h>
5673 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5675 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5677 if test "$_libvorbis" = auto
; then
5680 #include <vorbis/codec.h>
5681 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5683 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5685 if test "$_tremor_internal" = yes ; then
5687 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5688 _def_tremor
='#define TREMOR 1'
5689 _codecmodules
="tremor(internal) $_codecmodules"
5690 _res_comment
="internal Tremor"
5691 if test "$_tremor_low" = yes ; then
5692 _tremor_flags
='-D_LOW_ACCURACY_'
5693 _res_comment
="internal low accuracy Tremor"
5695 elif test "$_tremor_external" = yes ; then
5697 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5698 _def_tremor
='#define TREMOR 1'
5699 _codecmodules
="tremor(external) $_codecmodules"
5700 _res_comment
="external Tremor"
5701 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5702 elif test "$_libvorbis" = yes ; then
5704 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5705 _codecmodules
="libvorbis $_codecmodules"
5706 _res_comment
="libvorbis"
5707 _ld_extra
="$_ld_extra -lvorbis -logg"
5710 _nocodecmodules
="libvorbis $_nocodecmodules"
5714 echocheck
"libspeex (version >= 1.1 required)"
5715 if test "$_speex" = auto
; then
5718 #include <speex/speex.h>
5722 speex_decode_int(dec, &bits, dec);
5725 cc_check
-lspeex $_ld_lm && _speex
=yes
5727 if test "$_speex" = yes ; then
5728 _def_speex
='#define HAVE_SPEEX 1'
5729 _ld_extra
="$_ld_extra -lspeex"
5730 _codecmodules
="speex $_codecmodules"
5732 _def_speex
='#undef HAVE_SPEEX'
5733 _nocodecmodules
="speex $_nocodecmodules"
5737 echocheck
"OggTheora support"
5738 if test "$_theora" = auto
; then
5741 #include <theora/theora.h>
5745 /* theora is in flux, make sure that all interface routines and
5746 * datatypes exist and work the way we expect it, so we don't break
5756 theora_info_init (&inf);
5757 theora_comment_init (&tc);
5761 /* we don't want to execute this kind of nonsense; just for making sure
5762 * that compilation works... */
5763 memset(&op, 0, sizeof(op));
5764 r = theora_decode_header (&inf, &tc, &op);
5765 r = theora_decode_init (&st, &inf);
5766 t = theora_granule_time (&st, op.granulepos);
5767 r = theora_decode_packetin (&st, &op);
5768 r = theora_decode_YUVout (&st, &yuv);
5774 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5775 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5776 && _theora
=yes && break
5778 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5779 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5780 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5781 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5785 if test "$_theora" = yes ; then
5786 _def_theora
='#define HAVE_OGGTHEORA 1'
5787 _codecmodules
="libtheora $_codecmodules"
5788 # when --enable-theora is forced, we'd better provide a probably sane
5789 # $_ld_theora than nothing
5790 test -z "$_ld_theora" && _ld_theora
="-ltheora -logg"
5792 _def_theora
='#undef HAVE_OGGTHEORA'
5793 _nocodecmodules
="libtheora $_nocodecmodules"
5797 echocheck
"mp3lib support"
5798 if test "$_mp3lib" = yes ; then
5799 _def_mp3lib
='#define USE_MP3LIB 1'
5800 _codecmodules
="mp3lib $_codecmodules"
5802 _def_mp3lib
='#undef USE_MP3LIB'
5803 _nocodecmodules
="mp3lib $_nocodecmodules"
5807 echocheck
"liba52 support"
5808 if test "$_liba52" = yes ; then
5809 _def_liba52
='#define USE_LIBA52 1'
5810 _codecmodules
="liba52 $_codecmodules"
5812 _def_liba52
='#undef USE_LIBA52'
5813 _nocodecmodules
="liba52 $_nocodecmodules"
5817 echocheck
"libdts support"
5818 if test "$_libdts" = auto
; then
5821 #include <inttypes.h>
5823 int main(void) { dts_init (0); return 0; }
5825 cc_check
-ldts $_ld_lm && _libdts
=yes
5827 if test "$_libdts" = yes ; then
5828 _def_libdts
='#define CONFIG_LIBDTS 1'
5829 _ld_extra
="$_ld_extra -ldts"
5830 _codecmodules
="libdts $_codecmodules"
5832 _def_libdts
='#undef CONFIG_LIBDTS'
5833 _nocodecmodules
="libdts $_nocodecmodules"
5837 echocheck
"libmpeg2 support"
5838 if test "$_libmpeg2" = yes ; then
5839 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5840 _codecmodules
="libmpeg2 $_codecmodules"
5842 _def_libmpeg2
='#undef USE_LIBMPEG2'
5843 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5845 echores
"$_libmpeg2"
5847 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5848 if test "$_musepack" = auto
; then
5851 #include <mpcdec/mpcdec.h>
5853 mpc_streaminfo info;
5854 mpc_decoder decoder;
5855 mpc_decoder_set_streaminfo(&decoder, &info);
5856 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5859 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5861 if test "$_musepack" = yes ; then
5862 _def_musepack
='#define HAVE_MUSEPACK 1'
5863 _ld_extra
="$_ld_extra -lmpcdec"
5864 _codecmodules
="musepack $_codecmodules"
5866 _def_musepack
='#undef HAVE_MUSEPACK'
5867 _nocodecmodules
="musepack $_nocodecmodules"
5869 echores
"$_musepack"
5872 echocheck
"FAAC (AAC encoder) support"
5873 if test "$_faac" = auto
; then
5875 #include <inttypes.h>
5877 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5880 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5881 cc_check
-O4 $_ld_faac $_ld_tmp $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
5884 if test "$_faac" = yes ; then
5885 _def_faac
="#define HAVE_FAAC 1"
5886 if echo $_libavencoders |
grep -q FAAC
; then
5888 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
5889 _libs_mplayer
="$_libs_mplayer $_ld_faac"
5892 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
5894 _codecmodules
="faac $_codecmodules"
5896 _def_faac
="#undef HAVE_FAAC"
5897 _nocodecmodules
="faac $_nocodecmodules"
5899 echores
"$_faac (in libavcodec: $_lavc_faac)"
5902 echocheck
"FAAD2 (AAC) support"
5903 if test "$_faad_internal" = auto
; then
5904 if x86_32
&& test cc_vendor
=gnu
; then
5906 3.1*|
3.2) # ICE/insn with these versions
5908 _res_comment
="broken gcc"
5917 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
5921 #ifndef FAAD_MIN_STREAMSIZE
5922 #error Too old version
5924 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5926 cc_check
-lfaad $_ld_lm && _faad_external
=yes
5929 if test "$_faad_internal" = yes ; then
5930 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
5932 _res_comment
="internal floating-point"
5933 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
5934 elif test "$_faad_external" = yes ; then
5936 _ld_extra
="$_ld_extra -lfaad"
5938 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
5942 if test "$_faad" = yes ; then
5943 _def_faad
='#define HAVE_FAAD 1'
5944 _codecmodules
="faad2 $_codecmodules"
5946 _def_faad
='#undef HAVE_FAAD'
5947 _nocodecmodules
="faad2 $_nocodecmodules"
5952 echocheck
"LADSPA plugin support"
5953 if test "$_ladspa" = auto
; then
5958 const LADSPA_Descriptor *ld = NULL;
5963 cc_check
&& _ladspa
=yes
5965 if test "$_ladspa" = yes; then
5966 _def_ladspa
="#define HAVE_LADSPA"
5967 _afsrc
="$_afsrc af_ladspa.c"
5968 _afmodules
="ladspa $_afmodules"
5970 _def_ladspa
="#undef HAVE_LADSPA"
5971 _noafmodules
="ladspa $_noafmodules"
5976 if test -z "$_codecsdir" ; then
5977 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
5978 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5979 if test -d "$dir" ; then
5985 # Fall back on default directory.
5986 if test -z "$_codecsdir" ; then
5987 _codecsdir
="$_libdir/codecs"
5988 mingw32
&& _codecsdir
="codecs"
5992 echocheck
"Win32 codecs"
5993 if test "$_win32" = auto
; then
5995 if x86_32
&& not qnx
; then
5999 if test "$_win32" = yes ; then
6000 _def_win32
='#define USE_WIN32DLL 1'
6001 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6002 _res_comment
="using $_win32codecsdir"
6003 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
6005 _def_win32_loader
='#define WIN32_LOADER 1'
6007 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
6008 _res_comment
="using native windows"
6010 _codecmodules
="win32 $_codecmodules"
6012 _def_win32
='#undef USE_WIN32DLL'
6013 _def_win32_loader
='#undef WIN32_LOADER'
6014 _nocodecmodules
="win32 $_nocodecmodules"
6019 echocheck
"XAnim codecs"
6020 if test "$_xanim" = auto
; then
6022 _res_comment
="dynamic loader support needed"
6023 if test "$_dl" = yes ; then
6027 if test "$_xanim" = yes ; then
6028 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6029 _def_xanim
='#define USE_XANIM 1'
6030 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6031 _codecmodules
="xanim $_codecmodules"
6032 _res_comment
="using $_xanimcodecsdir"
6034 _def_xanim
='#undef USE_XANIM'
6035 _def_xanim_path
='#undef XACODEC_PATH'
6036 _nocodecmodules
="xanim $_nocodecmodules"
6041 echocheck
"RealPlayer codecs"
6042 if test "$_real" = auto
; then
6044 _res_comment
="dynamic loader support needed"
6045 if test "$_dl" = yes ||
test "$_win32" = yes &&
6046 (linux || freebsd || netbsd || win32 || darwin
) ; then
6050 if test "$_real" = yes ; then
6051 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6052 _def_real
='#define USE_REALCODECS 1'
6053 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6054 _codecmodules
="real $_codecmodules"
6055 _res_comment
="using $_realcodecsdir"
6057 _def_real
='#undef USE_REALCODECS'
6058 _def_real_path
="#undef REALCODEC_PATH"
6059 _nocodecmodules
="real $_nocodecmodules"
6064 echocheck
"LIVE555 Streaming Media libraries"
6065 if test "$_live" = auto
&& test "$_network" = yes ; then
6066 cat > $TMPCPP << EOF
6067 #include <liveMedia.hh>
6068 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6069 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6075 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6076 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6077 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6078 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6079 $_livelibdir/groupsock/libgroupsock.a \
6080 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6081 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6082 $_ld_extra -lstdc++" \
6083 _inc_extra
="$_inc_extra -I$_livelibdir/liveMedia/include \
6084 -I$_livelibdir/UsageEnvironment/include \
6085 -I$_livelibdir/BasicUsageEnvironment/include \
6086 -I$_livelibdir/groupsock/include" && \
6089 if test "$_live" != yes ; then
6090 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6095 if test "$_live" = yes && test "$_network" = yes ; then
6096 _res_comment
="using $_livelibdir"
6097 _def_live
='#define STREAMING_LIVE555 1'
6098 _inputmodules
="live555 $_inputmodules"
6099 elif test "$_live_dist" = yes && test "$_network" = yes ; then
6100 _res_comment
="using distribution version"
6102 _def_live
='#define STREAMING_LIVE555 1'
6103 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6104 _inc_extra
="$_inc_extra -I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6105 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6106 _inputmodules
="live555 $_inputmodules"
6108 _def_live
='#undef STREAMING_LIVE555'
6109 _noinputmodules
="live555 $_noinputmodules"
6114 echocheck
"FFmpeg libavutil (static)"
6115 if test "$_libavutil" = auto
; then
6116 if test -d libavutil
; then
6122 echores
"$_libavutil"
6124 echocheck
"FFmpeg libavcodec (static)"
6125 if test "$_libavcodec" = auto
; then
6126 # Note: static linking is preferred to dynamic linking
6128 _res_comment
="see DOCS/HTML/$_doc_lang/codecs.html"
6129 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6130 _res_comment
="old ffmpeg version, use CVS !"
6131 if grep avcodec_find_encoder_by_name libavcodec
/utils.c
> /dev
/null
2>&1 ; then
6132 # check if libavutil is a required
6134 #include "libavcodec/avcodec.h"
6135 #if LIBAVCODEC_BUILD >= 3211265
6136 #error We need libavutil!
6138 int main(void) { return 0; }
6141 if cc_check
-I.
-I.
/libavutil
; then
6142 _libavutil_required
="no"
6144 _libavutil_required
="yes"
6146 _res_comment
="libavutil availability does not fit libavcodec version"
6147 if test "$_libavutil_required" = "$_libavutil"; then
6154 echores
"$_libavcodec"
6156 echocheck
"FFmpeg libavformat (static)"
6157 if test "$_libavformat" = auto
; then
6158 # Note: static linking is preferred to dynamic linking
6160 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6164 echores
"$_libavformat"
6166 echocheck
"FFmpeg libpostproc (static)"
6167 if test "$_libpostproc" = auto
; then
6169 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6173 echores
"$_libpostproc"
6176 if test "$_libavutil" != yes ; then
6177 echocheck
"FFmpeg libavutil (dynamic)"
6178 if test "$_libavutil_so" = auto
; then
6181 #include <ffmpeg/common.h>
6182 int main(void) { ff_gcd(1,1); return 0; }
6184 if $_pkg_config --exists libavutil
; then
6185 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6186 _ld_tmp
=`$_pkg_config --libs libavutil`
6187 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6188 && _libavutil_so
=yes
6189 elif cc_check
-lavutil $_ld_lm ; then
6190 _ld_extra
="$_ld_extra -lavutil"
6192 _res_comment
="using libavutil.so, but static libavutil is recommended"
6195 # neither static nor shared libavutil is available, but it is mandatory ...
6196 if test "$_libavutil_so" = no
; then
6197 die
"You need static or shared libavutil, MPlayer will not compile without!"
6199 echores
"$_libavutil_so"
6200 fi #if test "$_libavutil" != yes ; then
6202 if test "$_libavcodec" != yes ; then
6203 echocheck
"FFmpeg libavcodec (dynamic)"
6204 if test "$_libavcodec_so" = auto
; then
6206 _res_comment
="libavcodec.so is broken/obsolete"
6207 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
6209 #include <ffmpeg/avcodec.h>
6211 avcodec_find_encoder_by_name("");
6215 if $_pkg_config --exists libavcodec
; then
6216 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6217 _ld_tmp
=`$_pkg_config --libs libavcodec`
6218 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6219 && _libavcodec_so
=yes
6220 elif cc_check
-lavcodec $_ld_lm ; then
6221 _ld_extra
="$_ld_extra -lavcodec"
6223 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6226 echores
"$_libavcodec_so"
6227 fi #if test "$_libavcodec" != yes ; then
6229 if test "$_libavformat" != yes ; then
6230 echocheck
"FFmpeg libavformat (dynamic)"
6231 if test "$_libavformat_so" = auto
; then
6234 #include <ffmpeg/avformat.h>
6235 #include <ffmpeg/opt.h>
6236 int main(void) { av_alloc_format_context(); return 0; }
6238 if $_pkg_config --exists libavformat
; then
6239 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6240 _ld_tmp
=`$_pkg_config --libs libavformat`
6241 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6242 && _libavformat_so
=yes
6243 elif cc_check
$_ld_lm -lavformat ; then
6244 _ld_extra
="$_ld_extra -lavformat"
6246 _res_comment
="using libavformat.so, but static libavformat is recommended"
6249 echores
"$_libavformat_so"
6250 fi #if test "$_libavformat" != yes ; then
6252 if test "$_libpostproc" != yes ; then
6253 echocheck
"FFmpeg libpostproc (dynamic)"
6254 if test "$_libpostproc_so" = auto
; then
6257 #define USE_LIBPOSTPROC 1
6258 #include <inttypes.h>
6259 #include <postproc/postprocess.h>
6261 pp_get_mode_by_name_and_quality("de", 0);
6264 if cc_check
-lpostproc $_ld_lm ; then
6265 _ld_extra
="$_ld_extra -lpostproc"
6267 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6270 echores
"$_libpostproc_so"
6271 fi #if test "$_libpostproc" != yes ; then
6273 _def_libavutil
='#undef USE_LIBAVUTIL'
6274 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6275 if test "$_libavutil" = yes ; then
6276 _def_libavutil
='#define USE_LIBAVUTIL 1'
6277 elif test "$_libavutil_so" = yes ; then
6278 _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6281 _def_libavcodec
='#undef USE_LIBAVCODEC'
6282 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6283 _def_lavc_dsputil
='#undef USE_LIBAVCODEC_DSPUTIL'
6284 if test "$_libavcodec_mpegaudio_hp" = yes ; then
6285 _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6287 if test "$_libavcodec" = yes ; then
6288 _def_libavcodec
='#define USE_LIBAVCODEC 1'
6289 _def_lavc_dsputil
='#define USE_LIBAVCODEC_DSPUTIL'
6290 _codecmodules
="libavcodec $_codecmodules"
6291 elif test "$_libavcodec_so" = yes ; then
6292 _def_libavcodec
='#define USE_LIBAVCODEC 1'
6293 _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6294 _codecmodules
="libavcodec.so $_codecmodules"
6296 _nocodecmodules
="libavcodec $_nocodecmodules"
6299 _def_libavformat
='#undef USE_LIBAVFORMAT'
6300 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6301 _def_libavformat_win32
='#undef CONFIG_WIN32'
6302 if test "$_libavformat" = yes ; then
6303 _def_libavformat
='#define USE_LIBAVFORMAT 1'
6305 _def_libavformat_win32
='#define CONFIG_WIN32 1'
6308 if test "$_libavformat_so" = yes ; then
6309 _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6311 _def_libavformat_win32
='#define CONFIG_WIN32 1'
6316 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6317 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6318 if test "$_libpostproc" = yes ; then
6319 _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6321 if test "$_libpostproc_so" = yes ; then
6322 _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6326 echocheck
"md5sum support"
6327 if test "$_md5sum" = yes; then
6328 _def_md5sum
="#define HAVE_MD5SUM"
6329 _vosrc
="$_vosrc vo_md5sum.c"
6330 _vomodules
="md5sum $_vomodules"
6332 _def_md5sum
="#undef HAVE_MD5SUM"
6333 _novomodules
="md5sum $_novomodules"
6337 echocheck
"AMR narrowband"
6338 if test "$_amr_nb" = auto
; then
6340 if test -f libavcodec
/amr_float
/sp_dec.c
; then
6341 if test "$_libavcodec" = yes ; then
6344 _res_comment
="libavcodec (static) is required by amr_nb, sorry"
6348 if test "$_amr_nb" = yes ; then
6350 _def_amr
='#define CONFIG_AMR 1'
6351 _def_amr_nb
='#define CONFIG_AMR_NB 1'
6353 _def_amr_nb
='#undef CONFIG_AMR_NB'
6357 echocheck
"AMR narrowband, fixed point"
6358 if test "$_amr_nb_fixed" = auto
; then
6360 if test -f libavcodec
/amr
/dtx_dec.c
; then
6361 if test "$_libavcodec" = yes ; then
6362 if test "$_amr_nb" = no
; then
6365 _res_comment
="disabled by amr_nb"
6368 _res_comment
="libavcodec (static) is required by amr_nb-fixed, sorry"
6372 if test "$_amr_nb_fixed" = yes ; then
6374 _def_amr
='#define CONFIG_AMR 1'
6375 _def_amr_nb_fixed
='#define CONFIG_AMR_NB_FIXED 1'
6377 _def_amr_nb_fixed
='#undef CONFIG_AMR_NB_FIXED'
6379 echores
"$_amr_nb_fixed"
6381 if test "$_amr_nb" = yes ||
test "$_amr_nb_fixed" = yes ; then
6382 _codecmodules
="amr_nb $_codecmodules"
6384 _nocodecmodules
="amr_nb $_nocodecmodules"
6387 echocheck
"AMR wideband"
6388 if test "$_amr_wb" = auto
; then
6390 if test -f libavcodec
/amrwb_float
/dec_dtx.c
; then
6391 if test "$_libavcodec" = yes ; then
6394 _res_comment
="libavcodec (static) is required by amr_wb, sorry"
6398 if test "$_amr_wb" = yes ; then
6400 _def_amr
='#define CONFIG_AMR 1'
6401 _def_amr_wb
='#define CONFIG_AMR_WB 1'
6402 _codecmodules
="amr_wb $_codecmodules"
6404 _def_amr_wb
='#undef CONFIG_AMR_WB'
6405 _nocodecmodules
="amr_wb $_nocodecmodules"
6409 echocheck
"libdv-0.9.5+"
6410 if test "$_libdv" = auto
; then
6413 #include <libdv/dv.h>
6414 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6416 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6418 if test "$_libdv" = yes ; then
6419 _def_libdv
='#define HAVE_LIBDV095 1'
6420 _ld_extra
="$_ld_extra -ldv"
6421 _codecmodules
="libdv $_codecmodules"
6423 _def_libdv
='#undef HAVE_LIBDV095'
6424 _nocodecmodules
="libdv $_nocodecmodules"
6429 if test "$_zr" = auto
; then
6430 #36067's seem to identify themselves as 36057PQC's, so the line
6431 #below should work for 36067's and 36057's.
6432 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
6438 if test "$_zr" = yes ; then
6439 if test "$_libavcodec" = yes ; then
6440 _def_zr
='#define HAVE_ZR 1'
6441 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6442 _vomodules
="zr zr2 $_vomodules"
6444 _res_comment
="libavcodec (static) is required by zr, sorry"
6445 _novomodules
="zr $_novomodules"
6446 _def_zr
='#undef HAVE_ZR'
6449 _def_zr
='#undef HAVE_ZR'
6450 _novomodules
="zr zr2 $_novomodules"
6455 if test "$_bl" = yes ; then
6456 _def_bl
='#define HAVE_BL 1'
6457 _vosrc
="$_vosrc vo_bl.c"
6458 _vomodules
="bl $_vomodules"
6460 _def_bl
='#undef HAVE_BL'
6461 _novomodules
="bl $_novomodules"
6467 if test "$_xvid" = auto
; then
6471 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6473 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6474 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6478 if test "$_xvid" = yes ; then
6479 _def_xvid
='#define HAVE_XVID4 1'
6480 _codecmodules
="xvid $_codecmodules"
6482 _def_xvid
='#undef HAVE_XVID4'
6483 _nocodecmodules
="xvid $_nocodecmodules"
6487 if test "$_xvid" = yes ; then
6488 echocheck
"XviD two pass plugin"
6491 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6495 _def_lavc_xvid
='#define CONFIG_XVID 1'
6498 _def_lavc_xvid
='#undef CONFIG_XVID'
6500 echores
"$_lavc_xvid"
6505 if test "$_x264" = auto
; then
6507 #include <inttypes.h>
6510 #error We do not support old versions of x264. Get the latest from SVN.
6512 int main(void) { x264_encoder_open((void*)0); return 0; }
6515 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6516 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6520 if test "$_x264" = yes ; then
6522 _def_x264
='#define HAVE_X264 1'
6523 _codecmodules
="x264 $_codecmodules"
6524 if echo $_libavencoders |
grep -q X264
; then
6526 _def_lavc_x264
='#define CONFIG_X264 1'
6527 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6530 _def_lavc_x264
='#undef CONFIG_X264'
6535 _def_x264
='#undef HAVE_X264'
6536 _def_lavc_x264
='#undef CONFIG_X264'
6537 _nocodecmodules
="x264 $_nocodecmodules"
6539 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6543 if test "$_nut" = auto
; then
6547 #include <inttypes.h>
6549 int main(void) { (void)nut_error(0); return 0; }
6552 cc_check
-lnut && _nut
=yes
6555 if test "$_nut" = yes ; then
6556 _def_nut
='#define HAVE_LIBNUT 1'
6557 _ld_extra
="$_ld_extra -lnut"
6559 _def_nut
='#undef HAVE_LIBNUT'
6564 # mencoder requires (optional) those libs: libmp3lame
6565 if test "$_mencoder" != no
; then
6567 echocheck
"libmp3lame (for mencoder)"
6569 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6570 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6572 #include <lame/lame.h>
6573 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; }
6575 # Note: libmp3lame usually depends on vorbis
6576 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6577 if test "$_mp3lame" = yes ; then
6578 _def_mp3lame
="#define HAVE_MP3LAME"
6579 _ld_mp3lame
=-lmp3lame
6580 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6582 #include <lame/lame.h>
6583 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6585 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6587 #include <lame/lame.h>
6588 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6590 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6591 if echo $_libavencoders |
grep -q MP3LAME
; then
6593 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6594 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6597 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6600 _def_mp3lame
='#undef HAVE_MP3LAME'
6606 echocheck
"mencoder"
6607 _mencoder_flag
='#undef HAVE_MENCODER'
6608 if test "$_mencoder" = yes ; then
6609 _mencoder_flag
='#define HAVE_MENCODER'
6610 _def_muxers
='#define CONFIG_MUXERS 1'
6612 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6613 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6616 echores
"$_mencoder"
6618 echocheck
"fastmemcpy"
6619 # fastmemcpy check is done earlier with tests of CPU & binutils features
6620 if test "$_fastmemcpy" = yes ; then
6621 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6623 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6625 echores
"$_fastmemcpy"
6627 echocheck
"UniquE RAR File Library"
6628 if test "$_unrarlib" = yes ; then
6629 _def_unrarlib
='#define USE_UNRARLIB 1'
6631 _def_unrarlib
='#undef USE_UNRARLIB'
6633 echores
"$_unrarlib"
6635 echocheck
"TV interface"
6636 if test "$_tv" = yes ; then
6637 _def_tv
='#define USE_TV 1'
6638 _inputmodules
="tv $_inputmodules"
6640 _noinputmodules
="tv $_noinputmodules"
6641 _def_tv
='#undef USE_TV'
6647 echocheck
"*BSD BrookTree 848 TV interface"
6648 if test "$_tv_bsdbt848" = auto
; then
6650 if test "$_tv" = yes ; then
6652 #include <sys/types.h>
6653 #if defined(__NetBSD__)
6654 #include <dev/ic/bt8xx.h>
6656 #include <machine/ioctl_bt848.h>
6658 int main(void) { return 0; }
6660 cc_check
&& _tv_bsdbt848
=yes
6663 if test "$_tv_bsdbt848" = yes ; then
6664 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6665 _inputmodules
="tv-bsdbt848 $_inputmodules"
6667 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6668 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6670 echores
"$_tv_bsdbt848"
6674 echocheck
"Video 4 Linux TV interface"
6675 if test "$_tv_v4l1" = auto
; then
6677 if test "$_tv" = yes && linux
; then
6680 #include <linux/videodev.h>
6681 int main(void) { return 0; }
6683 cc_check
&& _tv_v4l1
=yes
6686 if test "$_tv_v4l1" = yes ; then
6688 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6689 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6690 _inputmodules
="tv-v4l $_inputmodules"
6692 _noinputmodules
="tv-v4l1 $_noinputmodules"
6693 _def_tv_v4l
='#undef HAVE_TV_V4L'
6698 echocheck
"Video 4 Linux 2 TV interface"
6699 if test "$_tv_v4l2" = auto
; then
6701 if test "$_tv" = yes && linux
; then
6704 #include <linux/types.h>
6705 #include <linux/videodev2.h>
6706 int main(void) { return 0; }
6708 cc_check
&& _tv_v4l2
=yes
6711 if test "$_tv_v4l2" = yes ; then
6713 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6714 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6715 _inputmodules
="tv-v4l2 $_inputmodules"
6717 _noinputmodules
="tv-v4l2 $_noinputmodules"
6718 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6723 echocheck
"Radio interface"
6724 if test "$_radio" = yes ; then
6725 _def_radio
='#define USE_RADIO 1'
6726 _inputmodules
="radio $_inputmodules"
6727 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6730 if test "$_radio_capture" = yes ; then
6731 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6733 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6736 _noinputmodules
="radio $_noinputmodules"
6737 _def_radio
='#undef USE_RADIO'
6738 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6742 echocheck
"Capture for Radio interface"
6743 echores
"$_radio_capture"
6745 echocheck
"Video 4 Linux 2 Radio interface"
6746 if test "$_radio_v4l2" = auto
; then
6748 if test "$_radio" = yes && linux
; then
6751 #include <linux/types.h>
6752 #include <linux/videodev2.h>
6753 int main(void) { return 0; }
6755 cc_check
&& _radio_v4l2
=yes
6758 if test "$_radio_v4l2" = yes ; then
6759 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6761 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6763 echores
"$_radio_v4l2"
6765 echocheck
"Video 4 Linux Radio interface"
6766 if test "$_radio_v4l" = auto
; then
6768 if test "$_radio" = yes && linux
; then
6771 #include <linux/videodev.h>
6772 int main(void) { return 0; }
6774 cc_check
&& _radio_v4l
=yes
6777 if test "$_radio_v4l" = yes ; then
6778 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6780 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6782 echores
"$_radio_v4l"
6784 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6785 echocheck
"*BSD BrookTree 848 Radio interface header"
6786 for file in "dev/ic/bt8xx.h" \
6787 "machine/ioctl_bt848.h" \
6788 "dev/bktr/ioctl_bt848.h" \
6789 "dev/video/bktr/ioctl_bt848.h" ; do
6791 #include <sys/types.h>
6793 int main(void) { return 0; }
6795 cc_check
&& _radio_bsdbt848_hdr
=$file
6797 echores
"$_radio_bsdbt848_hdr"
6798 fi #if bsd && radio && radio_bsdbt848
6800 if test -n "$_radio_bsdbt848_hdr" ; then
6801 _def_radio_bsdbt848
="#define RADIO_BSDBT848_HDR <$_radio_bsdbt848_hdr>"
6803 _def_radio_bsdbt848
='#undef RADIO_BSDBT848_HDR '
6806 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6807 test -z "$_radio_bsdbt848_hdr" && test "$_radio" = yes ; then
6808 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6811 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6812 if test "$_pvr" = auto
; then
6814 if test "$_tv_v4l2" = yes && linux
; then
6817 #include <inttypes.h>
6818 #include <linux/types.h>
6819 #include <linux/videodev2.h>
6820 int main(void) { struct v4l2_ext_controls ext; return 0; }
6822 cc_check
&& _pvr
=yes
6825 if test "$_pvr" = yes ; then
6826 _def_pvr
='#define HAVE_PVR 1'
6827 _inputmodules
="pvr $_inputmodules"
6829 _noinputmodules
="pvr $_noinputmodules"
6830 _def_pvr
='#undef HAVE_PVR'
6835 echocheck
"audio select()"
6836 if test "$_select" = no
; then
6837 _def_select
='#undef HAVE_AUDIO_SELECT'
6838 elif test "$_select" = yes ; then
6839 _def_select
='#define HAVE_AUDIO_SELECT 1'
6845 if not beos
&& test "$_ftp" = yes ; then
6846 _def_ftp
='#define HAVE_FTP 1'
6847 _inputmodules
="ftp $_inputmodules"
6849 _noinputmodules
="ftp $_noinputmodules"
6850 _def_ftp
='#undef HAVE_FTP'
6854 echocheck
"vstream client"
6855 if test "$_vstream" = auto
; then
6858 #include <vstream-client.h>
6859 void vstream_error(const char *format, ... ) {}
6860 int main(void) { vstream_start(); return 0; }
6862 cc_check
-lvstream-client && _vstream
=yes
6864 if test "$_vstream" = yes ; then
6865 _def_vstream
='#define HAVE_VSTREAM 1'
6866 _inputmodules
="vstream $_inputmodules"
6867 _ld_extra
="$_ld_extra -lvstream-client"
6869 _noinputmodules
="vstream $_noinputmodules"
6870 _def_vstream
='#undef HAVE_VSTREAM'
6875 echocheck
"byte order"
6876 if test "$_big_endian" = auto
; then
6878 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6879 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6881 return (int)ascii_name;
6885 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6891 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
6894 if test "$_big_endian" = yes ; then
6895 _byte_order
='big-endian'
6896 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6898 _byte_order
='little-endian'
6899 _def_words_endian
='#undef WORDS_BIGENDIAN'
6901 echores
"$_byte_order"
6903 echocheck
"OSD menu"
6904 if test "$_menu" = yes ; then
6905 _def_menu
='#define HAVE_MENU 1'
6907 _def_menu
='#undef HAVE_MENU'
6912 echocheck
"QuickTime codecs"
6913 if test "$_qtx" = auto
; then
6914 test "$_win32" = yes || darwin
&& _qtx
=yes
6916 if test "$_qtx" = yes ; then
6917 _def_qtx
='#define USE_QTX_CODECS 1'
6918 _codecmodules
="qtx $_codecmodules"
6920 _def_qtx
='#undef USE_QTX_CODECS'
6921 _nocodecmodules
="qtx $_nocodecmodules"
6926 echocheck
"Subtitles sorting"
6927 if test "$_sortsub" = yes ; then
6928 _def_sortsub
='#define USE_SORTSUB 1'
6930 _def_sortsub
='#undef USE_SORTSUB'
6935 echocheck
"XMMS inputplugin support"
6936 if test "$_xmms" = yes ; then
6937 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6938 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6939 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6941 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6942 _xmmslibdir
=/usr
/lib
6945 _def_xmms
='#define HAVE_XMMS 1'
6947 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
6949 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6952 _def_xmms
='#undef HAVE_XMMS'
6957 if test "$_inet6" = auto
; then
6959 #include <sys/types.h>
6960 #include <sys/socket.h>
6961 #include <netinet/in.h>
6962 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6969 if test "$_inet6" = yes ; then
6970 _def_inet6
='#define HAVE_AF_INET6 1'
6972 _def_inet6
='#undef HAVE_AF_INET6'
6977 echocheck
"gethostbyname2"
6978 if test "$_gethostbyname2" = auto
; then
6980 #include <sys/types.h>
6981 #include <sys/socket.h>
6983 int main(void) { gethostbyname2("", AF_INET); }
6991 if test "$_gethostbyname2" = yes ; then
6992 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6994 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6996 echores
"$_gethostbyname2"
6999 # --------------- GUI specific tests begin -------------------
7002 if test "$_gui" = yes ; then
7004 # Required libraries
7005 test "$_png" != yes && die
"The GUI requires PNG support, please install libpng and libpng-dev packages."
7007 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7009 echocheck
"XShape extension"
7010 if test "$_xshape" = auto
; then
7013 #include <X11/Xlib.h>
7014 #include <X11/Xproto.h>
7015 #include <X11/Xutil.h>
7016 #include <X11/extensions/shape.h>
7019 char *name = ":0.0";
7022 int eventbase, errorbase;
7023 if (getenv("DISPLAY"))
7024 name=getenv("DISPLAY");
7025 wsDisplay=XOpenDisplay(name);
7026 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7028 XCloseDisplay(wsDisplay);
7032 cc_check
&& _xshape
=yes
7034 if test "$_xshape" = yes ; then
7035 _def_xshape
='#define HAVE_XSHAPE 1'
7037 die
"The GUI requires the X11 extension XShape (which was not found)."
7042 if test "$_gtk1" = no
; then
7044 echocheck
"GTK+ version"
7046 if $_pkg_config gtk
+-2.0
--exists ; then
7047 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7048 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7049 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7053 if $_pkg_config glib-2.0
--exists ; then
7054 echocheck
"glib version"
7055 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7056 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7059 _def_gui
='#define HAVE_NEW_GUI 1'
7060 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7063 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7066 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7071 if test "$_gtk1" = yes ; then
7072 # Check for old GTK (1.2.x)
7073 echocheck
"GTK version"
7074 if test -z "$_gtkconfig" ; then
7075 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7076 _gtkconfig
="gtk-config"
7077 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7078 _gtkconfig
="gtk12-config"
7080 die
"The GUI requires GTK devel packages (which were not found)."
7083 _gtk
=`$_gtkconfig --version 2>&1`
7084 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7085 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7086 echores
"$_gtk (using $_gtkconfig)"
7089 echocheck
"glib version"
7090 if test -z "$_glibconfig" ; then
7091 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7092 _glibconfig
="glib-config"
7093 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7094 _glibconfig
="glib12-config"
7096 die
"The GUI requires GLIB devel packages (which were not found)"
7099 _glib
=`$_glibconfig --version 2>&1`
7100 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7101 echores
"$_glib (using $_glibconfig)"
7103 _def_gui
='#define HAVE_NEW_GUI 1'
7104 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7108 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7109 _def_gui
='#define HAVE_NEW_GUI 1'
7110 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7113 else #if test "$_gui"
7114 _def_gui
='#undef HAVE_NEW_GUI'
7115 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7117 # --------------- GUI specific tests end -------------------
7120 if test "$_charset" = "noconv" ; then
7123 if test "$_charset" ; then
7124 _def_charset
="#define MSG_CHARSET \"$_charset\""
7126 _def_charset
="#undef MSG_CHARSET"
7129 if test "$_charset" = "UTF-8" ; then
7130 # hack to disable conversion in the Makefile
7134 if test "$_charset" ; then
7135 echocheck
"iconv program"
7136 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7137 if test "$?" -ne 0 ; then
7139 echo "No working iconv program found, use "
7140 echo "--charset=UTF-8 to continue anyway."
7141 echo "If you also have problems with iconv library functions use --charset=noconv."
7142 echo "Messages in the GTK-2 interface will be broken then."
7149 #############################################################################
7151 echocheck
"automatic gdb attach"
7152 if test "$_crash_debug" = yes ; then
7153 _def_crash_debug
='#define CRASH_DEBUG 1'
7155 _def_crash_debug
='#undef CRASH_DEBUG'
7158 echores
"$_crash_debug"
7161 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN -shared-libgcc"
7162 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7163 CFLAGS
="$CFLAGS -no-cpp-precomp"
7166 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
7167 test "$_altivec" = yes && CFLAGS
="$CFLAGS -DCONFIG_DARWIN"
7170 # use flag for HPUX missing setenv()
7171 CFLAGS
="$CFLAGS -DHPUX"
7175 CFLAGS
="$CFLAGS -D_REENTRANT"
7177 # FIXME bsd needs this so maybe other OS'es
7178 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7180 # 64 bit file offsets?
7181 if test "$_largefiles" = yes || freebsd
; then
7182 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7183 if test "$_dvdread" = yes ; then
7184 # dvdread support requires this (for off64_t)
7185 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7189 echocheck
"compiler support for noexecstack"
7191 int main(void) { return 0; }
7193 if cc_check
-Wl,-z,noexecstack
; then
7194 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7200 if cc_check
-Wdeclaration-after-statement ; then
7201 CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7204 echocheck
"ftello()"
7205 # if we don't have ftello use the osdep/ compatibility module
7208 #include <sys/types.h>
7209 int main (void) { ftello(stdin); return 0; }
7212 cc_check
&& _ftello
=yes
7213 if test "$_ftello" = yes ; then
7214 _def_ftello
='#define HAVE_FTELLO 1'
7217 _def_ftello
='#undef HAVE_FTELLO'
7222 # Determine OS dependent libs
7224 _def_confwin32
='#define WIN32'
7225 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
7226 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
7227 CFLAGS
="$CFLAGS -D__CYGWIN__"
7231 _confwin32
='TARGET_WIN32 = yes'
7233 _confwin32
='TARGET_WIN32 = no'
7236 # Dynamic linking flags
7237 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7239 bsd
&& _ld_dl_dynamic
='-rdynamic'
7240 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
&& not darwin
; then
7241 _ld_dl_dynamic
='-rdynamic'
7244 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7245 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7246 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7248 _def_debug
='#undef MP_DEBUG'
7249 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7251 _def_linux
='#undef TARGET_LINUX'
7252 linux
&& _def_linux
='#define TARGET_LINUX 1'
7254 # TODO cleanup the VIDIX stuff here
7255 echocheck
"VIDIX (internal)"
7256 echores
"$_vidix_internal"
7258 echocheck
"VIDIX (external)"
7259 if test "$_vidix_external" = auto
; then
7262 #include <vidix/vidix.h>
7263 int main(void) { return 0; }
7265 cc_check
-lvidix && _vidix_external
=yes
7267 echores
"$_vidix_external"
7269 if test "$_vidix_internal" = yes ||
test "$_vidix_external" = yes ; then
7271 _def_vidix
='#define CONFIG_VIDIX 1'
7274 _def_vidix
='#undef CONFIG_VIDIX'
7277 if test "$_vidix_internal" = yes ; then
7278 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
7279 elif test "$_vidix_external" = yes ; then
7280 _libs_mplayer
="$_libs_mplayer -lvidix"
7281 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
7284 if test "$_vidix" = yes; then
7285 _vosrc
="$_vosrc vo_cvidix.c"
7286 _vomodules
="cvidix $_vomodules"
7288 _novomodules
="cvidix $_novomodules"
7290 if test "$_vidix" = yes && win32
; then
7291 _vosrc
="$_vosrc vo_winvidix.c"
7292 _vomodules
="winvidix $_vomodules"
7293 _libs_mplayer
="$_libs_mplayer -lgdi32"
7295 _novomodules
="winvidix $_novomodules"
7297 if test "$_vidix" = yes && test "$_x11" = yes; then
7298 _vosrc
="$_vosrc vo_xvidix.c"
7299 _vomodules
="xvidix $_vomodules"
7301 _novomodules
="xvidix $_novomodules"
7304 echocheck
"joystick"
7305 _def_joystick
='#undef HAVE_JOYSTICK'
7306 if test "$_joystick" = yes ; then
7308 # TODO add some check
7309 _def_joystick
='#define HAVE_JOYSTICK 1'
7311 _joystick
="no (unsupported under $system_name)"
7314 echores
"$_joystick"
7317 if test "$_lirc" = auto
; then
7320 #include <lirc/lirc_client.h>
7321 int main(void) { return 0; }
7323 cc_check
-llirc_client && _lirc
=yes
7325 if test "$_lirc" = yes ; then
7326 _def_lirc
='#define HAVE_LIRC 1'
7327 _ld_extra
="$_ld_extra -llirc_client"
7329 _def_lirc
='#undef HAVE_LIRC'
7334 if test "$_lircc" = auto
; then
7337 #include <lirc/lircc.h>
7338 int main(void) { return 0; }
7340 cc_check
-llircc && _lircc
=yes
7342 if test "$_lircc" = yes ; then
7343 _def_lircc
='#define HAVE_LIRCC 1'
7344 _ld_extra
="$_ld_extra -llircc"
7346 _def_lircc
='#undef HAVE_LIRCC'
7351 # Detect maemo development platform libraries availability (http://www.maemo.org),
7352 # they are used when run on Nokia 770
7353 echocheck
"maemo (Nokia 770)"
7354 if test "$_maemo" = auto
; then
7357 #include <libosso.h>
7358 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7360 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7362 if test "$_maemo" = yes ; then
7363 _def_maemo
='#define HAVE_MAEMO 1'
7364 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7365 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7367 _def_maemo
='#undef HAVE_MAEMO'
7372 echocheck
"color console output"
7373 if test "$_color_console" = yes ; then
7374 _def_color_console
='#define MSG_USE_COLORS 1'
7376 _def_color_console
='#undef MSG_USE_COLORS'
7378 echores
"$_color_console"
7380 # linker paths should be the same for mencoder and mplayer
7382 for I
in $_libs_mplayer ; do
7383 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7384 if test -z "$_tmp" ; then
7385 _ld_extra
="$I $_ld_extra"
7387 _ld_tmp
="$_ld_tmp $I"
7390 _libs_mplayer
=$_ld_tmp
7392 #############################################################################
7393 # Take care of ffmpeg dependencies
7394 if test "$_zlib" = no
; then
7395 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// `
7396 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
7398 if test "$_amr_nb" = no
&& test "$_amr_nb_fixed" = no
; then
7399 _libavdecoders
=`echo $_libavdecoders | sed -e s/AMR_NB_DECODER// `
7400 _libavencoders
=`echo $_libavencoders | sed -e s/AMR_NB_ENCODER// `
7402 if test "$_amr_wb" = no
; then
7403 _libavdecoders
=`echo $_libavdecoders | sed -e s/AMR_WB_DECODER// `
7404 _libavencoders
=`echo $_libavencoders | sed -e s/AMR_WB_ENCODER// `
7406 if test "$_libdts" = no
; then
7407 _libavdecoders
=`echo $_libavdecoders | sed -e s/DTS_DECODER// `
7409 if test "$_xvmc" = no
; then
7410 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
7412 if test "$_x264" = no ||
test "$_lavc_x264" = no
; then
7413 _libavencoders
=`echo $_libavencoders | sed -e s/X264_ENCODER// `
7415 if test "$_xvid" = no ||
test "$_lavc_xvid" = no
; then
7416 _libavencoders
=`echo $_libavencoders | sed -e s/XVID_ENCODER// `
7418 if test "$_faac" = no ||
test "$_lavc_faac" = no
; then
7419 _libavencoders
=`echo $_libavencoders | sed -e s/FAAC_ENCODER// `
7421 if test "$_mp3lame" = no ||
test "$_lavc_mp3lame" = no
; then
7422 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
7424 if test "$_libvorbis" = no
; then
7425 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
7426 _libavmuxers
=`echo $_libavmuxers | sed -e s/OGG_MUXER// `
7428 if test "$_nut" = no
; then
7429 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
7432 #############################################################################
7433 echo "Creating config.mak"
7434 cat > config.mak
<< EOF
7435 # -------- Generated by configure -----------
7438 MAN_LANG = $MAN_LANG
7439 TARGET_OS = $system_name
7441 prefix = \$(DESTDIR)$_prefix
7442 BINDIR = \$(DESTDIR)$_bindir
7443 DATADIR = \$(DESTDIR)$_datadir
7444 MANDIR = \$(DESTDIR)$_mandir
7445 CONFDIR = \$(DESTDIR)$_confdir
7446 LIBDIR = \$(DESTDIR)$_libdir
7447 # FFmpeg uses libdir instead of LIBDIR
7454 LDCONFIG = $_ldconfig
7456 EXTRA_INC = $_inc_extra
7457 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7458 INSTALLSTRIP = $_install_strip
7460 HELP_FILE = $_mp_help
7464 MPLAYER_NETWORK = $_network
7466 STREAMING_LIVE555 = $_live
7468 STREAM_CACHE = $_stream_cache
7470 VIDIX = $_vidix_internal
7471 EXTERNAL_VIDIX = $_vidix_external
7478 LIBMPEG2 = $_libmpeg2
7479 TREMOR_INTERNAL = $_tremor_internal
7480 TREMOR_FLAGS = $_tremor_flags
7484 MUSEPACK = $_musepack
7486 UNRARLIB = $_unrarlib
7491 EXTRALIBS = $_extra_libs
7492 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7493 EXTRALIBS_MPLAYER = $_libs_mplayer
7494 EXTRALIBS_MENCODER = $_libs_mencoder
7497 HAVE_PTHREADS = $_pthreads
7499 HAVE_XVMC_ACCEL = $_xvmc
7501 HAVE_SYS_MMAN_H = $_mman
7503 NEED_FSEEKO = $_need_fseeko
7504 NEED_FTELLO = $_need_ftello
7505 NEED_GETTIMEOFDAY = $_need_gettimeofday
7506 NEED_GLOB = $_need_glob
7507 NEED_SCANDIR = $_need_scandir
7508 NEED_SETENV = $_need_setenv
7509 NEED_STRLCAT = $_need_strlcat
7510 NEED_STRLCPY = $_need_strlcpy
7511 NEED_STRSEP = $_need_strsep
7512 NEED_SWAB = $_need_swab
7513 NEED_VSSCANF = $_need_vsscanf
7520 LIB=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7529 # input/demuxer/codecs
7530 JOYSTICK = $_joystick
7536 TV_BSDBT848 = $_tv_bsdbt848
7540 DVDREAD_INTERNAL = $_dvdread_internal
7541 DVDCSS_INTERNAL = $_libdvdcss_internal
7545 REAL_CODECS = $_real
7546 XANIM_CODECS = $_xanim
7547 CONFIG_LIBAVUTIL = $_libavutil
7548 CONFIG_LIBAVUTIL_SO = $_libavutil_so
7549 CONFIG_LIBAVCODEC = $_libavcodec
7550 CONFIG_LIBAVCODEC_SO = $_libavcodec_so
7551 CONFIG_LIBAVFORMAT = $_libavformat
7552 CONFIG_LIBAVFORMAT_SO = $_libavformat_so
7553 CONFIG_LIBPOSTPROC = $_libpostproc
7554 CONFIG_LIBPOSTPROC_SO = $_libpostproc_so
7561 CONFIG_LIBDTS = $_libdts
7563 MENCODER = $_mencoder
7566 BITMAP_FONT = $_bitmap_font
7567 FREETYPE = $_freetype
7570 LIBVORBIS = $_vorbis
7571 LIBTHEORA = $_theora
7572 FAAD_INTERNAL = $_faad_internal
7573 FAAD_FIXED = $_faad_fixed
7574 LIBSMBCLIENT = $_smbsupport
7575 XMMS_PLUGINS = $_xmms
7577 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7578 MACOSX_BUNDLE = $_macosx_bundle
7579 MACOSX_COREVIDEO = $_macosx_corevideo
7584 CONFIG_AMR_NB=$_amr_nb
7585 CONFIG_AMR_NB_FIXED=$_amr_nb_fixed
7586 CONFIG_AMR_WB=$_amr_wb
7587 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7588 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7589 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7590 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7591 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7592 CONFIG_LIBFAAC=$_lavc_faac
7593 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7594 CONFIG_XVID=$_lavc_xvid
7595 CONFIG_X264=$_lavc_x264
7598 CONFIG_ENCODERS=$_mencoder
7599 CONFIG_MUXERS=$_mencoder
7601 RADIO_CAPTURE=$_radio_capture
7603 # --- Some stuff for autoconfigure ----
7609 TARGET_MMX2 = $_mmxext
7610 TARGET_3DNOW = $_3dnow
7611 TARGET_3DNOWEX = $_3dnowext
7613 TARGET_CMOV = $_cmov
7614 TARGET_ALTIVEC = $_altivec
7615 TARGET_ARMV5TE = $_armv5te
7616 TARGET_IWMMXT = $_iwmmxt
7618 TARGET_BUILTIN_VECTOR = $_builtin_vector
7619 TARGET_BUILTIN_3DNOW = $_mm3dnow
7624 # --- libvo stuff ---
7627 # --- libao2 stuff ---
7630 # --- libaf stuff ---
7635 #############################################################################
7637 ff_config_enable
() {
7639 if ` echo $2 | grep $part > /dev/null `; then
7640 echo "#define CONFIG_$part 1"
7641 echo "#define ENABLE_$part 1"
7643 echo "#define ENABLE_$part 0"
7648 echo "Creating config.h"
7649 cat > config.h
<< EOF
7650 /* -------- This file has been automatically generated by configure ---------
7651 Note: Any changes in it will be lost when you run configure again. */
7653 /* Protect against multiple inclusion */
7654 #ifndef MPLAYER_CONFIG_H
7655 #define MPLAYER_CONFIG_H 1
7657 #define CONFIGURATION "$_configuration"
7659 /* make sure we never get lavformat's poll() emulation, the results are
7660 horrible if the X libs try to actually use it, see MPlayer-users
7661 Message-ID: <45D49541.8060101@infernix.net>
7662 Date: Thu, 15 Feb 2007 18:15:45 +0100
7663 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7665 #define HAVE_SYS_POLL_H 1
7667 /* use GNU internationalization */
7670 /* name of messages charset */
7673 /* Runtime CPU detection */
7674 $_def_runtime_cpudetection
7676 /* Dynamic a/v plugins */
7677 $_def_dynamic_plugins
7679 /* "restrict" keyword */
7680 $_def_restrict_keyword
7682 /* __builtin_expect branch prediction hint */
7683 $_def_builtin_expect
7684 #ifdef HAVE_BUILTIN_EXPECT
7685 #define likely(x) __builtin_expect ((x) != 0, 1)
7686 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7688 #define likely(x) (x)
7689 #define unlikely(x) (x)
7692 /* attribute(used) as needed by some compilers */
7693 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7694 # define attribute_used __attribute__((used))
7696 # define attribute_used
7699 /* compiler support for named assembler arguments */
7700 $_def_named_asm_args
7702 #define PREFIX "$_prefix"
7704 /* enable/disable SIGHANDLER */
7707 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7710 /* Toggles debugging informations */
7713 /* Toggles color console output */
7716 /* Indicates that libcdio is available for VCD and CD-DA playback */
7719 /* Indicates that Ogle's libdvdread is available for DVD playback */
7722 /* Indicates that dvdread is internal */
7723 $_def_dvdread_internal
7725 /* Additional options for libdvdread/libdvdcss */
7739 /* Common data directory (for fonts, etc) */
7740 #define MPLAYER_DATADIR "$_datadir"
7741 #define MPLAYER_CONFDIR "$_confdir"
7742 #define MPLAYER_LIBDIR "$_libdir"
7744 /* Define this to compile stream-caching support, it can be enabled via
7745 -cache <kilobytes> */
7748 /* Define if you are using XviD library */
7751 /* Define if you are using the X.264 library */
7754 /* Define if you are using libnut */
7757 /* Define to include support for libdv-0.9.5 */
7760 /* If build mencoder */
7763 /* Indicates if libmp3lame is available
7764 Note: for mencoder */
7766 $_def_mp3lame_preset
7767 $_def_mp3lame_preset_medium
7769 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7770 (use -bps or -nobps commandline option for run-time method selection)
7771 -bps gives better sync for vbr mp3 audio, it is now default */
7772 #define AVI_SYNC_BPS 1
7774 /* Undefine this if you do not want to select mono audio (left or right)
7775 with a stereo MPEG layer 2/3 audio stream. The command line option
7776 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7777 right-only), with 0 being the default.
7779 #define USE_FAKE_MONO 1
7781 /* Undefine this if your sound card driver has no working select().
7782 If you have kernel Oops, player hangups, or just no audio, you should
7783 try to recompile MPlayer with this option disabled! */
7786 /* define this to use iconv(3) function to codepage conversions */
7789 /* define this to use nl_langinfo function */
7792 /* define this to use RTC (/dev/rtc) for video timers */
7795 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7796 #define MAX_OUTBURST 65536
7798 /* set up audio OUTBURST. Do not change this! */
7799 #define OUTBURST 512
7801 /* Define this if your system has the header file for the OSS sound interface */
7804 /* Define this if your system has the header file for the OSS sound interface
7805 * in /usr/include */
7808 /* Define this if your system has the sysinfo header */
7811 /* Define this if your system has ftello() */
7815 /* Need these for FILE and off_t an config.h is usually before other includes*/
7817 #include <sys/types.h>
7818 off_t ftello(FILE *);
7821 /* Define this if your system has the "malloc.h" header file */
7824 /* memalign is mapped to malloc if unsupported */
7829 /* assembler handling of .align */
7832 /* Define this if your system has the "alloca.h" header file */
7835 /* Define this if your system has the "sys/mman.h" header file */
7837 $_def_mman_has_map_failed
7839 /* Define this if you have the elf dynamic linker -ldl library */
7842 /* Define this if you have the kstat kernel statistics library */
7845 /* Define this if you have zlib */
7848 #define CONFIG_ZLIB 1
7851 /* Define this if you have shm support */
7854 /* Define this if your system has scandir & alphasort */
7857 /* Define this if your system has strsep */
7860 /* Define this if your system has strlcpy */
7862 #ifndef HAVE_STRLCPY
7863 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7866 /* Define this if your system has strlcat */
7868 #ifndef HAVE_STRLCAT
7869 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7872 /* Define this if your system has fseeko */
7875 /* Need these for FILE and off_t an config.h is usually before other includes*/
7877 #include <sys/types.h>
7878 int fseeko(FILE *, off_t, int);
7883 /* Define this if your system has vsscanf */
7886 /* Define this if your system has swab */
7889 /* Define this if your system has no posix select */
7890 $_def_no_posix_select
7892 /* Define this if your system has gettimeofday */
7895 /* Define this if your system has glob */
7898 /* Define this if your system has setenv */
7901 int setenv(const char *name, const char *val, int overwrite);
7904 /* Define this if your system has sysi86 */
7907 /* Define this if your system has pthreads */
7910 /* Define this if you enabled thread support for libavcodec */
7913 /* LIRC (remote control, see www.lirc.org) support: */
7916 /* Support for maemo (http://www.maemo.org) */
7920 * LIRCCD (LIRC client daemon)
7921 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7925 /* DVD navigation support using libdvdnav */
7927 $_def_dvdnav_version
7929 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7930 #define MPEG12_POSTPROC 1
7932 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7934 $_def_libpostproc_so
7936 /* Win32 DLL support */
7938 #define WIN32_PATH "$_win32codecsdir"
7940 /* Mac OS X specific features */
7942 $_def_macosx_finder_support
7944 $_def_macosx_corevideo
7946 /* Build our Win32-loader */
7949 /* ffmpeg's libavcodec support (requires libavcodec source) */
7953 $_def_libavcodec_mpegaudio_hp
7955 /* ffmpeg's libavformat support (requires libavformat source) */
7957 $_def_libavformat_so
7958 $_def_libavformat_win32
7963 /* Use libavcodec's decoders */
7964 #define CONFIG_DECODERS 1
7965 /* Use libavcodec's encoders */
7966 #define CONFIG_ENCODERS 1
7968 /* Use libavformat's demuxers */
7969 #define CONFIG_DEMUXERS 1
7970 /* Use libavformat's muxers */
7973 #define CONFIG_GPL 1
7975 /* Use amr codecs from libavcodec (requires amr sources) */
7981 /* Use specific parts from FFmpeg. */
7982 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
7983 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
7984 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
7985 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
7986 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
7993 /* Use codec libs included in mplayer CVS / source dist: */
7999 /* XAnim DLL support */
8001 /* Default search path */
8004 /* RealPlayer DLL support */
8006 /* Default search path */
8009 /* LIVE555 Streaming Media library support */
8012 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8015 /* Use unrarlib for Vobsubs */
8018 /* gui support, please do not edit this option */
8022 /* Audio output drivers */
8024 $_def_ossaudio_devdsp
8025 $_def_ossaudio_devmixer
8036 $_def_sys_asoundlib_h
8037 $_def_alsa_asoundlib_h
8043 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8045 #undef FAST_OSD_TABLE
8047 /* Enable TV Interface support */
8050 /* Enable Video 4 Linux TV interface support */
8053 /* Enable Video 4 Linux 1 TV interface support */
8056 /* Enable Video 4 Linux 2 TV interface support */
8059 /* Enable *BSD BrookTree TV interface support */
8062 /* Enable Radio Interface support */
8065 /* Enable Capture for Radio Interface support */
8068 /* Enable Video 4 Linux Radio interface support */
8071 /* Enable Video 4 Linux 2 Radio interface support */
8074 /* Enable *BSD BrookTree Radio interface support */
8075 $_def_radio_bsdbt848
8077 /* Enable Video 4 Linux 2 MPEG PVR support */
8080 /* Define if your processor stores words with the most significant
8081 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8087 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8088 have the instruction. */
8091 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
8092 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
8098 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
8103 /* only gcc3 can compile mvi instructions */
8104 $_def_gcc_mvi_support
8106 /* Define this for Cygwin build for win32 */
8109 /* Define this to any prefered value from 386 up to infinity with step 100 */
8110 #define __CPU__ $iproc
8119 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8120 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8122 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8123 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8124 #elif defined(WIN32)
8125 #define DEFAULT_CDROM_DEVICE "D:"
8126 #define DEFAULT_DVD_DEVICE "D:"
8127 #elif defined(SYS_DARWIN)
8128 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8129 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8130 #elif defined(__OpenBSD__)
8131 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8132 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8133 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8134 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8135 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8137 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8138 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8142 /*----------------------------------------------------------------------------
8144 ** NOTE: Instead of modifying these definitions here, use the
8145 ** --enable/--disable options of the ./configure script!
8146 ** See ./configure --help for details.
8148 *---------------------------------------------------------------------------*/
8150 /* C99 lrintf function available */
8153 /* round function is available */
8156 /* yes, we have inttypes.h */
8157 #define HAVE_INTTYPES_H 1
8159 /* int_fastXY_t emulation */
8162 /* nanosleep support */
8168 /* termcap flag for getch2.c */
8171 /* termios flag for getch2.c */
8176 /* enable PNG support */
8179 /* enable JPEG support */
8182 /* enable PNM support */
8185 /* enable md5sum support */
8188 /* enable GIF support */
8193 /* enable bitmap font support */
8196 /* enable FreeType support */
8199 /* enable Fontconfig support */
8202 /* enable SSA/ASS support */
8205 /* enable FriBiDi usage */
8208 /* enable ENCA usage */
8211 /* liblzo support */
8214 #define CONFIG_LZO 1
8217 /* libmad support */
8220 /* enable OggVorbis support */
8224 /* enable Speex support */
8227 /* enable musepack support */
8230 /* enable OggTheora support */
8233 /* enable FAAD (AAC) support */
8237 /* enable FAAC (AAC encoder) support */
8240 /* enable LADSPA plugin support */
8243 /* enable network */
8246 /* enable ftp support */
8249 /* enable vstream support */
8252 /* enable winsock2 instead of Unix functions*/
8255 /* define this to use inet_aton() instead of inet_pton() */
8258 /* enables / disables cdparanoia support */
8262 /* enables / disables VIDIX usage */
8266 /* enables / disables new input joystick support */
8269 /* enables / disables QTX codecs */
8272 /* enables / disables osd menu */
8275 /* enables / disables subtitles sorting */
8278 /* XMMS input plugin support */
8280 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8282 /* enables inet6 support */
8285 /* do we have gethostbyname2? */
8286 $_def_gethostbyname2
8288 /* Extension defines */
8289 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
8290 $_def_3dnowext // only define if you have 3DNOWEXT (AMD Athlon, etc.)
8291 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
8292 $_def_mmxext // only define if you have MMX2 (Athlon/PIII/4/CelII)
8293 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
8294 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
8295 $_def_cmov // only define if you have CMOV (i686+, without VIA C3)
8296 $_def_altivec // only define if you have Altivec (G4)
8297 $_def_armv5te // only define if you have Enhanced DSP Extensions (ARM)
8298 $_def_iwmmxt // only define if you have XScale IWMMX (ARM)
8300 $_def_altivec_h // enables usage of altivec.h
8302 $_def_mlib // Sun mediaLib, available only on solaris
8303 $_def_vis // only define if you have VIS ( ultrasparc )
8305 /* libmpeg2 uses a different feature test macro for mediaLib */
8307 #define LIBMPEG2_MLIB 1
8311 #define SCREEN_SIZE_X 1
8312 #define SCREEN_SIZE_Y 1
8324 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8334 $_def_directfb_version
8359 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8360 #define X11_FULLSCREEN 1
8363 #endif /* MPLAYER_CONFIG_H */
8366 #############################################################################
8370 Config files successfully generated by ./configure !
8372 Install prefix: $_prefix
8373 Data directory: $_datadir
8374 Config direct.: $_confdir
8376 Byte order: $_byte_order
8377 Optimizing for: $_optimizing
8380 Messages/GUI: $_language
8383 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8384 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8389 Enabled optional drivers:
8390 Input: $_inputmodules
8391 Codecs: $_codecmodules
8392 Audio output: $_aomodules
8393 Video output: $_vomodules
8394 Audio filters: $_afmodules
8395 Disabled optional drivers:
8396 Input: $_noinputmodules
8397 Codecs: $_nocodecmodules
8398 Audio output: $_noaomodules
8399 Video output: $_novomodules
8400 Audio filters: $_noafmodules
8402 'config.h' and 'config.mak' contain your configuration options.
8403 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8404 compile *** DO NOT REPORT BUGS if you tweak these files ***
8406 'make' will now compile MPlayer and 'make install' will install it.
8407 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8412 if test "$_mtrr" = yes ; then
8413 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8419 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8420 operating system ($system_name). You may encounter a few files that cannot
8421 be played due to missing open source video/audio codec support.
8428 Check $TMPLOG if you wonder why an autodetection failed (make sure
8429 development headers/packages are installed).
8431 NOTE: The --enable-* parameters unconditionally force options on, completely
8432 skipping autodetection. This behavior is unlike what you may be used to from
8433 autoconf-based configure scripts that can decide to override you. This greater
8434 level of control comes at a price. You may have to provide the correct compiler
8435 and linker flags yourself.
8436 If you used one of these options (except --enable-gui and similar ones that
8437 turn on internal features) and experience a compilation or linking failure,
8438 make sure you have passed the necessary compiler/linker flags to configure.
8440 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8444 if test "$_warn_CFLAGS" = yes; then
8447 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8449 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8451 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8452 To do so, execute 'CFLAGS= ./configure <options>'
8458 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"