3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: check the cvs log !
8 # Cleanups all over the place (c) 2001 pl
11 # This configure script is *not* autoconf-based and has different semantics.
12 # It attempts to autodetect all settings and options where possible. It is
13 # possible to override autodetection with the --enable-option/--disable-option
14 # command line parameters. --enable-option forces the option on skipping
15 # autodetection. Yes, this means that compilation may fail and yes, this is not
16 # how autoconf-based configure scripts behave.
18 # configure generates a series of configuration files:
19 # - config.h contains #defines that are used in the C code.
20 # - config.mak is included from the Makefiles.
22 # If you want to add a new check for $feature, here is a simple skeleton:
24 # echocheck "$feature"
25 # if "$_feature" = auto; then
27 # #include <feature.h>
28 # int main(void) { return 0; }
31 # cc_check && _feature=yes
32 # if test "$_feature" = yes ; then
33 # _def_feature='#define HAVE_FEATURE 1'
35 # _def_feature='#undef HAVE_FEATURE'
39 # Furthermore you need to add the variable _feature to the list of default
40 # settings and set it to one of yes/no/auto. Also add appropriate
41 # --enable-feature/--disable-feature command line options.
42 # The results of the check should be written to config.h and config.mak
43 # at the end of this script. The variable names used for this should be
44 # uniform, i.e. if the option is named 'feature':
46 # _feature : should have a value of yes/no/auto
47 # _def_feature : '#define ... 1' or '#undef ...' for conditional compilation
48 # _ld_feature : '-L/path/dir -lfeature' GCC options
50 #############################################################################
52 # Prevent locale nonsense from breaking basic text processing utils
56 # Store the configure line that was used
59 # Prefer these macros to full length text !
60 # These macros only return an error code - NO display is done
65 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o $TMPO $@" >> "$TMPLOG"
67 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $_libs_mplayer $_libs_mencoder -o "$TMPO" "$@" >> "$TMPLOG" 2>&1
75 compile_check
$TMPC $@
79 compile_check
$TMPCPP $@
-lstdc++
83 "$TMPO" >> "$TMPLOG" 2>&1
86 # Display error message, flushes tempfile, exit
91 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
92 echo "Check \"$TMPLOG\" if you do not understand why it failed."
96 # OS test booleans functions
98 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
100 linux
() { issystem
"Linux" || issystem
"uClinux" ; return "$?" ; }
101 sunos
() { issystem
"SunOS" ; return "$?" ; }
102 hpux
() { issystem
"HP-UX" ; return "$?" ; }
103 irix
() { issystem
"IRIX" ; return "$?" ; }
104 aix
() { issystem
"AIX" ; return "$?" ; }
105 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
106 freebsd
() { issystem
"FreeBSD" || issystem
"GNU/kFreeBSD"; return "$?" ; }
107 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
108 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
109 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
110 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
111 qnx
() { issystem
"QNX" ; return "$?" ; }
112 darwin
() { issystem
"Darwin" ; return "$?" ; }
113 gnu
() { issystem
"GNU" ; return "$?" ; }
114 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
115 morphos
() { issystem
"MorphOS" ; return "$?" ; }
116 amigaos
() { issystem
"AmigaOS" ; return "$?" ; }
117 win32
() { cygwin || mingw32
; return "$?" ; }
118 beos
() { issystem
"BEOS" ; return "$?" ; }
120 # arch test boolean functions
121 # x86/x86pc is used by QNX
124 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
131 x86_64|amd64
) return 0 ;;
142 ppc|powerpc
) return 0;;
168 # not boolean test: implement the posix shell "!" operator for a
170 # usage: not {command}
171 # returns exit status "success" when the execution of "command"
178 # Use this before starting a check
180 echo "============ Checking for $@ ============" >> "$TMPLOG"
181 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
184 # Use this to echo the results of a check
186 if test "$_res_comment" ; then
187 _res_comment
="($_res_comment)"
189 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
190 echo "##########################################" >> "$TMPLOG"
192 echo "$@ $_res_comment"
195 #############################################################################
197 # Check how echo works in this /bin/sh
199 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
200 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
203 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"`
207 Usage: $0 [OPTIONS]...
210 -h, --help display this help and exit
212 Installation directories:
213 --prefix=DIR prefix directory for installation [/usr/local]
214 --bindir=DIR directory for installing binaries [PREFIX/bin]
215 --datadir=DIR directory for installing machine independent
216 data files (skins, etc) [PREFIX/share/mplayer]
217 --mandir=DIR directory for installing man pages [PREFIX/man]
218 --confdir=DIR directory for installing configuration files
220 --libdir=DIR directory for object code libraries [PREFIX/lib]
221 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
222 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
223 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
224 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
227 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
228 --disable-mplayer disable MPlayer compilation [enable]
229 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
230 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
231 --enable-largefiles enable support for files > 2GB [disable]
232 --enable-linux-devfs set default devices to devfs [disable]
233 --enable-termcap use termcap database for key codes [autodetect]
234 --enable-termios use termios database for key codes [autodetect]
235 --disable-iconv disable iconv for encoding conversion [autodetect]
236 --disable-langinfo do not use langinfo [autodetect]
237 --enable-lirc enable LIRC (remote control) support [autodetect]
238 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
239 --enable-joystick enable joystick support [disable]
240 --disable-vm disable X video mode extensions [autodetect]
241 --disable-xf86keysym disable support for multimedia keys [autodetect]
242 --enable-radio enable radio interface [disable]
243 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
244 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
245 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
246 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
247 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
248 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
249 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
250 --disable-tv-teletext disable TV teletext interface [autodetect]
251 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
252 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
253 --disable-network disable networking [enable]
254 --enable-winsock2 enable winsock2 [autodetect]
255 --enable-smb enable Samba (SMB) input [autodetect]
256 --enable-live enable LIVE555 Streaming Media [autodetect]
257 --disable-dvdnav disable libdvdnav [autodetect]
258 --disable-dvdread disable libdvdread [autodetect]
259 --disable-dvdread-internal disable internal libdvdread [autodetect]
260 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
261 --disable-cdparanoia disable cdparanoia [autodetect]
262 --disable-cddb disable cddb [autodetect]
263 --disable-bitmap-font disable bitmap font support [enable]
264 --disable-freetype disable FreeType 2 font rendering [autodetect]
265 --disable-fontconfig disable fontconfig font lookup [autodetect]
266 --disable-unrarlib disable Unique RAR File Library [enabled]
267 --enable-menu enable OSD menu (not DVD menu) [disabled]
268 --disable-sortsub disable subtitle sorting [enabled]
269 --enable-fribidi enable the FriBiDi libs [autodetect]
270 --disable-enca disable ENCA charset oracle library [autodetect]
271 --disable-macosx disable Mac OS X specific features [autodetect]
272 --disable-maemo disable maemo specific features [autodetect]
273 --enable-macosx-finder-support enable Mac OS X Finder invocation
274 parameter parsing [disabled]
275 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
276 --disable-inet6 disable IPv6 support [autodetect]
277 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
278 --disable-ftp disable FTP support [enabled]
279 --disable-vstream disable TiVo vstream client support [autodetect]
280 --disable-pthreads disable Posix threads support [autodetect]
281 --disable-w32threads disable Win32 threads support [autodetect]
282 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
283 --enable-rpath enable runtime linker path for extra libs [disabled]
286 --enable-gif enable GIF support [autodetect]
287 --enable-png enable PNG input/output support [autodetect]
288 --enable-jpeg enable JPEG input/output support [autodetect]
289 --enable-libcdio enable external libcdio [autodetect]
290 --enable-liblzo enable external liblzo [autodetect]
291 --disable-win32dll disable Win32 DLL support [enabled]
292 --disable-qtx disable QuickTime codecs support [enabled]
293 --disable-xanim disable XAnim codecs support [enabled]
294 --disable-real disable RealPlayer codecs support [enabled]
295 --disable-xvid disable XviD [autodetect]
296 --disable-x264 disable x264 [autodetect]
297 --disable-libnut disable libnut [autodetect]
298 --disable-libavutil_a disable static libavutil [autodetect]
299 --disable-libavcodec_a disable static libavcodec [autodetect]
300 --disable-libavformat_a disable static libavformat [autodetect]
301 --disable-libpostproc_a disable static libpostproc [autodetect]
302 --disable-libavutil_so disable shared libavutil [autodetect]
303 --disable-libavcodec_so disable shared libavcodec [autodetect]
304 --disable-libavformat_so disable shared libavformat [autodetect]
305 --disable-libpostproc_so disable shared libpostproc [autodetect]
306 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
307 in libavcodec [enabled]
308 --disable-tremor-internal disable internal Tremor [enabled]
309 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
310 --enable-tremor-external enable external Tremor [autodetect]
311 --disable-libvorbis disable libvorbis support [autodetect]
312 --disable-speex disable Speex support [autodetect]
313 --enable-theora enable OggTheora libraries [autodetect]
314 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
315 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
316 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
317 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
318 --disable-ladspa disable LADSPA plugin support [autodetect]
319 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
320 --disable-mad disable libmad (MPEG audio) support [autodetect]
321 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
322 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
323 --enable-xmms enable XMMS input plugin support [disabled]
324 --enable-libdca enable libdca support [autodetect]
325 --disable-mp3lib disable builtin mp3lib [enabled]
326 --disable-liba52 disable builtin liba52 [enabled]
327 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
328 --disable-musepack disable musepack support [autodetect]
329 --disable-libamr_nb disable libamr narrowband [autodetect]
330 --disable-libamr_wb disable libamr wideband [autodetect]
331 --disable-decoder=DECODER disable specified FFmpeg decoder
332 --enable-decoder=DECODER enable specified FFmpeg decoder
333 --disable-encoder=ENCODER disable specified FFmpeg encoder
334 --enable-encoder=ENCODER enable specified FFmpeg encoder
335 --disable-parser=PARSER disable specified FFmpeg parser
336 --enable-parser=PARSER enable specified FFmpeg parser
337 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
338 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
339 --disable-muxer=MUXER disable specified FFmpeg muxer
340 --enable-muxer=MUXER enable specified FFmpeg muxer
343 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
344 --disable-vidix-external disable external VIDIX [for x86 *nix]
345 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
346 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
347 nvidia,pm2,pm3,radeon,rage128,savage,sis,unichrome
348 --enable-gl enable OpenGL video output [autodetect]
349 --enable-dga[=n] enable DGA [n in {1, 2} ] support [autodetect]
350 --enable-vesa enable VESA video output [autodetect]
351 --enable-svga enable SVGAlib video output [autodetect]
352 --enable-sdl enable SDL video output [autodetect]
353 --enable-aa enable AAlib video output [autodetect]
354 --enable-caca enable CACA video output [autodetect]
355 --enable-ggi enable GGI video output [autodetect]
356 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
357 --enable-directx enable DirectX video output [autodetect]
358 --enable-dxr2 enable DXR2 video output [autodetect]
359 --enable-dxr3 enable DXR3/H+ video output [autodetect]
360 --enable-ivtv enable IVTV TV-Out video output [autodetect]
361 --enable-v4l2 enable V4L2 Decoder audio/video output [autodetect]
362 --enable-dvb enable DVB video output [autodetect]
363 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
364 --enable-mga enable mga_vid video output [disable]
365 --enable-xmga enable mga_vid X11 video output [autodetect]
366 --enable-xv enable Xv video output [autodetect]
367 --enable-xvmc enable XvMC acceleration [disable]
368 --enable-vm enable XF86VidMode support [autodetect]
369 --enable-xinerama enable Xinerama support [autodetect]
370 --enable-x11 enable X11 video output [autodetect]
371 --enable-xshape enable XShape support [autodetect]
372 --enable-fbdev enable FBDev video output [autodetect]
373 --enable-mlib enable mediaLib video output (Solaris) [disable]
374 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
375 --enable-tdfxfb enable tdfxfb video output [disable]
376 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
377 --enable-directfb enable DirectFB video output [autodetect]
378 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
379 --enable-bl enable Blinkenlights video output [disable]
380 --enable-tdfxvid enable tdfx_vid video output [disable]
381 --enable-xvr100 enable SUN XVR-100 video output [autodetect]
382 --disable-tga disable Targa video output [enable]
383 --disable-pnm disable PNM video output [enable]
384 --disable-md5sum disable md5sum video output [enable]
387 --disable-alsa disable ALSA audio output [autodetect]
388 --disable-ossaudio disable OSS audio output [autodetect]
389 --disable-arts disable aRts audio output [autodetect]
390 --disable-esd disable esd audio output [autodetect]
391 --disable-polyp disable Polypaudio audio output [autodetect]
392 --disable-jack disable JACK audio output [autodetect]
393 --disable-openal disable OpenAL audio output [autodetect]
394 --disable-nas disable NAS audio output [autodetect]
395 --disable-sgiaudio disable SGI audio output [autodetect]
396 --disable-sunaudio disable Sun audio output [autodetect]
397 --disable-win32waveout disable Windows waveout audio output [autodetect]
398 --disable-select disable using select() on the audio device [enable]
400 Miscellaneous options:
401 --enable-runtime-cpudetection enable runtime CPU detection [disable]
402 --enable-cross-compile enable cross-compilation [autodetect]
403 --cc=COMPILER C compiler to build MPlayer [gcc]
404 --host-cc=COMPILER C compiler for tools needed while building [gcc]
405 --as=ASSEMBLER assembler to build MPlayer [as]
406 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
407 --enable-static build a statically linked binary
408 --charset=charset convert the console messages to this character set
409 --language=list a white space or comma separated list of languages for
410 translated man pages, the first language is used for
411 messages and the GUI (the environment variable
412 \$LINGUAS is also honored) [en]
413 (Available: $LANGUAGES all)
414 --with-install=PATH path to a custom install program
415 --enable-color-console enable color console output (UNSUPPORTED) [disable]
418 --enable-mmx enable MMX [autodetect]
419 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
420 --enable-3dnow enable 3DNow! [autodetect]
421 --enable-3dnowext enable extended 3DNow! [autodetect]
422 --enable-sse enable SSE [autodetect]
423 --enable-sse2 enable SSE2 [autodetect]
424 --enable-ssse3 enable SSSE3 [autodetect]
425 --enable-shm enable shm [autodetect]
426 --enable-altivec enable AltiVec (PowerPC) [autodetect]
427 --enable-armv5te enable DSP extensions (ARM) [autodetect]
428 --enable-armv6 enable ARMv6 (ARM) [autodetect]
429 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
430 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
431 --enable-big-endian force byte order to big-endian [autodetect]
432 --enable-debug[=1-3] compile-in debugging information [disable]
433 --enable-profile compile-in profiling information [disable]
434 --disable-sighandler disable sighandler for crashes [enable]
435 --enable-crash-debug enable automatic gdb attach on crash [disable]
436 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
438 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
439 --disable-gcc-check disable gcc version checking [enable]
441 Use these options if autodetection fails (Options marked with (*) accept
442 multiple paths separated by ':'):
443 --extra-libs=FLAGS extra linker flags
444 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
445 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
446 --with-extraincdir=DIR extra header search paths in DIR (*)
447 --with-extralibdir=DIR extra linker search paths in DIR (*)
448 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
450 --with-freetype-config=PATH path to freetype-config
451 --with-fribidi-config=PATH path to fribidi-config
452 --with-glib-config=PATH path to glib*-config
453 --with-gtk-config=PATH path to gtk*-config
454 --with-sdl-config=PATH path to sdl*-config
455 --with-dvdnav-config=PATH path to dvdnav-config
457 This configure script is NOT autoconf-based, even though its output is similar.
458 It will try to autodetect all configuration options. If you --enable an option
459 it will be forcefully turned on, skipping autodetection. This can break
460 compilation, so you need to know what you are doing.
465 # GOTCHA: the variables below defines the default behavior for autodetection
466 # and have - unless stated otherwise - at least 2 states : yes no
467 # If autodetection is available then the third state is: auto
485 test "$CC" && _cc
="$CC"
488 _runtime_cpudetection
=no
496 _libavdecoders_all
=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
497 _libavdecoders
=` echo $_libavdecoders_all | sed -e s/LIBFAAD_DECODER// -e s/MPEG4AAC_DECODER// -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// `
498 _libavencoders_all
=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
499 _libavencoders
=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// `
500 _libavparsers_all
=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
501 _libavparsers
=$_libavparsers_all
502 _libavbsfs_all
=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
503 _libavbsfs
=$_libavbsfs_all
504 _libavdemuxers_all
=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
505 _libavdemuxers
=`echo $_libavdemuxers_all | sed -e s/AUDIO_DEMUXER// -e s/DC1394_DEMUXER// -e s/DV1394_DEMUXER// -e s/REDIR_DEMUXER// -e s/RTSP_DEMUXER// -e s/SDP_DEMUXER// -e s/VIDEO_GRAB_V4L_DEMUXER// -e s/VIDEO_GRAB_BKTR_DEMUXER// -e s/X11_GRAB_DEVICE_DEMUXER// -e s/V4L2_DEMUXER// -e s/LIBNUT_DEMUXER// `
506 _libavmuxers_all
=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
507 _libavmuxers
=`echo $_libavmuxers_all | sed -e s/AUDIO_MUXER// -e s/RTP_MUXER// `
508 _libavprotocols_all
=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
514 _libavcodec_mpegaudio_hp
=yes
519 _dga
=auto
# 1 2 no auto
521 _xvmc
=no
#auto when complete
561 _tremor_external
=auto
576 _dvdnavconfig
=dvdnav-config
578 _dvdread_internal
=auto
579 _libdvdcss_internal
=auto
588 _mlib
=no
#broken, thus disabled
650 _macosx_finder_support
=no
653 _freetypeconfig
='freetype-config'
655 _fribidiconfig
='fribidi-config'
669 _def_stream_cache
="#define USE_STREAM_CACHE 1"
677 _prefix
=`echo $ac_option | cut -d '=' -f 2`
680 _bindir
=`echo $ac_option | cut -d '=' -f 2`
683 _datadir
=`echo $ac_option | cut -d '=' -f 2`
686 _mandir
=`echo $ac_option | cut -d '=' -f 2`
689 _confdir
=`echo $ac_option | cut -d '=' -f 2`
692 _libdir
=`echo $ac_option | cut -d '=' -f 2`
695 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
698 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
701 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
704 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
706 --with-extraincdir=*)
707 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
709 --with-extralibdir=*)
710 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
714 _install
=`echo $ac_option | cut -d '=' -f 2 `
717 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
721 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
723 --with-freetype-config=*)
724 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
726 --with-fribidi-config=*)
727 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
730 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
732 --with-glib-config=*)
733 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
735 --with-dvdnav-config=*)
736 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
740 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
742 --extra-libs-mplayer=*)
743 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
745 --extra-libs-mencoder=*)
746 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
750 _target
=`echo $ac_option | cut -d '=' -f 2`
753 _cc
=`echo $ac_option | cut -d '=' -f 2`
756 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
759 _as
=`echo $ac_option | cut -d '=' -f 2`
762 _charset
=`echo $ac_option | cut -d '=' -f 2`
765 _language
=`echo $ac_option | cut -d '=' -f 2`
784 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
789 --enable-gcc-check) _gcc_check
=yes ;;
790 --disable-gcc-check) _gcc_check
=no
;;
791 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
792 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
793 --enable-cross-compile) _cross_compile
=yes ;;
794 --disable-cross-compile) _cross_compile
=no
;;
795 --enable-mencoder) _mencoder
=yes ;;
796 --disable-mencoder) _mencoder
=no
;;
797 --enable-mplayer) _mplayer
=yes ;;
798 --disable-mplayer) _mplayer
=no
;;
799 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
800 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
801 --enable-x11) _x11
=yes ;;
802 --disable-x11) _x11
=no
;;
803 --enable-xshape) _xshape
=yes ;;
804 --disable-xshape) _xshape
=no
;;
805 --enable-xv) _xv
=yes ;;
806 --disable-xv) _xv
=no
;;
807 --enable-xvmc) _xvmc
=yes ;;
808 --disable-xvmc) _xvmc
=no
;;
809 --enable-sdl) _sdl
=yes ;;
810 --disable-sdl) _sdl
=no
;;
811 --enable-directx) _directx
=yes ;;
812 --disable-directx) _directx
=no
;;
813 --enable-win32waveout) _win32waveout
=yes ;;
814 --disable-win32waveout) _win32waveout
=no
;;
815 --enable-nas) _nas
=yes ;;
816 --disable-nas) _nas
=no
;;
817 --enable-png) _png
=yes ;;
818 --disable-png) _png
=no
;;
819 --enable-jpeg) _jpeg
=yes ;;
820 --disable-jpeg) _jpeg
=no
;;
821 --enable-pnm) _pnm
=yes ;;
822 --disable-pnm) _pnm
=no
;;
823 --enable-md5sum) _md5sum
=yes ;;
824 --disable-md5sum) _md5sum
=no
;;
825 --enable-gif) _gif
=yes ;;
826 --disable-gif) _gif
=no
;;
827 --enable-gl) _gl
=yes ;;
828 --disable-gl) _gl
=no
;;
829 --enable-ggi) _ggi
=yes ;;
830 --disable-ggi) _ggi
=no
;;
831 --enable-ggiwmh) _ggiwmh
=yes ;;
832 --disable-ggiwmh) _ggiwmh
=no
;;
833 --enable-aa) _aa
=yes ;;
834 --disable-aa) _aa
=no
;;
835 --enable-caca) _caca
=yes ;;
836 --disable-caca) _caca
=no
;;
837 --enable-svga) _svga
=yes ;;
838 --disable-svga) _svga
=no
;;
839 --enable-vesa) _vesa
=yes ;;
840 --disable-vesa) _vesa
=no
;;
841 --enable-fbdev) _fbdev
=yes ;;
842 --disable-fbdev) _fbdev
=no
;;
843 --enable-dvb) _dvb
=yes ;;
844 --disable-dvb) _dvb
=no
;;
845 --enable-dvbhead) _dvbhead
=yes ;;
846 --disable-dvbhead) _dvbhead
=no
;;
847 --enable-dxr2) _dxr2
=yes ;;
848 --disable-dxr2) _dxr2
=no
;;
849 --enable-dxr3) _dxr3
=yes ;;
850 --disable-dxr3) _dxr3
=no
;;
851 --enable-ivtv) _ivtv
=yes ;;
852 --disable-ivtv) _ivtv
=no
;;
853 --enable-v4l2) _v4l2
=yes ;;
854 --disable-v4l2) _v4l2
=no
;;
855 --enable-iconv) _iconv
=yes ;;
856 --disable-iconv) _iconv
=no
;;
857 --enable-langinfo) _langinfo
=yes ;;
858 --disable-langinfo) _langinfo
=no
;;
859 --enable-rtc) _rtc
=yes ;;
860 --disable-rtc) _rtc
=no
;;
861 --enable-libdv) _libdv
=yes ;;
862 --disable-libdv) _libdv
=no
;;
863 --enable-ossaudio) _ossaudio
=yes ;;
864 --disable-ossaudio) _ossaudio
=no
;;
865 --enable-arts) _arts
=yes ;;
866 --disable-arts) _arts
=no
;;
867 --enable-esd) _esd
=yes ;;
868 --disable-esd) _esd
=no
;;
869 --enable-polyp) _polyp
=yes ;;
870 --disable-polyp) _polyp
=no
;;
871 --enable-jack) _jack
=yes ;;
872 --disable-jack) _jack
=no
;;
873 --enable-openal) _openal
=yes ;;
874 --disable-openal) _openal
=no
;;
875 --enable-mad) _mad
=yes ;;
876 --disable-mad) _mad
=no
;;
877 --enable-toolame) _toolame
=yes ;;
878 --disable-toolame) _toolame
=no
;;
879 --enable-twolame) _twolame
=yes ;;
880 --disable-twolame) _twolame
=no
;;
881 --enable-libcdio) _libcdio
=yes ;;
882 --disable-libcdio) _libcdio
=no
;;
883 --enable-liblzo) _liblzo
=yes ;;
884 --disable-liblzo) _liblzo
=no
;;
885 --enable-libvorbis) _libvorbis
=yes ;;
886 --disable-libvorbis) _libvorbis
=no
;;
887 --enable-speex) _speex
=yes ;;
888 --disable-speex) _speex
=no
;;
889 --enable-tremor-internal) _tremor_internal
=yes ;;
890 --disable-tremor-internal) _tremor_internal
=no
;;
891 --enable-tremor-low) _tremor_low
=yes ;;
892 --disable-tremor-low) _tremor_low
=no
;;
893 --enable-tremor-external) _tremor_external
=yes ;;
894 --disable-tremor-external) _tremor_external
=no
;;
895 --enable-theora) _theora
=yes ;;
896 --disable-theora) _theora
=no
;;
897 --enable-mp3lib) _mp3lib
=yes ;;
898 --disable-mp3lib) _mp3lib
=no
;;
899 --enable-liba52) _liba52
=yes ;;
900 --disable-liba52) _liba52
=no
;;
901 --enable-libdca) _libdca
=yes ;;
902 --disable-libdca) _libdca
=no
;;
903 --enable-libmpeg2) _libmpeg2
=yes ;;
904 --disable-libmpeg2) _libmpeg2
=no
;;
905 --enable-musepack) _musepack
=yes ;;
906 --disable-musepack) _musepack
=no
;;
907 --enable-faad-internal) _faad_internal
=yes ;;
908 --disable-faad-internal) _faad_internal
=no
;;
909 --enable-faad-external) _faad_external
=yes ;;
910 --disable-faad-external) _faad_external
=no
;;
911 --enable-faad-fixed) _faad_fixed
=yes ;;
912 --disable-faad-fixed) _faad_fixed
=no
;;
913 --enable-faac) _faac
=yes ;;
914 --disable-faac) _faac
=no
;;
915 --enable-ladspa) _ladspa
=yes ;;
916 --disable-ladspa) _ladspa
=no
;;
917 --enable-xmms) _xmms
=yes ;;
918 --disable-xmms) _xmms
=no
;;
919 --enable-dvdread) _dvdread
=yes ;;
920 --disable-dvdread) _dvdread
=no
;;
921 --enable-dvdread-internal) _dvdread_internal
=yes ;;
922 --disable-dvdread-internal) _dvdread_internal
=no
;;
923 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
924 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
925 --enable-dvdnav) _dvdnav
=yes ;;
926 --disable-dvdnav) _dvdnav
=no
;;
927 --enable-xanim) _xanim
=yes ;;
928 --disable-xanim) _xanim
=no
;;
929 --enable-real) _real
=yes ;;
930 --disable-real) _real
=no
;;
931 --enable-live) _live
=yes ;;
932 --disable-live) _live
=no
;;
933 --enable-xinerama) _xinerama
=yes ;;
934 --disable-xinerama) _xinerama
=no
;;
935 --enable-mga) _mga
=yes ;;
936 --disable-mga) _mga
=no
;;
937 --enable-xmga) _xmga
=yes ;;
938 --disable-xmga) _xmga
=no
;;
939 --enable-vm) _vm
=yes ;;
940 --disable-vm) _vm
=no
;;
941 --enable-xf86keysym) _xf86keysym
=yes ;;
942 --disable-xf86keysym) _xf86keysym
=no
;;
943 --enable-mlib) _mlib
=yes ;;
944 --disable-mlib) _mlib
=no
;;
945 --enable-sunaudio) _sunaudio
=yes ;;
946 --disable-sunaudio) _sunaudio
=no
;;
947 --enable-sgiaudio) _sgiaudio
=yes ;;
948 --disable-sgiaudio) _sgiaudio
=no
;;
949 --enable-alsa) _alsa
=yes ;;
950 --disable-alsa) _alsa
=no
;;
951 --enable-tv) _tv
=yes ;;
952 --disable-tv) _tv
=no
;;
953 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
954 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
955 --enable-tv-v4l1) _tv_v4l1
=yes ;;
956 --disable-tv-v4l1) _tv_v4l1
=no
;;
957 --enable-tv-v4l2) _tv_v4l2
=yes ;;
958 --disable-tv-v4l2) _tv_v4l2
=no
;;
959 --enable-tv-teletext) _tv_teletext
=yes ;;
960 --disable-tv-teletext) _tv_teletext
=no
;;
961 --enable-radio) _radio
=yes ;;
962 --enable-radio-capture) _radio_capture
=yes ;;
963 --disable-radio-capture) _radio_capture
=no
;;
964 --disable-radio) _radio
=no
;;
965 --enable-radio-v4l) _radio_v4l
=yes ;;
966 --disable-radio-v4l) _radio_v4l
=no
;;
967 --enable-radio-v4l2) _radio_v4l2
=yes ;;
968 --disable-radio-v4l2) _radio_v4l2
=no
;;
969 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
970 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
971 --enable-pvr) _pvr
=yes ;;
972 --disable-pvr) _pvr
=no
;;
973 --enable-fastmemcpy) _fastmemcpy
=yes ;;
974 --disable-fastmemcpy) _fastmemcpy
=no
;;
975 --enable-network) _network
=yes ;;
976 --disable-network) _network
=no
;;
977 --enable-winsock2) _winsock2
=yes ;;
978 --disable-winsock2) _winsock2
=no
;;
979 --enable-smb) _smbsupport
=yes ;;
980 --disable-smb) _smbsupport
=no
;;
981 --enable-vidix-internal) _vidix_internal
=yes ;;
982 --disable-vidix-internal) _vidix_internal
=no
;;
983 --enable-vidix-external) _vidix_external
=yes ;;
984 --disable-vidix-external) _vidix_external
=no
;;
985 --with-vidix-drivers=*)
986 _vidix_drivers
=`echo $ac_option | cut -d '=' -f 2`
988 --enable-joystick) _joystick
=yes ;;
989 --disable-joystick) _joystick
=no
;;
990 --enable-xvid) _xvid
=yes ;;
991 --disable-xvid) _xvid
=no
;;
992 --enable-x264) _x264
=yes ;;
993 --disable-x264) _x264
=no
;;
994 --enable-libnut) _libnut
=yes ;;
995 --disable-libnut) _libnut
=no
;;
996 --enable-libavutil_a) _libavutil_a
=yes ;;
997 --disable-libavutil_a) _libavutil_a
=no
;;
998 --enable-libavutil_so) _libavutil_so
=yes ;;
999 --disable-libavutil_so) _libavutil_so
=no
;;
1000 --enable-libavcodec_a) _libavcodec_a
=yes ;;
1001 --disable-libavcodec_a) _libavcodec_a
=no
;;
1002 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1003 --disable-libavcodec_so) _libavcodec_so
=no
;;
1004 --enable-libamr_nb) _libamr_nb
=yes ;;
1005 --disable-libamr_nb) _libamr_nb
=no
;;
1006 --enable-libamr_wb) _libamr_wb
=yes ;;
1007 --disable-libamr_wb) _libamr_wb
=no
;;
1008 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
1009 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1010 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
1011 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1012 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
1013 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1014 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
1015 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1016 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
1017 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1018 --enable-libavformat_a) _libavformat_a
=yes ;;
1019 --disable-libavformat_a) _libavformat_a
=no
;;
1020 --enable-libavformat_so) _libavformat_so
=yes ;;
1021 --disable-libavformat_so) _libavformat_so
=no
;;
1022 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1023 --disable-libpostproc_a) _libpostproc_a
=no
;;
1024 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1025 --disable-libpostproc_so) _libpostproc_so
=no
;;
1026 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1027 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1029 --enable-lirc) _lirc
=yes ;;
1030 --disable-lirc) _lirc
=no
;;
1031 --enable-lircc) _lircc
=yes ;;
1032 --disable-lircc) _lircc
=no
;;
1033 --enable-gui) _gui
=yes ;;
1034 --disable-gui) _gui
=no
;;
1035 --enable-gtk1) _gtk1
=yes ;;
1036 --disable-gtk1) _gtk1
=no
;;
1037 --enable-termcap) _termcap
=yes ;;
1038 --disable-termcap) _termcap
=no
;;
1039 --enable-termios) _termios
=yes ;;
1040 --disable-termios) _termios
=no
;;
1041 --enable-3dfx) _3dfx
=yes ;;
1042 --disable-3dfx) _3dfx
=no
;;
1043 --enable-s3fb) _s3fb
=yes ;;
1044 --disable-s3fb) _s3fb
=no
;;
1045 --enable-tdfxfb) _tdfxfb
=yes ;;
1046 --disable-tdfxfb) _tdfxfb
=no
;;
1047 --disable-tdfxvid) _tdfxvid
=no
;;
1048 --enable-tdfxvid) _tdfxvid
=yes ;;
1049 --disable-xvr100) _xvr100
=no
;;
1050 --enable-xvr100) _xvr100
=yes ;;
1051 --disable-tga) _tga
=no
;;
1052 --enable-tga) _tga
=yes ;;
1053 --enable-directfb) _directfb
=yes ;;
1054 --disable-directfb) _directfb
=no
;;
1055 --enable-zr) _zr
=yes ;;
1056 --disable-zr) _zr
=no
;;
1057 --enable-bl) _bl
=yes ;;
1058 --disable-bl) _bl
=no
;;
1059 --enable-mtrr) _mtrr
=yes ;;
1060 --disable-mtrr) _mtrr
=no
;;
1061 --enable-largefiles) _largefiles
=yes ;;
1062 --disable-largefiles) _largefiles
=no
;;
1063 --enable-shm) _shm
=yes ;;
1064 --disable-shm) _shm
=no
;;
1065 --enable-select) _select
=yes ;;
1066 --disable-select) _select
=no
;;
1067 --enable-linux-devfs) _linux_devfs
=yes ;;
1068 --disable-linux-devfs) _linux_devfs
=no
;;
1069 --enable-cdparanoia) _cdparanoia
=yes ;;
1070 --disable-cdparanoia) _cdparanoia
=no
;;
1071 --enable-cddb) _cddb
=yes ;;
1072 --disable-cddb) _cddb
=no
;;
1073 --enable-big-endian) _big_endian
=yes ;;
1074 --disable-big-endian) _big_endian
=no
;;
1075 --enable-bitmap-font) _bitmap_font
=yes ;;
1076 --disable-bitmap-font) _bitmap_font
=no
;;
1077 --enable-freetype) _freetype
=yes ;;
1078 --disable-freetype) _freetype
=no
;;
1079 --enable-fontconfig) _fontconfig
=yes ;;
1080 --disable-fontconfig) _fontconfig
=no
;;
1081 --enable-unrarlib) _unrarlib
=yes ;;
1082 --disable-unrarlib) _unrarlib
=no
;;
1083 --enable-ftp) _ftp
=yes ;;
1084 --disable-ftp) _ftp
=no
;;
1085 --enable-vstream) _vstream
=yes ;;
1086 --disable-vstream) _vstream
=no
;;
1087 --enable-pthreads) _pthreads
=yes ;;
1088 --disable-pthreads) _pthreads
=no
;;
1089 --enable-w32threads) _w32threads
=yes ;;
1090 --disable-w32threads) _w32threads
=no
;;
1091 --enable-ass) _ass
=yes ;;
1092 --disable-ass) _ass
=no
;;
1093 --enable-rpath) _rpath
=yes ;;
1094 --disable-rpath) _rpath
=no
;;
1095 --enable-color-console) _color_console
=yes ;;
1096 --disable-color-console) _color_console
=no
;;
1098 --enable-fribidi) _fribidi
=yes ;;
1099 --disable-fribidi) _fribidi
=no
;;
1101 --enable-enca) _enca
=yes ;;
1102 --disable-enca) _enca
=no
;;
1104 --enable-inet6) _inet6
=yes ;;
1105 --disable-inet6) _inet6
=no
;;
1107 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1108 --disable-gethostbyname2) _gethostbyname2
=no
;;
1110 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1111 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1112 --disable-dga) _dga
=no
;;
1114 --enable-menu) _menu
=yes ;;
1115 --disable-menu) _menu
=no
;;
1117 --enable-qtx) _qtx
=yes ;;
1118 --disable-qtx) _qtx
=no
;;
1120 --enable-macosx) _macosx
=yes ;;
1121 --disable-macosx) _macosx
=no
;;
1122 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1123 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1124 --enable-macosx-bundle) _macosx_bundle
=yes;;
1125 --disable-macosx-bundle) _macosx_bundle
=no
;;
1127 --enable-maemo) _maemo
=yes ;;
1128 --disable-maemo) _maemo
=no
;;
1130 --enable-sortsub) _sortsub
=yes ;;
1131 --disable-sortsub) _sortsub
=no
;;
1133 --enable-crash-debug) _crash_debug
=yes ;;
1134 --disable-crash-debug) _crash_debug
=no
;;
1135 --enable-sighandler) _sighandler
=yes ;;
1136 --disable-sighandler) _sighandler
=no
;;
1137 --enable-win32dll) _win32dll
=yes ;;
1138 --disable-win32dll) _win32dll
=no
;;
1140 --enable-sse) _sse
=yes ;;
1141 --disable-sse) _sse
=no
;;
1142 --enable-sse2) _sse2
=yes ;;
1143 --disable-sse2) _sse2
=no
;;
1144 --enable-ssse3) _ssse3
=yes ;;
1145 --disable-ssse3) _ssse3
=no
;;
1146 --enable-mmxext) _mmxext
=yes ;;
1147 --disable-mmxext) _mmxext
=no
;;
1148 --enable-3dnow) _3dnow
=yes ;;
1149 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1150 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1151 --disable-3dnowext) _3dnowext
=no
;;
1152 --enable-cmov) _cmov
=yes ;;
1153 --disable-cmov) _cmov
=no
;;
1154 --enable-fast-cmov) _fast_cmov
=yes ;;
1155 --disable-fast-cmov) _fast_cmov
=no
;;
1156 --enable-altivec) _altivec
=yes ;;
1157 --disable-altivec) _altivec
=no
;;
1158 --enable-armv5te) _armv5te
=yes ;;
1159 --disable-armv5te) _armv5te
=no
;;
1160 --enable-armv6) _armv6
=yes ;;
1161 --disable-armv6) _armv6
=no
;;
1162 --enable-iwmmxt) _iwmmxt
=yes ;;
1163 --disable-iwmmxt) _iwmmxt
=no
;;
1164 --enable-mmx) _mmx
=yes ;;
1165 --disable-mmx) # 3Dnow! and MMX2 require MMX
1166 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1169 echo "Unknown parameter: $ac_option"
1176 # Atmos: moved this here, to be correct, if --prefix is specified
1177 test -z "$_bindir" && _bindir
="$_prefix/bin"
1178 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1179 test -z "$_mandir" && _mandir
="$_prefix/man"
1180 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1181 test -z "$_libdir" && _libdir
="$_prefix/lib"
1183 # Determine our OS name and CPU architecture
1184 if test -z "$_target" ; then
1186 system_name
=`uname -s 2>&1`
1187 case "$system_name" in
1188 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1199 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1206 system_name
="$system_name-UNKNOWN"
1211 # host's CPU/instruction set
1212 host_arch
=`uname -p 2>&1`
1213 case "$host_arch" in
1214 i386|sparc|ppc|alpha|arm|sh3|mips|vax
)
1216 powerpc
) # Darwin returns 'powerpc'
1219 *) # uname -p on Linux returns 'unknown' for the processor type,
1220 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1222 # Maybe uname -m (machine hardware name) returns something we
1225 # x86/x86pc is used by QNX
1226 case "`uname -m 2>&1`" in
1227 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
;;
1228 ia64
) host_arch
=ia64
;;
1230 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1231 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1237 macppc|ppc|ppc64
) host_arch
=ppc
;;
1238 alpha
) host_arch
=alpha
;;
1239 sparc
) host_arch
=sparc
;;
1240 sparc64
) host_arch
=sparc64
;;
1241 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1242 arm
*|zaurus|cats
) host_arch
=arm
;;
1243 sh3
) host_arch
=sh3
;;
1244 s390
) host_arch
=s390
;;
1245 s390x
) host_arch
=s390x
;;
1246 mips
*) host_arch
=mips
;;
1247 vax
) host_arch
=vax
;;
1248 *) host_arch
=UNKNOWN
;;
1252 else # if test -z "$_target"
1253 system_name
=`echo $_target | cut -d '-' -f 2`
1254 case "`echo $system_name | tr A-Z a-z`" in
1255 linux
) system_name
=Linux
;;
1256 freebsd
) system_name
=FreeBSD
;;
1257 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1258 netbsd
) system_name
=NetBSD
;;
1259 bsd
/os
) system_name
=BSD
/OS
;;
1260 openbsd
) system_name
=OpenBSD
;;
1261 sunos
) system_name
=SunOS
;;
1262 qnx
) system_name
=QNX
;;
1263 morphos
) system_name
=MorphOS
;;
1264 amigaos
) system_name
=AmigaOS
;;
1265 mingw32msvc
) system_name
=MINGW32
;;
1267 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1268 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
1271 echo "Detected operating system: $system_name"
1272 echo "Detected host architecture: $host_arch"
1274 if test "$_runtime_cpudetection" = yes && not x86
&& not ppc
; then
1275 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1278 # LGB: temporary files
1279 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1283 TMPLOG
="configure.log"
1285 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1286 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1287 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
1288 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1290 echo configuration
: $_configuration > "$TMPLOG"
1295 # FIXME: A lot of stuff is installed under /usr/local
1296 # NK: But we should never use this stuff implicitly since we call compiler
1297 # from /usr we should be sure that there no effects from other compilers
1298 # (libraries) which might be installed into /usr/local. Let users use this
1299 # stuff explicitly as command line argument. In other words: It would be
1300 # resonable to have only /usr/include or only /usr/local/include.
1303 _ldconfig
="ldconfig -R"
1307 _ld_extra
="$_ld_extra -L/usr/local/lib"
1308 _inc_extra
="$_inc_extra -I/usr/local/include"
1312 _ld_extra
="$_ld_extra -L/usr/local/lib"
1313 _inc_extra
="$_inc_extra -I/usr/local/include"
1317 _ld_extra
="$_ld_extra -lC"
1320 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
1329 # -lwinmm is always needed for osdep/timer-win2.c
1330 _ld_extra
="$_ld_extra -lwinmm"
1331 _confwin32
='TARGET_WIN32 = yes'
1333 _confwin32
='TARGET_WIN32 = no'
1341 _def_confwin32
='#define WIN32'
1348 _def_stream_cache
="#undef USE_STREAM_CACHE"
1352 _ld_extra
="$_ld_extra -lph"
1355 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1356 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1358 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1359 _head
() { head -$1 2>/dev
/null
; }
1361 _head
() { head -n $1 2>/dev
/null
; }
1363 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1364 _tail
() { tail -$1 2>/dev
/null
; }
1366 _tail
() { tail -n $1 2>/dev
/null
; }
1369 # Checking CC version...
1370 if test "$_gcc_check" = yes ; then
1371 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1372 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1373 echocheck
"$_cc version"
1375 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1376 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1377 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1378 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1379 # TODO verify older icc/ecc compatibility
1382 cc_version
="v. ?.??, bad"
1386 cc_version
="$cc_version, ok"
1390 cc_version
="$cc_version, bad"
1394 echores
"$cc_version"
1396 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
1397 echocheck
"$_cc version"
1399 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1400 cc_version
=`$_cc -dumpversion 2>&1`
1401 if test "$?" -gt 0; then
1402 cc_version
="not found"
1406 cc_version
="v. ?.??, bad"
1409 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1410 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1411 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1412 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1413 cc_version
="$cc_version, ok"
1420 cc_version
="$cc_version, bad"
1424 echores
"$cc_version"
1425 test "$cc_verc_fail" = "no" && break
1428 if test "$cc_verc_fail" = yes ; then
1431 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1433 You are not using a supported compiler. We do not have the time to make sure
1434 everything works with compilers other than the ones we use. Use either the
1435 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1436 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1438 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1439 mplayer and lame (which is used for mencoder). If you get compile errors,
1440 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1441 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1444 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1447 die
"Bad gcc version"
1452 ******************************************************************************
1454 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1455 Ok. You know. Do it.
1457 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1458 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1459 Lame which is used by mencoder produces weird errors, too.
1461 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1462 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1464 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1466 ******************************************************************************
1474 test "$_host_cc" || _host_cc
=$_cc
1477 echocheck
"cross compilation"
1478 if test $_cross_compile = auto
; then
1480 int main() { return 0; }
1483 cc_check
&& "$TMPO" && _cross_compile
=no
1485 echores
$_cross_compile
1487 if test $_cross_compile = yes; then
1495 # now that we know what compiler should be used for compilation, try to find
1496 # out which assembler is used by the $_cc compiler
1497 if test "$_as" = auto
; then
1498 _as
=`$_cc -print-prog-name=as`
1499 test -z "$_as" && _as
=as
1502 # XXX: this should be ok..
1505 if test "$_runtime_cpudetection" = no
; then
1507 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1508 # FIXME: Remove the cygwin check once AMD CPUs are supported
1509 if test -r /proc
/cpuinfo
&& not cygwin
; then
1510 # Linux with /proc mounted, extract CPU information from it
1511 _cpuinfo
="cat /proc/cpuinfo"
1512 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86_32
; then
1513 # FreeBSD with Linux emulation /proc mounted,
1514 # extract CPU information from it
1515 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1516 elif darwin
&& not x86_32
; then
1517 # use hostinfo on Darwin
1520 # use 'lsattr' on AIX
1521 _cpuinfo
="lsattr -E -l proc0 -a type"
1523 # all other OSes try to extract CPU information from a small helper
1524 # program cpuinfo instead
1525 $_cc -o cpuinfo
$_exesuf cpuinfo.c
1526 _cpuinfo
="./cpuinfo$_exesuf"
1530 # gather more CPU information
1531 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1532 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1533 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1534 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1535 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1537 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1539 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1540 -e s/xmm/sse/ -e s/kni/sse/`
1542 for ext
in $pparam ; do
1543 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1546 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1547 test $_sse = kernel_check
&& _mmxext
=kernel_check
1549 echocheck
"CPU vendor"
1550 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1552 echocheck
"CPU type"
1556 fi # test "$_runtime_cpudetection" = no
1558 if x86
&& test "$_runtime_cpudetection" = no
; then
1560 if test "$1" = kernel_check
; then
1561 echocheck
"kernel support of $2"
1564 void catch() { exit(1); }
1566 signal(SIGILL, catch);
1567 __asm__ __volatile__ ("$3":::"memory");return(0);
1571 if cc_check
&& tmp_run
; then
1574 _optimizing
="$_optimizing $2"
1579 echo "It seems that your kernel does not correctly support $2."
1580 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1587 extcheck
$_mmx "mmx" "emms"
1588 extcheck
$_mmxext "mmxext" "sfence"
1589 extcheck
$_3dnow "3dnow" "femms"
1590 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1591 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1592 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1593 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1594 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1596 echocheck
"mtrr support"
1597 if test "$_mtrr" = kernel_check
; then
1599 _optimizing
="$_optimizing mtrr"
1603 if test "$_gcc3_ext" != ""; then
1604 # if we had to disable sse/sse2 because the active kernel does not
1605 # support this instruction set extension, we also have to tell
1606 # gcc3 to not generate sse/sse2 instructions for normal C code
1608 int main(void) { return 0; }
1610 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1616 _arch_all
='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L SH3 POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX GENERIC'
1617 case "$host_arch" in
1618 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1620 _target_arch_x86
="ARCH_X86 = yes"
1621 _target_arch
="ARCH_X86_32 = yes"
1622 _def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1627 if test "$_runtime_cpudetection" = no
; then
1631 3) proc
=i386 iproc
=386 ;;
1632 4) proc
=i486 iproc
=486 ;;
1633 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1634 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1635 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1637 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1639 elif test "$pmodel" -ge 8; then
1641 elif test "$pmodel" -ge 6; then
1648 # It's a bit difficult to determine the correct type of Family 6
1649 # AMD CPUs just from their signature. Instead, we check directly
1650 # whether it supports SSE.
1651 if test "$_sse" = yes; then
1652 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1655 # Again, gcc treats athlon and athlon-tbird similarly.
1660 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1661 # caught and remedied in the optimization tests below.
1665 *) proc
=k8 iproc
=686 ;;
1670 3) proc
=i386 iproc
=386 ;;
1671 4) proc
=i486 iproc
=486 ;;
1673 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1674 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1680 if test "$pmodel" -ge 15; then
1682 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1684 elif test "$pmodel" -ge 7; then
1686 elif test "$pmodel" -ge 3; then
1693 # A nocona in 32-bit mode has no more capabilities than a prescott.
1694 if test "$pmodel" -ge 3; then
1700 *) proc
=prescott iproc
=686 ;;
1706 if test "$pmodel" -ge 8; then
1708 elif test "$pmodel" -ge 4; then
1715 if test "$pmodel" -ge 9; then
1722 *) proc
=i686 iproc
=i686
;;
1727 3) proc
=i386 iproc
=386 ;;
1728 4) proc
=i486 iproc
=486 ;;
1729 *) proc
=i586 iproc
=586 ;;
1733 proc
=i586 iproc
=586 ;;
1735 fi # test "$_runtime_cpudetection" = no
1738 # check that gcc supports our CPU, if not, fall back to earlier ones
1739 # LGB: check -mcpu and -march swithing step by step with enabling
1740 # to fall back till 386.
1742 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1744 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1750 echocheck
"GCC & CPU optimization abilities"
1752 int main(void) { return 0; }
1754 if test "$_runtime_cpudetection" = no
; then
1755 if test "$proc" = "k8"; then
1756 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1758 if test "$proc" = "athlon-xp"; then
1759 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1761 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1762 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1764 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1765 if not cc_check
-march=$proc $cpuopt=$proc; then
1766 if cc_check
-march=i586
$cpuopt=i686
; then
1773 if test "$proc" = "prescott" ; then
1774 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1776 if test "$proc" = "core2" ; then
1777 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1779 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
1780 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1782 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1783 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1785 if test "$proc" = "i586"; then
1786 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1788 if test "$proc" = "i486" ; then
1789 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1791 if test "$proc" = "i386" ; then
1792 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1794 if test "$proc" = "error" ; then
1795 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1799 elif test "$proc" = "i586-i686"; then
1800 _march
="-march=i586"
1801 _mcpu
="$cpuopt=i686"
1804 _march
="-march=$proc"
1805 _mcpu
="$cpuopt=$proc"
1808 else # if test "$_runtime_cpudetection" = no
1809 _mcpu
="$cpuopt=generic"
1810 # at least i486 required, for bswap instruction
1811 _march
="-march=i486"
1812 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1813 cc_check
$_mcpu || _mcpu
=""
1814 cc_check
$_march $_mcpu || _march
=""
1817 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1818 ## autodetected mcpu/march parameters
1819 if test "$_target" ; then
1820 # TODO: it may be a good idea to check GCC and fall back in all cases
1821 if test "$host_arch" = "i586-i686"; then
1822 _march
="-march=i586"
1823 _mcpu
="$cpuopt=i686"
1825 _march
="-march=$host_arch"
1826 _mcpu
="$cpuopt=$host_arch"
1834 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1835 i686|athlon
*|pentium
*) iproc
=686 ;;
1840 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1843 pentium4|prescott|nocona
)
1855 _target_arch
='ARCH_IA64 = yes'
1865 _target_arch
='ARCH_X86_64 = yes'
1866 _target_arch_x86
="ARCH_X86 = yes"
1867 _def_fast_unaligned
='#define HAVE_FAST_UNALIGNED 1'
1870 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1871 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1876 if test "$_runtime_cpudetection" = no
; then
1884 # 64-bit prescotts exist, but as far as GCC is concerned they
1885 # have the same capabilities as a nocona.
1892 fi # test "$_runtime_cpudetection" = no
1894 echocheck
"GCC & CPU optimization abilities"
1896 int main(void) { return 0; }
1898 # This is a stripped-down version of the i386 fallback.
1899 if test "$_runtime_cpudetection" = no
; then
1900 # --- AMD processors ---
1901 if test "$proc" = "k8"; then
1902 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1904 # This will fail if gcc version < 3.3, which is ok because earlier
1905 # versions don't really support 64-bit on amd64.
1906 # Is this a valid assumption? -Corey
1907 if test "$proc" = "athlon-xp"; then
1908 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1910 # --- Intel processors ---
1911 if test "$proc" = "core2"; then
1912 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1914 if test "$proc" = "nocona"; then
1915 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1917 if test "$proc" = "pentium4"; then
1918 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1921 _march
="-march=$proc"
1922 _mcpu
="$cpuopt=$proc"
1923 if test "$proc" = "error" ; then
1924 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1928 else # if test "$_runtime_cpudetection" = no
1929 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1930 _march
="-march=x86-64"
1931 _mcpu
="$cpuopt=generic"
1932 cc_check
$_mcpu || _mcpu
="x86-64"
1933 cc_check
$_mcpu || _mcpu
=""
1934 cc_check
$_march $_mcpu || _march
=""
1944 _target_arch
='ARCH_SPARC = yes'
1947 echocheck
"CPU type"
1949 case "`echo $karch`" in
1954 sun4u
) proc
=ultrasparc _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1969 _target_arch
='ARCH_SPARC = yes'
1971 _def_vis
='#define HAVE_VIS = yes'
1979 arm|armv4l|armv5tel
)
1981 _target_arch
='ARCH_ARMV4L = yes'
1991 _target_arch
='ARCH_SH3 = yes'
2001 _def_dcbzl
='#define NO_DCBZL 1'
2002 _target_arch
='ARCH_POWERPC = yes'
2010 echocheck
"CPU type"
2011 case $system_name in
2013 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
2014 if test -n "`$_cpuinfo | grep altivec`"; then
2019 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
2020 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
2021 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
2026 # only gcc 3.4 works reliably with AltiVec code under NetBSD
2028 2*|
3.0*|
3.1*|
3.2*|
3.3*)
2031 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
2038 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
2041 if test "$_altivec" = yes; then
2042 echores
"$proc altivec"
2047 echocheck
"GCC & CPU optimization abilities"
2049 if test -n "$proc"; then
2051 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2052 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2053 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2054 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2055 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2056 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2057 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2058 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2059 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2062 # gcc 3.1(.1) and up supports 7400 and 7450
2063 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2065 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2066 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2070 # gcc 3.2 and up supports 970
2071 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2073 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2074 _def_dcbzl
='#undef NO_DCBZL' ;;
2078 # gcc 3.3 and up supports POWER4
2079 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2081 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2085 # gcc 3.4 and up supports 440*
2086 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2088 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2089 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2093 # gcc 4.0 and up supports POWER5
2094 if test "$_cc_major" -ge "4"; then
2096 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2102 if test -n "$_mcpu"; then
2103 _optimizing
=`echo $_mcpu | cut -c 8-`
2104 echores
"$_optimizing"
2113 _target_arch
='ARCH_ALPHA = yes'
2117 echocheck
"CPU type"
2120 unsigned long ver, mask;
2121 asm ("implver %0" : "=r" (ver));
2122 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2123 printf("%ld-%x\n", ver, ~mask);
2127 $_cc -o "$TMPO" "$TMPC"
2130 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
2131 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
2132 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
2133 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
2134 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
2135 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
2136 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
2140 echocheck
"GCC & CPU optimization abilities"
2141 if test "$proc" = "ev68" ; then
2142 cc_check
-mcpu=$proc || proc
=ev67
2144 if test "$proc" = "ev67" ; then
2145 cc_check
-mcpu=$proc || proc
=ev6
2152 echocheck
"MVI instruction support in GCC"
2153 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
2154 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2157 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2158 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2164 _target_arch
='ARCH_SGI_MIPS = yes'
2172 echocheck
"CPU type"
2173 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2174 case "`echo $proc`" in
2175 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2176 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2177 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2178 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2179 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2180 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2182 # gcc < 3.x does not support -mtune.
2183 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2193 _target_arch
='ARCH_PA_RISC = yes'
2203 _target_arch
='ARCH_S390 = yes'
2213 _target_arch
='ARCH_S390X = yes'
2223 _target_arch
='ARCH_VAX = yes'
2233 _target_arch
='ARCH_GENERIC = yes'
2242 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2243 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2244 die
"unsupported architecture $host_arch"
2246 esac # case "$host_arch" in
2248 if test "$_runtime_cpudetection" = yes ; then
2250 test "$_cmov" != no
&& _cmov
=yes
2252 test "$_mmx" != no
&& _mmx
=yes
2253 test "$_3dnow" != no
&& _3dnow
=yes
2254 test "$_3dnowext" != no
&& _3dnowext
=yes
2255 test "$_mmxext" != no
&& _mmxext
=yes
2256 test "$_sse" != no
&& _sse
=yes
2257 test "$_sse2" != no
&& _sse2
=yes
2258 test "$_ssse3" != no
&& _ssse3
=yes
2259 test "$_mtrr" != no
&& _mtrr
=yes
2268 echocheck
"assembler support of -pipe option"
2270 int main(void) { return 0; }
2272 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2275 echocheck
"compiler support of named assembler arguments"
2277 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2278 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2279 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2281 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2283 echores
$_named_asm_args
2286 # Checking for CFLAGS
2288 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2289 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2291 elif test -z "$CFLAGS" ; then
2292 if test "$cc_vendor" = "intel" ; then
2293 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer -wd167"
2294 elif test "$cc_vendor" != "gnu" ; then
2295 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2297 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2302 if test -n "$LDFLAGS" ; then
2303 _ld_extra
="$_ld_extra $LDFLAGS"
2305 elif test "$cc_vendor" = "intel" ; then
2306 _ld_extra
="$_ld_extra -i-static"
2308 if test -n "$CPPFLAGS" ; then
2309 _inc_extra
="$_inc_extra $CPPFLAGS"
2316 # Checking assembler (_as) compatibility...
2317 # Added workaround for older as that reads from stdin by default - atmos
2318 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2319 echocheck
"assembler ($_as $as_version)"
2321 _pref_as_version
='2.9.1'
2323 if test "$_mmx" = yes ; then
2324 echo 'emms' >> $TMPS
2326 if test "$_3dnow" = yes ; then
2327 _pref_as_version
='2.10.1'
2328 echo 'femms' >> $TMPS
2330 if test "$_3dnowext" = yes ; then
2331 _pref_as_version
='2.10.1'
2332 echo 'pswapd %mm0, %mm0' >> $TMPS
2334 if test "$_mmxext" = yes ; then
2335 _pref_as_version
='2.10.1'
2336 echo 'movntq %mm0, (%eax)' >> $TMPS
2338 if test "$_sse" = yes ; then
2339 _pref_as_version
='2.10.1'
2340 echo 'xorps %xmm0, %xmm0' >> $TMPS
2342 #if test "$_sse2" = yes ; then
2343 # _pref_as_version='2.11'
2344 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2346 if test "$_cmov" = yes ; then
2347 _pref_as_version
='2.10.1'
2348 echo 'cmovb %eax, %ebx' >> $TMPS
2350 if test "$_ssse3" = yes ; then
2351 _pref_as_version
='2.16.92'
2352 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2354 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2356 if test "$as_verc_fail" != yes ; then
2359 _res_comment
="Upgrade binutils to ${_pref_as_version} or use --disable-ssse3 etc."
2361 die
"obsolete binutils version"
2366 echocheck
".align is a power of two"
2367 if test "$_asmalign_pot" = auto
; then
2370 main() { asm (".align 3"); }
2372 cc_check
&& _asmalign_pot
=yes
2374 if test "$_asmalign_pot" = "yes" ; then
2375 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2377 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2379 echores
$_asmalign_pot
2382 #FIXME: This should happen before the check for CFLAGS..
2385 # check if altivec is supported by the compiler, and how to enable it
2387 _altivec_gcc_flags
=''
2389 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2390 echocheck
"GCC altivec support"
2398 FSF_flags
='-maltivec -mabi=altivec'
2399 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2401 # check for Darwin-style flags first, since
2402 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2403 # accepts but ignores FSF-style flags...
2405 if test -z "$p"; then
2406 cc_check
$Darwin_flags && p
='Darwin'
2408 if test -z "$p"; then
2409 cc_check
$FSF_flags && p
='FSF'
2413 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2414 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2418 if test -z "$p"; then
2421 p
="$p-style ($_altivec_gcc_flags)"
2427 # check if <altivec.h> should be included
2429 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2431 if test "$_altivec" = yes ; then
2432 echocheck
"altivec.h"
2434 #include <altivec.h>
2435 int main(void) { return 0; }
2438 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2439 if test "$_have_altivec_h" = yes ; then
2440 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2442 echores
"$_have_altivec_h"
2445 # disable runtime cpudetection if
2446 # - we cannot generate altivec code
2447 # - altivec is disabled by the user
2449 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2450 _runtime_cpudetection
=no
2453 # show that we are optimizing for altivec (if enabled and supported)
2455 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2456 _optimizing
="$_optimizing altivec"
2459 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2461 if test "$_altivec" = yes ; then
2462 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2463 #_mcpu="$_mcpu $_altivec_gcc_flags"
2464 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2467 # setup _def_altivec correctly
2469 if test "$_altivec" = yes ; then
2470 _def_altivec
='#define HAVE_ALTIVEC 1'
2472 _def_altivec
='#undef HAVE_ALTIVEC'
2477 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2478 if test $_armv5te = "auto" ; then
2481 __asm__ __volatile__ ("qadd r0, r0, r0");
2485 cc_check
&& _armv5te
=yes
2489 echocheck
"ARMv6 (SIMD instructions)"
2490 if test $_armv6 = "auto" ; then
2492 int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); }
2495 cc_check
&& _armv6
=yes
2499 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2500 if test $_iwmmxt = "auto" ; then
2503 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2507 cc_check
&& _iwmmxt
=yes
2512 _cpuexts_all
='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 IWMMXT MLIB MMI SH4 BFIN'
2513 test "$_altivec" = yes && _cpuexts
="ALTIVEC $_cpuexts"
2514 test "$_mmx" = yes && _cpuexts
="MMX $_cpuexts"
2515 test "$_mmxext" = yes && _cpuexts
="MMX2 $_cpuexts"
2516 test "$_3dnow" = yes && _cpuexts
="3DNOW $_cpuexts"
2517 test "$_3dnowext" = yes && _cpuexts
="3DNOWEX $_cpuexts"
2518 test "$_sse" = yes && _cpuexts
="SSE $_cpuexts"
2519 test "$_sse2" = yes && _cpuexts
="SSE2 $_cpuexts"
2520 test "$_ssse3" = yes && _cpuexts
="SSSE3 $_cpuexts"
2521 test "$_cmov" = yes && _cpuexts
="CMOV $_cpuexts"
2522 test "$_fast_cmov" = yes && _cpuexts
="FAST_CMOV $_cpuexts"
2523 test "$_armv5te" = yes && _cpuexts
="ARMV5TE $_cpuexts"
2524 test "$_armv6" = yes && _cpuexts
="ARMV6 $_cpuexts"
2525 test "$_iwmmxt" = yes && _cpuexts
="IWMMXT $_cpuexts"
2527 # Checking kernel version...
2528 if x86_32
&& linux
; then
2530 kernel_version
=`uname -r 2>&1`
2531 echocheck
"$system_name kernel version"
2532 case "$kernel_version" in
2533 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2534 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2535 _k_verc_problem
=yes;;
2537 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2540 if test "$_k_verc_fail" ; then
2541 echores
"$kernel_version, fail"
2542 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2543 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2544 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2545 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2546 echo "2.2.x you must upgrade it to get SSE support!"
2547 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2549 echores
"$kernel_version, ok"
2553 ######################
2554 # MAIN TESTS GO HERE #
2555 ######################
2560 int main(void) { return 0; }
2562 if cc_check
-lposix ; then
2563 _ld_extra
="$_ld_extra -lposix"
2571 int main(void) { return 0; }
2573 if cc_check
-lm ; then
2582 echocheck
"langinfo"
2583 if test "$_langinfo" = auto
; then
2585 #include <langinfo.h>
2586 int main(void) { nl_langinfo(CODESET); return 0; }
2589 cc_check
&& _langinfo
=yes
2591 if test "$_langinfo" = yes ; then
2592 _def_langinfo
='#define USE_LANGINFO 1'
2594 _def_langinfo
='#undef USE_LANGINFO'
2596 echores
"$_langinfo"
2599 echocheck
"language"
2600 test -z "$_language" && _language
=$LINGUAS
2601 _language
=`echo $_language | sed 's/,/ /g'`
2602 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2603 for lang
in $_language ; do
2604 test "$lang" = all
&& lang
=en
2605 if test -f "help/help_mp-${lang}.h" ; then
2609 echo ${_echo_n} "$lang not found, ${_echo_c}"
2610 _language
=`echo $_language | sed "s/$lang *//"`
2613 test -z "$_language" && _language
=en
2614 _mp_help
="help/help_mp-${_language}.h"
2615 test -f $_mp_help || die
"$_mp_help not found"
2616 for lang
in $LANGUAGES ; do
2617 if test -f "DOCS/man/$lang/mplayer.1" ; then
2618 MAN_LANG
="$lang $MAN_LANG"
2621 _doc_lang
=$_language
2622 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2623 echores
"using $_language (man pages: $MAN_LANG)"
2626 echocheck
"enable sighandler"
2627 if test "$_sighandler" = yes ; then
2628 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2630 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2632 echores
"$_sighandler"
2634 echocheck
"runtime cpudetection"
2635 if test "$_runtime_cpudetection" = yes ; then
2636 _optimizing
="Runtime CPU-Detection enabled"
2637 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2639 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2641 echores
"$_runtime_cpudetection"
2644 echocheck
"restrict keyword"
2645 for restrict_keyword
in restrict __restrict __restrict__
; do
2646 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2648 _def_restrict_keyword
=$restrict_keyword
2652 if [ -n "$_def_restrict_keyword" ]; then
2653 echores
"$_def_restrict_keyword"
2657 # Avoid infinite recursion loop ("#define restrict restrict")
2658 if [ "$_def_restrict_keyword" != "restrict" ]; then
2659 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2661 _def_restrict_keyword
=""
2665 echocheck
"__builtin_expect"
2666 # GCC branch prediction hint
2669 a = __builtin_expect (a, 10);
2670 return a == 10 ? 0 : 1;
2672 int main() { return foo(10) && foo(0); }
2675 cc_check
&& _builtin_expect
=yes
2676 if test "$_builtin_expect" = yes ; then
2677 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2679 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2681 echores
"$_builtin_expect"
2687 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2690 cc_check
-lkstat && _kstat
=yes
2691 if test "$_kstat" = yes ; then
2692 _def_kstat
="#define HAVE_LIBKSTAT 1"
2693 _ld_extra
="$_ld_extra -lkstat"
2695 _def_kstat
="#undef HAVE_LIBKSTAT"
2701 # required for nanosleep on some systems
2704 int main(void) { (void) nanosleep(0, 0); return 0; }
2707 cc_check
-lposix4 && _posix4
=yes
2708 if test "$_posix4" = yes ; then
2709 _ld_extra
="$_ld_extra -lposix4"
2716 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2719 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2720 if test "$_lrintf" = yes ; then
2721 _def_lrintf
="#define HAVE_LRINTF 1"
2723 _def_lrintf
="#undef HAVE_LRINTF"
2731 int main(void) { char a; mkstemp(&a); return 0; }
2734 cc_check
&& _mkstemp
=yes
2735 if test "$_mkstemp" = yes ; then
2736 _def_mkstemp
='#define HAVE_MKSTEMP 1'
2738 _def_mkstemp
='#undef HAVE_MKSTEMP'
2743 echocheck
"nanosleep"
2744 # also check for nanosleep
2747 int main(void) { (void) nanosleep(0, 0); return 0; }
2750 cc_check
&& _nanosleep
=yes
2751 if test "$_nanosleep" = yes ; then
2752 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2754 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2756 echores
"$_nanosleep"
2760 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2761 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2764 #include <sys/socket.h>
2765 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2768 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2769 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2771 if test $_winsock2 = auto
&& not cygwin
; then
2774 #include <winsock2.h>
2775 int main(void) { (void) gethostbyname(0); return 0; }
2777 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2779 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2783 if test $_winsock2 = yes ; then
2785 _def_winsock2
='#define HAVE_WINSOCK2 1'
2787 _def_winsock2
='#undef HAVE_WINSOCK2'
2792 echocheck
"inet_pton()"
2794 #include <sys/types.h>
2795 #include <sys/socket.h>
2796 #include <arpa/inet.h>
2797 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2799 if test "$_winsock2" = yes ; then
2800 _res_comment
="using winsock2 functions instead"
2802 elif cc_check
$_ld_sock ; then
2803 # NOTE: Linux has libresolv but does not need it
2805 _res_comment
="using $_ld_sock"
2807 elif cc_check
$_ld_sock -lresolv ; then
2808 # NOTE: needed for SunOS at least
2809 _ld_sock
="$_ld_sock -lresolv"
2810 _res_comment
="using $_ld_sock"
2813 _res_comment
="trying inet_aton next"
2816 echocheck
"inet_aton()"
2818 #include <sys/types.h>
2819 #include <sys/socket.h>
2820 #include <arpa/inet.h>
2821 int main(void) { (void) inet_aton(0, 0); return 0; }
2824 if cc_check
$_ld_sock ; then
2825 # NOTE: Linux has libresolv but does not need it
2827 _res_comment
="using $_ld_sock"
2828 elif cc_check
$_ld_sock -lresolv ; then
2829 # NOTE: needed for SunOS at least
2830 _ld_sock
="$_ld_sock -lresolv"
2831 _res_comment
="using $_ld_sock"
2835 _res_comment
="network support disabled"
2837 echores
"$_use_aton"
2840 _def_use_aton
='#undef USE_ATON'
2841 if test "$_use_aton" = yes; then
2842 _def_use_aton
='#define USE_ATON 1'
2846 # FIXME network check
2847 if test "$_network" = yes ; then
2848 _def_network
='#define MPLAYER_NETWORK 1'
2849 _ld_extra
="$_ld_extra $_ld_sock"
2850 _inputmodules
="network $_inputmodules"
2852 _noinputmodules
="network $_noinputmodules"
2853 _def_network
='#undef MPLAYER_NETWORK'
2858 echocheck
"inttypes.h (required)"
2860 #include <inttypes.h>
2861 int main(void) { return 0; }
2864 cc_check
&& _inttypes
=yes
2865 echores
"$_inttypes"
2867 if test "$_inttypes" = no
; then
2868 echocheck
"bitypes.h (inttypes.h predecessor)"
2870 #include <sys/bitypes.h>
2871 int main(void) { return 0; }
2873 cc_check
&& _inttypes
=yes
2874 if test "$_inttypes" = yes ; then
2875 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."
2877 die
"Cannot find header either inttypes.h or bitypes.h. There is no chance for compilation to succeed."
2882 echocheck
"int_fastXY_t in inttypes.h"
2884 #include <inttypes.h>
2886 volatile int_fast16_t v= 0;
2890 cc_check
&& _fast_inttypes
=yes
2891 if test "$_fast_inttypes" = yes ; then
2895 _def_fast_inttypes
='
2896 typedef signed char int_fast8_t;
2897 typedef signed int int_fast16_t;
2898 typedef signed int int_fast32_t;
2899 typedef signed long long int_fast64_t;
2900 typedef unsigned char uint_fast8_t;
2901 typedef unsigned int uint_fast16_t;
2902 typedef unsigned int uint_fast32_t;
2903 typedef unsigned long long uint_fast64_t;'
2905 echores
"$_fast_inttypes"
2908 echocheck
"word size"
2909 _mp_wordsize
="#undef MP_WORDSIZE"
2912 #include <sys/types.h>
2913 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2915 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2916 echores
"$_wordsize"
2919 echocheck
"malloc.h"
2922 int main(void) { (void) malloc(0); return 0; }
2925 cc_check
&& _malloc
=yes
2926 if test "$_malloc" = yes ; then
2927 _def_malloc
='#define HAVE_MALLOC_H 1'
2929 _def_malloc
='#undef HAVE_MALLOC_H'
2931 # malloc.h emits a warning in FreeBSD and OpenBSD
2932 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2936 echocheck
"memalign()"
2937 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2940 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2943 cc_check
&& _memalign
=yes
2944 if test "$_memalign" = yes ; then
2945 _def_memalign
='#define HAVE_MEMALIGN 1'
2947 _def_memalign
='#undef HAVE_MEMALIGN'
2948 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2949 not darwin
&& _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2951 echores
"$_memalign"
2954 echocheck
"alloca.h"
2957 int main(void) { (void) alloca(0); return 0; }
2960 cc_check
&& _alloca
=yes
2962 _def_alloca
='#define HAVE_ALLOCA_H 1'
2964 _def_alloca
='#undef HAVE_ALLOCA_H'
2971 #include <sys/types.h>
2972 #include <sys/mman.h>
2973 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2976 cc_check
&& _mman
=yes
2977 if test "$_mman" = yes ; then
2978 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2980 _def_mman
='#undef HAVE_SYS_MMAN_H'
2985 #include <sys/types.h>
2986 #include <sys/mman.h>
2987 int main(void) { void *p = MAP_FAILED; return 0; }
2989 _mman_has_map_failed
=no
2990 cc_check
&& _mman_has_map_failed
=yes
2991 if test "$_mman_has_map_failed" = yes ; then
2992 _def_mman_has_map_failed
=''
2994 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2997 echocheck
"dynamic loader"
3000 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
3003 for _ld_tmp
in "" "-ldl" ; do
3004 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3006 if test "$_dl" = yes ; then
3007 _def_dl
='#define HAVE_LIBDL 1'
3009 _def_dl
='#undef HAVE_LIBDL'
3014 echocheck
"dynamic a/v plugins support"
3015 if test "$_dl" = no
; then
3018 if test "$_dynamic_plugins" = yes ; then
3019 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
3021 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3023 echores
"$_dynamic_plugins"
3026 _def_threads
='#undef HAVE_THREADS'
3029 if test "$_pthreads" = auto
; then
3031 #include <pthread.h>
3032 void* func(void *arg) { return arg; }
3033 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3037 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3038 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3039 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3043 if test "$_pthreads" = yes ; then
3044 _res_comment
="using $_ld_pthread"
3045 _def_pthreads
='#define HAVE_PTHREADS 1'
3046 _def_threads
='#define HAVE_THREADS 1'
3048 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3049 _def_pthreads
='#undef HAVE_PTHREADS'
3050 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3051 if not mingw32
; then
3055 echores
"$_pthreads"
3057 echocheck
"w32threads"
3058 if test "$_pthreads" = yes ; then
3059 _res_comment
="using pthread instead"
3062 if test "$_w32threads" = auto
; then
3064 mingw32
&& _w32threads
=yes
3066 test "$_w32threads" = yes && _def_threads
='#define HAVE_THREADS 1'
3067 echores
"$_w32threads"
3071 if test "$_rpath" = yes ; then
3072 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3073 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3080 if test "$_iconv" = auto
; then
3085 #define INBUFSIZE 1024
3086 #define OUTBUFSIZE 4096
3088 char inbuffer[INBUFSIZE];
3089 char outbuffer[OUTBUFSIZE];
3094 char *tocode="UTF-8";
3095 char *fromcode="cp1250";
3096 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3097 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3098 char *iptr=inbuffer;
3099 char *optr=outbuffer;
3100 size_t inleft=numread;
3101 size_t outleft=OUTBUFSIZE;
3102 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3104 write (1, outbuffer, OUTBUFSIZE - outleft);
3107 if (iconv_close(icdsc) == -1)
3113 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3114 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3118 if test "$_iconv" = yes ; then
3119 _def_iconv
='#define USE_ICONV 1'
3121 _def_iconv
='#undef USE_ICONV'
3126 echocheck
"soundcard.h"
3128 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3129 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3130 for _soundcard_header
in "sys/soundcard.h" "soundcard.h"; do
3132 #include <$_soundcard_header>
3133 int main(void) { return 0; }
3135 cc_check
&& _soundcard_h
=yes && _res_comment
="$_soundcard_header" && break
3138 if test "$_soundcard_h" = yes ; then
3139 if test $_soundcard_header = "sys/soundcard.h"; then
3140 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3142 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3145 echores
"$_soundcard_h"
3148 echocheck
"sys/dvdio.h"
3151 #include <sys/dvdio.h>
3152 int main(void) { return 0; }
3155 cc_check
&& _dvdio
=yes
3156 if test "$_dvdio" = yes ; then
3157 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3159 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3164 echocheck
"sys/cdio.h"
3167 #include <sys/cdio.h>
3168 int main(void) { return 0; }
3171 cc_check
&& _cdio
=yes
3172 if test "$_cdio" = yes ; then
3173 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3175 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3180 echocheck
"linux/cdrom.h"
3182 #include <sys/types.h>
3183 #include <linux/cdrom.h>
3184 int main(void) { return 0; }
3187 cc_check
&& _cdrom
=yes
3188 if test "$_cdrom" = yes ; then
3189 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3191 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3199 int main(void) { return 0; }
3202 cc_check
&& _dvd
=yes
3203 if test "$_dvd" = yes ; then
3204 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3206 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3212 echocheck
"BSDI dvd.h"
3215 int main(void) { return 0; }
3218 cc_check
&& _bsdi_dvd
=yes
3219 if test "$_bsdi_dvd" = yes ; then
3220 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3222 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3224 echores
"$_bsdi_dvd"
3229 # also used by AIX, but AIX does not support VCD and/or libdvdread
3230 echocheck
"HP-UX SCSI header"
3232 #include <sys/scsi.h>
3233 int main(void) { return 0; }
3236 cc_check
&& _hpux_scsi_h
=yes
3237 if test "$_hpux_scsi_h" = yes ; then
3238 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3240 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3242 echores
"$_hpux_scsi_h"
3247 echocheck
"userspace SCSI headers (Solaris)"
3249 # include <unistd.h>
3250 # include <stropts.h>
3251 # include <sys/scsi/scsi_types.h>
3252 # include <sys/scsi/impl/uscsi.h>
3253 int main(void) { return 0; }
3256 cc_check
&& _sol_scsi_h
=yes
3257 if test "$_sol_scsi_h" = yes ; then
3258 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3260 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3262 echores
"$_sol_scsi_h"
3267 if test "$_termcap" = auto
; then
3269 int main(void) { tgetent(); return 0; }
3272 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3273 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3274 && _termcap
=yes && break
3277 if test "$_termcap" = yes ; then
3278 _def_termcap
='#define USE_TERMCAP 1'
3279 _res_comment
="using $_ld_tmp"
3281 _def_termcap
='#undef USE_TERMCAP'
3287 _def_termios
='#undef HAVE_TERMIOS'
3288 _def_termios_h
='#undef HAVE_TERMIOS_H'
3289 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3290 if test "$_termios" = auto
; then
3292 for _termios_header
in "sys/termios.h" "termios.h"; do
3294 #include <$_termios_header>
3295 int main(void) { return 0; }
3297 cc_check
&& _termios
=yes && _res_comment
="$_termios_header" && break
3301 if test "$_termios" = yes ; then
3302 _def_termios
='#define HAVE_TERMIOS 1'
3303 if test "$_termios_header" = "termios.h" ; then
3304 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3306 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3313 if test "$_shm" = auto
; then
3315 #include <sys/types.h>
3316 #include <sys/shm.h>
3317 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3320 cc_check
&& _shm
=yes
3322 if test "$_shm" = yes ; then
3323 _def_shm
='#define HAVE_SHM 1'
3325 _def_shm
='#undef HAVE_SHM'
3330 echocheck
"strsep()"
3333 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3336 cc_check
&& _strsep
=yes
3337 if test "$_strsep" = yes ; then
3338 _def_strsep
='#define HAVE_STRSEP 1'
3341 _def_strsep
='#undef HAVE_STRSEP'
3347 echocheck
"vsscanf()"
3350 int main(void) { vsscanf(0, 0, 0); return 0; }
3353 cc_check
&& _vsscanf
=yes
3354 if test "$_vsscanf" = yes ; then
3355 _def_vsscanf
='#define HAVE_VSSCANF 1'
3358 _def_vsscanf
='#undef HAVE_VSSCANF'
3367 int main(void) { swab(0, 0, 0); return 0; }
3370 cc_check
&& _swab
=yes
3371 if test "$_swab" = yes ; then
3372 _def_swab
='#define HAVE_SWAB 1'
3375 _def_swab
='#undef HAVE_SWAB'
3380 echocheck
"POSIX select()"
3384 #include <sys/types.h>
3386 #include <sys/time.h>
3388 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3391 _def_posix_select
='#undef HAVE_POSIX_SELECT'
3392 cc_check
&& _posix_select
=yes \
3393 && _def_posix_select
='#define HAVE_POSIX_SELECT 1'
3394 echores
"$_posix_select"
3397 echocheck
"gettimeofday()"
3400 #include <sys/time.h>
3401 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3404 cc_check
&& _gettimeofday
=yes
3405 if test "$_gettimeofday" = yes ; then
3406 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3407 _need_gettimeofday
=no
3409 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3410 _need_gettimeofday
=yes
3412 echores
"$_gettimeofday"
3419 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3422 cc_check
&& _glob
=yes
3423 if test "$_glob" = yes ; then
3424 _def_glob
='#define HAVE_GLOB 1'
3427 _def_glob
='#undef HAVE_GLOB'
3433 echocheck
"setenv()"
3436 int main (void){ setenv("","",0); return 0; }
3439 cc_check
&& _setenv
=yes
3440 if test "$_setenv" = yes ; then
3441 _def_setenv
='#define HAVE_SETENV 1'
3444 _def_setenv
='#undef HAVE_SETENV'
3451 echocheck
"sysi86()"
3453 #include <sys/sysi86.h>
3454 int main (void) { sysi86(0); return 0; }
3457 cc_check
&& _sysi86
=yes
3458 if test "$_sysi86" = yes ; then
3459 _def_sysi86
='#define HAVE_SYSI86 1'
3461 #include <sys/sysi86.h>
3462 int main (void) { int sysi86(int, void*); sysi86(0); return 0; }
3464 cc_check
&& _def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3466 _def_sysi86
='#undef HAVE_SYSI86'
3472 echocheck
"sys/sysinfo.h"
3474 #include <sys/sysinfo.h>
3476 struct sysinfo s_info;
3482 cc_check
&& _sys_sysinfo
=yes
3483 if test "$_sys_sysinfo" = yes ; then
3484 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3486 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3488 echores
"$_sys_sysinfo"
3493 echocheck
"Mac OS X APIs"
3494 if test "$_macosx" = auto
; then
3495 productName
=`/usr/bin/sw_vers -productName`
3496 if test "$productName" = "Mac OS X" ||
3497 test "$productName" = "Mac OS X Server" ; then
3501 _def_macosx
='#undef MACOSX'
3502 _noaomodules
="macosx $_noaomodules"
3503 _novomodules
="quartz $_novomodules"
3506 if test "$_macosx" = yes ; then
3508 #include <Carbon/Carbon.h>
3509 #include <QuickTime/QuickTime.h>
3510 #include <CoreAudio/CoreAudio.h>
3514 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3517 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3518 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3519 _def_macosx
='#define MACOSX 1'
3520 _aosrc
="$_aosrc ao_macosx.c"
3521 _aomodules
="macosx $_aomodules"
3522 _vosrc
="$_vosrc vo_quartz.c"
3523 _vomodules
="quartz $_vomodules"
3526 _def_macosx
='#undef MACOSX'
3527 _noaomodules
="macosx $_noaomodules"
3528 _novomodules
="quartz $_novomodules"
3531 #include <Carbon/Carbon.h>
3532 #include <QuartzCore/CoreVideo.h>
3535 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3536 _vosrc
="$_vosrc vo_macosx.m"
3537 _vomodules
="macosx $_vomodules"
3538 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3539 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3540 _macosx_corevideo
=yes
3542 _novomodules
="macosx $_novomodules"
3543 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3544 _macosx_corevideo
=no
3549 echocheck
"Mac OS X Finder Support"
3550 if test "$_macosx_finder_support" = auto
; then
3551 _macosx_finder_support
=$_macosx
3553 if test "$_macosx_finder_support" = yes; then
3554 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3555 _macosx_finder_support
=yes
3557 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3558 _macosx_finder_support
=no
3560 echores
"$_macosx_finder_support"
3562 echocheck
"Mac OS X Bundle file locations"
3563 if test "$_macosx_bundle" = auto
; then
3564 _macosx_bundle
=$_macosx_finder_support
3566 if test "$_macosx_bundle" = yes; then
3567 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3569 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3572 echores
"$_macosx_bundle"
3577 echocheck
"pkg-config"
3578 _pkg_config
=pkg-config
3579 if `$_pkg_config --version > /dev/null 2>&1`; then
3580 if test "$_ld_static"; then
3581 _pkg_config
="$_pkg_config --static"
3590 echocheck
"Samba support (libsmbclient)"
3591 if test "$_smbsupport" = yes; then
3592 _ld_extra
="$_ld_extra -lsmbclient"
3594 if test "$_smbsupport" = auto
; then
3597 #include <libsmbclient.h>
3598 int main(void) { smbc_opendir("smb://"); return 0; }
3600 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3601 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3602 _smbsupport
=yes && break
3606 if test "$_smbsupport" = yes; then
3607 _def_smbsupport
="#define LIBSMBCLIENT"
3608 _inputmodules
="smb $_inputmodules"
3610 _def_smbsupport
="#undef LIBSMBCLIENT"
3611 _noinputmodules
="smb $_noinputmodules"
3613 echores
"$_smbsupport"
3622 if test "$_3dfx" = yes ; then
3623 _def_3dfx
='#define HAVE_3DFX 1'
3624 _vosrc
="$_vosrc vo_3dfx.c"
3625 _vomodules
="3dfx $_vomodules"
3627 _def_3dfx
='#undef HAVE_3DFX'
3628 _novomodules
="3dfx $_novomodules"
3634 if test "$_tdfxfb" = yes ; then
3635 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3636 _vosrc
="$_vosrc vo_tdfxfb.c"
3637 _vomodules
="tdfxfb $_vomodules"
3639 _def_tdfxfb
='#undef HAVE_TDFXFB'
3640 _novomodules
="tdfxfb $_novomodules"
3645 if test "$_s3fb" = yes ; then
3646 _def_s3fb
='#define HAVE_S3FB 1'
3647 _vosrc
="$_vosrc vo_s3fb.c"
3648 _vomodules
="s3fb $_vomodules"
3650 _def_s3fb
='#undef HAVE_S3FB'
3651 _novomodules
="s3fb $_novomodules"
3656 if test "$_tdfxvid" = yes ; then
3657 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3658 _vosrc
="$_vosrc vo_tdfx_vid.c"
3659 _vomodules
="tdfx_vid $_vomodules"
3661 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3662 _novomodules
="tdfx_vid $_novomodules"
3667 if test "$_xvr100" = auto
; then
3670 #include <sys/fbio.h>
3671 #include <sys/visual_io.h>
3673 struct vis_identifier ident;
3674 struct fbgattr attr;
3676 ioctl(0, VIS_GETIDENTIFIER, &ident);
3677 ioctl(0, FBIOGATTR, &attr);
3681 cc_check
&& _xvr100
=yes
3683 if test "$_xvr100" = yes ; then
3684 _def_xvr100
='#define HAVE_XVR100 1'
3685 _vosrc
="$_vosrc vo_xvr100.c"
3686 _vomodules
="xvr100 $_vomodules"
3688 _def_tdfxvid
='#undef HAVE_XVR100'
3689 _novomodules
="xvr100 $_novomodules"
3694 if test "$_tga" = yes ; then
3695 _def_tga
='#define HAVE_TGA 1'
3696 _vosrc
="$_vosrc vo_tga.c"
3697 _vomodules
="tga $_vomodules"
3699 _def_tga
='#undef HAVE_TGA'
3700 _novomodules
="tga $_novomodules"
3705 echocheck
"md5sum support"
3706 if test "$_md5sum" = yes; then
3707 _def_md5sum
="#define HAVE_MD5SUM"
3708 _vosrc
="$_vosrc vo_md5sum.c"
3709 _vomodules
="md5sum $_vomodules"
3711 _def_md5sum
="#undef HAVE_MD5SUM"
3712 _novomodules
="md5sum $_novomodules"
3718 if test "$_bl" = yes ; then
3719 _def_bl
='#define HAVE_BL 1'
3720 _vosrc
="$_vosrc vo_bl.c"
3721 _vomodules
="bl $_vomodules"
3723 _def_bl
='#undef HAVE_BL'
3724 _novomodules
="bl $_novomodules"
3729 echocheck
"DirectFB"
3730 if test "$_directfb" = auto
; then
3733 #include <directfb.h>
3734 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3736 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3737 -I/usr
/include
/directfb
-I/usr
/local
/include
; do
3738 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3739 _inc_extra
="$_inc_extra $_inc_tmp" && break
3744 expr $1 \
* 65536 + $2 \
* 256 + $3
3747 if test "$_directfb" = yes; then
3749 #include <directfb_version.h>
3751 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3754 if $_cc -E $TMPC $_inc_extra > "$TMPO"; then
3755 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPO" | tr -d '()'`
3756 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3757 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3758 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3759 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3760 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3761 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3762 _res_comment
="$_directfb_version"
3764 _def_directfb_version
='#undef DIRECTFBVERSION'
3766 _res_comment
="version >=0.9.13 required"
3770 _res_comment
="failed to get version"
3773 echores
"$_directfb"
3775 if test "$_directfb" = yes ; then
3776 _def_directfb
='#define HAVE_DIRECTFB 1'
3777 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3778 _vosrc
="$_vosrc vo_directfb2.c"
3779 _vomodules
="directfb $_vomodules"
3780 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3782 _novomodules
="directfb $_novomodules"
3785 if test "$_dfb_version" -ge `dfb_version 0 9 15`; then
3786 _vosrc
="$_vosrc vo_dfbmga.c"
3787 _vomodules
="dfbmga $_vomodules"
3788 _def_dfbmga
='#define HAVE_DFBMGA 1'
3790 _novomodules
="dfbmga $_novomodules"
3791 _def_dfbmga
='#undef HAVE_DFBMGA'
3794 _def_directfb
='#undef HAVE_DIRECTFB'
3795 _novomodules
="dfbmga directfb $_novomodules"
3799 echocheck
"X11 headers presence"
3801 _res_comment
="check if the dev(el) packages are installed"
3802 for I
in `echo $_inc_extra | sed s/-I//g` /usr
/include
; do
3803 if test -f "$I/X11/Xlib.h" ; then
3809 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/openwin
/include
; do
3810 if test -f "$I/X11/Xlib.h" ; then
3811 _inc_extra
="$_inc_extra -I$I"
3813 _res_comment
="using $I"
3817 echores
"$_x11_headers"
3821 if test "$_x11" = auto
&& test "$_x11_headers" = yes ; then
3823 #include <X11/Xlib.h>
3824 #include <X11/Xutil.h>
3825 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3827 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3828 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3830 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3832 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3834 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3835 && _x11
=yes && break
3838 if test "$_x11" = yes ; then
3839 _def_x11
='#define HAVE_X11 1'
3840 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3841 _vomodules
="x11 xover $_vomodules"
3844 _def_x11
='#undef HAVE_X11'
3845 _novomodules
="x11 $_novomodules"
3846 _res_comment
="check if the dev(el) packages are installed"
3847 # disable stuff that depends on X
3848 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _dga
=no
3856 if test "$_x11" = yes ; then
3858 #include <X11/Xmd.h>
3859 #include <X11/Xlib.h>
3860 #include <X11/Xutil.h>
3861 #include <X11/Xatom.h>
3862 #include <X11/extensions/dpms.h>
3864 (void) DPMSQueryExtension(0, 0, 0);
3867 cc_check
-lXdpms && _xdpms3
=yes
3869 #include <X11/Xlib.h>
3870 #include <X11/extensions/dpms.h>
3872 (void) DPMSQueryExtension(0, 0, 0);
3875 cc_check
&& _xdpms4
=yes
3877 if test "$_xdpms4" = yes ; then
3878 _def_xdpms
='#define HAVE_XDPMS 1'
3879 _res_comment
="using Xdpms 4"
3881 elif test "$_xdpms3" = yes ; then
3882 _def_xdpms
='#define HAVE_XDPMS 1'
3883 _libs_mplayer
="$_libs_mplayer -lXdpms"
3884 _res_comment
="using Xdpms 3"
3887 _def_xdpms
='#undef HAVE_XDPMS'
3893 if test "$_xv" = auto
; then
3895 #include <X11/Xlib.h>
3896 #include <X11/extensions/Xvlib.h>
3898 (void) XvGetPortAttribute(0, 0, 0, 0);
3899 (void) XvQueryPortAttributes(0, 0, 0);
3903 cc_check
-lXv && _xv
=yes
3906 if test "$_xv" = yes ; then
3907 _def_xv
='#define HAVE_XV 1'
3908 _libs_mplayer
="$_libs_mplayer -lXv"
3909 _vosrc
="$_vosrc vo_xv.c"
3910 _vomodules
="xv $_vomodules"
3912 _def_xv
='#undef HAVE_XV'
3913 _novomodules
="xv $_novomodules"
3919 if test "$_xv" = yes && test "$_xvmc" != no
; then
3922 #include <X11/Xlib.h>
3923 #include <X11/extensions/Xvlib.h>
3924 #include <X11/extensions/XvMClib.h>
3926 (void) XvMCQueryExtension(0,0,0);
3927 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3930 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3931 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3934 if test "$_xvmc" = yes ; then
3935 _def_xvmc
='#define HAVE_XVMC 1'
3936 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
3937 _vosrc
="$_vosrc vo_xvmc.c"
3938 _vomodules
="xvmc $_vomodules"
3939 _res_comment
="using $_xvmclib"
3941 _def_xvmc
='#undef HAVE_XVMC'
3942 _novomodules
="xvmc $_novomodules"
3943 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
3948 echocheck
"Xinerama"
3949 if test "$_xinerama" = auto
; then
3951 #include <X11/Xlib.h>
3952 #include <X11/extensions/Xinerama.h>
3953 int main(void) { (void) XineramaIsActive(0); return 0; }
3956 cc_check
-lXinerama && _xinerama
=yes
3959 if test "$_xinerama" = yes ; then
3960 _def_xinerama
='#define HAVE_XINERAMA 1'
3961 _libs_mplayer
="$_libs_mplayer -lXinerama"
3963 _def_xinerama
='#undef HAVE_XINERAMA'
3965 echores
"$_xinerama"
3968 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3969 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3970 # named 'X extensions' or something similar.
3971 # This check may be useful for future mplayer versions (to change resolution)
3972 # If you run into problems, remove '-lXxf86vm'.
3974 if test "$_vm" = auto
; then
3976 #include <X11/Xlib.h>
3977 #include <X11/extensions/xf86vmode.h>
3978 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3981 cc_check
-lXxf86vm && _vm
=yes
3983 if test "$_vm" = yes ; then
3984 _def_vm
='#define HAVE_XF86VM 1'
3985 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
3987 _def_vm
='#undef HAVE_XF86VM'
3991 # Check for the presence of special keycodes, like audio control buttons
3992 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3993 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3994 # have these new keycodes.
3995 echocheck
"XF86keysym"
3996 if test "$_xf86keysym" = auto
; then
3999 #include <X11/Xlib.h>
4000 #include <X11/XF86keysym.h>
4001 int main(void) { return XF86XK_AudioPause; }
4003 cc_check
&& _xf86keysym
=yes
4005 if test "$_xf86keysym" = yes ; then
4006 _def_xf86keysym
='#define HAVE_XF86XK 1'
4008 _def_xf86keysym
='#undef HAVE_XF86XK'
4010 echores
"$_xf86keysym"
4013 # Version 2 is preferred to version 1 if available
4014 if test "$_dga" = auto
; then
4016 #include <X11/Xlib.h>
4017 #include <X11/extensions/xf86dga.h>
4018 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4021 cc_check
-lXxf86dga -lXxf86vm && _dga
=1
4024 #include <X11/Xlib.h>
4025 #include <X11/extensions/xf86dga.h>
4026 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4028 cc_check
-lXxf86dga && _dga
=2
4031 _def_dga
='#undef HAVE_DGA'
4032 _def_dga2
='#undef HAVE_DGA2'
4033 if test "$_dga" = 1 ; then
4034 _def_dga
='#define HAVE_DGA 1'
4035 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4036 _vosrc
="$_vosrc vo_dga.c"
4037 _vomodules
="dga $_vomodules"
4038 _res_comment
="using DGA 1.0"
4039 elif test "$_dga" = 2 ; then
4040 _def_dga
='#define HAVE_DGA 1'
4041 _def_dga2
='#define HAVE_DGA2 1'
4042 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4043 _vosrc
="$_vosrc vo_dga.c"
4044 _vomodules
="dga $_vomodules"
4045 _res_comment
="using DGA 2.0"
4046 elif test "$_dga" = no
; then
4047 _novomodules
="dga $_novomodules"
4049 die
"DGA version must be 1 or 2"
4055 #Note: this test is run even with --enable-gl since we autodetect linker flags
4056 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4060 #include <windows.h>
4061 #include <GL/glext.h>
4063 #include <X11/Xlib.h>
4069 wglCreateContext(dc);
4071 glXCreateContext(NULL, NULL, NULL, True);
4078 if cc_check
-lGL $_ld_lm ; then
4080 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4081 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4083 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4084 elif cc_check
-DGL_WIN32 -lopengl32 ; then
4087 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4092 if test "$_gl" = yes ; then
4093 _def_gl
='#define HAVE_GL 1'
4094 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4095 if test "$_gl_win32" = yes ; then
4096 _def_gl_win32
='#define GL_WIN32 1'
4097 _vosrc
="$_vosrc w32_common.c"
4098 _res_comment
="win32 version"
4100 _vomodules
="opengl $_vomodules"
4102 _def_gl
='#undef HAVE_GL'
4103 _def_gl_win32
='#undef GL_WIN32'
4104 _novomodules
="opengl $_novomodules"
4111 _def_vidix
='#undef CONFIG_VIDIX'
4112 _def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
4113 _vidix_drv_cyberblade
=no
4114 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4116 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
4118 _def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
4119 _vidix_drv_mach64
=no
4120 _def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
4122 _def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
4123 _vidix_drv_mga_crtc2
=no
4124 _def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
4125 _vidix_drv_nvidia
=no
4126 _def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
4128 _def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
4130 _def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
4131 _vidix_drv_radeon
=no
4132 _def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
4133 _vidix_drv_rage128
=no
4134 _def_vidix_drv_savage
='#undef CONFIG_VIDIX_DRV_SAVAGE'
4135 _vidix_drv_savage
=no
4136 _def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
4138 _def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
4139 _vidix_drv_unichrome
=no
4140 if test "$_vidix_internal" = auto
; then
4142 x86
&& _vidix_internal
=yes
4143 # this is broken currently, undefined references to inw, outw etc.
4144 #ppc && linux && _vidix_internal=yes
4145 alpha
&& linux
&& _vidix_internal
=yes
4146 qnx || beos || darwin
&& _vidix_internal
=no
4148 if test "$_vidix_internal" = yes; then
4149 _res_comment
="internal"
4152 elif test "$_vidix_external" = auto
; then
4155 #include <vidix/vidix.h>
4156 int main(void) { return 0; }
4158 cc_check
-lvidix && _vidix_external
=yes && _res_comment
="external" \
4163 if test "$_vidix" = yes ; then
4164 _def_vidix
='#define CONFIG_VIDIX 1'
4165 _vosrc
="$_vosrc vo_cvidix.c"
4166 _vomodules
="cvidix $_vomodules"
4167 test "$_vidix_drivers" || _vidix_drivers
="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 savage sis unichrome"
4168 test $_ivtv = "yes" || _vidix_drivers
=`echo $_vidix_drivers | sed s/ivtv//`
4170 for driver
in $_vidix_drivers ; do
4171 uc_driver
=`echo $driver | tr '[a-z]' '[A-Z]'`
4172 eval _vidix_drv_
${driver}=yes
4173 eval _def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
4176 _novomodules
="cvidix $_novomodules"
4179 if test "$_vidix_internal" = yes ; then
4180 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
4181 elif test "$_vidix_external" = yes ; then
4182 _libs_mplayer
="$_libs_mplayer -lvidix"
4183 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
4186 if test "$_vidix" = yes && win32
; then
4187 _vosrc
="$_vosrc vo_winvidix.c"
4188 _vomodules
="winvidix $_vomodules"
4189 _libs_mplayer
="$_libs_mplayer -lgdi32"
4191 _novomodules
="winvidix $_novomodules"
4193 if test "$_vidix" = yes && test "$_x11" = yes; then
4194 _vosrc
="$_vosrc vo_xvidix.c"
4195 _vomodules
="xvidix $_vomodules"
4197 _novomodules
="xvidix $_novomodules"
4202 if test "$_mga" = auto
; then
4206 if test "$_mga" = yes ; then
4207 _def_mga
='#define HAVE_MGA 1'
4208 _vosrc
="$_vosrc vo_mga.c"
4209 _vomodules
="mga $_vomodules"
4211 _def_mga
='#undef HAVE_MGA'
4212 _novomodules
="mga $_novomodules"
4218 if test "$_xmga" = auto
; then
4220 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4222 if test "$_xmga" = yes ; then
4223 _def_xmga
='#define HAVE_XMGA 1'
4224 _vosrc
="$_vosrc vo_xmga.c"
4225 _vomodules
="xmga $_vomodules"
4227 _def_xmga
='#undef HAVE_XMGA'
4228 _novomodules
="xmga $_novomodules"
4234 if test "$_ggi" = auto
; then
4236 #include <ggi/ggi.h>
4237 int main(void) { ggiInit(); return 0; }
4240 cc_check
-lggi && _ggi
=yes
4242 if test "$_ggi" = yes ; then
4243 _def_ggi
='#define HAVE_GGI 1'
4244 _libs_mplayer
="$_libs_mplayer -lggi"
4245 _vosrc
="$_vosrc vo_ggi.c"
4246 _vomodules
="ggi $_vomodules"
4248 _def_ggi
='#undef HAVE_GGI'
4249 _novomodules
="ggi $_novomodules"
4253 echocheck
"GGI extension: libggiwmh"
4254 if test "$_ggiwmh" = auto
; then
4257 #include <ggi/ggi.h>
4258 #include <ggi/wmh.h>
4259 int main(void) { ggiInit(); ggiWmhInit(); return 0; }
4261 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4263 # needed to get right output on obscure combination
4264 # like --disable-ggi --enable-ggiwmh
4265 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4266 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4267 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4270 _def_ggiwmh
='#undef HAVE_GGIWMH'
4276 if test "$_aa" = auto
; then
4279 extern struct aa_hardware_params aa_defparams;
4280 extern struct aa_renderparams aa_defrenderparams;
4284 (void) aa_init(0, 0, 0);
4285 c = aa_autoinit(&aa_defparams);
4286 p = aa_getrenderparams();
4287 aa_autoinitkbd(c,0);
4291 for _ld_tmp
in "-laa" ; do
4292 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4295 if test "$_aa" = yes ; then
4296 _def_aa
='#define HAVE_AA 1'
4298 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4300 _vosrc
="$_vosrc vo_aa.c"
4301 _vomodules
="aa $_vomodules"
4303 _def_aa
='#undef HAVE_AA'
4304 _novomodules
="aa $_novomodules"
4310 if test "$_caca" = auto
; then
4312 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4315 #ifdef CACA_API_VERSION_1
4318 int main(void) { (void) caca_init(); return 0; }
4320 cc_check
`caca-config --libs` && _caca
=yes
4323 if test "$_caca" = yes ; then
4324 _def_caca
='#define HAVE_CACA 1'
4325 _inc_extra
="$_inc_extra `caca-config --cflags`"
4326 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4327 _vosrc
="$_vosrc vo_caca.c"
4328 _vomodules
="caca $_vomodules"
4330 _def_caca
='#undef HAVE_CACA'
4331 _novomodules
="caca $_novomodules"
4337 if test "$_svga" = auto
; then
4340 int main(void) { return 0; }
4343 cc_check
-lvga $_ld_lm && _svga
=yes
4345 if test "$_svga" = yes ; then
4346 _def_svga
='#define HAVE_SVGALIB 1'
4347 _libs_mplayer
="$_libs_mplayer -lvga"
4348 _vosrc
="$_vosrc vo_svga.c"
4349 _vomodules
="svga $_vomodules"
4351 _def_svga
='#undef HAVE_SVGALIB'
4352 _novomodules
="svga $_novomodules"
4358 if test "$_fbdev" = auto
; then
4362 if test "$_fbdev" = yes ; then
4363 _def_fbdev
='#define HAVE_FBDEV 1'
4364 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4365 _vomodules
="fbdev $_vomodules"
4367 _def_fbdev
='#undef HAVE_FBDEV'
4368 _novomodules
="fbdev $_novomodules"
4375 if test "$_dvb" = auto
; then
4378 #include <sys/poll.h>
4379 #include <sys/ioctl.h>
4384 #include <ost/dmx.h>
4385 #include <ost/frontend.h>
4386 #include <ost/sec.h>
4387 #include <ost/video.h>
4388 #include <ost/audio.h>
4389 int main(void) {return 0;}
4391 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4392 cc_check
$_inc_tmp && _dvb
=yes && \
4393 _inc_extra
="$_inc_extra $_inc_tmp" && break
4397 if test "$_dvb" = yes ; then
4398 _def_dvb
='#define HAVE_DVB 1'
4399 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4400 _aomodules
="mpegpes(dvb) $_aomodules"
4401 _vomodules
="mpegpes(dvb) $_vomodules"
4404 echocheck
"DVB HEAD"
4405 if test "$_dvbhead" = auto
; then
4409 #include <sys/poll.h>
4410 #include <sys/ioctl.h>
4415 #include <linux/dvb/dmx.h>
4416 #include <linux/dvb/frontend.h>
4417 #include <linux/dvb/video.h>
4418 #include <linux/dvb/audio.h>
4419 int main(void) {return 0;}
4421 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4422 cc_check
$_inc_tmp && _dvbhead
=yes && \
4423 _inc_extra
="$_inc_extra $_inc_tmp" && break
4427 if test "$_dvbhead" = yes ; then
4428 _def_dvb
='#define HAVE_DVB_HEAD 1'
4429 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4430 _aomodules
="mpegpes(dvb) $_aomodules"
4431 _vomodules
="mpegpes(dvb) $_vomodules"
4434 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4435 _def_dvb
='#undef HAVE_DVB'
4436 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4437 _aomodules
="mpegpes(file) $_aomodules"
4438 _vomodules
="mpegpes(file) $_vomodules"
4441 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4443 _inputmodules
="dvb $_inputmodules"
4446 _noinputmodules
="dvb $_noinputmodules"
4451 if test "$_zr" = auto
; then
4452 #36067's seem to identify themselves as 36057PQC's, so the line
4453 #below should work for 36067's and 36057's.
4454 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
4460 if test "$_zr" = yes ; then
4461 if test "$_libavcodec_a" = yes ; then
4462 _def_zr
='#define HAVE_ZR 1'
4463 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
4464 _vomodules
="zr zr2 $_vomodules"
4466 _res_comment
="libavcodec (static) is required by zr, sorry"
4467 _novomodules
="zr $_novomodules"
4468 _def_zr
='#undef HAVE_ZR'
4471 _def_zr
='#undef HAVE_ZR'
4472 _novomodules
="zr zr2 $_novomodules"
4477 echocheck
"PNG support"
4478 if test "$_png" = auto
; then
4481 # Don't check for -lpng on irix since it has its own libpng
4482 # incompatible with the GNU libpng
4483 _res_comment
="disabled on irix (not GNU libpng)"
4489 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4490 printf("libpng: %s\n", png_libpng_ver);
4491 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4494 if cc_check
-lpng -lz $_ld_lm ; then
4498 _res_comment
="mismatch of library and header versions"
4504 if test "$_png" = yes ; then
4505 _def_png
='#define HAVE_PNG 1'
4506 _ld_extra
="$_ld_extra -lpng -lz"
4507 _vosrc
="$_vosrc vo_png.c"
4508 _vomodules
="png $_vomodules"
4510 _def_png
='#undef HAVE_PNG'
4511 _novomodules
="png $_novomodules"
4514 echocheck
"JPEG support"
4515 if test "$_jpeg" = auto
; then
4522 #include <jpeglib.h>
4527 if cc_check
-ljpeg $_ld_lm ; then
4535 if test "$_jpeg" = yes ; then
4536 _def_jpeg
='#define HAVE_JPEG 1'
4537 _vosrc
="$_vosrc vo_jpeg.c"
4538 _vomodules
="jpeg $_vomodules"
4539 _ld_extra
="$_ld_extra -ljpeg"
4541 _def_jpeg
='#undef HAVE_JPEG'
4542 _novomodules
="jpeg $_novomodules"
4547 echocheck
"PNM support"
4548 if test "$_pnm" = yes; then
4549 _def_pnm
="#define HAVE_PNM"
4550 _vosrc
="$_vosrc vo_pnm.c"
4551 _vomodules
="pnm $_vomodules"
4553 _def_pnm
="#undef HAVE_PNM"
4554 _novomodules
="pnm $_novomodules"
4560 echocheck
"GIF support"
4561 # This is to appease people who want to force gif support.
4562 # If it is forced to yes, then we still do checks to determine
4563 # which gif library to use.
4564 if test "$_gif" = yes ; then
4569 if test "$_gif" = auto
; then
4572 #include <gif_lib.h>
4577 for _ld_gif
in "-lungif" "-lgif" ; do
4578 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4582 # If no library was found, and the user wants support forced,
4583 # then we force it on with libgif, as this is the safest
4584 # assumption IMHO. (libungif & libregif both create symbolic
4585 # links to libgif. We also assume that no x11 support is needed,
4586 # because if you are forcing this, then you _should_ know what
4587 # you are doing. [ Besides, package maintainers should never
4588 # have compiled x11 deps into libungif in the first place. ] )
4591 if test "$_force_gif" = yes && test "$_gif" = no
; then
4596 if test "$_gif" = yes ; then
4597 _def_gif
='#define HAVE_GIF 1'
4598 _vosrc
="$_vosrc vo_gif89a.c"
4599 _codecmodules
="gif $_codecmodules"
4600 _vomodules
="gif89a $_vomodules"
4601 _res_comment
="old version, some encoding functions disabled"
4602 _def_gif_4
='#undef HAVE_GIF_4'
4603 _ld_extra
="$_ld_extra $_ld_gif"
4607 #include <gif_lib.h>
4608 void catch() { exit(1); }
4610 signal(SIGSEGV, catch); // catch segfault
4611 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4612 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4616 if cc_check
"$_ld_gif" && tmp_run
; then
4617 _def_gif_4
='#define HAVE_GIF_4 1'
4621 _def_gif
='#undef HAVE_GIF'
4622 _def_gif_4
='#undef HAVE_GIF_4'
4623 _novomodules
="gif89a $_novomodules"
4624 _nocodecmodules
="gif $_nocodecmodules"
4629 case "$_gif" in yes*)
4630 echocheck
"broken giflib workaround"
4631 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4634 #include <gif_lib.h>
4637 printf("UserData is at address %p\n", gif.UserData);
4641 if cc_check
"$_ld_gif" && tmp_run
; then
4642 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4651 echocheck
"VESA support"
4652 if test "$_vesa" = auto
; then
4655 int main(void) { vbeVersion(); return 0; }
4658 cc_check
-lvbe -llrmi && _vesa
=yes
4660 if test "$_vesa" = yes ; then
4661 _def_vesa
='#define HAVE_VESA 1'
4662 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4663 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4664 _vomodules
="vesa $_vomodules"
4666 _def_vesa
='#undef HAVE_VESA'
4667 _novomodules
="vesa $_novomodules"
4677 if test -z "$_sdlconfig" ; then
4678 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4679 _sdlconfig
="sdl-config"
4680 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4681 _sdlconfig
="sdl11-config"
4686 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4689 int main(int argc, char *argv[]) {
4690 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
4695 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4696 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4697 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4698 if test "$_sdlversion" -gt 116 ; then
4699 if test "$_sdlversion" -lt 121 ; then
4700 _def_sdlbuggy
='#define BUGGY_SDL'
4702 _def_sdlbuggy
='#undef BUGGY_SDL'
4709 if test "$_sdl" = yes ; then
4710 _def_sdl
='#define HAVE_SDL 1'
4712 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4713 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4715 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4716 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4718 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4719 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4721 _vosrc
="$_vosrc vo_sdl.c"
4722 _vomodules
="sdl $_vomodules"
4723 _aosrc
="$_aosrc ao_sdl.c"
4724 _aomodules
="sdl $_aomodules"
4725 _res_comment
="using $_sdlconfig"
4727 _def_sdl
='#undef HAVE_SDL'
4728 _novomodules
="sdl $_novomodules"
4729 _noaomodules
="sdl $_noaomodules"
4736 echocheck
"Windows waveout"
4737 if test "$_win32waveout" = auto
; then
4739 #include <windows.h>
4740 #include <mmsystem.h>
4741 int main(void) { return 0; }
4744 cc_check
-lwinmm && _win32waveout
=yes
4746 if test "$_win32waveout" = yes ; then
4747 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4748 _libs_mplayer
="$_libs_mplayer -lwinmm"
4749 _aosrc
="$_aosrc ao_win32.c"
4750 _aomodules
="win32 $_aomodules"
4752 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4753 _noaomodules
="win32 $_noaomodules"
4755 echores
"$_win32waveout"
4758 if test "$_directx" = auto
; then
4760 #include <windows.h>
4763 int main(void) { return 0; }
4766 cc_check
-lgdi32 && _directx
=yes
4768 if test "$_directx" = yes ; then
4769 _def_directx
='#define HAVE_DIRECTX 1'
4770 _libs_mplayer
="$_libs_mplayer -lgdi32"
4771 _vosrc
="$_vosrc vo_directx.c"
4772 _vomodules
="directx $_vomodules"
4773 _aosrc
="$_aosrc ao_dsound.c"
4774 _aomodules
="dsound $_aomodules"
4776 _def_directx
='#undef HAVE_DIRECTX'
4777 _novomodules
="directx $_novomodules"
4778 _noaomodules
="dsound $_noaomodules"
4786 if test "$_nas" = auto
; then
4788 #include <audio/audiolib.h>
4789 int main(void) { return 0; }
4792 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4794 if test "$_nas" = yes ; then
4795 _def_nas
='#define HAVE_NAS 1'
4796 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4797 _aosrc
="$_aosrc ao_nas.c"
4798 _aomodules
="nas $_aomodules"
4800 _noaomodules
="nas $_noaomodules"
4801 _def_nas
='#undef HAVE_NAS'
4806 if test "$_dxr2" = auto
; then
4809 #include <dxr2ioctl.h>
4810 int main(void) { return 0; }
4812 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4813 cc_check
$_inc_tmp && _dxr2
=yes && \
4814 _inc_extra
="$_inc_extra $_inc_tmp" && break
4817 if test "$_dxr2" = yes; then
4818 _def_dxr2
='#define HAVE_DXR2 1'
4819 _vosrc
="$_vosrc vo_dxr2.c"
4820 _aosrc
="$_aosrc ao_dxr2.c"
4821 _aomodules
="dxr2 $_aomodules"
4822 _vomodules
="dxr2 $_vomodules"
4824 _def_dxr2
='#undef HAVE_DXR2'
4825 _noaomodules
="dxr2 $_noaomodules"
4826 _novomodules
="dxr2 $_novomodules"
4831 if test "$_dxr3" = auto
; then
4833 #include <linux/em8300.h>
4834 int main(void) { return 0; }
4837 cc_check
&& _dxr3
=yes
4839 if test "$_dxr3" = yes ; then
4840 _def_dxr3
='#define HAVE_DXR3 1'
4841 _vosrc
="$_vosrc vo_dxr3.c"
4842 _vomodules
="dxr3 $_vomodules"
4844 _def_dxr3
='#undef HAVE_DXR3'
4845 _novomodules
="dxr3 $_novomodules"
4850 echocheck
"IVTV TV-Out"
4851 if test "$_ivtv" = auto
; then
4854 #include <inttypes.h>
4855 #include <linux/types.h>
4856 #include <linux/videodev2.h>
4857 #include <linux/ivtv.h>
4858 int main(void) { return 0; }
4861 cc_check
&& _ivtv
=yes
4863 if test "$_ivtv" = yes ; then
4864 _def_ivtv
='#define HAVE_IVTV 1'
4865 _vosrc
="$_vosrc vo_ivtv.c"
4866 _vomodules
="ivtv $_vomodules"
4867 _aosrc
="$_aosrc ao_ivtv.c"
4868 _aomodules
="ivtv $_aomodules"
4870 _def_ivtv
='#undef HAVE_IVTV'
4871 _novomodules
="ivtv $_novomodules"
4872 _noaomodules
="ivtv $_noaomodules"
4877 echocheck
"V4L2 MPEG Decoder"
4878 if test "$_v4l2" = auto
; then
4881 #include <inttypes.h>
4882 #include <linux/types.h>
4883 #include <linux/videodev2.h>
4884 #include <linux/version.h>
4886 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
4887 #error kernel headers too old, need 2.6.22
4888 bad_kernel_version();
4890 struct v4l2_ext_controls ctrls;
4891 ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
4896 cc_check
&& _v4l2
=yes
4898 if test "$_v4l2" = yes ; then
4899 _def_v4l2
='#define HAVE_V4L2_DECODER 1'
4900 _vosrc
="$_vosrc vo_v4l2.c"
4901 _vomodules
="v4l2 $_vomodules"
4902 _aosrc
="$_aosrc ao_v4l2.c"
4903 _aomodules
="v4l2 $_aomodules"
4905 _def_v4l2
='#undef HAVE_V4L2_DECODER'
4906 _novomodules
="v4l2 $_novomodules"
4907 _noaomodules
="v4l2 $_noaomodules"
4918 echocheck
"OSS Audio"
4919 if test "$_ossaudio" = auto
; then
4921 #include <sys/ioctl.h>
4922 #include <$_soundcard_header>
4923 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4926 cc_check
&& _ossaudio
=yes
4928 if test "$_ossaudio" = yes ; then
4929 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4930 _aosrc
="$_aosrc ao_oss.c"
4931 _aomodules
="oss $_aomodules"
4932 if test "$_linux_devfs" = yes; then
4933 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4934 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4937 #include <sys/ioctl.h>
4938 #include <$_soundcard_header>
4939 #ifdef OPEN_SOUND_SYSTEM
4940 int main(void) { return 0; }
4942 #error Not the real thing
4946 cc_check
&& _real_ossaudio
=yes
4947 if test "$_real_ossaudio" = yes; then
4948 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4949 elif netbsd || openbsd
; then
4950 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4951 _ld_extra
="$_ld_extra -lossaudio"
4953 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4955 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4958 _def_ossaudio
='#undef USE_OSS_AUDIO'
4959 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4960 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4961 _noaomodules
="oss $_noaomodules"
4963 echores
"$_ossaudio"
4967 if test "$_arts" = auto
; then
4969 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4973 int main(void) { return 0; }
4975 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4980 if test "$_arts" = yes ; then
4981 _def_arts
='#define USE_ARTS 1'
4982 _aosrc
="$_aosrc ao_arts.c"
4983 _aomodules
="arts $_aomodules"
4984 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
4985 _inc_extra
="$_inc_extra `artsc-config --cflags`"
4987 _noaomodules
="arts $_noaomodules"
4993 if test "$_esd" = auto
; then
4995 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4999 int main(void) { return 0; }
5001 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
5007 if test "$_esd" = yes ; then
5008 _def_esd
='#define USE_ESD 1'
5009 _aosrc
="$_aosrc ao_esd.c"
5010 _aomodules
="esd $_aomodules"
5011 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
5012 _inc_extra
="$_inc_extra `esd-config --cflags`"
5014 echocheck
"esd_get_latency()"
5017 int main(void) { return esd_get_latency(0); }
5019 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
5020 echores
"$_esd_latency"
5022 _def_esd
='#undef USE_ESD'
5023 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
5024 _noaomodules
="esd $_noaomodules"
5028 if test "$_polyp" = auto
; then
5030 if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
5033 #include <polyp/polyplib.h>
5034 #include <polyp/mainloop.h>
5035 #include <polyp/polyplib-error.h>
5036 int main(void) { return 0; }
5038 cc_check
`$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
5044 if test "$_polyp" = yes ; then
5045 _def_polyp
='#define USE_POLYP 1'
5046 _aosrc
="$_aosrc ao_polyp.c"
5047 _aomodules
="polyp $_aomodules"
5048 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`"
5049 _inc_extra
="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
5051 _def_polyp
='#undef USE_POLYP'
5052 _noaomodules
="polyp $_noaomodules"
5057 if test "$_jack" = auto
; then
5061 #include <jack/jack.h>
5062 int main(void) { jack_client_new("test"); return 0; }
5064 if cc_check
-ljack ; then
5065 _libs_mplayer
="$_libs_mplayer -ljack"
5066 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
5067 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
5068 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
5074 if test "$_jack" = yes ; then
5075 _def_jack
='#define USE_JACK 1'
5076 _aosrc
="$_aosrc ao_jack.c"
5077 _aomodules
="jack $_aomodules"
5079 _noaomodules
="jack $_noaomodules"
5084 if test "$_openal" = auto
; then
5088 #include <OpenAL/al.h>
5093 alSourceQueueBuffers(0, 0, 0);
5094 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5098 for I
in "-lopenal" "-framework OpenAL" ; do
5099 cc_check
$I && _openal
=yes && break
5100 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5102 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
5104 if test "$_openal" = yes ; then
5105 _def_openal
='#define USE_OPENAL 1'
5106 _aosrc
="$_aosrc ao_openal.c"
5107 _aomodules
="openal $_aomodules"
5109 _noaomodules
="openal $_noaomodules"
5113 echocheck
"ALSA audio"
5114 if test "$_alsa" != no
; then
5117 #include <sys/asoundlib.h>
5118 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5119 #error "alsa version != 0.5.x"
5121 int main(void) { return 0; }
5123 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5126 #include <sys/asoundlib.h>
5127 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5128 #error "alsa version != 0.9.x"
5130 int main(void) { return 0; }
5132 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5134 #include <alsa/asoundlib.h>
5135 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5136 #error "alsa version != 0.9.x"
5138 int main(void) { return 0; }
5140 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5143 #include <sys/asoundlib.h>
5144 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5145 #error "alsa version != 1.0.x"
5147 int main(void) { return 0; }
5149 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5151 #include <alsa/asoundlib.h>
5152 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5153 #error "alsa version != 1.0.x"
5155 int main(void) { return 0; }
5157 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5159 _def_alsa5
='#undef HAVE_ALSA5'
5160 _def_alsa9
='#undef HAVE_ALSA9'
5161 _def_alsa1x
='#undef HAVE_ALSA1X'
5162 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5163 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5164 if test "$_alsaver" ; then
5166 if test "$_alsaver" = '0.5.x' ; then
5168 _aosrc
="$_aosrc ao_alsa5.c"
5169 _aomodules
="alsa5 $_aomodules"
5170 _def_alsa5
='#define HAVE_ALSA5 1'
5171 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5172 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5173 elif test "$_alsaver" = '0.9.x-sys' ; then
5175 _aosrc
="$_aosrc ao_alsa.c"
5176 _aomodules
="alsa $_aomodules"
5177 _def_alsa9
='#define HAVE_ALSA9 1'
5178 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5179 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5180 elif test "$_alsaver" = '0.9.x-alsa' ; then
5182 _aosrc
="$_aosrc ao_alsa.c"
5183 _aomodules
="alsa $_aomodules"
5184 _def_alsa9
='#define HAVE_ALSA9 1'
5185 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5186 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5187 elif test "$_alsaver" = '1.0.x-sys' ; then
5189 _aosrc
="$_aosrc ao_alsa.c"
5190 _aomodules
="alsa $_aomodules"
5191 _def_alsa1x
="#define HAVE_ALSA1X 1"
5192 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5193 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5194 elif test "$_alsaver" = '1.0.x-alsa' ; then
5196 _aosrc
="$_aosrc ao_alsa.c"
5197 _aomodules
="alsa $_aomodules"
5198 _def_alsa1x
="#define HAVE_ALSA1X 1"
5199 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5200 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5203 _res_comment
="unknown version"
5205 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5207 _noaomodules
="alsa $_noaomodules"
5212 echocheck
"Sun audio"
5213 if test "$_sunaudio" = auto
; then
5215 #include <sys/types.h>
5216 #include <sys/audioio.h>
5217 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5220 cc_check
&& _sunaudio
=yes
5222 if test "$_sunaudio" = yes ; then
5223 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5224 _aosrc
="$_aosrc ao_sun.c"
5225 _aomodules
="sun $_aomodules"
5227 _def_sunaudio
='#undef USE_SUN_AUDIO'
5228 _noaomodules
="sun $_noaomodules"
5230 echores
"$_sunaudio"
5234 echocheck
"Sun mediaLib"
5235 if test "$_mlib" = auto
; then
5239 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5241 cc_check
-lmlib && _mlib
=yes
5243 test "$_mlib" = yes && _cpuexts
="MLIB $_cpuexts"
5249 echocheck
"SGI audio"
5250 if test "$_sgiaudio" = auto
; then
5251 # check for SGI audio
5253 #include <dmedia/audio.h>
5254 int main(void) { return 0; }
5257 cc_check
&& _sgiaudio
=yes
5259 if test "$_sgiaudio" = "yes" ; then
5260 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5261 _libs_mplayer
="$_libs_mplayer -laudio"
5262 _aosrc
="$_aosrc ao_sgi.c"
5263 _aomodules
="sgi $_aomodules"
5265 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5266 _noaomodules
="sgi $_noaomodules"
5268 echores
"$_sgiaudio"
5272 echocheck
"VCD support"
5273 if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32
; then
5274 _inputmodules
="vcd $_inputmodules"
5275 _def_vcd
='#define HAVE_VCD 1'
5278 _def_vcd
='#undef HAVE_VCD'
5279 _noinputmodules
="vcd $_noinputmodules"
5280 _res_comment
="not supported on this OS"
5288 if test "$_dvdread_internal" = auto
; then
5289 _dvdread_internal
=no
5290 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5291 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5292 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5293 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5294 _dvdread_internal
=yes
5296 _res_comment
="internal"
5298 elif test "$_dvdread" = auto
; then
5300 if test "$_dl" = yes; then
5302 #include <inttypes.h>
5303 #include <dvdread/dvd_reader.h>
5304 #include <dvdread/ifo_types.h>
5305 #include <dvdread/ifo_read.h>
5306 #include <dvdread/nav_read.h>
5307 int main(void) { return 0; }
5309 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5310 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5314 if test "$_dvdread_internal" = yes; then
5315 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5316 _def_dvdread
='#define USE_DVDREAD 1'
5317 _inputmodules
="dvdread(internal) $_inputmodules"
5319 elif test "$_dvdread" = yes; then
5320 _def_dvdread
='#define USE_DVDREAD 1'
5322 _ld_extra
="$_ld_extra -ldvdread"
5323 _inputmodules
="dvdread(external) $_inputmodules"
5324 _res_comment
="external"
5326 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5327 _def_dvdread
='#undef USE_DVDREAD'
5328 _noinputmodules
="dvdread $_noinputmodules"
5333 echocheck
"internal libdvdcss"
5334 if test "$_libdvdcss_internal" = auto
; then
5335 _libdvdcss_internal
=no
5336 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5338 if test "$_libdvdcss_internal" = yes ; then
5339 if linux || netbsd || openbsd || bsdos
; then
5340 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5341 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5343 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5345 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5346 _ld_extra
="$_ld_extra -framework IOKit"
5348 _inputmodules
="libdvdcss(internal) $_inputmodules"
5351 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5353 echores
"$_libdvdcss_internal"
5356 echocheck
"cdparanoia"
5357 if test "$_cdparanoia" = auto
; then
5359 #include <cdda_interface.h>
5360 #include <cdda_paranoia.h>
5361 // This need a better test. How ?
5363 void *test = cdda_verbose_set;
5364 return test == (void *)1;
5368 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5369 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5370 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5373 if test "$_cdparanoia" = yes ; then
5375 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5376 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5378 echores
"$_cdparanoia"
5382 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5385 #include <cdio/version.h>
5386 #include <cdio/cdda.h>
5387 #include <cdio/paranoia.h>
5390 void *test = cdda_verbose_set;
5391 printf("%s\n", CDIO_VERSION);
5392 return test == (void *)1;
5397 for _ld_tmp
in "" "-lwinmm" ; do
5398 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5399 cc_check
$_ld_tmp $_ld_lm \
5400 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5402 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5403 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5404 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5405 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5406 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5409 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5411 _def_libcdio
='#define HAVE_LIBCDIO'
5412 _def_havelibcdio
='yes'
5414 if test "$_cdparanoia" = yes ; then
5415 _res_comment
="using cdparanoia"
5417 _def_libcdio
='#undef HAVE_LIBCDIO'
5418 _def_havelibcdio
='no'
5422 if test "$_cdda" = yes ; then
5423 test $_cddb = auto
&& test $_network = yes && not darwin
&& _cddb
=yes
5424 _def_cdparanoia
='#define HAVE_CDDA'
5425 _inputmodules
="cdda $_inputmodules"
5427 _def_cdparanoia
='#undef HAVE_CDDA'
5428 _noinputmodules
="cdda $_noinputmodules"
5431 if test "$_cddb" = yes ; then
5432 _def_cddb
='#define HAVE_CDDB'
5433 _inputmodules
="cddb $_inputmodules"
5436 _def_cddb
='#undef HAVE_CDDB'
5437 _noinputmodules
="cddb $_noinputmodules"
5440 echocheck
"bitmap font support"
5441 if test "$_bitmap_font" = yes ; then
5442 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5444 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5446 echores
"$_bitmap_font"
5449 echocheck
"freetype >= 2.0.9"
5451 # freetype depends on iconv
5452 if test "$_iconv" = no
; then
5454 _res_comment
="iconv support needed"
5457 if test "$_freetype" = auto
; then
5458 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5461 #include <ft2build.h>
5462 #include FT_FREETYPE_H
5463 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5464 #error "Need FreeType 2.0.9 or newer"
5469 FT_Int major=-1,minor=-1,patch=-1;
5470 int err=FT_Init_FreeType(&library);
5472 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5475 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5476 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5477 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5478 (int)major,(int)minor,(int)patch );
5479 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5480 printf("Library and header version mismatch! Fix it in your distribution!\n");
5487 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5492 if test "$_freetype" = yes ; then
5493 _def_freetype
='#define HAVE_FREETYPE'
5494 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5495 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5497 _def_freetype
='#undef HAVE_FREETYPE'
5499 echores
"$_freetype"
5501 if test "$_freetype" = no
; then
5503 _res_comment
="freetype support needed"
5505 echocheck
"fontconfig"
5506 if test "$_fontconfig" = auto
; then
5509 #include <fontconfig/fontconfig.h>
5514 printf("Couldn't initialize fontconfig lib\n");
5522 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5523 _ld_tmp
="-lfontconfig $_ld_tmp"
5524 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5526 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5527 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5528 _ld_tmp
=`$_pkg_config --libs fontconfig`
5529 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5530 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5533 if test "$_fontconfig" = yes ; then
5534 _def_fontconfig
='#define HAVE_FONTCONFIG'
5536 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5538 echores
"$_fontconfig"
5541 echocheck
"SSA/ASS support"
5542 # libass depends on FreeType
5543 if test "$_freetype" = no
; then
5545 _res_comment
="FreeType support needed"
5548 if test "$_ass" = auto
; then
5550 #include <ft2build.h>
5551 #include FT_FREETYPE_H
5552 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5553 #error "Need FreeType 2.1.8 or newer"
5555 int main() { return 0; }
5558 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5559 if test "$_ass" = no
; then
5560 _res_comment
="FreeType >= 2.1.8 needed"
5563 if test "$_ass" = yes ; then
5564 _def_ass
='#define USE_ASS'
5566 _def_ass
='#undef USE_ASS'
5571 echocheck
"fribidi with charsets"
5572 if test "$_fribidi" = auto
; then
5573 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5576 /* workaround for fribidi 0.10.4 and below */
5577 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5578 #include <fribidi/fribidi.h>
5581 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5582 printf("Fribidi headers are not consistents with the library!\n");
5589 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5594 if test "$_fribidi" = yes ; then
5595 _def_fribidi
='#define USE_FRIBIDI'
5596 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5597 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5599 _def_fribidi
='#undef USE_FRIBIDI'
5605 if test "$_enca" = auto
; then
5612 langs = enca_get_languages(&langcnt);
5617 cc_check
-lenca $_ld_lm && _enca
=yes
5619 if test "$_enca" = yes ; then
5620 _def_enca
='#define HAVE_ENCA 1'
5621 _ld_extra
="$_ld_extra -lenca"
5623 _def_enca
='#undef HAVE_ENCA'
5631 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5634 cc_check
-lz && _zlib
=yes
5635 if test "$_zlib" = yes ; then
5636 _def_zlib
='#define HAVE_ZLIB 1'
5637 _ld_extra
="$_ld_extra -lz"
5639 _def_zlib
='#undef HAVE_ZLIB'
5640 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
5641 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
5647 if test "$_rtc" = auto
; then
5649 #include <sys/ioctl.h>
5651 #include <linux/rtc.h>
5654 #define RTC_PIE_ON RTCIO_PIE_ON
5656 int main(void) { return RTC_PIE_ON; }
5659 cc_check
&& _rtc
=yes
5662 if test "$_rtc" = yes ; then
5663 _def_rtc
='#define HAVE_RTC 1'
5665 _def_rtc
='#undef HAVE_RTC'
5670 echocheck
"liblzo2 support"
5671 if test "$_liblzo" = auto
; then
5674 #include <lzo/lzo1x.h>
5675 int main(void) { lzo_init();return 0; }
5677 cc_check
-llzo2 && _liblzo
=yes
5679 if test "$_liblzo" = yes ; then
5680 _def_liblzo
='#define USE_LIBLZO 1'
5681 _ld_extra
="$_ld_extra -llzo2"
5682 _codecmodules
="liblzo $_codecmodules"
5684 _def_liblzo
='#undef USE_LIBLZO'
5685 _nocodecmodules
="liblzo $_nocodecmodules"
5690 echocheck
"mad support"
5691 if test "$_mad" = auto
; then
5695 int main(void) { return 0; }
5697 cc_check
-lmad && _mad
=yes
5699 if test "$_mad" = yes ; then
5700 _def_mad
='#define USE_LIBMAD 1'
5701 _ld_extra
="$_ld_extra -lmad"
5702 _codecmodules
="libmad $_codecmodules"
5704 _def_mad
='#undef USE_LIBMAD'
5705 _nocodecmodules
="libmad $_nocodecmodules"
5710 if test "$_twolame" = auto
; then
5712 #include <twolame.h>
5713 int main(void) { twolame_init(); return 0; }
5716 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5718 if test "$_twolame" = yes ; then
5719 _def_twolame
='#define HAVE_TWOLAME 1'
5720 _libs_mencoder
="$_libs_mencoder -ltwolame"
5721 _codecmodules
="twolame $_codecmodules"
5723 _def_twolame
='#undef HAVE_TWOLAME'
5724 _nocodecmodules
="twolame $_nocodecmodules"
5729 if test "$_toolame" = auto
; then
5731 if test "$_twolame" = yes ; then
5732 _res_comment
="disabled by twolame"
5735 #include <toolame.h>
5736 int main(void) { toolame_init(); return 0; }
5738 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5741 if test "$_toolame" = yes ; then
5742 _def_toolame
='#define HAVE_TOOLAME 1'
5743 _libs_mencoder
="$_libs_mencoder -ltoolame"
5744 _codecmodules
="toolame $_codecmodules"
5746 _def_toolame
='#undef HAVE_TOOLAME'
5747 _nocodecmodules
="toolame $_nocodecmodules"
5749 if test "$_toolamedir" ; then
5750 _res_comment
="using $_toolamedir"
5754 echocheck
"OggVorbis support"
5755 if test "$_tremor_internal" = yes; then
5757 elif test "$_tremor_external" = auto
; then
5760 #include <tremor/ivorbiscodec.h>
5761 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5763 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5765 if test "$_libvorbis" = auto
; then
5768 #include <vorbis/codec.h>
5769 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5771 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5773 if test "$_tremor_internal" = yes ; then
5775 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5776 _def_tremor
='#define TREMOR 1'
5777 _codecmodules
="tremor(internal) $_codecmodules"
5778 _res_comment
="internal Tremor"
5779 if test "$_tremor_low" = yes ; then
5780 _res_comment
="internal low accuracy Tremor"
5782 elif test "$_tremor_external" = yes ; then
5784 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5785 _def_tremor
='#define TREMOR 1'
5786 _codecmodules
="tremor(external) $_codecmodules"
5787 _res_comment
="external Tremor"
5788 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5789 elif test "$_libvorbis" = yes ; then
5791 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5792 _codecmodules
="libvorbis $_codecmodules"
5793 _res_comment
="libvorbis"
5794 _ld_extra
="$_ld_extra -lvorbis -logg"
5797 _nocodecmodules
="libvorbis $_nocodecmodules"
5799 if test "$_libvorbis" = no
; then
5800 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
5801 _libavmuxers
=`echo $_libavmuxers | sed -e s/OGG_MUXER// `
5805 echocheck
"libspeex (version >= 1.1 required)"
5806 if test "$_speex" = auto
; then
5809 #include <speex/speex.h>
5813 speex_decode_int(dec, &bits, dec);
5816 cc_check
-lspeex $_ld_lm && _speex
=yes
5818 if test "$_speex" = yes ; then
5819 _def_speex
='#define HAVE_SPEEX 1'
5820 _ld_extra
="$_ld_extra -lspeex"
5821 _codecmodules
="speex $_codecmodules"
5823 _def_speex
='#undef HAVE_SPEEX'
5824 _nocodecmodules
="speex $_nocodecmodules"
5828 echocheck
"OggTheora support"
5829 if test "$_theora" = auto
; then
5832 #include <theora/theora.h>
5836 /* theora is in flux, make sure that all interface routines and
5837 * datatypes exist and work the way we expect it, so we don't break
5847 theora_info_init (&inf);
5848 theora_comment_init (&tc);
5852 /* we don't want to execute this kind of nonsense; just for making sure
5853 * that compilation works... */
5854 memset(&op, 0, sizeof(op));
5855 r = theora_decode_header (&inf, &tc, &op);
5856 r = theora_decode_init (&st, &inf);
5857 t = theora_granule_time (&st, op.granulepos);
5858 r = theora_decode_packetin (&st, &op);
5859 r = theora_decode_YUVout (&st, &yuv);
5865 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5866 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5867 && _theora
=yes && break
5869 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5870 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5871 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5872 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5876 if test "$_theora" = yes ; then
5877 _def_theora
='#define HAVE_OGGTHEORA 1'
5878 _codecmodules
="libtheora $_codecmodules"
5879 # when --enable-theora is forced, we'd better provide a probably sane
5880 # $_ld_theora than nothing
5881 test -z "$_ld_theora" && _ld_extra
="$_ld_extra -ltheora -logg"
5883 _def_theora
='#undef HAVE_OGGTHEORA'
5884 _nocodecmodules
="libtheora $_nocodecmodules"
5888 echocheck
"internal mp3lib support"
5889 if test "$_mp3lib" = yes ; then
5890 _def_mp3lib
='#define USE_MP3LIB 1'
5891 _codecmodules
="mp3lib $_codecmodules"
5893 _def_mp3lib
='#undef USE_MP3LIB'
5894 _nocodecmodules
="mp3lib $_nocodecmodules"
5898 echocheck
"internal liba52 support"
5899 if test "$_liba52" = yes ; then
5900 _def_liba52
='#define USE_LIBA52 1'
5901 _codecmodules
="liba52 $_codecmodules"
5903 _def_liba52
='#undef USE_LIBA52'
5904 _nocodecmodules
="liba52 $_nocodecmodules"
5908 echocheck
"libdca support"
5909 if test "$_libdca" = auto
; then
5912 #include <inttypes.h>
5914 int main(void) { dts_init (0); return 0; }
5916 cc_check
-ldts $_ld_lm && _libdca
=yes
5918 if test "$_libdca" = yes ; then
5919 _def_libdca
='#define USE_LIBDCA 1'
5920 _ld_extra
="$_ld_extra -ldts"
5921 _codecmodules
="libdca $_codecmodules"
5923 _def_libdca
='#undef USE_LIBDCA'
5924 _nocodecmodules
="libdca $_nocodecmodules"
5928 echocheck
"internal libmpeg2 support"
5929 if test "$_libmpeg2" = yes ; then
5930 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5931 _codecmodules
="libmpeg2 $_codecmodules"
5933 _def_libmpeg2
='#undef USE_LIBMPEG2'
5934 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5936 echores
"$_libmpeg2"
5938 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5939 if test "$_musepack" = auto
; then
5942 #include <mpcdec/mpcdec.h>
5944 mpc_streaminfo info;
5945 mpc_decoder decoder;
5946 mpc_decoder_set_streaminfo(&decoder, &info);
5947 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5950 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5952 if test "$_musepack" = yes ; then
5953 _def_musepack
='#define HAVE_MUSEPACK 1'
5954 _ld_extra
="$_ld_extra -lmpcdec"
5955 _codecmodules
="musepack $_codecmodules"
5957 _def_musepack
='#undef HAVE_MUSEPACK'
5958 _nocodecmodules
="musepack $_nocodecmodules"
5960 echores
"$_musepack"
5963 echocheck
"FAAC (AAC encoder) support"
5964 if test "$_faac" = auto
; then
5966 #include <inttypes.h>
5968 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5971 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5972 cc_check
-O4 $_ld_faac $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
5975 if test "$_faac" = yes ; then
5976 _def_faac
="#define HAVE_FAAC 1"
5977 if echo $_libavencoders |
grep -q FAAC
; then
5979 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
5980 _libs_mplayer
="$_libs_mplayer $_ld_faac"
5983 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
5985 _codecmodules
="faac $_codecmodules"
5987 _def_faac
="#undef HAVE_FAAC"
5988 _nocodecmodules
="faac $_nocodecmodules"
5989 _libavencoders
=`echo $_libavencoders | sed -e s/LIBFAAC_ENCODER// `
5991 echores
"$_faac (in libavcodec: $_lavc_faac)"
5994 echocheck
"FAAD2 (AAC) support"
5995 if test "$_faad_internal" = auto
; then
5996 if x86_32
&& test cc_vendor
=gnu
; then
5998 3.1*|
3.2) # ICE/insn with these versions
6000 _res_comment
="broken gcc"
6009 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
6013 #ifndef FAAD_MIN_STREAMSIZE
6014 #error Too old version
6016 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6018 cc_check
-lfaad $_ld_lm && _faad_external
=yes
6021 if test "$_faad_internal" = yes ; then
6022 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
6024 _res_comment
="internal floating-point"
6025 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
6026 elif test "$_faad_external" = yes ; then
6028 _ld_extra
="$_ld_extra -lfaad"
6030 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
6034 if test "$_faad" = yes ; then
6035 _def_faad
='#define HAVE_FAAD 1'
6036 _codecmodules
="faad2 $_codecmodules"
6038 _def_faad
='#undef HAVE_FAAD'
6039 _nocodecmodules
="faad2 $_nocodecmodules"
6044 echocheck
"LADSPA plugin support"
6045 if test "$_ladspa" = auto
; then
6050 const LADSPA_Descriptor *ld = NULL;
6055 cc_check
&& _ladspa
=yes
6057 if test "$_ladspa" = yes; then
6058 _def_ladspa
="#define HAVE_LADSPA"
6059 _afsrc
="$_afsrc af_ladspa.c"
6060 _afmodules
="ladspa $_afmodules"
6062 _def_ladspa
="#undef HAVE_LADSPA"
6063 _noafmodules
="ladspa $_noafmodules"
6068 if test -z "$_codecsdir" ; then
6069 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
6070 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
6071 if test -d "$dir" ; then
6077 # Fall back on default directory.
6078 if test -z "$_codecsdir" ; then
6079 _codecsdir
="$_libdir/codecs"
6080 mingw32
&& _codecsdir
="codecs"
6084 echocheck
"Win32 codecs"
6085 if test "$_win32dll" = auto
; then
6087 if x86_32
&& not qnx
; then
6091 if test "$_win32dll" = yes ; then
6092 _def_win32dll
='#define USE_WIN32DLL 1'
6093 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
6094 _res_comment
="using $_win32codecsdir"
6096 _def_win32_loader
='#define WIN32_LOADER 1'
6098 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
6099 _res_comment
="using native windows"
6101 _codecmodules
="win32 $_codecmodules"
6103 _def_win32dll
='#undef USE_WIN32DLL'
6104 _def_win32_loader
='#undef WIN32_LOADER'
6105 _nocodecmodules
="win32 $_nocodecmodules"
6107 echores
"$_win32dll"
6110 echocheck
"XAnim codecs"
6111 if test "$_xanim" = auto
; then
6113 _res_comment
="dynamic loader support needed"
6114 if test "$_dl" = yes ; then
6118 if test "$_xanim" = yes ; then
6119 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6120 _def_xanim
='#define USE_XANIM 1'
6121 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6122 _codecmodules
="xanim $_codecmodules"
6123 _res_comment
="using $_xanimcodecsdir"
6125 _def_xanim
='#undef USE_XANIM'
6126 _def_xanim_path
='#undef XACODEC_PATH'
6127 _nocodecmodules
="xanim $_nocodecmodules"
6132 echocheck
"RealPlayer codecs"
6133 if test "$_real" = auto
; then
6135 _res_comment
="dynamic loader support needed"
6136 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6137 (linux || freebsd || netbsd || win32 || darwin
) ; then
6141 if test "$_real" = yes ; then
6142 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6143 _def_real
='#define USE_REALCODECS 1'
6144 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6145 _codecmodules
="real $_codecmodules"
6146 _res_comment
="using $_realcodecsdir"
6148 _def_real
='#undef USE_REALCODECS'
6149 _def_real_path
="#undef REALCODEC_PATH"
6150 _nocodecmodules
="real $_nocodecmodules"
6155 echocheck
"QuickTime codecs"
6156 if test "$_qtx" = auto
; then
6157 test "$_win32dll" = yes || darwin
&& _qtx
=yes
6159 if test "$_qtx" = yes ; then
6160 _def_qtx
='#define USE_QTX_CODECS 1'
6161 _codecmodules
="qtx $_codecmodules"
6163 _def_qtx
='#undef USE_QTX_CODECS'
6164 _nocodecmodules
="qtx $_nocodecmodules"
6169 echocheck
"LIVE555 Streaming Media libraries"
6170 if test "$_live" = auto
&& test "$_network" = yes ; then
6171 cat > $TMPCPP << EOF
6172 #include <liveMedia.hh>
6173 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6174 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6180 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6181 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6182 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6183 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6184 $_livelibdir/groupsock/libgroupsock.a \
6185 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6186 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6187 $_ld_extra -lstdc++" \
6188 _inc_extraxx
="-I$_livelibdir/liveMedia/include \
6189 -I$_livelibdir/UsageEnvironment/include \
6190 -I$_livelibdir/BasicUsageEnvironment/include \
6191 -I$_livelibdir/groupsock/include" && \
6194 if test "$_live" != yes ; then
6195 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6200 if test "$_live" = yes && test "$_network" = yes ; then
6201 _res_comment
="using $_livelibdir"
6202 _def_live
='#define STREAMING_LIVE555 1'
6203 _inputmodules
="live555 $_inputmodules"
6204 elif test "$_live_dist" = yes && test "$_network" = yes ; then
6205 _res_comment
="using distribution version"
6207 _def_live
='#define STREAMING_LIVE555 1'
6208 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6209 _inc_extraxx
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6210 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6211 _inputmodules
="live555 $_inputmodules"
6213 _def_live
='#undef STREAMING_LIVE555'
6214 _noinputmodules
="live555 $_noinputmodules"
6219 echocheck
"FFmpeg libavutil"
6220 if test "$_libavutil_a" = auto
; then
6221 if test -d libavutil
; then
6223 _res_comment
="static"
6225 die
"MPlayer will not compile without libavutil in the source tree."
6227 elif test "$_libavutil_so" = auto
; then
6230 #include <ffmpeg/common.h>
6231 int main(void) { ff_gcd(1,1); return 0; }
6233 if $_pkg_config --exists libavutil
; then
6234 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6235 _ld_tmp
=`$_pkg_config --libs libavutil`
6236 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6237 && _libavutil_so
=yes
6238 elif cc_check
-lavutil $_ld_lm ; then
6239 _ld_extra
="$_ld_extra -lavutil"
6241 _res_comment
="using libavutil.so, but static libavutil is recommended"
6245 _def_libavutil
='#undef USE_LIBAVUTIL'
6246 _def_libavutil_a
='#undef USE_LIBAVUTIL_A'
6247 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6248 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
6249 test "$_libavutil" = yes && _def_libavutil
='#define USE_LIBAVUTIL 1'
6250 test "$_libavutil_a" = yes && _def_libavutil_a
='#define USE_LIBAVUTIL_A 1'
6251 test "$_libavutil_so" = yes && _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6252 # neither static nor shared libavutil is available, but it is mandatory ...
6253 if test "$_libavutil" = no
; then
6254 die
"You need static or shared libavutil, MPlayer will not compile without!"
6256 echores
"$_libavutil"
6258 echocheck
"FFmpeg libavcodec"
6259 if test "$_libavcodec_a" = auto
; then
6261 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6263 _res_comment
="static"
6265 elif test "$_libavcodec_so" = auto
; then
6267 _res_comment
="libavcodec.so is discouraged over static libavcodec"
6269 #include <ffmpeg/avcodec.h>
6270 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6272 if $_pkg_config --exists libavcodec
; then
6273 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6274 _ld_tmp
=`$_pkg_config --libs libavcodec`
6275 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6276 && _libavcodec_so
=yes
6277 elif cc_check
-lavcodec $_ld_lm ; then
6278 _ld_extra
="$_ld_extra -lavcodec"
6280 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6284 _def_libavcodec
='#undef USE_LIBAVCODEC'
6285 _def_libavcodec_a
='#undef USE_LIBAVCODEC_A'
6286 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6287 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
6288 test "$_libavcodec" = yes && _def_libavcodec
='#define USE_LIBAVCODEC 1'
6289 test "$_libavcodec_a" = yes && _def_libavcodec_a
='#define USE_LIBAVCODEC_A 1'
6290 test "$_libavcodec_so" = yes && _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6291 test "$_libavcodec_mpegaudio_hp" = yes \
6292 && _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6293 if test "$_libavcodec_a" = yes ; then
6294 _codecmodules
="libavcodec $_codecmodules"
6295 elif test "$_libavcodec_so" = yes ; then
6296 _codecmodules
="libavcodec.so $_codecmodules"
6298 _nocodecmodules
="libavcodec $_nocodecmodules"
6300 echores
"$_libavcodec"
6302 echocheck
"FFmpeg libavformat"
6303 if test "$_libavformat_a" = auto
; then
6305 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6307 _res_comment
="static"
6309 elif test "$_libavformat_so" = auto
; then
6312 #include <ffmpeg/avformat.h>
6313 #include <ffmpeg/opt.h>
6314 int main(void) { av_alloc_format_context(); return 0; }
6316 if $_pkg_config --exists libavformat
; then
6317 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6318 _ld_tmp
=`$_pkg_config --libs libavformat`
6319 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6320 && _libavformat_so
=yes
6321 elif cc_check
$_ld_lm -lavformat ; then
6322 _ld_extra
="$_ld_extra -lavformat"
6324 _res_comment
="using libavformat.so, but static libavformat is recommended"
6328 _def_libavformat
='#undef USE_LIBAVFORMAT'
6329 _def_libavformat_a
='#undef USE_LIBAVFORMAT_A'
6330 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6331 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
6332 test "$_libavformat" = yes && _def_libavformat
='#define USE_LIBAVFORMAT 1'
6333 test "$_libavformat_a" = yes && _def_libavformat_a
='#define USE_LIBAVFORMAT_A 1'
6334 test "$_libavformat_so" = yes \
6335 && _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6336 echores
"$_libavformat"
6338 echocheck
"FFmpeg libpostproc"
6339 if test "$_libpostproc_a" = auto
; then
6341 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6342 _libpostproc_a
='yes'
6343 _res_comment
="static"
6345 elif test "$_libpostproc_so" = auto
; then
6348 #define USE_LIBPOSTPROC 1
6349 #include <inttypes.h>
6350 #include <postproc/postprocess.h>
6351 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6353 if cc_check
-lpostproc $_ld_lm ; then
6354 _ld_extra
="$_ld_extra -lpostproc"
6356 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6360 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6361 _def_libpostproc_a
='#undef USE_LIBPOSTPROC_A'
6362 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6363 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
6364 test "$_libpostproc" = yes && _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6365 test "$_libpostproc_a" = yes && _def_libpostproc_a
='#define USE_LIBPOSTPROC_A 1'
6366 test "$_libpostproc_so" = yes \
6367 && _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6368 echores
"$_libpostproc"
6371 echocheck
"libamr narrowband"
6372 if test "$_libamr_nb" = auto
; then
6375 #include <amrnb/interf_dec.h>
6376 int main(void) { Speech_Decode_Frame_init(); return 0; }
6378 cc_check
-lamrnb && _libamr_nb
=yes
6379 if test "$_libavcodec_a" != yes ; then
6381 _res_comment
="libavcodec (static) is required by libamr_nb, sorry"
6384 if test "$_libamr_nb" = yes ; then
6386 _ld_extra
="$_ld_extra -lamrnb"
6387 _def_libamr
='#define CONFIG_LIBAMR 1'
6388 _def_libamr_nb
='#define CONFIG_LIBAMR_NB 1'
6389 _codecmodules
="libamr_nb $_codecmodules"
6391 _def_libamr_nb
='#undef CONFIG_LIBAMR_NB'
6392 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_NB_DECODER// `
6393 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_NB_ENCODER// `
6394 _nocodecmodules
="libamr_nb $_nocodecmodules"
6396 echores
"$_libamr_nb"
6399 echocheck
"libamr wideband"
6400 if test "$_libamr_wb" = auto
; then
6403 #include <amrwb/dec_if.h>
6404 int main(void) { D_IF_init(); return 0; }
6406 cc_check
-lamrwb && _libamr_wb
=yes
6407 if test "$_libavcodec_a" != yes ; then
6409 _res_comment
="libavcodec (static) is required by libamr_wb, sorry"
6412 if test "$_libamr_wb" = yes ; then
6414 _ld_extra
="$_ld_extra -lamrwb"
6415 _def_libamr
='#define CONFIG_LIBAMR 1'
6416 _def_libamr_wb
='#define CONFIG_LIBAMR_WB 1'
6417 _codecmodules
="libamr_wb $_codecmodules"
6419 _def_libamr_wb
='#undef CONFIG_LIBAMR_WB'
6420 _nocodecmodules
="libamr_wb $_nocodecmodules"
6421 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_WB_DECODER// `
6422 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_WB_ENCODER// `
6424 echores
"$_libamr_wb"
6426 echocheck
"libdv-0.9.5+"
6427 if test "$_libdv" = auto
; then
6430 #include <libdv/dv.h>
6431 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6433 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6435 if test "$_libdv" = yes ; then
6436 _def_libdv
='#define HAVE_LIBDV095 1'
6437 _ld_extra
="$_ld_extra -ldv"
6438 _codecmodules
="libdv $_codecmodules"
6440 _def_libdv
='#undef HAVE_LIBDV095'
6441 _nocodecmodules
="libdv $_nocodecmodules"
6447 if test "$_xvid" = auto
; then
6451 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6453 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6454 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6458 if test "$_xvid" = yes ; then
6459 _def_xvid
='#define HAVE_XVID4 1'
6460 _codecmodules
="xvid $_codecmodules"
6462 _def_xvid
='#undef HAVE_XVID4'
6463 _nocodecmodules
="xvid $_nocodecmodules"
6464 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6468 if test "$_xvid" = yes ; then
6469 echocheck
"XviD two pass plugin"
6472 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6476 _def_lavc_xvid
='#define CONFIG_LIBXVID 1'
6479 _def_lavc_xvid
='#undef CONFIG_LIBXVID'
6480 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6482 echores
"$_lavc_xvid"
6487 if test "$_x264" = auto
; then
6489 #include <inttypes.h>
6492 #error We do not support old versions of x264. Get the latest from SVN.
6494 int main(void) { x264_encoder_open((void*)0); return 0; }
6497 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6498 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6502 if test "$_x264" = yes ; then
6504 _def_x264
='#define HAVE_X264 1'
6505 _codecmodules
="x264 $_codecmodules"
6506 if echo $_libavencoders |
grep -q X264
; then
6508 _def_lavc_x264
='#define CONFIG_LIBX264 1'
6509 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6512 _def_lavc_x264
='#undef CONFIG_LIBX264'
6517 _def_x264
='#undef HAVE_X264'
6518 _def_lavc_x264
='#undef CONFIG_LIBX264'
6519 _nocodecmodules
="x264 $_nocodecmodules"
6520 _libavencoders
=`echo $_libavencoders | sed -e s/LIBX264_ENCODER// `
6522 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6526 if test "$_libnut" = auto
; then
6530 #include <inttypes.h>
6532 int main(void) { (void)nut_error(0); return 0; }
6535 cc_check
-lnut && _libnut
=yes
6538 if test "$_libnut" = yes ; then
6539 _def_libnut
='#define HAVE_LIBNUT 1'
6540 _ld_extra
="$_ld_extra -lnut"
6542 _def_libnut
='#undef HAVE_LIBNUT'
6543 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
6548 # mencoder requires (optional) those libs: libmp3lame
6549 if test "$_mencoder" != no
; then
6551 echocheck
"libmp3lame (for mencoder)"
6553 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6554 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6556 #include <lame/lame.h>
6557 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; }
6559 # Note: libmp3lame usually depends on vorbis
6560 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6561 if test "$_mp3lame" = yes ; then
6562 _def_mp3lame
="#define HAVE_MP3LAME"
6563 _ld_mp3lame
=-lmp3lame
6564 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6566 #include <lame/lame.h>
6567 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6569 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6571 #include <lame/lame.h>
6572 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6574 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6575 if echo $_libavencoders |
grep -q MP3LAME
; then
6577 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6578 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6581 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6584 _def_mp3lame
='#undef HAVE_MP3LAME'
6585 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
6591 echocheck
"mencoder"
6592 _mencoder_flag
='#undef HAVE_MENCODER'
6593 if test "$_mencoder" = yes ; then
6594 _mencoder_flag
='#define HAVE_MENCODER'
6595 _def_muxers
='#define CONFIG_MUXERS 1'
6597 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6598 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6601 echores
"$_mencoder"
6603 echocheck
"fastmemcpy"
6604 # fastmemcpy check is done earlier with tests of CPU & binutils features
6605 if test "$_fastmemcpy" = yes ; then
6606 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6608 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6610 echores
"$_fastmemcpy"
6612 echocheck
"UniquE RAR File Library"
6613 if test "$_unrarlib" = yes ; then
6614 _def_unrarlib
='#define USE_UNRARLIB 1'
6616 _def_unrarlib
='#undef USE_UNRARLIB'
6618 echores
"$_unrarlib"
6620 echocheck
"TV interface"
6621 if test "$_tv" = yes ; then
6622 _def_tv
='#define USE_TV 1'
6623 _inputmodules
="tv $_inputmodules"
6625 _noinputmodules
="tv $_noinputmodules"
6626 _def_tv
='#undef USE_TV'
6632 echocheck
"*BSD BT848 bt8xx header"
6634 for file in "machine/ioctl_bt848.h" \
6635 "dev/bktr/ioctl_bt848.h" \
6636 "dev/video/bktr/ioctl_bt848.h" \
6637 "dev/ic/bt8xx.h" ; do
6639 #include <sys/types.h>
6642 ioctl(0, TVTUNER_GETFREQ, 0);
6648 _ioctl_bt848_h_name
="$file"
6652 if test "$_ioctl_bt848_h" = yes ; then
6653 _def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6654 _res_comment
="using $_ioctl_bt848_h_name"
6656 _def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6658 echores
"$_ioctl_bt848_h"
6660 echocheck
"*BSD ioctl_meteor.h"
6662 for file in "machine/ioctl_meteor.h" \
6663 "dev/bktr/ioctl_meteor.h" \
6664 "dev/video/bktr/ioctl_meteor.h" ; do
6666 #include <sys/types.h>
6669 ioctl(0, METEORSINPUT, 0);
6675 _ioctl_meteor_h_name
="$file"
6679 if test "$_ioctl_meteor_h" = yes ; then
6680 _def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6681 _res_comment
="using $_ioctl_meteor_h_name"
6683 _def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6685 echores
"$_ioctl_meteor_h"
6687 echocheck
"*BSD BrookTree 848 TV interface"
6688 if test "$_tv_bsdbt848" = auto
; then
6690 if test "$_tv" = yes ; then
6692 #include <sys/types.h>
6693 $_def_ioctl_meteor_h_name
6694 $_def_ioctl_bt848_h_name
6695 #ifdef IOCTL_METEOR_H_NAME
6696 #include IOCTL_METEOR_H_NAME
6698 #ifdef IOCTL_BT848_H_NAME
6699 #include IOCTL_BT848_H_NAME
6702 ioctl(0, METEORSINPUT, 0);
6703 ioctl(0, TVTUNER_GETFREQ, 0);
6707 cc_check
&& _tv_bsdbt848
=yes
6710 if test "$_tv_bsdbt848" = yes ; then
6711 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6712 _inputmodules
="tv-bsdbt848 $_inputmodules"
6714 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6715 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6717 echores
"$_tv_bsdbt848"
6721 echocheck
"Video 4 Linux TV interface"
6722 if test "$_tv_v4l1" = auto
; then
6724 if test "$_tv" = yes && linux
; then
6727 #include <linux/videodev.h>
6728 int main(void) { return 0; }
6730 cc_check
&& _tv_v4l1
=yes
6733 if test "$_tv_v4l1" = yes ; then
6736 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6737 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6738 _inputmodules
="tv-v4l $_inputmodules"
6740 _noinputmodules
="tv-v4l1 $_noinputmodules"
6741 _def_tv_v4l
='#undef HAVE_TV_V4L'
6746 echocheck
"Video 4 Linux 2 TV interface"
6747 if test "$_tv_v4l2" = auto
; then
6749 if test "$_tv" = yes && linux
; then
6752 #include <linux/types.h>
6753 #include <linux/videodev2.h>
6754 int main(void) { return 0; }
6756 cc_check
&& _tv_v4l2
=yes
6759 if test "$_tv_v4l2" = yes ; then
6762 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6763 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6764 _inputmodules
="tv-v4l2 $_inputmodules"
6766 _noinputmodules
="tv-v4l2 $_noinputmodules"
6767 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6772 echocheck
"TV teletext interface"
6773 if test "$_tv_teletext" = auto
; then
6775 if test "$_freetype" = yes ; then
6776 if test "$_tv_v4l2" = yes ||
test "$_v4l" = yes ; then
6781 if test "$_tv_teletext" = yes ; then
6782 _def_tv_teletext
='#define HAVE_TV_TELETEXT 1'
6783 _inputmodules
="tv-teletext $_inputmodules"
6785 _noinputmodules
="tv-teletext $_noinputmodules"
6786 _def_tv_teletext
='#undef HAVE_TV_TELETEXT'
6788 echores
"$_tv_teletext"
6791 echocheck
"Radio interface"
6792 if test "$_radio" = yes ; then
6793 _def_radio
='#define USE_RADIO 1'
6794 _inputmodules
="radio $_inputmodules"
6795 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6798 if test "$_radio_capture" = yes ; then
6800 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6802 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6805 _noinputmodules
="radio $_noinputmodules"
6806 _def_radio
='#undef USE_RADIO'
6807 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6811 echocheck
"Capture for Radio interface"
6812 echores
"$_radio_capture"
6814 echocheck
"Video 4 Linux 2 Radio interface"
6815 if test "$_radio_v4l2" = auto
; then
6817 if test "$_radio" = yes && linux
; then
6820 #include <linux/types.h>
6821 #include <linux/videodev2.h>
6822 int main(void) { return 0; }
6824 cc_check
&& _radio_v4l2
=yes
6827 if test "$_radio_v4l2" = yes ; then
6828 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6830 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6832 echores
"$_radio_v4l2"
6834 echocheck
"Video 4 Linux Radio interface"
6835 if test "$_radio_v4l" = auto
; then
6837 if test "$_radio" = yes && linux
; then
6840 #include <linux/videodev.h>
6841 int main(void) { return 0; }
6843 cc_check
&& _radio_v4l
=yes
6846 if test "$_radio_v4l" = yes ; then
6847 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6849 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6851 echores
"$_radio_v4l"
6853 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6854 echocheck
"*BSD BrookTree 848 Radio interface"
6857 #include <sys/types.h>
6858 $_def_ioctl_bt848_h_name
6859 #ifdef IOCTL_BT848_H_NAME
6860 #include IOCTL_BT848_H_NAME
6863 ioctl(0, RADIO_GETFREQ, 0);
6867 cc_check
&& _radio_bsdbt848
=yes
6868 echores
"$_radio_bsdbt848"
6869 fi #if bsd && radio && radio_bsdbt848
6871 if test "$_radio_bsdbt848" = yes ; then
6872 _def_radio_bsdbt848
='#define HAVE_RADIO_BSDBT848 1'
6874 _def_radio_bsdbt848
='#undef HAVE_RADIO_BSDBT848'
6877 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6878 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6879 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6882 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6883 if test "$_pvr" = auto
; then
6885 if test "$_tv_v4l2" = yes && linux
; then
6888 #include <inttypes.h>
6889 #include <linux/types.h>
6890 #include <linux/videodev2.h>
6891 int main(void) { struct v4l2_ext_controls ext; return 0; }
6893 cc_check
&& _pvr
=yes
6896 if test "$_pvr" = yes ; then
6897 _def_pvr
='#define HAVE_PVR 1'
6898 _inputmodules
="pvr $_inputmodules"
6900 _noinputmodules
="pvr $_noinputmodules"
6901 _def_pvr
='#undef HAVE_PVR'
6906 echocheck
"audio select()"
6907 if test "$_select" = no
; then
6908 _def_select
='#undef HAVE_AUDIO_SELECT'
6909 elif test "$_select" = yes ; then
6910 _def_select
='#define HAVE_AUDIO_SELECT 1'
6916 if not beos
&& test "$_ftp" = yes ; then
6917 _def_ftp
='#define HAVE_FTP 1'
6918 _inputmodules
="ftp $_inputmodules"
6920 _noinputmodules
="ftp $_noinputmodules"
6921 _def_ftp
='#undef HAVE_FTP'
6925 echocheck
"vstream client"
6926 if test "$_vstream" = auto
; then
6929 #include <vstream-client.h>
6930 void vstream_error(const char *format, ... ) {}
6931 int main(void) { vstream_start(); return 0; }
6933 cc_check
-lvstream-client && _vstream
=yes
6935 if test "$_vstream" = yes ; then
6936 _def_vstream
='#define HAVE_VSTREAM 1'
6937 _inputmodules
="vstream $_inputmodules"
6938 _ld_extra
="$_ld_extra -lvstream-client"
6940 _noinputmodules
="vstream $_noinputmodules"
6941 _def_vstream
='#undef HAVE_VSTREAM'
6946 echocheck
"byte order"
6947 if test "$_big_endian" = auto
; then
6949 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6950 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6952 return (int)ascii_name;
6956 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6962 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
6965 if test "$_big_endian" = yes ; then
6966 _byte_order
='big-endian'
6967 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6969 _byte_order
='little-endian'
6970 _def_words_endian
='#undef WORDS_BIGENDIAN'
6972 echores
"$_byte_order"
6974 echocheck
"OSD menu"
6975 if test "$_menu" = yes ; then
6976 _def_menu
='#define HAVE_MENU 1'
6978 _def_menu
='#undef HAVE_MENU'
6983 echocheck
"Subtitles sorting"
6984 if test "$_sortsub" = yes ; then
6985 _def_sortsub
='#define USE_SORTSUB 1'
6987 _def_sortsub
='#undef USE_SORTSUB'
6992 echocheck
"XMMS inputplugin support"
6993 if test "$_xmms" = yes ; then
6994 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6995 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6996 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6998 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6999 _xmmslibdir
=/usr
/lib
7002 _def_xmms
='#define HAVE_XMMS 1'
7004 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
7006 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
7009 _def_xmms
='#undef HAVE_XMMS'
7014 if test "$_inet6" = auto
; then
7016 #include <sys/types.h>
7017 #include <sys/socket.h>
7018 #include <netinet/in.h>
7019 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
7026 if test "$_inet6" = yes ; then
7027 _def_inet6
='#define HAVE_AF_INET6 1'
7029 _def_inet6
='#undef HAVE_AF_INET6'
7034 echocheck
"gethostbyname2"
7035 if test "$_gethostbyname2" = auto
; then
7037 #include <sys/types.h>
7038 #include <sys/socket.h>
7040 int main(void) { gethostbyname2("", AF_INET); }
7048 if test "$_gethostbyname2" = yes ; then
7049 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
7051 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
7053 echores
"$_gethostbyname2"
7056 # --------------- GUI specific tests begin -------------------
7059 if test "$_gui" = yes ; then
7061 # Required libraries
7062 if test "$_libavcodec" != yes ||
7063 not
"echo $_libavdecoders | grep PNG_DECODER >/dev/null 2>&1" ; then
7064 die
"The GUI requires libavcodec with PNG support."
7067 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7069 echocheck
"XShape extension"
7070 if test "$_xshape" = auto
; then
7073 #include <X11/Xlib.h>
7074 #include <X11/Xproto.h>
7075 #include <X11/Xutil.h>
7076 #include <X11/extensions/shape.h>
7079 char *name = ":0.0";
7082 int eventbase, errorbase;
7083 if (getenv("DISPLAY"))
7084 name=getenv("DISPLAY");
7085 wsDisplay=XOpenDisplay(name);
7086 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7088 XCloseDisplay(wsDisplay);
7092 cc_check
&& _xshape
=yes
7094 if test "$_xshape" = yes ; then
7095 _def_xshape
='#define HAVE_XSHAPE 1'
7097 die
"The GUI requires the X11 extension XShape (which was not found)."
7102 if test "$_gtk1" = no
; then
7104 echocheck
"GTK+ version"
7106 if $_pkg_config gtk
+-2.0
--exists ; then
7107 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7108 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7109 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7113 if $_pkg_config glib-2.0
--exists ; then
7114 echocheck
"glib version"
7115 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7116 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7119 _def_gui
='#define HAVE_NEW_GUI 1'
7120 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7123 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7126 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7131 if test "$_gtk1" = yes ; then
7132 # Check for old GTK (1.2.x)
7133 echocheck
"GTK version"
7134 if test -z "$_gtkconfig" ; then
7135 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7136 _gtkconfig
="gtk-config"
7137 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7138 _gtkconfig
="gtk12-config"
7140 die
"The GUI requires GTK devel packages (which were not found)."
7143 _gtk
=`$_gtkconfig --version 2>&1`
7144 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7145 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7146 echores
"$_gtk (using $_gtkconfig)"
7149 echocheck
"glib version"
7150 if test -z "$_glibconfig" ; then
7151 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7152 _glibconfig
="glib-config"
7153 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7154 _glibconfig
="glib12-config"
7156 die
"The GUI requires GLIB devel packages (which were not found)"
7159 _glib
=`$_glibconfig --version 2>&1`
7160 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7161 echores
"$_glib (using $_glibconfig)"
7163 _def_gui
='#define HAVE_NEW_GUI 1'
7164 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7168 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7169 _def_gui
='#define HAVE_NEW_GUI 1'
7170 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7173 else #if test "$_gui"
7174 _def_gui
='#undef HAVE_NEW_GUI'
7175 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7177 # --------------- GUI specific tests end -------------------
7180 if test "$_charset" = "noconv" ; then
7183 if test "$_charset" ; then
7184 _def_charset
="#define MSG_CHARSET \"$_charset\""
7186 _def_charset
="#undef MSG_CHARSET"
7189 if test "$_charset" = "UTF-8" ; then
7190 # hack to disable conversion in the Makefile
7194 if test "$_charset" ; then
7195 echocheck
"iconv program"
7196 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7197 if test "$?" -ne 0 ; then
7199 echo "No working iconv program found, use "
7200 echo "--charset=UTF-8 to continue anyway."
7201 echo "If you also have problems with iconv library functions use --charset=noconv."
7202 echo "Messages in the GTK-2 interface will be broken then."
7209 #############################################################################
7211 echocheck
"automatic gdb attach"
7212 if test "$_crash_debug" = yes ; then
7213 _def_crash_debug
='#define CRASH_DEBUG 1'
7215 _def_crash_debug
='#undef CRASH_DEBUG'
7218 echores
"$_crash_debug"
7220 echocheck
"compiler support for noexecstack"
7222 int main(void) { return 0; }
7224 if cc_check
-Wl,-z,noexecstack
; then
7225 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7232 # Dynamic linking flags
7233 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7235 bsd
&& _ld_dl_dynamic
='-rdynamic'
7236 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
&& not darwin
; then
7237 _ld_dl_dynamic
='-rdynamic'
7240 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7241 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7242 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7243 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7245 _def_debug
='#undef MP_DEBUG'
7246 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7248 _def_linux
='#undef TARGET_LINUX'
7249 linux
&& _def_linux
='#define TARGET_LINUX 1'
7252 echocheck
"joystick"
7253 _def_joystick
='#undef HAVE_JOYSTICK'
7254 if test "$_joystick" = yes ; then
7256 # TODO add some check
7257 _def_joystick
='#define HAVE_JOYSTICK 1'
7259 _joystick
="no (unsupported under $system_name)"
7262 echores
"$_joystick"
7265 if test "$_lirc" = auto
; then
7268 #include <lirc/lirc_client.h>
7269 int main(void) { return 0; }
7271 cc_check
-llirc_client && _lirc
=yes
7273 if test "$_lirc" = yes ; then
7274 _def_lirc
='#define HAVE_LIRC 1'
7275 _ld_extra
="$_ld_extra -llirc_client"
7277 _def_lirc
='#undef HAVE_LIRC'
7282 if test "$_lircc" = auto
; then
7285 #include <lirc/lircc.h>
7286 int main(void) { return 0; }
7288 cc_check
-llircc && _lircc
=yes
7290 if test "$_lircc" = yes ; then
7291 _def_lircc
='#define HAVE_LIRCC 1'
7292 _ld_extra
="$_ld_extra -llircc"
7294 _def_lircc
='#undef HAVE_LIRCC'
7299 # Detect maemo development platform libraries availability (http://www.maemo.org),
7300 # they are used when run on Nokia 770
7301 echocheck
"maemo (Nokia 770)"
7302 if test "$_maemo" = auto
; then
7305 #include <libosso.h>
7306 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7308 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7310 if test "$_maemo" = yes ; then
7311 _def_maemo
='#define HAVE_MAEMO 1'
7312 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7313 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7315 _def_maemo
='#undef HAVE_MAEMO'
7320 echocheck
"color console output"
7321 if test "$_color_console" = yes ; then
7322 _def_color_console
='#define MSG_USE_COLORS 1'
7324 _def_color_console
='#undef MSG_USE_COLORS'
7326 echores
"$_color_console"
7328 # linker paths should be the same for mencoder and mplayer
7330 for I
in $_libs_mplayer ; do
7331 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7332 if test -z "$_tmp" ; then
7333 _ld_extra
="$I $_ld_extra"
7335 _ld_tmp
="$_ld_tmp $I"
7338 _libs_mplayer
=$_ld_tmp
7341 #############################################################################
7343 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN -shared-libgcc"
7344 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7345 CFLAGS
="$CFLAGS -no-cpp-precomp"
7349 CFLAGS
="$CFLAGS -DNEWLIB -D__USE_INLINE__ -DSYS_AMIGAOS4"
7352 # use flag for HPUX missing setenv()
7353 CFLAGS
="$CFLAGS -DHPUX"
7357 CFLAGS
="$CFLAGS -D_REENTRANT"
7359 # FIXME bsd needs this so maybe other OS'es
7360 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7363 CFLAGS
="$CFLAGS -D__CYGWIN__ -DSYS_CYGWIN"
7365 # 64 bit file offsets?
7366 if test "$_largefiles" = yes || freebsd
; then
7367 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7368 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7369 # dvdread support requires this (for off64_t)
7370 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7374 CFLAGS
="-I. -I.. -I../libavutil $CFLAGS"
7375 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
7378 int main() { return 0; }
7380 if test "$cc_vendor" = "gnu" ; then
7381 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7382 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
7383 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
7387 #this must be the last test to be performed or the ones following it will likely fail
7388 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
7389 # to use its own copy of the library)
7390 echocheck
"DVD support (libdvdnav)"
7391 if test "$_dvdnav" = auto
; then
7392 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7394 if test "$_dvdnav" = auto
; then
7396 #include <inttypes.h>
7398 int main(void) { dvdnav_t *dvd=0; return 0; }
7401 _dvdnavdir
=`$_dvdnavconfig --cflags`
7402 _dvdnavlibs
=`$_dvdnavconfig --libs`
7403 _dvdnavvsn
=`$_dvdnavconfig --version | sed "s/\.//g"`
7404 _dvdnavmajor
=`echo $_dvdnavvsn | cut -d. -f2`
7405 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
7406 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7408 if test "$_dvdnav" = yes ; then
7410 _def_dvdnav
='#define USE_DVDNAV 1'
7411 _dvdnav_version
=`$_dvdnavconfig --version | sed "s/\.//g"`
7412 _def_dvdnav_version
="#define DVDNAVVERSION $_dvdnav_version"
7413 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
7414 _ld_extra
="$_ld_extra `$_dvdnavconfig --minilibs`"
7415 _inputmodules
="dvdnav $_inputmodules"
7417 _def_dvdnav
='#undef USE_DVDNAV'
7418 _noinputmodules
="dvdnav $_noinputmodules"
7422 #############################################################################
7423 echo "Creating config.mak"
7424 cat > config.mak
<< EOF
7425 # -------- Generated by configure -----------
7428 MAN_LANG = $MAN_LANG
7429 TARGET_OS = $system_name
7431 prefix = \$(DESTDIR)$_prefix
7432 BINDIR = \$(DESTDIR)$_bindir
7433 DATADIR = \$(DESTDIR)$_datadir
7434 MANDIR = \$(DESTDIR)$_mandir
7435 CONFDIR = \$(DESTDIR)$_confdir
7436 LIBDIR = \$(DESTDIR)$_libdir
7437 # FFmpeg uses libdir instead of LIBDIR
7443 LDCONFIG = $_ldconfig
7445 EXTRA_INC = $_inc_extra
7446 EXTRAXX_INC = $_inc_extra $_inc_extraxx
7447 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7448 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
7449 INSTALLSTRIP = $_install_strip
7451 HELP_FILE = $_mp_help
7455 MPLAYER_NETWORK = $_network
7457 STREAMING_LIVE555 = $_live
7459 STREAM_CACHE = $_stream_cache
7462 VIDIX_INTERNAL = $_vidix_internal
7463 VIDIX_EXTERNAL = $_vidix_external
7470 LIBMPEG2 = $_libmpeg2
7471 TREMOR_INTERNAL = $_tremor_internal
7472 TREMOR_LOW = $_tremor_low
7476 MUSEPACK = $_musepack
7478 UNRARLIB = $_unrarlib
7483 EXTRALIBS = $_extra_libs
7484 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7485 EXTRALIBS_MPLAYER = $_libs_mplayer
7486 EXTRALIBS_MENCODER = $_libs_mencoder
7489 HAVE_PTHREADS = $_pthreads
7490 HAVE_W32THREADS = $_w32threads
7492 HAVE_XVMC_ACCEL = $_xvmc
7494 HAVE_SYS_MMAN_H = $_mman
7495 HAVE_POSIX_SELECT = $_posix_select
7497 NEED_GETTIMEOFDAY = $_need_gettimeofday
7498 NEED_GLOB = $_need_glob
7499 NEED_SETENV = $_need_setenv
7500 NEED_SHMEM = $_need_shmem
7501 NEED_STRSEP = $_need_strsep
7502 NEED_SWAB = $_need_swab
7503 NEED_VSSCANF = $_need_vsscanf
7510 LIB=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7519 # input/demuxer/codecs
7520 JOYSTICK = $_joystick
7526 TV_BSDBT848 = $_tv_bsdbt848
7527 TV_TELETEXT = $_tv_teletext
7528 AUDIO_INPUT = $_audio_input
7532 DVDREAD_INTERNAL = $_dvdread_internal
7533 DVDCSS_INTERNAL = $_libdvdcss_internal
7535 WIN32DLL = $_win32dll
7537 REAL_CODECS = $_real
7538 XANIM_CODECS = $_xanim
7539 LIBAVUTIL = $_libavutil
7540 LIBAVUTIL_A = $_libavutil_a
7541 LIBAVUTIL_SO = $_libavutil_so
7542 LIBAVCODEC = $_libavcodec
7543 LIBAVCODEC_A = $_libavcodec_a
7544 LIBAVCODEC_SO = $_libavcodec_so
7545 LIBAVFORMAT = $_libavformat
7546 LIBAVFORMAT_A = $_libavformat_a
7547 LIBAVFORMAT_SO = $_libavformat_so
7548 LIBPOSTPROC = $_libpostproc
7549 LIBPOSTPROC_A = $_libpostproc_a
7550 LIBPOSTPROC_SO = $_libpostproc_so
7559 MENCODER = $_mencoder
7562 BITMAP_FONT = $_bitmap_font
7563 FREETYPE = $_freetype
7566 LIBVORBIS = $_vorbis
7567 LIBTHEORA = $_theora
7568 FAAD_INTERNAL = $_faad_internal
7569 FAAD_FIXED = $_faad_fixed
7570 LIBSMBCLIENT = $_smbsupport
7571 XMMS_PLUGINS = $_xmms
7573 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7574 MACOSX_BUNDLE = $_macosx_bundle
7575 MACOSX_COREVIDEO = $_macosx_corevideo
7579 CONFIG_LIBAMR=$_libamr
7580 CONFIG_LIBAMR_NB=$_libamr_nb
7581 CONFIG_LIBAMR_WB=$_libamr_wb
7582 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7583 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7584 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7585 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7586 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7587 `echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7588 CONFIG_LIBFAAC=$_lavc_faac
7589 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7590 CONFIG_LIBXVID=$_lavc_xvid
7591 CONFIG_LIBX264=$_lavc_x264
7594 CONFIG_ENCODERS=$_mencoder
7595 CONFIG_MUXERS=$_mencoder
7597 RADIO_CAPTURE=$_radio_capture
7598 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7599 VIDIX_IVTV=$_vidix_drv_ivtv
7600 VIDIX_MACH64=$_vidix_drv_mach64
7601 VIDIX_MGA=$_vidix_drv_mga
7602 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7603 VIDIX_NVIDIA=$_vidix_drv_nvidia
7604 VIDIX_PM2=$_vidix_drv_pm2
7605 VIDIX_PM3=$_vidix_drv_pm3
7606 VIDIX_RADEON=$_vidix_drv_radeon
7607 VIDIX_RAGE128=$_vidix_drv_rage128
7608 VIDIX_SAVAGE=$_vidix_drv_savage
7609 VIDIX_SIS=$_vidix_drv_sis
7610 VIDIX_UNICHROME=$_vidix_drv_unichrome
7612 # --- Some stuff for autoconfigure ----
7618 HAVE_MMX2 = $_mmxext
7619 HAVE_3DNOW = $_3dnow
7620 HAVE_3DNOWEX = $_3dnowext
7623 HAVE_ALTIVEC = $_altivec
7624 HAVE_ARMV5TE = $_armv5te
7625 HAVE_ARMV6 = $_armv6
7626 HAVE_IWMMXT = $_iwmmxt
7632 # --- libvo stuff ---
7635 # --- libao2 stuff ---
7638 # --- libaf stuff ---
7643 #############################################################################
7645 ff_config_enable
() {
7647 test -z "$_nprefix" && _nprefix
='CONFIG'
7649 if ` echo $2 | grep "\<$part\>" > /dev/null `; then
7650 echo "#define ${_nprefix}_$part 1"
7651 echo "#define ENABLE_$part 1"
7653 echo "#define ENABLE_$part 0"
7658 echo "Creating config.h"
7659 cat > config.h
<< EOF
7660 /* -------- This file has been automatically generated by configure ---------
7661 Note: Any changes in it will be lost when you run configure again. */
7663 /* Protect against multiple inclusion */
7664 #ifndef MPLAYER_CONFIG_H
7665 #define MPLAYER_CONFIG_H 1
7667 #define CONFIGURATION "$_configuration"
7669 /* make sure we never get lavformat's poll() emulation, the results are
7670 horrible if the X libs try to actually use it, see MPlayer-users
7671 Message-ID: <45D49541.8060101@infernix.net>
7672 Date: Thu, 15 Feb 2007 18:15:45 +0100
7673 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7675 #define HAVE_SYS_POLL_H 1
7677 /* yes, we have inttypes.h */
7678 #define HAVE_INTTYPES_H 1
7680 /* int_fastXY_t emulation */
7683 /* use GNU internationalization */
7686 /* name of messages charset */
7689 /* Runtime CPU detection */
7690 $_def_runtime_cpudetection
7692 /* Dynamic a/v plugins */
7693 $_def_dynamic_plugins
7695 /* "restrict" keyword */
7696 $_def_restrict_keyword
7698 /* __builtin_expect branch prediction hint */
7699 $_def_builtin_expect
7700 #ifdef HAVE_BUILTIN_EXPECT
7701 #define likely(x) __builtin_expect ((x) != 0, 1)
7702 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7704 #define likely(x) (x)
7705 #define unlikely(x) (x)
7708 /* attribute(used) as needed by some compilers */
7709 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7710 # define attribute_used __attribute__((used))
7712 # define attribute_used
7715 /* compiler support for named assembler arguments */
7716 $_def_named_asm_args
7718 /* enable/disable SIGHANDLER */
7721 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7724 /* Toggles debugging informations */
7727 /* Toggles color console output */
7730 /* Indicates that libcdio is available for VCD and CD-DA playback */
7733 /* Indicates that Ogle's libdvdread is available for DVD playback */
7736 /* Indicates that dvdread is internal */
7737 $_def_dvdread_internal
7739 /* Additional options for libdvdread/libdvdcss */
7752 /* Common data directory (for fonts, etc) */
7753 #define MPLAYER_DATADIR "$_datadir"
7754 #define MPLAYER_CONFDIR "$_confdir"
7755 #define MPLAYER_LIBDIR "$_libdir"
7757 /* Define this to compile stream-caching support, it can be enabled via
7758 -cache <kilobytes> */
7761 /* Define if you are using XviD library */
7764 /* Define if you are using the X.264 library */
7767 /* Define if you are using libnut */
7770 /* Define to include support for libdv-0.9.5 */
7773 /* If build mencoder */
7776 /* Indicates if libmp3lame is available
7777 Note: for mencoder */
7779 $_def_mp3lame_preset
7780 $_def_mp3lame_preset_medium
7782 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7783 (use -bps or -nobps commandline option for run-time method selection)
7784 -bps gives better sync for vbr mp3 audio, it is now default */
7785 #define AVI_SYNC_BPS 1
7787 /* Undefine this if you do not want to select mono audio (left or right)
7788 with a stereo MPEG layer 2/3 audio stream. The command line option
7789 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7790 right-only), with 0 being the default.
7792 #define USE_FAKE_MONO 1
7794 /* Undefine this if your sound card driver has no working select().
7795 If you have kernel Oops, player hangups, or just no audio, you should
7796 try to recompile MPlayer with this option disabled! */
7799 /* define this to use iconv(3) function to codepage conversions */
7802 /* define this to use nl_langinfo function */
7805 /* define this to use RTC (/dev/rtc) for video timers */
7808 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7809 #define MAX_OUTBURST 65536
7811 /* set up audio OUTBURST. Do not change this! */
7812 #define OUTBURST 512
7814 /* Define this if your system has the header file for the OSS sound interface */
7817 /* Define this if your system has the header file for the OSS sound interface
7818 * in /usr/include */
7821 /* Define this if your system has the sysinfo header */
7824 /* Define this if your system has the "malloc.h" header file */
7827 /* memalign is mapped to malloc if unsupported */
7832 /* assembler handling of .align */
7835 /* Define this if your system has the "alloca.h" header file */
7838 /* Define this if your system has the "sys/mman.h" header file */
7840 $_def_mman_has_map_failed
7842 /* Define this if you have the elf dynamic linker -ldl library */
7845 /* Define this if you have the kstat kernel statistics library */
7848 /* Define this if you have zlib */
7851 #define CONFIG_ZLIB 1
7854 /* Define this if you have shm support */
7857 /* Define this if your system has strsep */
7860 /* Define this if your system has vsscanf */
7863 /* Define this if your system has swab */
7866 /* Define this if your system has posix select */
7869 /* Define this if your system has gettimeofday */
7872 /* Define this if your system has glob */
7875 /* Define this if your system has setenv */
7878 int setenv(const char *name, const char *val, int overwrite);
7881 /* Define this if your system has sysi86 */
7885 /* Define this if your system has pthreads */
7888 /* Define this if you enabled thread support for libavcodec */
7891 #define ENABLE_THREADS 1
7893 #define ENABLE_THREADS 0
7896 /* LIRC (remote control, see www.lirc.org) support: */
7899 /* Support for maemo (http://www.maemo.org) */
7903 * LIRCCD (LIRC client daemon)
7904 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7908 /* DVD navigation support using libdvdnav */
7910 $_def_dvdnav_version
7912 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7913 #define MPEG12_POSTPROC 1
7915 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7918 $_def_libpostproc_so
7920 /* Win32 DLL support */
7922 #define WIN32_PATH "$_win32codecsdir"
7924 /* Mac OS X specific features */
7926 $_def_macosx_finder_support
7928 $_def_macosx_corevideo
7930 /* Build our Win32-loader */
7933 /* ffmpeg's libavcodec support (requires libavcodec source) */
7937 $_def_libavcodec_mpegaudio_hp
7939 /* ffmpeg's libavformat support (requires libavformat source) */
7942 $_def_libavformat_so
7948 /* Use libavcodec's decoders */
7949 #define CONFIG_DECODERS 1
7950 /* Use libavcodec's encoders */
7951 #define CONFIG_ENCODERS 1
7953 /* Use libavformat's demuxers */
7954 #define CONFIG_DEMUXERS 1
7955 /* Use libavformat's muxers */
7958 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
7959 #define HAVE_EBX_AVAILABLE 1
7960 #define HAVE_EBP_AVAILABLE 1
7962 #define CONFIG_GPL 1
7963 #define ENABLE_SMALL 0
7965 /* Support for grayscale encoding/decoding in FFmpeg (makes color slower) */
7966 #define ENABLE_GRAY 1
7968 /* Use AMR codecs from libavcodec. */
7973 /* Use specific parts from FFmpeg. */
7974 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
7975 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
7976 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
7977 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
7978 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
7979 `ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
7980 `ff_config_enable "$_libavbsfs_all" "$_libavbsfs"`
7987 /* Use codec libs included in mplayer CVS / source dist: */
7993 /* XAnim DLL support */
7995 /* Default search path */
7998 /* RealPlayer DLL support */
8000 /* Default search path */
8003 /* LIVE555 Streaming Media library support */
8006 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8009 /* Use unrarlib for Vobsubs */
8012 /* gui support, please do not edit this option */
8016 /* Audio output drivers */
8018 $_def_ossaudio_devdsp
8019 $_def_ossaudio_devmixer
8030 $_def_sys_asoundlib_h
8031 $_def_alsa_asoundlib_h
8037 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8039 #undef FAST_OSD_TABLE
8041 /* Enable TV Interface support */
8044 /* Enable Video 4 Linux TV interface support */
8047 /* Enable Video 4 Linux 1 TV interface support */
8050 /* Enable Video 4 Linux 2 TV interface support */
8053 /* *BSD BrookTree headers */
8054 $_def_ioctl_meteor_h_name
8055 $_def_ioctl_bt848_h_name
8057 /* Enable *BSD BrookTree TV interface support */
8060 /* Enable TV Teletext Interface support */
8063 /* Enable Radio Interface support */
8066 /* Enable Capture for Radio Interface support */
8069 /* Enable Video 4 Linux Radio interface support */
8072 /* Enable Video 4 Linux 2 Radio interface support */
8075 /* Enable *BSD BrookTree Radio interface support */
8076 $_def_radio_bsdbt848
8078 /* Enable Video 4 Linux 2 MPEG PVR support */
8081 /* Define if your processor stores words with the most significant
8082 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8085 /* Define if your processor can access unaligned data in a fast way */
8086 $_def_fast_unaligned
8088 `ff_config_enable "$_arch_all" "$_arch" "ARCH"`
8090 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8091 have the instruction. */
8094 /* only gcc3 can compile mvi instructions */
8095 $_def_gcc_mvi_support
8097 /* Define this for Cygwin build for win32 */
8100 /* Define this to any prefered value from 386 up to infinity with step 100 */
8101 #define __CPU__ $iproc
8110 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8111 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8113 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8114 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8115 #elif defined(WIN32)
8116 #define DEFAULT_CDROM_DEVICE "D:"
8117 #define DEFAULT_DVD_DEVICE "D:"
8118 #elif defined(SYS_DARWIN)
8119 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8120 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8121 #elif defined(__OpenBSD__)
8122 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8123 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8124 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8125 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8126 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8127 #elif defined(SYS_AMIGAOS4)
8128 #define DEFAULT_CDROM_DEVICE "a1ide.device:2"
8129 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8131 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8132 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8136 /*----------------------------------------------------------------------------
8138 ** NOTE: Instead of modifying these definitions here, use the
8139 ** --enable/--disable options of the ./configure script!
8140 ** See ./configure --help for details.
8142 *---------------------------------------------------------------------------*/
8144 /* C99 lrintf function available */
8147 /* mkstemp support */
8150 /* nanosleep support */
8156 /* termcap flag for getch2.c */
8159 /* termios flag for getch2.c */
8164 /* enable PNG support */
8167 /* enable JPEG support */
8170 /* enable PNM support */
8173 /* enable md5sum support */
8176 /* enable GIF support */
8181 /* enable bitmap font support */
8184 /* enable FreeType support */
8187 /* enable Fontconfig support */
8190 /* enable SSA/ASS support */
8193 /* enable FriBiDi usage */
8196 /* enable ENCA usage */
8199 /* liblzo support */
8202 #define CONFIG_LZO 1
8205 /* libmad support */
8208 /* enable OggVorbis support */
8212 /* enable Speex support */
8215 /* enable musepack support */
8218 /* enable OggTheora support */
8221 /* enable FAAD (AAC) support */
8225 /* enable FAAC (AAC encoder) support */
8228 /* enable LADSPA plugin support */
8231 /* enable network */
8234 /* enable ftp support */
8237 /* enable vstream support */
8240 /* enable winsock2 instead of Unix functions*/
8243 /* define this to use inet_aton() instead of inet_pton() */
8246 /* enables / disables cdparanoia support */
8250 /* enables / disables VIDIX usage */
8252 $_def_vidix_drv_cyberblade
8253 $_def_vidix_drv_ivtv
8254 $_def_vidix_drv_mach64
8256 $_def_vidix_drv_mga_crtc2
8257 $_def_vidix_drv_nvidia
8259 $_def_vidix_drv_radeon
8260 $_def_vidix_drv_rage128
8261 $_def_vidix_drv_savage
8263 $_def_vidix_drv_unichrome
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 `ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
8291 $_def_altivec_h // enables usage of altivec.h
8293 $_def_vis // only define if you have VIS ( ultrasparc )
8295 /* libmpeg2 uses a different feature test macro for mediaLib */
8297 #define LIBMPEG2_MLIB 1
8301 #define SCREEN_SIZE_X 1
8302 #define SCREEN_SIZE_Y 1
8314 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8325 $_def_directfb_version
8350 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8351 #define X11_FULLSCREEN 1
8354 #endif /* MPLAYER_CONFIG_H */
8357 #############################################################################
8361 Config files successfully generated by ./configure $_configuration !
8363 Install prefix: $_prefix
8364 Data directory: $_datadir
8365 Config direct.: $_confdir
8367 Byte order: $_byte_order
8368 Optimizing for: $_optimizing
8371 Messages/GUI: $_language
8374 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8375 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8380 Enabled optional drivers:
8381 Input: $_inputmodules
8382 Codecs: $_codecmodules
8383 Audio output: $_aomodules
8384 Video output: $_vomodules
8385 Audio filters: $_afmodules
8386 Disabled optional drivers:
8387 Input: $_noinputmodules
8388 Codecs: $_nocodecmodules
8389 Audio output: $_noaomodules
8390 Video output: $_novomodules
8391 Audio filters: $_noafmodules
8393 'config.h' and 'config.mak' contain your configuration options.
8394 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8395 compile *** DO NOT REPORT BUGS if you tweak these files ***
8397 'make' will now compile MPlayer and 'make install' will install it.
8398 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8403 if test "$_mtrr" = yes ; then
8404 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8410 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8411 operating system ($system_name). You may encounter a few files that cannot
8412 be played due to missing open source video/audio codec support.
8419 Check $TMPLOG if you wonder why an autodetection failed (make sure
8420 development headers/packages are installed).
8422 NOTE: The --enable-* parameters unconditionally force options on, completely
8423 skipping autodetection. This behavior is unlike what you may be used to from
8424 autoconf-based configure scripts that can decide to override you. This greater
8425 level of control comes at a price. You may have to provide the correct compiler
8426 and linker flags yourself.
8427 If you used one of these options (except --enable-gui and similar ones that
8428 turn on internal features) and experience a compilation or linking failure,
8429 make sure you have passed the necessary compiler/linker flags to configure.
8431 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8435 if test "$_warn_CFLAGS" = yes; then
8438 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8440 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8442 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8443 To do so, execute 'CFLAGS= ./configure <options>'
8449 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"