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;;
161 # not boolean test: implement the posix shell "!" operator for a
163 # usage: not {command}
164 # returns exit status "success" when the execution of "command"
171 # Use this before starting a check
173 echo "============ Checking for $@ ============" >> "$TMPLOG"
174 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
177 # Use this to echo the results of a check
179 if test "$_res_comment" ; then
180 _res_comment
="($_res_comment)"
182 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
183 echo "##########################################" >> "$TMPLOG"
185 echo "$@ $_res_comment"
188 #############################################################################
190 # Check how echo works in this /bin/sh
192 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
193 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
196 LANGUAGES
=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s:help/help_mp-\(..\).h:\1:g" | sed "s:help/help_mp-\(.....\).h:\1:g"`
200 Usage: $0 [OPTIONS]...
203 -h, --help display this help and exit
205 Installation directories:
206 --prefix=DIR prefix directory for installation [/usr/local]
207 --bindir=DIR directory for installing binaries [PREFIX/bin]
208 --datadir=DIR directory for installing machine independent
209 data files (skins, etc) [PREFIX/share/mplayer]
210 --mandir=DIR directory for installing man pages [PREFIX/man]
211 --confdir=DIR directory for installing configuration files
213 --libdir=DIR directory for object code libraries [PREFIX/lib]
214 --codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
215 --win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
216 --xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
217 --realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]
220 --disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
221 --disable-mplayer disable MPlayer compilation [enable]
222 --enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
223 --enable-gtk1 force using GTK 1.2 for the GUI [disable]
224 --enable-largefiles enable support for files > 2GB [disable]
225 --enable-linux-devfs set default devices to devfs [disable]
226 --enable-termcap use termcap database for key codes [autodetect]
227 --enable-termios use termios database for key codes [autodetect]
228 --disable-iconv disable iconv for encoding conversion [autodetect]
229 --disable-langinfo do not use langinfo [autodetect]
230 --enable-lirc enable LIRC (remote control) support [autodetect]
231 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
232 --enable-joystick enable joystick support [disable]
233 --disable-vm disable X video mode extensions [autodetect]
234 --disable-xf86keysym disable support for multimedia keys [autodetect]
235 --enable-radio enable radio interface [disable]
236 --enable-radio-capture enable radio capture (through PCI/line-in) [disable]
237 --disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
238 --disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
239 --disable-tv disable TV interface (TV/DVB grabbers) [enable]
240 --disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
241 --disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
242 --disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
243 --disable-tv-teletex disable TV teletext interface [autodetect]
244 --disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
245 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
246 --disable-network disable networking [enable]
247 --enable-winsock2 enable winsock2 [autodetect]
248 --enable-smb enable Samba (SMB) input [autodetect]
249 --enable-live enable LIVE555 Streaming Media [autodetect]
250 --disable-dvdnav disable libdvdnav [autodetect]
251 --disable-dvdread disable libdvdread [autodetect]
252 --disable-dvdread-internal disable internal libdvdread [autodetect]
253 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
254 --disable-cdparanoia disable cdparanoia [autodetect]
255 --disable-cddb disable cddb [autodetect]
256 --disable-bitmap-font disable bitmap font support [enable]
257 --disable-freetype disable FreeType 2 font rendering [autodetect]
258 --disable-fontconfig disable fontconfig font lookup [autodetect]
259 --disable-unrarlib disable Unique RAR File Library [enabled]
260 --enable-menu enable OSD menu (not DVD menu) [disabled]
261 --disable-sortsub disable subtitle sorting [enabled]
262 --enable-fribidi enable the FriBiDi libs [autodetect]
263 --disable-enca disable ENCA charset oracle library [autodetect]
264 --disable-macosx disable Mac OS X specific features [autodetect]
265 --disable-maemo disable maemo specific features [autodetect]
266 --enable-macosx-finder-support enable Mac OS X Finder invocation
267 parameter parsing [disabled]
268 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
269 --disable-inet6 disable IPv6 support [autodetect]
270 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
271 --disable-ftp disable FTP support [enabled]
272 --disable-vstream disable TiVo vstream client support [autodetect]
273 --disable-pthreads disable Posix threads support [autodetect]
274 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
275 --enable-rpath enable runtime linker path for extra libs [disabled]
278 --enable-gif enable GIF support [autodetect]
279 --enable-png enable PNG input/output support [autodetect]
280 --enable-jpeg enable JPEG input/output support [autodetect]
281 --enable-libcdio enable external libcdio [autodetect]
282 --enable-liblzo enable external liblzo [autodetect]
283 --disable-win32dll disable Win32 DLL support [enabled]
284 --disable-qtx disable QuickTime codecs support [enabled]
285 --disable-xanim disable XAnim codecs support [enabled]
286 --disable-real disable RealPlayer codecs support [enabled]
287 --disable-xvid disable XviD [autodetect]
288 --disable-x264 disable x264 [autodetect]
289 --disable-nut disable libnut [autodetect]
290 --disable-libavutil_a disable static libavutil [autodetect]
291 --disable-libavcodec_a disable static libavcodec [autodetect]
292 --disable-libavformat_a disable static libavformat [autodetect]
293 --disable-libpostproc_a disable static libpostproc [autodetect]
294 --disable-libavutil_so disable shared libavutil [autodetect]
295 --disable-libavcodec_so disable shared libavcodec [autodetect]
296 --disable-libavformat_so disable shared libavformat [autodetect]
297 --disable-libpostproc_so disable shared libpostproc [autodetect]
298 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
299 in libavcodec [enabled]
300 --disable-tremor-internal disable internal Tremor [enabled]
301 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
302 --enable-tremor-external enable external Tremor [autodetect]
303 --disable-libvorbis disable libvorbis support [autodetect]
304 --disable-speex disable Speex support [autodetect]
305 --enable-theora enable OggTheora libraries [autodetect]
306 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
307 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
308 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
309 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
310 --disable-ladspa disable LADSPA plugin support [autodetect]
311 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
312 --disable-mad disable libmad (MPEG audio) support [autodetect]
313 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
314 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
315 --enable-xmms enable XMMS input plugin support [disabled]
316 --disable-mp3lib disable builtin mp3lib [enabled]
317 --disable-liba52 disable builtin liba52 [enabled]
318 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
319 --disable-musepack disable musepack support [autodetect]
320 --disable-libamr_nb disable libamr narrowband [autodetect]
321 --disable-libamr_wb disable libamr wideband [autodetect]
322 --disable-decoder=DECODER disable specified FFmpeg decoder
323 --enable-decoder=DECODER enable specified FFmpeg decoder
324 --disable-encoder=ENCODER disable specified FFmpeg encoder
325 --enable-encoder=ENCODER enable specified FFmpeg encoder
326 --disable-parser=PARSER disable specified FFmpeg parser
327 --enable-parser=PARSER enable specified FFmpeg parser
328 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
329 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
330 --disable-muxer=MUXER disable specified FFmpeg muxer
331 --enable-muxer=MUXER enable specified FFmpeg muxer
334 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
335 --disable-vidix-external disable external VIDIX [for x86 *nix]
336 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
337 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
338 nvidia,pm2,pm3,radeon,rage128,savage,sis,unichrome
339 --enable-gl enable OpenGL video output [autodetect]
340 --enable-dga[=n] enable DGA [n in {1, 2} ] support [autodetect]
341 --enable-vesa enable VESA video output [autodetect]
342 --enable-svga enable SVGAlib video output [autodetect]
343 --enable-sdl enable SDL video output [autodetect]
344 --enable-aa enable AAlib video output [autodetect]
345 --enable-caca enable CACA video output [autodetect]
346 --enable-ggi enable GGI video output [autodetect]
347 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
348 --enable-directx enable DirectX video output [autodetect]
349 --enable-dxr2 enable DXR2 video output [autodetect]
350 --enable-dxr3 enable DXR3/H+ video output [autodetect]
351 --enable-ivtv enable IVTV TV-Out video output [autodetect]
352 --enable-dvb enable DVB video output [autodetect]
353 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
354 --enable-mga enable mga_vid video output [autodetect]
355 --enable-xmga enable mga_vid X11 video output [autodetect]
356 --enable-xv enable Xv video output [autodetect]
357 --enable-xvmc enable XvMC acceleration [disable]
358 --enable-vm enable XF86VidMode support [autodetect]
359 --enable-xinerama enable Xinerama support [autodetect]
360 --enable-x11 enable X11 video output [autodetect]
361 --enable-xshape enable XShape support [autodetect]
362 --enable-fbdev enable FBDev video output [autodetect]
363 --enable-mlib enable mediaLib video output (Solaris) [disable]
364 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
365 --enable-tdfxfb enable tdfxfb video output [disable]
366 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
367 --enable-directfb enable DirectFB video output [autodetect]
368 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
369 --enable-bl enable Blinkenlights video output [disable]
370 --enable-tdfxvid enable tdfx_vid video output [disable]
371 --disable-tga disable Targa video output [enable]
372 --disable-pnm disable PNM video output [enable]
373 --disable-md5sum disable md5sum video output [enable]
376 --disable-alsa disable ALSA audio output [autodetect]
377 --disable-ossaudio disable OSS audio output [autodetect]
378 --disable-arts disable aRts audio output [autodetect]
379 --disable-esd disable esd audio output [autodetect]
380 --disable-polyp disable Polypaudio audio output [autodetect]
381 --disable-jack disable JACK audio output [autodetect]
382 --disable-openal disable OpenAL audio output [autodetect]
383 --disable-nas disable NAS audio output [autodetect]
384 --disable-sgiaudio disable SGI audio output [autodetect]
385 --disable-sunaudio disable Sun audio output [autodetect]
386 --disable-win32waveout disable Windows waveout audio output [autodetect]
387 --disable-select disable using select() on the audio device [enable]
389 Miscellaneous options:
390 --enable-runtime-cpudetection enable runtime CPU detection [disable]
391 --enable-cross-compile enable cross-compilation [autodetect]
392 --cc=COMPILER C compiler to build MPlayer [gcc]
393 --host-cc=COMPILER C compiler for tools needed while building [gcc]
394 --as=ASSEMBLER assembler to build MPlayer [as]
395 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
396 --enable-static build a statically linked binary
397 --charset=charset convert the console messages to this character set
398 --language=list a white space or comma separated list of languages for
399 translated man pages, the first language is used for
400 messages and the GUI (the environment variable
401 \$LINGUAS is also honored) [en]
402 (Available: $LANGUAGES all)
403 --with-install=PATH path to a custom install program
404 --enable-color-console enable color console output (UNSUPPORTED) [disable]
407 --enable-mmx enable MMX [autodetect]
408 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
409 --enable-3dnow enable 3DNow! [autodetect]
410 --enable-3dnowext enable extended 3DNow! [autodetect]
411 --enable-sse enable SSE [autodetect]
412 --enable-sse2 enable SSE2 [autodetect]
413 --enable-ssse3 enable SSSE3 [autodetect]
414 --enable-shm enable shm [autodetect]
415 --enable-altivec enable AltiVec (PowerPC) [autodetect]
416 --enable-armv5te enable DSP extensions (ARM) [autodetect]
417 --enable-armv6 enable ARMv6 (ARM) [autodetect]
418 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
419 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
420 --enable-big-endian force byte order to big-endian [autodetect]
421 --enable-debug[=1-3] compile-in debugging information [disable]
422 --enable-profile compile-in profiling information [disable]
423 --disable-sighandler disable sighandler for crashes [enable]
424 --enable-crash-debug enable automatic gdb attach on crash [disable]
425 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
427 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
428 --disable-gcc-check disable gcc version checking [enable]
430 Use these options if autodetection fails (Options marked with (*) accept
431 multiple paths separated by ':'):
432 --extra-libs=FLAGS extra linker flags
433 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
434 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
435 --with-extraincdir=DIR extra header search paths in DIR (*)
436 --with-extralibdir=DIR extra linker search paths in DIR (*)
437 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
439 --with-freetype-config=PATH path to freetype-config
440 --with-fribidi-config=PATH path to fribidi-config
441 --with-glib-config=PATH path to glib*-config
442 --with-gtk-config=PATH path to gtk*-config
443 --with-sdl-config=PATH path to sdl*-config
444 --with-dvdnav-config=PATH path to dvdnav-config
446 This configure script is NOT autoconf-based, even though its output is similar.
447 It will try to autodetect all configuration options. If you --enable an option
448 it will be forcefully turned on, skipping autodetection. This can break
449 compilation, so you need to know what you are doing.
454 # GOTCHA: the variables below defines the default behavior for autodetection
455 # and have - unless stated otherwise - at least 2 states : yes no
456 # If autodetection is available then the third state is: auto
474 test "$CC" && _cc
="$CC"
477 _runtime_cpudetection
=no
485 _libavdecoders_all
=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
486 _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// `
487 _libavencoders_all
=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
488 _libavencoders
=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// `
489 _libavparsers_all
=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
490 _libavparsers
=$_libavparsers_all
491 _libavbsfs_all
=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
492 _libavbsfs
=$_libavbsfs_all
493 _libavdemuxers_all
=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
494 _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// `
495 _libavmuxers_all
=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
496 _libavmuxers
=`echo $_libavmuxers_all | sed -e s/AUDIO_MUXER// -e s/RTP_MUXER// `
497 _libavprotocols_all
=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
503 _libavcodec_mpegaudio_hp
=yes
508 _dga
=auto
# 1 2 no auto
510 _xvmc
=no
#auto when complete
549 _tremor_external
=auto
563 _dvdnavconfig
=dvdnav-config
565 _dvdread_internal
=auto
566 _libdvdcss_internal
=auto
575 _mlib
=no
#broken, thus disabled
636 _macosx_finder_support
=no
639 _freetypeconfig
='freetype-config'
641 _fribidiconfig
='fribidi-config'
654 _def_stream_cache
="#define USE_STREAM_CACHE 1"
662 _prefix
=`echo $ac_option | cut -d '=' -f 2`
665 _bindir
=`echo $ac_option | cut -d '=' -f 2`
668 _datadir
=`echo $ac_option | cut -d '=' -f 2`
671 _mandir
=`echo $ac_option | cut -d '=' -f 2`
674 _confdir
=`echo $ac_option | cut -d '=' -f 2`
677 _libdir
=`echo $ac_option | cut -d '=' -f 2`
680 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
683 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
686 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
689 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
691 --with-extraincdir=*)
692 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
694 --with-extralibdir=*)
695 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
699 _install
=`echo $ac_option | cut -d '=' -f 2 `
702 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
706 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
708 --with-freetype-config=*)
709 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
711 --with-fribidi-config=*)
712 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
715 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
717 --with-glib-config=*)
718 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
720 --with-dvdnav-config=*)
721 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
725 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
727 --extra-libs-mplayer=*)
728 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
730 --extra-libs-mencoder=*)
731 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
735 _target
=`echo $ac_option | cut -d '=' -f 2`
738 _cc
=`echo $ac_option | cut -d '=' -f 2`
741 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
744 _as
=`echo $ac_option | cut -d '=' -f 2`
747 _charset
=`echo $ac_option | cut -d '=' -f 2`
750 _language
=`echo $ac_option | cut -d '=' -f 2`
769 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
774 --enable-gcc-check) _gcc_check
=yes ;;
775 --disable-gcc-check) _gcc_check
=no
;;
776 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
777 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
778 --enable-cross-compile) _cross_compile
=yes ;;
779 --disable-cross-compile) _cross_compile
=no
;;
780 --enable-mencoder) _mencoder
=yes ;;
781 --disable-mencoder) _mencoder
=no
;;
782 --enable-mplayer) _mplayer
=yes ;;
783 --disable-mplayer) _mplayer
=no
;;
784 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
785 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
786 --enable-x11) _x11
=yes ;;
787 --disable-x11) _x11
=no
;;
788 --enable-xshape) _xshape
=yes ;;
789 --disable-xshape) _xshape
=no
;;
790 --enable-xv) _xv
=yes ;;
791 --disable-xv) _xv
=no
;;
792 --enable-xvmc) _xvmc
=yes ;;
793 --disable-xvmc) _xvmc
=no
;;
794 --enable-sdl) _sdl
=yes ;;
795 --disable-sdl) _sdl
=no
;;
796 --enable-directx) _directx
=yes ;;
797 --disable-directx) _directx
=no
;;
798 --enable-win32waveout) _win32waveout
=yes ;;
799 --disable-win32waveout) _win32waveout
=no
;;
800 --enable-nas) _nas
=yes ;;
801 --disable-nas) _nas
=no
;;
802 --enable-png) _png
=yes ;;
803 --disable-png) _png
=no
;;
804 --enable-jpeg) _jpeg
=yes ;;
805 --disable-jpeg) _jpeg
=no
;;
806 --enable-pnm) _pnm
=yes ;;
807 --disable-pnm) _pnm
=no
;;
808 --enable-md5sum) _md5sum
=yes ;;
809 --disable-md5sum) _md5sum
=no
;;
810 --enable-gif) _gif
=yes ;;
811 --disable-gif) _gif
=no
;;
812 --enable-gl) _gl
=yes ;;
813 --disable-gl) _gl
=no
;;
814 --enable-ggi) _ggi
=yes ;;
815 --disable-ggi) _ggi
=no
;;
816 --enable-ggiwmh) _ggiwmh
=yes ;;
817 --disable-ggiwmh) _ggiwmh
=no
;;
818 --enable-aa) _aa
=yes ;;
819 --disable-aa) _aa
=no
;;
820 --enable-caca) _caca
=yes ;;
821 --disable-caca) _caca
=no
;;
822 --enable-svga) _svga
=yes ;;
823 --disable-svga) _svga
=no
;;
824 --enable-vesa) _vesa
=yes ;;
825 --disable-vesa) _vesa
=no
;;
826 --enable-fbdev) _fbdev
=yes ;;
827 --disable-fbdev) _fbdev
=no
;;
828 --enable-dvb) _dvb
=yes ;;
829 --disable-dvb) _dvb
=no
;;
830 --enable-dvbhead) _dvbhead
=yes ;;
831 --disable-dvbhead) _dvbhead
=no
;;
832 --enable-dxr2) _dxr2
=yes ;;
833 --disable-dxr2) _dxr2
=no
;;
834 --enable-dxr3) _dxr3
=yes ;;
835 --disable-dxr3) _dxr3
=no
;;
836 --enable-ivtv) _ivtv
=yes ;;
837 --disable-ivtv) _ivtv
=no
;;
838 --enable-iconv) _iconv
=yes ;;
839 --disable-iconv) _iconv
=no
;;
840 --enable-langinfo) _langinfo
=yes ;;
841 --disable-langinfo) _langinfo
=no
;;
842 --enable-rtc) _rtc
=yes ;;
843 --disable-rtc) _rtc
=no
;;
844 --enable-libdv) _libdv
=yes ;;
845 --disable-libdv) _libdv
=no
;;
846 --enable-ossaudio) _ossaudio
=yes ;;
847 --disable-ossaudio) _ossaudio
=no
;;
848 --enable-arts) _arts
=yes ;;
849 --disable-arts) _arts
=no
;;
850 --enable-esd) _esd
=yes ;;
851 --disable-esd) _esd
=no
;;
852 --enable-polyp) _polyp
=yes ;;
853 --disable-polyp) _polyp
=no
;;
854 --enable-jack) _jack
=yes ;;
855 --disable-jack) _jack
=no
;;
856 --enable-openal) _openal
=yes ;;
857 --disable-openal) _openal
=no
;;
858 --enable-mad) _mad
=yes ;;
859 --disable-mad) _mad
=no
;;
860 --enable-toolame) _toolame
=yes ;;
861 --disable-toolame) _toolame
=no
;;
862 --enable-twolame) _twolame
=yes ;;
863 --disable-twolame) _twolame
=no
;;
864 --enable-libcdio) _libcdio
=yes ;;
865 --disable-libcdio) _libcdio
=no
;;
866 --enable-liblzo) _liblzo
=yes ;;
867 --disable-liblzo) _liblzo
=no
;;
868 --enable-libvorbis) _libvorbis
=yes ;;
869 --disable-libvorbis) _libvorbis
=no
;;
870 --enable-speex) _speex
=yes ;;
871 --disable-speex) _speex
=no
;;
872 --enable-tremor-internal) _tremor_internal
=yes ;;
873 --disable-tremor-internal) _tremor_internal
=no
;;
874 --enable-tremor-low) _tremor_low
=yes ;;
875 --disable-tremor-low) _tremor_low
=no
;;
876 --enable-tremor-external) _tremor_external
=yes ;;
877 --disable-tremor-external) _tremor_external
=no
;;
878 --enable-theora) _theora
=yes ;;
879 --disable-theora) _theora
=no
;;
880 --enable-mp3lib) _mp3lib
=yes ;;
881 --disable-mp3lib) _mp3lib
=no
;;
882 --enable-liba52) _liba52
=yes ;;
883 --disable-liba52) _liba52
=no
;;
884 --enable-libmpeg2) _libmpeg2
=yes ;;
885 --disable-libmpeg2) _libmpeg2
=no
;;
886 --enable-musepack) _musepack
=yes ;;
887 --disable-musepack) _musepack
=no
;;
888 --enable-faad-internal) _faad_internal
=yes ;;
889 --disable-faad-internal) _faad_internal
=no
;;
890 --enable-faad-external) _faad_external
=yes ;;
891 --disable-faad-external) _faad_external
=no
;;
892 --enable-faad-fixed) _faad_fixed
=yes ;;
893 --disable-faad-fixed) _faad_fixed
=no
;;
894 --enable-faac) _faac
=yes ;;
895 --disable-faac) _faac
=no
;;
896 --enable-ladspa) _ladspa
=yes ;;
897 --disable-ladspa) _ladspa
=no
;;
898 --enable-xmms) _xmms
=yes ;;
899 --disable-xmms) _xmms
=no
;;
900 --enable-dvdread) _dvdread
=yes ;;
901 --disable-dvdread) _dvdread
=no
;;
902 --enable-dvdread-internal) _dvdread_internal
=yes ;;
903 --disable-dvdread-internal) _dvdread_internal
=no
;;
904 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
905 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
906 --enable-dvdnav) _dvdnav
=yes ;;
907 --disable-dvdnav) _dvdnav
=no
;;
908 --enable-xanim) _xanim
=yes ;;
909 --disable-xanim) _xanim
=no
;;
910 --enable-real) _real
=yes ;;
911 --disable-real) _real
=no
;;
912 --enable-live) _live
=yes ;;
913 --disable-live) _live
=no
;;
914 --enable-xinerama) _xinerama
=yes ;;
915 --disable-xinerama) _xinerama
=no
;;
916 --enable-mga) _mga
=yes ;;
917 --disable-mga) _mga
=no
;;
918 --enable-xmga) _xmga
=yes ;;
919 --disable-xmga) _xmga
=no
;;
920 --enable-vm) _vm
=yes ;;
921 --disable-vm) _vm
=no
;;
922 --enable-xf86keysym) _xf86keysym
=yes ;;
923 --disable-xf86keysym) _xf86keysym
=no
;;
924 --enable-mlib) _mlib
=yes ;;
925 --disable-mlib) _mlib
=no
;;
926 --enable-sunaudio) _sunaudio
=yes ;;
927 --disable-sunaudio) _sunaudio
=no
;;
928 --enable-sgiaudio) _sgiaudio
=yes ;;
929 --disable-sgiaudio) _sgiaudio
=no
;;
930 --enable-alsa) _alsa
=yes ;;
931 --disable-alsa) _alsa
=no
;;
932 --enable-tv) _tv
=yes ;;
933 --disable-tv) _tv
=no
;;
934 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
935 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
936 --enable-tv-v4l1) _tv_v4l1
=yes ;;
937 --disable-tv-v4l1) _tv_v4l1
=no
;;
938 --enable-tv-v4l2) _tv_v4l2
=yes ;;
939 --disable-tv-v4l2) _tv_v4l2
=no
;;
940 --enable-tv-teletext) _tv_teletext
=yes ;;
941 --disable-tv-teletext) _tv_teletext
=no
;;
942 --enable-radio) _radio
=yes ;;
943 --enable-radio-capture) _radio_capture
=yes ;;
944 --disable-radio-capture) _radio_capture
=no
;;
945 --disable-radio) _radio
=no
;;
946 --enable-radio-v4l) _radio_v4l
=yes ;;
947 --disable-radio-v4l) _radio_v4l
=no
;;
948 --enable-radio-v4l2) _radio_v4l2
=yes ;;
949 --disable-radio-v4l2) _radio_v4l2
=no
;;
950 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
951 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
952 --enable-pvr) _pvr
=yes ;;
953 --disable-pvr) _pvr
=no
;;
954 --enable-fastmemcpy) _fastmemcpy
=yes ;;
955 --disable-fastmemcpy) _fastmemcpy
=no
;;
956 --enable-network) _network
=yes ;;
957 --disable-network) _network
=no
;;
958 --enable-winsock2) _winsock2
=yes ;;
959 --disable-winsock2) _winsock2
=no
;;
960 --enable-smb) _smbsupport
=yes ;;
961 --disable-smb) _smbsupport
=no
;;
962 --enable-vidix-internal) _vidix_internal
=yes ;;
963 --disable-vidix-internal) _vidix_internal
=no
;;
964 --enable-vidix-external) _vidix_external
=yes ;;
965 --disable-vidix-external) _vidix_external
=no
;;
966 --with-vidix-drivers=*)
967 _vidix_drivers
=`echo $ac_option | cut -d '=' -f 2`
969 --enable-joystick) _joystick
=yes ;;
970 --disable-joystick) _joystick
=no
;;
971 --enable-xvid) _xvid
=yes ;;
972 --disable-xvid) _xvid
=no
;;
973 --enable-x264) _x264
=yes ;;
974 --disable-x264) _x264
=no
;;
975 --enable-nut) _nut
=yes ;;
976 --disable-nut) _nut
=no
;;
977 --enable-libavutil_a) _libavutil_a
=yes ;;
978 --disable-libavutil_a) _libavutil_a
=no
;;
979 --enable-libavutil_so) _libavutil_so
=yes ;;
980 --disable-libavutil_so) _libavutil_so
=no
;;
981 --enable-libavcodec_a) _libavcodec_a
=yes ;;
982 --disable-libavcodec_a) _libavcodec_a
=no
;;
983 --enable-libavcodec_so) _libavcodec_so
=yes ;;
984 --disable-libavcodec_so) _libavcodec_so
=no
;;
985 --enable-libamr_nb) _libamr_nb
=yes ;;
986 --disable-libamr_nb) _libamr_nb
=no
;;
987 --enable-libamr_wb) _libamr_wb
=yes ;;
988 --disable-libamr_wb) _libamr_wb
=no
;;
989 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
990 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
991 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
992 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
993 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
994 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
995 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
996 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
997 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
998 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
999 --enable-libavformat_a) _libavformat_a
=yes ;;
1000 --disable-libavformat_a) _libavformat_a
=no
;;
1001 --enable-libavformat_so) _libavformat_so
=yes ;;
1002 --disable-libavformat_so) _libavformat_so
=no
;;
1003 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1004 --disable-libpostproc_a) _libpostproc_a
=no
;;
1005 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1006 --disable-libpostproc_so) _libpostproc_so
=no
;;
1007 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1008 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1010 --enable-lirc) _lirc
=yes ;;
1011 --disable-lirc) _lirc
=no
;;
1012 --enable-lircc) _lircc
=yes ;;
1013 --disable-lircc) _lircc
=no
;;
1014 --enable-gui) _gui
=yes ;;
1015 --disable-gui) _gui
=no
;;
1016 --enable-gtk1) _gtk1
=yes ;;
1017 --disable-gtk1) _gtk1
=no
;;
1018 --enable-termcap) _termcap
=yes ;;
1019 --disable-termcap) _termcap
=no
;;
1020 --enable-termios) _termios
=yes ;;
1021 --disable-termios) _termios
=no
;;
1022 --enable-3dfx) _3dfx
=yes ;;
1023 --disable-3dfx) _3dfx
=no
;;
1024 --enable-s3fb) _s3fb
=yes ;;
1025 --disable-s3fb) _s3fb
=no
;;
1026 --enable-tdfxfb) _tdfxfb
=yes ;;
1027 --disable-tdfxfb) _tdfxfb
=no
;;
1028 --disable-tdfxvid) _tdfxvid
=no
;;
1029 --enable-tdfxvid) _tdfxvid
=yes ;;
1030 --disable-tga) _tga
=no
;;
1031 --enable-tga) _tga
=yes ;;
1032 --enable-directfb) _directfb
=yes ;;
1033 --disable-directfb) _directfb
=no
;;
1034 --enable-zr) _zr
=yes ;;
1035 --disable-zr) _zr
=no
;;
1036 --enable-bl) _bl
=yes ;;
1037 --disable-bl) _bl
=no
;;
1038 --enable-mtrr) _mtrr
=yes ;;
1039 --disable-mtrr) _mtrr
=no
;;
1040 --enable-largefiles) _largefiles
=yes ;;
1041 --disable-largefiles) _largefiles
=no
;;
1042 --enable-shm) _shm
=yes ;;
1043 --disable-shm) _shm
=no
;;
1044 --enable-select) _select
=yes ;;
1045 --disable-select) _select
=no
;;
1046 --enable-linux-devfs) _linux_devfs
=yes ;;
1047 --disable-linux-devfs) _linux_devfs
=no
;;
1048 --enable-cdparanoia) _cdparanoia
=yes ;;
1049 --disable-cdparanoia) _cdparanoia
=no
;;
1050 --enable-cddb) _cddb
=yes ;;
1051 --disable-cddb) _cddb
=no
;;
1052 --enable-big-endian) _big_endian
=yes ;;
1053 --disable-big-endian) _big_endian
=no
;;
1054 --enable-bitmap-font) _bitmap_font
=yes ;;
1055 --disable-bitmap-font) _bitmap_font
=no
;;
1056 --enable-freetype) _freetype
=yes ;;
1057 --disable-freetype) _freetype
=no
;;
1058 --enable-fontconfig) _fontconfig
=yes ;;
1059 --disable-fontconfig) _fontconfig
=no
;;
1060 --enable-unrarlib) _unrarlib
=yes ;;
1061 --disable-unrarlib) _unrarlib
=no
;;
1062 --enable-ftp) _ftp
=yes ;;
1063 --disable-ftp) _ftp
=no
;;
1064 --enable-vstream) _vstream
=yes ;;
1065 --disable-vstream) _vstream
=no
;;
1066 --enable-pthreads) _pthreads
=yes ;;
1067 --disable-pthreads) _pthreads
=no
;;
1068 --enable-ass) _ass
=yes ;;
1069 --disable-ass) _ass
=no
;;
1070 --enable-rpath) _rpath
=yes ;;
1071 --disable-rpath) _rpath
=no
;;
1072 --enable-color-console) _color_console
=yes ;;
1073 --disable-color-console) _color_console
=no
;;
1075 --enable-fribidi) _fribidi
=yes ;;
1076 --disable-fribidi) _fribidi
=no
;;
1078 --enable-enca) _enca
=yes ;;
1079 --disable-enca) _enca
=no
;;
1081 --enable-inet6) _inet6
=yes ;;
1082 --disable-inet6) _inet6
=no
;;
1084 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1085 --disable-gethostbyname2) _gethostbyname2
=no
;;
1087 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1088 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1089 --disable-dga) _dga
=no
;;
1091 --enable-menu) _menu
=yes ;;
1092 --disable-menu) _menu
=no
;;
1094 --enable-qtx) _qtx
=yes ;;
1095 --disable-qtx) _qtx
=no
;;
1097 --enable-macosx) _macosx
=yes ;;
1098 --disable-macosx) _macosx
=no
;;
1099 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1100 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1101 --enable-macosx-bundle) _macosx_bundle
=yes;;
1102 --disable-macosx-bundle) _macosx_bundle
=no
;;
1104 --enable-maemo) _maemo
=yes ;;
1105 --disable-maemo) _maemo
=no
;;
1107 --enable-sortsub) _sortsub
=yes ;;
1108 --disable-sortsub) _sortsub
=no
;;
1110 --enable-crash-debug) _crash_debug
=yes ;;
1111 --disable-crash-debug) _crash_debug
=no
;;
1112 --enable-sighandler) _sighandler
=yes ;;
1113 --disable-sighandler) _sighandler
=no
;;
1114 --enable-win32dll) _win32dll
=yes ;;
1115 --disable-win32dll) _win32dll
=no
;;
1117 --enable-sse) _sse
=yes ;;
1118 --disable-sse) _sse
=no
;;
1119 --enable-sse2) _sse2
=yes ;;
1120 --disable-sse2) _sse2
=no
;;
1121 --enable-ssse3) _ssse3
=yes ;;
1122 --disable-ssse3) _ssse3
=no
;;
1123 --enable-mmxext) _mmxext
=yes ;;
1124 --disable-mmxext) _mmxext
=no
;;
1125 --enable-3dnow) _3dnow
=yes ;;
1126 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1127 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1128 --disable-3dnowext) _3dnowext
=no
;;
1129 --enable-cmov) _cmov
=yes ;;
1130 --disable-cmov) _cmov
=no
;;
1131 --enable-fast-cmov) _fast_cmov
=yes ;;
1132 --disable-fast-cmov) _fast_cmov
=no
;;
1133 --enable-altivec) _altivec
=yes ;;
1134 --disable-altivec) _altivec
=no
;;
1135 --enable-armv5te) _armv5te
=yes ;;
1136 --disable-armv5te) _armv5te
=no
;;
1137 --enable-armv6) _armv6
=yes ;;
1138 --disable-armv6) _armv6
=no
;;
1139 --enable-iwmmxt) _iwmmxt
=yes ;;
1140 --disable-iwmmxt) _iwmmxt
=no
;;
1141 --enable-mmx) _mmx
=yes ;;
1142 --disable-mmx) # 3Dnow! and MMX2 require MMX
1143 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1146 echo "Unknown parameter: $ac_option"
1153 # Atmos: moved this here, to be correct, if --prefix is specified
1154 test -z "$_bindir" && _bindir
="$_prefix/bin"
1155 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1156 test -z "$_mandir" && _mandir
="$_prefix/man"
1157 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1158 test -z "$_libdir" && _libdir
="$_prefix/lib"
1160 # Determine our OS name and CPU architecture
1161 if test -z "$_target" ; then
1163 system_name
=`uname -s 2>&1`
1164 case "$system_name" in
1165 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1176 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1183 system_name
="$system_name-UNKNOWN"
1188 # host's CPU/instruction set
1189 host_arch
=`uname -p 2>&1`
1190 case "$host_arch" in
1191 i386|sparc|ppc|alpha|arm|mips|vax
)
1193 powerpc
) # Darwin returns 'powerpc'
1196 *) # uname -p on Linux returns 'unknown' for the processor type,
1197 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1199 # Maybe uname -m (machine hardware name) returns something we
1202 # x86/x86pc is used by QNX
1203 case "`uname -m 2>&1`" in
1204 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
;;
1205 ia64
) host_arch
=ia64
;;
1207 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1208 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1214 macppc|ppc|ppc64
) host_arch
=ppc
;;
1215 alpha
) host_arch
=alpha
;;
1216 sparc
) host_arch
=sparc
;;
1217 sparc64
) host_arch
=sparc64
;;
1218 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1219 arm
*|zaurus|cats
) host_arch
=arm
;;
1220 s390
) host_arch
=s390
;;
1221 s390x
) host_arch
=s390x
;;
1222 mips
*) host_arch
=mips
;;
1223 vax
) host_arch
=vax
;;
1224 *) host_arch
=UNKNOWN
;;
1228 else # if test -z "$_target"
1229 system_name
=`echo $_target | cut -d '-' -f 2`
1230 case "`echo $system_name | tr A-Z a-z`" in
1231 linux
) system_name
=Linux
;;
1232 freebsd
) system_name
=FreeBSD
;;
1233 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1234 netbsd
) system_name
=NetBSD
;;
1235 bsd
/os
) system_name
=BSD
/OS
;;
1236 openbsd
) system_name
=OpenBSD
;;
1237 sunos
) system_name
=SunOS
;;
1238 qnx
) system_name
=QNX
;;
1239 morphos
) system_name
=MorphOS
;;
1240 amigaos
) system_name
=AmigaOS
;;
1241 mingw32msvc
) system_name
=MINGW32
;;
1243 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1244 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
1247 echo "Detected operating system: $system_name"
1248 echo "Detected host architecture: $host_arch"
1250 if test "$_runtime_cpudetection" = yes && not x86
&& not ppc
; then
1251 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1254 # LGB: temporary files
1255 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1259 TMPLOG
="configure.log"
1261 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1262 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1263 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
1264 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1268 # FIXME: A lot of stuff is installed under /usr/local
1269 # NK: But we should never use this stuff implicitly since we call compiler
1270 # from /usr we should be sure that there no effects from other compilers
1271 # (libraries) which might be installed into /usr/local. Let users use this
1272 # stuff explicitly as command line argument. In other words: It would be
1273 # resonable to have only /usr/include or only /usr/local/include.
1276 _ldconfig
="ldconfig -R"
1280 _ld_extra
="$_ld_extra -L/usr/local/lib"
1281 _inc_extra
="$_inc_extra -I/usr/local/include"
1285 _ld_extra
="$_ld_extra -L/usr/local/lib"
1286 _inc_extra
="$_inc_extra -I/usr/local/include"
1290 _ld_extra
="$_ld_extra -lC"
1293 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
1302 # -lwinmm is always needed for osdep/timer-win2.c
1303 _ld_extra
="$_ld_extra -lwinmm"
1304 _confwin32
='TARGET_WIN32 = yes'
1306 _confwin32
='TARGET_WIN32 = no'
1314 _def_confwin32
='#define WIN32'
1321 _def_stream_cache
="#undef USE_STREAM_CACHE"
1325 _ld_extra
="$_ld_extra -lph"
1328 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1329 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1331 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1332 _head
() { head -$1 2>/dev
/null
; }
1334 _head
() { head -n $1 2>/dev
/null
; }
1336 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1337 _tail
() { tail -$1 2>/dev
/null
; }
1339 _tail
() { tail -n $1 2>/dev
/null
; }
1342 # Checking CC version...
1343 if test "$_gcc_check" = yes ; then
1344 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1345 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1346 echocheck
"$_cc version"
1348 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1349 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1350 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1351 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1352 # TODO verify older icc/ecc compatibility
1355 cc_version
="v. ?.??, bad"
1359 cc_version
="$cc_version, ok"
1363 cc_version
="$cc_version, bad"
1367 echores
"$cc_version"
1369 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
1370 echocheck
"$_cc version"
1372 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1373 cc_version
=`$_cc -dumpversion 2>&1`
1374 if test "$?" -gt 0; then
1375 cc_version
="not found"
1379 cc_version
="v. ?.??, bad"
1382 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1383 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1384 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1385 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1386 cc_version
="$cc_version, ok"
1393 cc_version
="$cc_version, bad"
1397 echores
"$cc_version"
1398 test "$cc_verc_fail" = "no" && break
1401 if test "$cc_verc_fail" = yes ; then
1404 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1406 You are not using a supported compiler. We do not have the time to make sure
1407 everything works with compilers other than the ones we use. Use either the
1408 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1409 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1411 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1412 mplayer and lame (which is used for mencoder). If you get compile errors,
1413 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1414 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1417 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1420 die
"Bad gcc version"
1425 ******************************************************************************
1427 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1428 Ok. You know. Do it.
1430 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1431 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1432 Lame which is used by mencoder produces weird errors, too.
1434 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1435 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1437 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1439 ******************************************************************************
1447 test "$_host_cc" || _host_cc
=$_cc
1450 echocheck
"cross compilation"
1451 if test $_cross_compile = auto
; then
1453 int main() { return 0; }
1456 cc_check
&& "$TMPO" && _cross_compile
=no
1458 echores
$_cross_compile
1460 if test $_cross_compile = yes; then
1468 # now that we know what compiler should be used for compilation, try to find
1469 # out which assembler is used by the $_cc compiler
1470 if test "$_as" = auto
; then
1471 _as
=`$_cc -print-prog-name=as`
1472 test -z "$_as" && _as
=as
1475 # XXX: this should be ok..
1478 if test "$_runtime_cpudetection" = no
; then
1480 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1481 # FIXME: Remove the cygwin check once AMD CPUs are supported
1482 if test -r /proc
/cpuinfo
&& not cygwin
; then
1483 # Linux with /proc mounted, extract CPU information from it
1484 _cpuinfo
="cat /proc/cpuinfo"
1485 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86_32
; then
1486 # FreeBSD with Linux emulation /proc mounted,
1487 # extract CPU information from it
1488 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1489 elif darwin
&& not x86_32
; then
1490 # use hostinfo on Darwin
1493 # use 'lsattr' on AIX
1494 _cpuinfo
="lsattr -E -l proc0 -a type"
1496 # all other OSes try to extract CPU information from a small helper
1497 # program cpuinfo instead
1498 $_cc -o cpuinfo cpuinfo.c
1499 _cpuinfo
="./cpuinfo"
1503 # gather more CPU information
1504 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1505 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1506 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1507 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1508 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1510 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1512 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1513 -e s/xmm/sse/ -e s/kni/sse/`
1515 for ext
in $pparam ; do
1516 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1519 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1520 test $_sse = kernel_check
&& _mmxext
=kernel_check
1522 echocheck
"CPU vendor"
1523 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1525 echocheck
"CPU type"
1529 fi # test "$_runtime_cpudetection" = no
1531 if x86
&& test "$_runtime_cpudetection" = no
; then
1533 if test "$1" = kernel_check
; then
1534 echocheck
"kernel support of $2"
1537 void catch() { exit(1); }
1539 signal(SIGILL, catch);
1540 __asm__ __volatile__ ("$3":::"memory");return(0);
1544 if cc_check
&& tmp_run
; then
1547 _optimizing
="$_optimizing $2"
1552 echo "It seems that your kernel does not correctly support $2."
1553 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1560 extcheck
$_mmx "mmx" "emms"
1561 extcheck
$_mmxext "mmxext" "sfence"
1562 extcheck
$_3dnow "3dnow" "femms"
1563 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1564 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1565 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1566 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1567 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1569 echocheck
"mtrr support"
1570 if test "$_mtrr" = kernel_check
; then
1572 _optimizing
="$_optimizing mtrr"
1576 if test "$_gcc3_ext" != ""; then
1577 # if we had to disable sse/sse2 because the active kernel does not
1578 # support this instruction set extension, we also have to tell
1579 # gcc3 to not generate sse/sse2 instructions for normal C code
1581 int main(void) { return 0; }
1583 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1588 case "$host_arch" in
1589 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1590 _def_arch_x86
="#define ARCH_X86 1"
1591 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1592 _def_arch
="#define ARCH_X86_32 1"
1593 _target_arch
="TARGET_ARCH_X86_32 = yes"
1598 if test "$_runtime_cpudetection" = no
; then
1602 3) proc
=i386 iproc
=386 ;;
1603 4) proc
=i486 iproc
=486 ;;
1604 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1605 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1606 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1608 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1610 elif test "$pmodel" -ge 8; then
1612 elif test "$pmodel" -ge 6; then
1619 # It's a bit difficult to determine the correct type of Family 6
1620 # AMD CPUs just from their signature. Instead, we check directly
1621 # whether it supports SSE.
1622 if test "$_sse" = yes; then
1623 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1626 # Again, gcc treats athlon and athlon-tbird similarly.
1631 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1632 # caught and remedied in the optimization tests below.
1636 *) proc
=k8 iproc
=686 ;;
1641 3) proc
=i386 iproc
=386 ;;
1642 4) proc
=i486 iproc
=486 ;;
1644 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1645 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1651 if test "$pmodel" -ge 15; then
1653 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1655 elif test "$pmodel" -ge 7; then
1657 elif test "$pmodel" -ge 3; then
1664 # A nocona in 32-bit mode has no more capabilities than a prescott.
1665 if test "$pmodel" -ge 3; then
1671 *) proc
=prescott iproc
=686 ;;
1677 if test "$pmodel" -ge 8; then
1679 elif test "$pmodel" -ge 4; then
1686 if test "$pmodel" -ge 9; then
1693 *) proc
=i686 iproc
=i686
;;
1698 3) proc
=i386 iproc
=386 ;;
1699 4) proc
=i486 iproc
=486 ;;
1700 *) proc
=i586 iproc
=586 ;;
1704 proc
=i586 iproc
=586 ;;
1706 fi # test "$_runtime_cpudetection" = no
1709 # check that gcc supports our CPU, if not, fall back to earlier ones
1710 # LGB: check -mcpu and -march swithing step by step with enabling
1711 # to fall back till 386.
1713 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1715 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1721 echocheck
"GCC & CPU optimization abilities"
1723 int main(void) { return 0; }
1725 if test "$_runtime_cpudetection" = no
; then
1726 if test "$proc" = "k8"; then
1727 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1729 if test "$proc" = "athlon-xp"; then
1730 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1732 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1733 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1735 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1736 if not cc_check
-march=$proc $cpuopt=$proc; then
1737 if cc_check
-march=i586
$cpuopt=i686
; then
1744 if test "$proc" = "prescott" ; then
1745 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1747 if test "$proc" = "core2" ; then
1748 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1750 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
1751 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1753 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1754 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1756 if test "$proc" = "i586"; then
1757 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1759 if test "$proc" = "i486" ; then
1760 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1762 if test "$proc" = "i386" ; then
1763 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1765 if test "$proc" = "error" ; then
1766 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1770 elif test "$proc" = "i586-i686"; then
1771 _march
="-march=i586"
1772 _mcpu
="$cpuopt=i686"
1775 _march
="-march=$proc"
1776 _mcpu
="$cpuopt=$proc"
1779 else # if test "$_runtime_cpudetection" = no
1780 _mcpu
="$cpuopt=generic"
1781 # at least i486 required, for bswap instruction
1782 _march
="-march=i486"
1783 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1784 cc_check
$_mcpu || _mcpu
=""
1785 cc_check
$_march $_mcpu || _march
=""
1788 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1789 ## autodetected mcpu/march parameters
1790 if test "$_target" ; then
1791 # TODO: it may be a good idea to check GCC and fall back in all cases
1792 if test "$host_arch" = "i586-i686"; then
1793 _march
="-march=i586"
1794 _mcpu
="$cpuopt=i686"
1796 _march
="-march=$host_arch"
1797 _mcpu
="$cpuopt=$host_arch"
1805 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1806 i686|athlon
*|pentium
*) iproc
=686 ;;
1811 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1814 pentium4|prescott|nocona
)
1825 _def_arch
='#define ARCH_IA64 1'
1826 _target_arch
='TARGET_ARCH_IA64 = yes'
1835 _def_arch
='#define ARCH_X86_64 1'
1836 _target_arch
='TARGET_ARCH_X86_64 = yes'
1837 _def_arch_x86
="#define ARCH_X86 1"
1838 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1841 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1842 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1847 if test "$_runtime_cpudetection" = no
; then
1855 # 64-bit prescotts exist, but as far as GCC is concerned they
1856 # have the same capabilities as a nocona.
1863 fi # test "$_runtime_cpudetection" = no
1865 echocheck
"GCC & CPU optimization abilities"
1867 int main(void) { return 0; }
1869 # This is a stripped-down version of the i386 fallback.
1870 if test "$_runtime_cpudetection" = no
; then
1871 # --- AMD processors ---
1872 if test "$proc" = "k8"; then
1873 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1875 # This will fail if gcc version < 3.3, which is ok because earlier
1876 # versions don't really support 64-bit on amd64.
1877 # Is this a valid assumption? -Corey
1878 if test "$proc" = "athlon-xp"; then
1879 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1881 # --- Intel processors ---
1882 if test "$proc" = "core2"; then
1883 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1885 if test "$proc" = "nocona"; then
1886 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1888 if test "$proc" = "pentium4"; then
1889 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1892 _march
="-march=$proc"
1893 _mcpu
="$cpuopt=$proc"
1894 if test "$proc" = "error" ; then
1895 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1899 else # if test "$_runtime_cpudetection" = no
1900 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1901 _march
="-march=x86-64"
1902 _mcpu
="$cpuopt=generic"
1903 cc_check
$_mcpu || _mcpu
="x86-64"
1904 cc_check
$_mcpu || _mcpu
=""
1905 cc_check
$_march $_mcpu || _march
=""
1914 _def_arch
='#define ARCH_SPARC 1'
1915 _target_arch
='TARGET_ARCH_SPARC = yes'
1918 echocheck
"CPU type"
1920 case "`echo $karch`" in
1925 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1939 _def_arch
='#define ARCH_SPARC 1'
1940 _target_arch
='TARGET_ARCH_SPARC = yes'
1942 _def_vis
='#define HAVE_VIS = yes'
1950 arm|armv4l|armv5tel
)
1951 _def_arch
='#define ARCH_ARMV4L 1'
1952 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1961 _def_arch
='#define ARCH_POWERPC 1'
1962 _def_dcbzl
='#define NO_DCBZL 1'
1963 _target_arch
='TARGET_ARCH_POWERPC = yes'
1971 echocheck
"CPU type"
1972 case $system_name in
1974 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1975 if test -n "`$_cpuinfo | grep altivec`"; then
1980 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1981 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
1982 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
1987 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1989 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1992 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1999 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
2002 if test "$_altivec" = yes; then
2003 echores
"$proc altivec"
2008 echocheck
"GCC & CPU optimization abilities"
2010 if test -n "$proc"; then
2012 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2013 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2014 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2015 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2016 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2017 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2018 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2019 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2020 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2023 # gcc 3.1(.1) and up supports 7400 and 7450
2024 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2026 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2027 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2031 # gcc 3.2 and up supports 970
2032 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2034 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2035 _def_dcbzl
='#undef NO_DCBZL' ;;
2039 # gcc 3.3 and up supports POWER4
2040 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2042 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2046 # gcc 3.4 and up supports 440*
2047 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2049 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2050 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2054 # gcc 4.0 and up supports POWER5
2055 if test "$_cc_major" -ge "4"; then
2057 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2063 if test -n "$_mcpu"; then
2064 _optimizing
=`echo $_mcpu | cut -c 8-`
2065 echores
"$_optimizing"
2073 _def_arch
='#define ARCH_ALPHA 1'
2074 _target_arch
='TARGET_ARCH_ALPHA = yes'
2078 echocheck
"CPU type"
2081 unsigned long ver, mask;
2082 asm ("implver %0" : "=r" (ver));
2083 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2084 printf("%ld-%x\n", ver, ~mask);
2088 $_cc -o "$TMPO" "$TMPC"
2091 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
2092 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
2093 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
2094 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
2095 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
2096 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
2097 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
2101 echocheck
"GCC & CPU optimization abilities"
2102 if test "$proc" = "ev68" ; then
2103 cc_check
-mcpu=$proc || proc
=ev67
2105 if test "$proc" = "ev67" ; then
2106 cc_check
-mcpu=$proc || proc
=ev6
2113 echocheck
"MVI instruction support in GCC"
2114 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
2115 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2118 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2119 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2124 _def_arch
='#define ARCH_SGI_MIPS 1'
2125 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
2133 echocheck
"CPU type"
2134 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2135 case "`echo $proc`" in
2136 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2137 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2138 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2139 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2140 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2141 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2143 # gcc < 3.x does not support -mtune.
2144 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2153 _def_arch
='#define ARCH_PA_RISC 1'
2154 _target_arch
='TARGET_ARCH_PA_RISC = yes'
2163 _def_arch
='#define ARCH_S390 1'
2164 _target_arch
='TARGET_ARCH_S390 = yes'
2173 _def_arch
='#define ARCH_S390X 1'
2174 _target_arch
='TARGET_ARCH_S390X = yes'
2183 _def_arch
='#define ARCH_VAX 1'
2184 _target_arch
='TARGET_ARCH_VAX = yes'
2193 _def_arch
='#define ARCH_GENERIC 1'
2194 _target_arch
='TARGET_ARCH_GENERIC = yes'
2203 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2204 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2205 die
"unsupported architecture $host_arch"
2207 esac # case "$host_arch" in
2209 if test "$_runtime_cpudetection" = yes ; then
2229 echocheck
"assembler support of -pipe option"
2231 int main(void) { return 0; }
2233 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2236 echocheck
"compiler support of named assembler arguments"
2238 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2239 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2240 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2242 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2244 echores
$_named_asm_args
2247 # Checking for CFLAGS
2249 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2250 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2252 elif test -z "$CFLAGS" ; then
2253 if test "$cc_vendor" = "intel" ; then
2254 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2255 elif test "$cc_vendor" != "gnu" ; then
2256 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2258 CFLAGS
="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2263 if test -n "$LDFLAGS" ; then
2264 _ld_extra
="$_ld_extra $LDFLAGS"
2266 elif test "$cc_vendor" = "intel" ; then
2267 _ld_extra
="$_ld_extra -i-static"
2269 if test -n "$CPPFLAGS" ; then
2270 _inc_extra
="$_inc_extra $CPPFLAGS"
2277 # Checking assembler (_as) compatibility...
2278 # Added workaround for older as that reads from stdin by default - atmos
2279 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2280 echocheck
"assembler ($_as $as_version)"
2282 _pref_as_version
='2.9.1'
2284 if test "$_mmx" = yes ; then
2285 echo 'emms' >> $TMPS
2287 if test "$_3dnow" = yes ; then
2288 _pref_as_version
='2.10.1'
2289 echo 'femms' >> $TMPS
2291 if test "$_3dnowext" = yes ; then
2292 _pref_as_version
='2.10.1'
2293 echo 'pswapd %mm0, %mm0' >> $TMPS
2295 if test "$_mmxext" = yes ; then
2296 _pref_as_version
='2.10.1'
2297 echo 'movntq %mm0, (%eax)' >> $TMPS
2299 if test "$_sse" = yes ; then
2300 _pref_as_version
='2.10.1'
2301 echo 'xorps %xmm0, %xmm0' >> $TMPS
2303 #if test "$_sse2" = yes ; then
2304 # _pref_as_version='2.11'
2305 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2307 if test "$_cmov" = yes ; then
2308 _pref_as_version
='2.10.1'
2309 echo 'cmovb %eax, %ebx' >> $TMPS
2311 if test "$_ssse3" = yes ; then
2312 _pref_as_version
='2.16.92'
2313 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2315 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2317 if test "$as_verc_fail" != yes ; then
2320 _res_comment
="Upgrade binutils to ${_pref_as_version} ..."
2322 die
"obsolete binutils version"
2327 echocheck
".align is a power of two"
2328 if test "$_asmalign_pot" = auto
; then
2331 main() { asm (".align 3"); }
2333 cc_check
&& _asmalign_pot
=yes
2335 if test "$_asmalign_pot" = "yes" ; then
2336 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2338 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2340 echores
$_asmalign_pot
2343 #FIXME: This should happen before the check for CFLAGS..
2346 # check if altivec is supported by the compiler, and how to enable it
2348 _altivec_gcc_flags
=''
2350 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2351 echocheck
"GCC altivec support"
2359 FSF_flags
='-maltivec -mabi=altivec'
2360 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2362 # check for Darwin-style flags first, since
2363 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2364 # accepts but ignores FSF-style flags...
2366 if test -z "$p"; then
2367 cc_check
$Darwin_flags && p
='Darwin'
2369 if test -z "$p"; then
2370 cc_check
$FSF_flags && p
='FSF'
2374 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2375 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2379 if test -z "$p"; then
2382 p
="$p-style ($_altivec_gcc_flags)"
2388 # check if <altivec.h> should be included
2390 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2392 if test "$_altivec" = yes ; then
2393 echocheck
"altivec.h"
2395 #include <altivec.h>
2396 int main(void) { return 0; }
2399 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2400 if test "$_have_altivec_h" = yes ; then
2401 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2403 echores
"$_have_altivec_h"
2406 # disable runtime cpudetection if
2407 # - we cannot generate altivec code
2408 # - altivec is disabled by the user
2410 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2411 _runtime_cpudetection
=no
2414 # show that we are optimizing for altivec (if enabled and supported)
2416 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2417 _optimizing
="$_optimizing altivec"
2420 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2422 if test "$_altivec" = yes ; then
2423 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2424 #_mcpu="$_mcpu $_altivec_gcc_flags"
2425 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2428 # setup _def_altivec correctly
2430 if test "$_altivec" = yes ; then
2431 _def_altivec
='#define HAVE_ALTIVEC 1'
2433 _def_altivec
='#undef HAVE_ALTIVEC'
2438 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2439 if test $_armv5te = "auto" ; then
2442 __asm__ __volatile__ ("qadd r0, r0, r0");
2446 cc_check
&& _armv5te
=yes
2450 echocheck
"ARMv6 (SIMD instructions)"
2451 if test $_armv6 = "auto" ; then
2453 int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); }
2456 cc_check
&& _armv6
=yes
2460 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2461 if test $_iwmmxt = "auto" ; then
2464 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2468 cc_check
&& _iwmmxt
=yes
2473 _def_mmx
='#undef HAVE_MMX'
2474 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2475 _def_mmxext
='#undef HAVE_MMX2'
2476 test "$_mmxext" = yes && _def_mmxext
='#define HAVE_MMX2 1'
2477 _def_3dnow
='#undef HAVE_3DNOW'
2478 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2479 _def_3dnowext
='#undef HAVE_3DNOWEX'
2480 test "$_3dnowext" = yes && _def_3dnowext
='#define HAVE_3DNOWEX 1'
2481 _def_sse
='#undef HAVE_SSE'
2482 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2483 _def_sse2
='#undef HAVE_SSE2'
2484 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2485 _def_ssse3
='#undef HAVE_SSSE3'
2486 test "$_ssse3" = yes && _def_ssse3
='#define HAVE_SSSE3 1'
2487 _def_cmov
='#undef HAVE_CMOV'
2488 test "$_cmov" = yes && _def_cmov
='#define HAVE_CMOV 1'
2489 _def_fast_cmov
='#undef HAVE_FAST_CMOV'
2490 test "$_fast_cmov" = yes && _def_fast_cmov
='#define HAVE_FAST_CMOV 1'
2491 _def_armv5te
='#undef HAVE_ARMV5TE'
2492 test "$_armv5te" = yes && _def_armv5te
='#define HAVE_ARMV5TE 1'
2493 _def_armv6
='#undef HAVE_ARMV6'
2494 test "$_armv6" = yes && _def_armv6
='#define HAVE_ARMV6 1'
2495 _def_iwmmxt
='#undef HAVE_IWMMXT'
2496 test "$_iwmmxt" = yes && _def_iwmmxt
='#define HAVE_IWMMXT 1'
2498 # Checking kernel version...
2499 if x86_32
&& linux
; then
2501 kernel_version
=`uname -r 2>&1`
2502 echocheck
"$system_name kernel version"
2503 case "$kernel_version" in
2504 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2505 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2506 _k_verc_problem
=yes;;
2508 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2511 if test "$_k_verc_fail" ; then
2512 echores
"$kernel_version, fail"
2513 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2514 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2515 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2516 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2517 echo "2.2.x you must upgrade it to get SSE support!"
2518 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2520 echores
"$kernel_version, ok"
2524 ######################
2525 # MAIN TESTS GO HERE #
2526 ######################
2529 echocheck
"extra headers"
2530 if test "$_inc_extra" ; then
2531 echores
"$_inc_extra"
2537 echocheck
"extra libs"
2538 if test "$_ld_extra" ; then
2539 echores
"$_ld_extra"
2546 int main(void) { return 0; }
2548 if cc_check
-lposix ; then
2549 _ld_extra
="$_ld_extra -lposix"
2557 int main(void) { return 0; }
2559 if cc_check
-lm ; then
2568 echocheck
"langinfo"
2569 if test "$_langinfo" = auto
; then
2571 #include <langinfo.h>
2572 int main(void) { nl_langinfo(CODESET); return 0; }
2575 cc_check
&& _langinfo
=yes
2577 if test "$_langinfo" = yes ; then
2578 _def_langinfo
='#define USE_LANGINFO 1'
2580 _def_langinfo
='#undef USE_LANGINFO'
2582 echores
"$_langinfo"
2585 echocheck
"language"
2586 test -z "$_language" && _language
=$LINGUAS
2587 _language
=`echo $_language | sed 's/,/ /g'`
2588 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2589 for lang
in $_language ; do
2590 test "$lang" = all
&& lang
=en
2591 if test -f "help/help_mp-${lang}.h" ; then
2595 echo ${_echo_n} "$lang not found, ${_echo_c}"
2596 _language
=`echo $_language | sed "s/$lang *//"`
2599 test -z "$_language" && _language
=en
2600 _mp_help
="help/help_mp-${_language}.h"
2601 test -f $_mp_help || die
"$_mp_help not found"
2602 for lang
in $LANGUAGES ; do
2603 if test -f "DOCS/man/$lang/mplayer.1" ; then
2604 MAN_LANG
="$lang $MAN_LANG"
2607 _doc_lang
=$_language
2608 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2609 echores
"using $_language (man pages: $MAN_LANG)"
2612 echocheck
"enable sighandler"
2613 if test "$_sighandler" = yes ; then
2614 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2616 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2618 echores
"$_sighandler"
2620 echocheck
"runtime cpudetection"
2621 if test "$_runtime_cpudetection" = yes ; then
2622 _optimizing
="Runtime CPU-Detection enabled"
2623 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2625 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2627 echores
"$_runtime_cpudetection"
2630 echocheck
"restrict keyword"
2631 for restrict_keyword
in restrict __restrict __restrict__
; do
2632 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2634 _def_restrict_keyword
=$restrict_keyword
2638 if [ -n "$_def_restrict_keyword" ]; then
2639 echores
"$_def_restrict_keyword"
2643 # Avoid infinite recursion loop ("#define restrict restrict")
2644 if [ "$_def_restrict_keyword" != "restrict" ]; then
2645 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2647 _def_restrict_keyword
=""
2651 echocheck
"__builtin_expect"
2652 # GCC branch prediction hint
2655 a = __builtin_expect (a, 10);
2656 return a == 10 ? 0 : 1;
2658 int main() { return foo(10) && foo(0); }
2661 cc_check
&& _builtin_expect
=yes
2662 if test "$_builtin_expect" = yes ; then
2663 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2665 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2667 echores
"$_builtin_expect"
2673 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2676 cc_check
-lkstat && _kstat
=yes
2677 if test "$_kstat" = yes ; then
2678 _def_kstat
="#define HAVE_LIBKSTAT 1"
2679 _ld_extra
="$_ld_extra -lkstat"
2681 _def_kstat
="#undef HAVE_LIBKSTAT"
2687 # required for nanosleep on some systems
2690 int main(void) { (void) nanosleep(0, 0); return 0; }
2693 cc_check
-lposix4 && _posix4
=yes
2694 if test "$_posix4" = yes ; then
2695 _ld_extra
="$_ld_extra -lposix4"
2702 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2705 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2706 if test "$_lrintf" = yes ; then
2707 _def_lrintf
="#define HAVE_LRINTF 1"
2709 _def_lrintf
="#undef HAVE_LRINTF"
2716 int main(void) { (void) round(0.0); return 0; }
2719 cc_check
$_ld_lm && _round
=yes
2720 if test "$_round" = yes ; then
2721 _def_round
="#define HAVE_ROUND 1"
2723 _def_round
="#undef HAVE_ROUND"
2727 echocheck
"nanosleep"
2728 # also check for nanosleep
2731 int main(void) { (void) nanosleep(0, 0); return 0; }
2734 cc_check
&& _nanosleep
=yes
2735 if test "$_nanosleep" = yes ; then
2736 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2738 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2740 echores
"$_nanosleep"
2744 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2745 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2748 #include <sys/socket.h>
2749 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2752 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2753 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2755 if test $_winsock2 = auto
&& not cygwin
; then
2758 #include <winsock2.h>
2759 int main(void) { (void) gethostbyname(0); return 0; }
2761 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2763 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2767 if test $_winsock2 = yes ; then
2769 _def_winsock2
='#define HAVE_WINSOCK2 1'
2771 _def_winsock2
='#undef HAVE_WINSOCK2'
2776 echocheck
"inet_pton()"
2778 #include <sys/types.h>
2779 #include <sys/socket.h>
2780 #include <arpa/inet.h>
2781 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2783 if test "$_winsock2" = yes ; then
2784 _res_comment
="using winsock2 functions instead"
2786 elif cc_check
$_ld_sock ; then
2787 # NOTE: Linux has libresolv but does not need it
2789 _res_comment
="using $_ld_sock"
2791 elif cc_check
$_ld_sock -lresolv ; then
2792 # NOTE: needed for SunOS at least
2793 _ld_sock
="$_ld_sock -lresolv"
2794 _res_comment
="using $_ld_sock"
2797 _res_comment
="trying inet_aton next"
2800 echocheck
"inet_aton()"
2802 #include <sys/types.h>
2803 #include <sys/socket.h>
2804 #include <arpa/inet.h>
2805 int main(void) { (void) inet_aton(0, 0); return 0; }
2808 if cc_check
$_ld_sock ; then
2809 # NOTE: Linux has libresolv but does not need it
2811 _res_comment
="using $_ld_sock"
2812 elif cc_check
$_ld_sock -lresolv ; then
2813 # NOTE: needed for SunOS at least
2814 _ld_sock
="$_ld_sock -lresolv"
2815 _res_comment
="using $_ld_sock"
2819 _res_comment
="network support disabled"
2821 echores
"$_use_aton"
2824 _def_use_aton
='#undef USE_ATON'
2825 if test "$_use_aton" = yes; then
2826 _def_use_aton
='#define USE_ATON 1'
2830 # FIXME network check
2831 if test "$_network" = yes ; then
2832 _def_network
='#define MPLAYER_NETWORK 1'
2833 _ld_extra
="$_ld_extra $_ld_sock"
2834 _inputmodules
="network $_inputmodules"
2836 _noinputmodules
="network $_noinputmodules"
2837 _def_network
='#undef MPLAYER_NETWORK'
2842 echocheck
"inttypes.h (required)"
2844 #include <inttypes.h>
2845 int main(void) { return 0; }
2848 cc_check
&& _inttypes
=yes
2849 echores
"$_inttypes"
2851 if test "$_inttypes" = no
; then
2852 echocheck
"bitypes.h (inttypes.h predecessor)"
2854 #include <sys/bitypes.h>
2855 int main(void) { return 0; }
2857 cc_check
&& _inttypes
=yes
2858 if test "$_inttypes" = yes ; then
2859 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."
2861 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2866 echocheck
"int_fastXY_t in inttypes.h"
2868 #include <inttypes.h>
2870 volatile int_fast16_t v= 0;
2874 cc_check
&& _fast_inttypes
=yes
2875 if test "$_fast_inttypes" = yes ; then
2879 _def_fast_inttypes
='
2880 typedef signed char int_fast8_t;
2881 typedef signed int int_fast16_t;
2882 typedef signed int int_fast32_t;
2883 typedef signed long long int_fast64_t;
2884 typedef unsigned char uint_fast8_t;
2885 typedef unsigned int uint_fast16_t;
2886 typedef unsigned int uint_fast32_t;
2887 typedef unsigned long long uint_fast64_t;'
2889 echores
"$_fast_inttypes"
2892 echocheck
"word size"
2893 _mp_wordsize
="#undef MP_WORDSIZE"
2896 #include <sys/types.h>
2897 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2899 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2900 echores
"$_wordsize"
2903 echocheck
"stddef.h"
2906 int main(void) { return 0; }
2909 cc_check
&& _stddef
=yes
2910 if test "$_stddef" = yes ; then
2911 _def_stddef
='#define HAVE_STDDEF_H 1'
2913 _def_stddef
='#undef HAVE_STDDEF_H'
2918 echocheck
"malloc.h"
2921 int main(void) { (void) malloc(0); return 0; }
2924 cc_check
&& _malloc
=yes
2925 if test "$_malloc" = yes ; then
2926 _def_malloc
='#define HAVE_MALLOC_H 1'
2928 _def_malloc
='#undef HAVE_MALLOC_H'
2930 # malloc.h emits a warning in FreeBSD and OpenBSD
2931 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2935 echocheck
"memalign()"
2936 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2939 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2942 cc_check
&& _memalign
=yes
2943 if test "$_memalign" = yes ; then
2944 _def_memalign
='#define HAVE_MEMALIGN 1'
2946 _def_memalign
='#undef HAVE_MEMALIGN'
2947 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2948 not darwin
&& _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2950 echores
"$_memalign"
2953 echocheck
"alloca.h"
2956 int main(void) { (void) alloca(0); return 0; }
2959 cc_check
&& _alloca
=yes
2961 _def_alloca
='#define HAVE_ALLOCA_H 1'
2963 _def_alloca
='#undef HAVE_ALLOCA_H'
2970 #include <sys/types.h>
2971 #include <sys/mman.h>
2972 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2975 cc_check
&& _mman
=yes
2976 if test "$_mman" = yes ; then
2977 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2979 _def_mman
='#undef HAVE_SYS_MMAN_H'
2984 #include <sys/types.h>
2985 #include <sys/mman.h>
2986 int main(void) { void *p = MAP_FAILED; return 0; }
2988 _mman_has_map_failed
=no
2989 cc_check
&& _mman_has_map_failed
=yes
2990 if test "$_mman_has_map_failed" = yes ; then
2991 _def_mman_has_map_failed
=''
2993 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2996 echocheck
"dynamic loader"
2999 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
3002 for _ld_tmp
in "" "-ldl" ; do
3003 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3005 if test "$_dl" = yes ; then
3006 _def_dl
='#define HAVE_LIBDL 1'
3008 _def_dl
='#undef HAVE_LIBDL'
3013 echocheck
"dynamic a/v plugins support"
3014 if test "$_dl" = no
; then
3017 if test "$_dynamic_plugins" = yes ; then
3018 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
3020 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3022 echores
"$_dynamic_plugins"
3025 #echocheck "dynamic linking"
3026 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
3027 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
3029 #int main(void) { return 0; }
3031 #if cc_check -rdynamic ; then
3032 # _ld_dl_dynamic='-rdynamic'
3033 #elif cc_check -Bdynamic ; then
3034 # _ld_dl_dynamic='-Bdynamic'
3035 #elif cc_check ; then
3038 #echores "using $_ld_dl_dynamic"
3040 _def_threads
='#undef HAVE_THREADS'
3043 if test "$_pthreads" = auto
; then
3045 #include <pthread.h>
3046 void* func(void *arg) { return arg; }
3047 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3051 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3052 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3053 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3057 if test "$_pthreads" = yes ; then
3058 _res_comment
="using $_ld_pthread"
3059 _def_pthreads
='#define HAVE_PTHREADS 1'
3060 _def_threads
='#define HAVE_THREADS 1'
3062 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3063 _def_pthreads
='#undef HAVE_PTHREADS'
3064 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3065 if not mingw32
; then
3069 echores
"$_pthreads"
3073 if test "$_rpath" = yes ; then
3074 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3075 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3082 if test "$_iconv" = auto
; then
3083 _iconv_tmp
='#include <iconv.h>'
3089 #define INBUFSIZE 1024
3090 #define OUTBUFSIZE 4096
3092 char inbuffer[INBUFSIZE];
3093 char outbuffer[OUTBUFSIZE];
3098 char *tocode="UTF-8";
3099 char *fromcode="cp1250";
3100 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3101 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3102 char *iptr=inbuffer;
3103 char *optr=outbuffer;
3104 size_t inleft=numread;
3105 size_t outleft=OUTBUFSIZE;
3106 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3108 write (1, outbuffer, OUTBUFSIZE - outleft);
3111 if (iconv_close(icdsc) == -1)
3117 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3118 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3122 if test "$_iconv" = yes ; then
3123 _def_iconv
='#define USE_ICONV 1'
3125 _def_iconv
='#undef USE_ICONV'
3130 echocheck
"sys/soundcard.h"
3132 #include <sys/soundcard.h>
3133 int main(void) { return 0; }
3136 cc_check
&& _sys_soundcard
=yes
3137 if test "$_sys_soundcard" = yes ; then
3138 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3139 _include_soundcard
='#include <sys/soundcard.h>'
3141 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3143 echores
"$_sys_soundcard"
3145 if test "$_sys_soundcard" != yes ; then
3146 echocheck
"soundcard.h"
3148 #include <soundcard.h>
3149 int main(void) { return 0; }
3152 cc_check
&& _soundcard
=yes
3153 if linux ||
test "$_ossaudio" != no
; then
3154 # use soundcard.h on Linux, or when OSS support is enabled
3155 echores
"$_soundcard"
3157 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
3158 _res_comment
= "but ignored!"
3159 echores
"$_soundcard"
3162 if test "$_soundcard" = yes ; then
3163 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3164 _include_soundcard
='#include <soundcard.h>'
3166 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3169 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3173 echocheck
"sys/dvdio.h"
3176 #include <sys/dvdio.h>
3177 int main(void) { return 0; }
3180 cc_check
&& _dvdio
=yes
3181 if test "$_dvdio" = yes ; then
3182 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3184 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3189 echocheck
"sys/cdio.h"
3192 #include <sys/cdio.h>
3193 int main(void) { return 0; }
3196 cc_check
&& _cdio
=yes
3197 if test "$_cdio" = yes ; then
3198 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3200 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3205 echocheck
"linux/cdrom.h"
3207 #include <sys/types.h>
3208 #include <linux/cdrom.h>
3209 int main(void) { return 0; }
3212 cc_check
&& _cdrom
=yes
3213 if test "$_cdrom" = yes ; then
3214 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3216 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3224 int main(void) { return 0; }
3227 cc_check
&& _dvd
=yes
3228 if test "$_dvd" = yes ; then
3229 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3231 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3237 echocheck
"BSDI dvd.h"
3240 int main(void) { return 0; }
3243 cc_check
&& _bsdi_dvd
=yes
3244 if test "$_bsdi_dvd" = yes ; then
3245 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3247 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3249 echores
"$_bsdi_dvd"
3254 # also used by AIX, but AIX does not support VCD and/or libdvdread
3255 echocheck
"HP-UX SCSI header"
3257 #include <sys/scsi.h>
3258 int main(void) { return 0; }
3261 cc_check
&& _hpux_scsi_h
=yes
3262 if test "$_hpux_scsi_h" = yes ; then
3263 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3265 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3267 echores
"$_hpux_scsi_h"
3272 echocheck
"userspace SCSI headers (Solaris)"
3274 # include <unistd.h>
3275 # include <stropts.h>
3276 # include <sys/scsi/scsi_types.h>
3277 # include <sys/scsi/impl/uscsi.h>
3278 int main(void) { return 0; }
3281 cc_check
&& _sol_scsi_h
=yes
3282 if test "$_sol_scsi_h" = yes ; then
3283 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3285 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3287 echores
"$_sol_scsi_h"
3292 if test "$_termcap" = auto
; then
3294 int main(void) { tgetent(); return 0; }
3297 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3298 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3299 && _termcap
=yes && break
3302 if test "$_termcap" = yes ; then
3303 _def_termcap
='#define USE_TERMCAP 1'
3304 _res_comment
="using $_ld_tmp"
3306 _def_termcap
='#undef USE_TERMCAP'
3312 if test "$_termios" = auto
; then
3314 #include <sys/termios.h>
3315 int main(void) { return 0; }
3318 cc_check
&& _termios
=yes
3319 _def_termios_h_name
='sys/termios.h'
3322 if test "$_termios" = auto
; then
3324 #include <termios.h>
3325 int main(void) { return 0; }
3328 cc_check
&& _termios
=yes
3329 _def_termios_h_name
='termios.h'
3332 if test "$_termios" = yes ; then
3333 _def_termios
='#define HAVE_TERMIOS 1'
3334 _def_termios_h
='#undef HAVE_TERMIOS_H'
3335 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3337 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3338 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3339 elif test "$_def_termios_h_name" = 'termios.h' ; then
3340 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3342 _res_comment
="using $_def_termios_h_name"
3344 _def_termios
='#undef HAVE_TERMIOS'
3345 _def_termios_h_name
=''
3352 if test "$_shm" = auto
; then
3354 #include <sys/types.h>
3355 #include <sys/shm.h>
3356 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3359 cc_check
&& _shm
=yes
3361 if test "$_shm" = yes ; then
3362 _def_shm
='#define HAVE_SHM 1'
3364 _def_shm
='#undef HAVE_SHM'
3369 # XXX: FIXME, add runtime checking
3370 echocheck
"linux devfs"
3371 echores
"$_linux_devfs"
3374 echocheck
"scandir()"
3376 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3379 cc_check
&& _scandir
=yes
3380 if test "$_scandir" = yes ; then
3381 _def_scandir
='#define HAVE_SCANDIR 1'
3384 _def_scandir
='#undef HAVE_SCANDIR'
3390 echocheck
"strsep()"
3393 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3396 cc_check
&& _strsep
=yes
3397 if test "$_strsep" = yes ; then
3398 _def_strsep
='#define HAVE_STRSEP 1'
3401 _def_strsep
='#undef HAVE_STRSEP'
3406 echocheck
"strlcpy()"
3409 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3412 cc_check
&& _strlcpy
=yes
3413 if test "$_strlcpy" = yes ; then
3414 _def_strlcpy
='#define HAVE_STRLCPY 1'
3417 _def_strlcpy
='#undef HAVE_STRLCPY'
3422 echocheck
"strlcat()"
3425 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3428 cc_check
&& _strlcat
=yes
3429 if test "$_strlcat" = yes ; then
3430 _def_strlcat
='#define HAVE_STRLCAT 1'
3433 _def_strlcat
='#undef HAVE_STRLCAT'
3438 echocheck
"fseeko()"
3441 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3444 cc_check
&& _fseeko
=yes
3445 if test "$_fseeko" = yes ; then
3446 _def_fseeko
='#define HAVE_FSEEKO 1'
3449 _def_fseeko
='#undef HAVE_FSEEKO'
3454 echocheck
"localtime_r()"
3457 int main( void ) { localtime_r(NULL, NULL); }
3460 cc_check
&& _localtime_r
=yes
3461 if test "$_localtime_r" = yes ; then
3462 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3464 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3466 echores
"$_localtime_r"
3468 echocheck
"vsscanf()"
3471 int main(void) { vsscanf(0, 0, 0); return 0; }
3474 cc_check
&& _vsscanf
=yes
3475 if test "$_vsscanf" = yes ; then
3476 _def_vsscanf
='#define HAVE_VSSCANF 1'
3479 _def_vsscanf
='#undef HAVE_VSSCANF'
3488 int main(void) { swab(0, 0, 0); return 0; }
3491 cc_check
&& _swab
=yes
3492 if test "$_swab" = yes ; then
3493 _def_swab
='#define HAVE_SWAB 1'
3496 _def_swab
='#undef HAVE_SWAB'
3501 echocheck
"POSIX select()"
3505 #include <sys/types.h>
3507 #include <sys/time.h>
3509 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3512 _def_posix_select
='#undef HAVE_POSIX_SELECT'
3513 cc_check
&& _posix_select
=yes \
3514 && _def_posix_select
='#define HAVE_POSIX_SELECT 1'
3515 echores
"$_posix_select"
3518 echocheck
"gettimeofday()"
3521 #include <sys/time.h>
3522 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3525 cc_check
&& _gettimeofday
=yes
3526 if test "$_gettimeofday" = yes ; then
3527 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3528 _need_gettimeofday
=no
3530 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3531 _need_gettimeofday
=yes
3533 echores
"$_gettimeofday"
3540 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3543 cc_check
&& _glob
=yes
3544 if test "$_glob" = yes ; then
3545 _def_glob
='#define HAVE_GLOB 1'
3548 _def_glob
='#undef HAVE_GLOB'
3554 echocheck
"setenv()"
3557 int main (void){ setenv("","",0); return 0; }
3560 cc_check
&& _setenv
=yes
3561 if test "$_setenv" = yes ; then
3562 _def_setenv
='#define HAVE_SETENV 1'
3565 _def_setenv
='#undef HAVE_SETENV'
3572 echocheck
"sysi86()"
3574 #include <sys/sysi86.h>
3575 int main (void) { sysi86(0); return 0; }
3578 cc_check
&& _sysi86
=yes
3579 if test "$_sysi86" = yes ; then
3580 _def_sysi86
='#define HAVE_SYSI86 1'
3582 #include <sys/sysi86.h>
3583 int main (void) { int sysi86(int, void*); sysi86(0); return 0; }
3585 cc_check
&& _def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3587 _def_sysi86
='#undef HAVE_SYSI86'
3593 echocheck
"sys/sysinfo.h"
3595 #include <sys/sysinfo.h>
3597 struct sysinfo s_info;
3603 cc_check
&& _sys_sysinfo
=yes
3604 if test "$_sys_sysinfo" = yes ; then
3605 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3607 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3609 echores
"$_sys_sysinfo"
3614 echocheck
"Mac OS X APIs"
3615 if test "$_macosx" = auto
; then
3616 productName
=`/usr/bin/sw_vers -productName`
3617 if test "$productName" = "Mac OS X" ||
3618 test "$productName" = "Mac OS X Server" ; then
3622 _def_macosx
='#undef MACOSX'
3623 _noaomodules
="macosx $_noaomodules"
3624 _novomodules
="quartz $_novomodules"
3627 if test "$_macosx" = yes ; then
3629 #include <Carbon/Carbon.h>
3630 #include <QuickTime/QuickTime.h>
3631 #include <CoreAudio/CoreAudio.h>
3635 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3638 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3639 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3640 _def_macosx
='#define MACOSX 1'
3641 _aosrc
="$_aosrc ao_macosx.c"
3642 _aomodules
="macosx $_aomodules"
3643 _vosrc
="$_vosrc vo_quartz.c"
3644 _vomodules
="quartz $_vomodules"
3647 _def_macosx
='#undef MACOSX'
3648 _noaomodules
="macosx $_noaomodules"
3649 _novomodules
="quartz $_novomodules"
3652 #include <Carbon/Carbon.h>
3653 #include <QuartzCore/CoreVideo.h>
3656 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3657 _vosrc
="$_vosrc vo_macosx.m"
3658 _vomodules
="macosx $_vomodules"
3659 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3660 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3661 _macosx_corevideo
=yes
3663 _novomodules
="macosx $_novomodules"
3664 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3665 _macosx_corevideo
=no
3670 echocheck
"Mac OS X Finder Support"
3671 if test "$_macosx_finder_support" = auto
; then
3672 _macosx_finder_support
=$_macosx
3674 if test "$_macosx_finder_support" = yes; then
3675 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3676 _macosx_finder_support
=yes
3678 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3679 _macosx_finder_support
=no
3681 echores
"$_macosx_finder_support"
3683 echocheck
"Mac OS X Bundle file locations"
3684 if test "$_macosx_bundle" = auto
; then
3685 _macosx_bundle
=$_macosx_finder_support
3687 if test "$_macosx_bundle" = yes; then
3688 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3690 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3693 echores
"$_macosx_bundle"
3698 echocheck
"pkg-config"
3699 _pkg_config
=pkg-config
3700 if `$_pkg_config --version > /dev/null 2>&1`; then
3708 echocheck
"Samba support (libsmbclient)"
3709 if test "$_smbsupport" = yes; then
3710 _ld_extra
="$_ld_extra -lsmbclient"
3712 if test "$_smbsupport" = auto
; then
3715 #include <libsmbclient.h>
3716 int main(void) { smbc_opendir("smb://"); return 0; }
3718 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3719 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3720 _smbsupport
=yes && break
3724 if test "$_smbsupport" = yes; then
3725 _def_smbsupport
="#define LIBSMBCLIENT"
3726 _inputmodules
="smb $_inputmodules"
3728 _def_smbsupport
="#undef LIBSMBCLIENT"
3729 _noinputmodules
="smb $_noinputmodules"
3731 echores
"$_smbsupport"
3740 if test "$_3dfx" = yes ; then
3741 _def_3dfx
='#define HAVE_3DFX 1'
3742 _vosrc
="$_vosrc vo_3dfx.c"
3743 _vomodules
="3dfx $_vomodules"
3745 _def_3dfx
='#undef HAVE_3DFX'
3746 _novomodules
="3dfx $_novomodules"
3752 if test "$_tdfxfb" = yes ; then
3753 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3754 _vosrc
="$_vosrc vo_tdfxfb.c"
3755 _vomodules
="tdfxfb $_vomodules"
3757 _def_tdfxfb
='#undef HAVE_TDFXFB'
3758 _novomodules
="tdfxfb $_novomodules"
3763 if test "$_s3fb" = yes ; then
3764 _def_s3fb
='#define HAVE_S3FB 1'
3765 _vosrc
="$_vosrc vo_s3fb.c"
3766 _vomodules
="s3fb $_vomodules"
3768 _def_s3fb
='#undef HAVE_S3FB'
3769 _novomodules
="s3fb $_novomodules"
3774 if test "$_tdfxvid" = yes ; then
3775 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3776 _vosrc
="$_vosrc vo_tdfx_vid.c"
3777 _vomodules
="tdfx_vid $_vomodules"
3779 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3780 _novomodules
="tdfx_vid $_novomodules"
3785 if test "$_tga" = yes ; then
3786 _def_tga
='#define HAVE_TGA 1'
3787 _vosrc
="$_vosrc vo_tga.c"
3788 _vomodules
="tga $_vomodules"
3790 _def_tga
='#undef HAVE_TGA'
3791 _novomodules
="tga $_novomodules"
3796 echocheck
"DirectFB"
3797 if test "$_directfb" = auto
; then
3800 #include <directfb.h>
3801 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3803 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3804 -I/usr
/include
/directfb
-I/usr
/local
/include
-I/usr
/include
; do
3805 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3806 _inc_extra
="$_inc_extra $_inc_tmp" && break
3811 expr $1 \
* 65536 + $2 \
* 256 + $3
3814 if test "$_directfb" = yes; then
3816 #include <directfb_version.h>
3818 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3821 if $_cc -E $TMPC $_inc_extra > "$TMPO"; then
3822 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPO" | tr -d '()'`
3823 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3824 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3825 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3826 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3827 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3828 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3829 _res_comment
="$_directfb_version"
3831 _def_directfb_version
='#undef DIRECTFBVERSION'
3833 _res_comment
="version >=0.9.13 required"
3837 _res_comment
="failed to get version"
3840 echores
"$_directfb"
3842 if test "$_directfb" = yes ; then
3843 _def_directfb
='#define HAVE_DIRECTFB 1'
3844 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3845 _vosrc
="$_vosrc vo_directfb2.c"
3846 _vomodules
="directfb $_vomodules"
3847 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3849 _novomodules
="directfb $_novomodules"
3852 if test "$_dfb_version" -ge `dfb_version 0 9 15`; then
3853 _vosrc
="$_vosrc vo_dfbmga.c"
3854 _vomodules
="dfbmga $_vomodules"
3855 _def_dfbmga
='#define HAVE_DFBMGA 1'
3857 _novomodules
="dfbmga $_novomodules"
3858 _def_dfbmga
='#undef HAVE_DFBMGA'
3861 _def_directfb
='#undef HAVE_DIRECTFB'
3862 _novomodules
="dfbmga directfb $_novomodules"
3866 echocheck
"X11 headers presence"
3867 for I
in `echo $_inc_extra | sed s/-I//g` /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3868 if test -f "$I/X11/Xlib.h" ; then
3871 _res_comment
="using $I"
3875 if test -z "$_inc_x11" ; then
3878 _res_comment
="check if the dev(el) packages are installed"
3880 echores
"$_x11_headers"
3884 if test "$_x11" != no
; then
3886 #include <X11/Xlib.h>
3887 #include <X11/Xutil.h>
3888 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3890 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3891 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3893 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3895 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3897 cc_check
$_inc_x11 $_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3898 && _x11
=yes && break
3901 if test "$_x11" = yes ; then
3902 #FIXME: This is ugly as it can duplicate a -I parameter..
3903 _inc_extra
="$_inc_extra $_inc_x11"
3904 _def_x11
='#define HAVE_X11 1'
3905 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3906 _vomodules
="x11 xover $_vomodules"
3909 _def_x11
='#undef HAVE_X11'
3910 _novomodules
="x11 $_novomodules"
3911 _res_comment
="check if the dev(el) packages are installed"
3912 # disable stuff that depends on X
3913 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _dga
=no
3921 if test "$_x11" = yes ; then
3923 #include <X11/Xmd.h>
3924 #include <X11/Xlib.h>
3925 #include <X11/Xutil.h>
3926 #include <X11/Xatom.h>
3927 #include <X11/extensions/dpms.h>
3929 (void) DPMSQueryExtension(0, 0, 0);
3932 cc_check
-lXdpms && _xdpms3
=yes
3934 #include <X11/Xlib.h>
3935 #include <X11/extensions/dpms.h>
3937 (void) DPMSQueryExtension(0, 0, 0);
3940 cc_check
&& _xdpms4
=yes
3942 if test "$_xdpms4" = yes ; then
3943 _def_xdpms
='#define HAVE_XDPMS 1'
3944 _res_comment
="using Xdpms 4"
3946 elif test "$_xdpms3" = yes ; then
3947 _def_xdpms
='#define HAVE_XDPMS 1'
3948 _libs_mplayer
="$_libs_mplayer -lXdpms"
3949 _res_comment
="using Xdpms 3"
3952 _def_xdpms
='#undef HAVE_XDPMS'
3958 if test "$_xv" = auto
; then
3960 #include <X11/Xlib.h>
3961 #include <X11/extensions/Xvlib.h>
3963 (void) XvGetPortAttribute(0, 0, 0, 0);
3964 (void) XvQueryPortAttributes(0, 0, 0);
3968 cc_check
-lXv && _xv
=yes
3971 if test "$_xv" = yes ; then
3972 _def_xv
='#define HAVE_XV 1'
3973 _libs_mplayer
="$_libs_mplayer -lXv"
3974 _vosrc
="$_vosrc vo_xv.c"
3975 _vomodules
="xv $_vomodules"
3977 _def_xv
='#undef HAVE_XV'
3978 _novomodules
="xv $_novomodules"
3984 if test "$_xv" = yes && test "$_xvmc" != no
; then
3987 #include <X11/Xlib.h>
3988 #include <X11/extensions/Xvlib.h>
3989 #include <X11/extensions/XvMClib.h>
3991 (void) XvMCQueryExtension(0,0,0);
3992 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3995 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3996 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3999 if test "$_xvmc" = yes ; then
4000 _def_xvmc
='#define HAVE_XVMC 1'
4001 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
4002 _vosrc
="$_vosrc vo_xvmc.c"
4003 _vomodules
="xvmc $_vomodules"
4004 _res_comment
="using $_xvmclib"
4006 _def_xvmc
='#undef HAVE_XVMC'
4007 _novomodules
="xvmc $_novomodules"
4008 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
4013 echocheck
"Xinerama"
4014 if test "$_xinerama" = auto
; then
4016 #include <X11/Xlib.h>
4017 #include <X11/extensions/Xinerama.h>
4018 int main(void) { (void) XineramaIsActive(0); return 0; }
4021 cc_check
-lXinerama && _xinerama
=yes
4024 if test "$_xinerama" = yes ; then
4025 _def_xinerama
='#define HAVE_XINERAMA 1'
4026 _libs_mplayer
="$_libs_mplayer -lXinerama"
4028 _def_xinerama
='#undef HAVE_XINERAMA'
4030 echores
"$_xinerama"
4033 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4034 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4035 # named 'X extensions' or something similar.
4036 # This check may be useful for future mplayer versions (to change resolution)
4037 # If you run into problems, remove '-lXxf86vm'.
4039 if test "$_vm" = auto
; then
4041 #include <X11/Xlib.h>
4042 #include <X11/extensions/xf86vmode.h>
4043 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4046 cc_check
-lXxf86vm && _vm
=yes
4048 if test "$_vm" = yes ; then
4049 _def_vm
='#define HAVE_XF86VM 1'
4050 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
4052 _def_vm
='#undef HAVE_XF86VM'
4056 # Check for the presence of special keycodes, like audio control buttons
4057 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4058 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4059 # have these new keycodes.
4060 echocheck
"XF86keysym"
4061 if test "$_xf86keysym" = auto
; then
4064 #include <X11/Xlib.h>
4065 #include <X11/XF86keysym.h>
4066 int main(void) { return XF86XK_AudioPause; }
4068 cc_check
&& _xf86keysym
=yes
4070 if test "$_xf86keysym" = yes ; then
4071 _def_xf86keysym
='#define HAVE_XF86XK 1'
4073 _def_xf86keysym
='#undef HAVE_XF86XK'
4075 echores
"$_xf86keysym"
4078 # Version 2 is preferred to version 1 if available
4079 if test "$_dga" = auto
; then
4081 #include <X11/Xlib.h>
4082 #include <X11/extensions/xf86dga.h>
4083 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4086 cc_check
-lXxf86dga -lXxf86vm && _dga
=1
4089 #include <X11/Xlib.h>
4090 #include <X11/extensions/xf86dga.h>
4091 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4093 cc_check
-lXxf86dga && _dga
=2
4096 _def_dga
='#undef HAVE_DGA'
4097 _def_dga2
='#undef HAVE_DGA2'
4098 if test "$_dga" = 1 ; then
4099 _def_dga
='#define HAVE_DGA 1'
4100 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4101 _vosrc
="$_vosrc vo_dga.c"
4102 _vomodules
="dga $_vomodules"
4103 _res_comment
="using DGA 1.0"
4104 elif test "$_dga" = 2 ; then
4105 _def_dga
='#define HAVE_DGA 1'
4106 _def_dga2
='#define HAVE_DGA2 1'
4107 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4108 _vosrc
="$_vosrc vo_dga.c"
4109 _vomodules
="dga $_vomodules"
4110 _res_comment
="using DGA 2.0"
4111 elif test "$_dga" = no
; then
4112 _novomodules
="dga $_novomodules"
4114 die
"DGA version must be 1 or 2"
4120 #Note: this test is run even with --enable-gl since we autodetect linker flags
4121 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4124 int main(void) { return 0; }
4127 if cc_check
-lGL $_ld_lm ; then
4129 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4130 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4132 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4133 elif cc_check
-lopengl32 ; then
4136 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4141 if test "$_gl" = yes ; then
4142 _def_gl
='#define HAVE_GL 1'
4143 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4144 if test "$_gl_win32" = yes ; then
4145 _def_gl_win32
='#define GL_WIN32 1'
4146 _vosrc
="$_vosrc w32_common.c"
4147 _res_comment
="win32 version"
4149 _vomodules
="opengl $_vomodules"
4151 _def_gl
='#undef HAVE_GL'
4152 _def_gl_win32
='#undef GL_WIN32'
4153 _novomodules
="opengl $_novomodules"
4158 echocheck
"/dev/mga_vid"
4159 if test "$_mga" = auto
; then
4161 test -c /dev
/mga_vid
&& _mga
=yes
4163 if test "$_mga" = yes ; then
4164 _def_mga
='#define HAVE_MGA 1'
4165 _vosrc
="$_vosrc vo_mga.c"
4166 _vomodules
="mga $_vomodules"
4168 _def_mga
='#undef HAVE_MGA'
4169 _novomodules
="mga $_novomodules"
4174 # echocheck "syncfb"
4176 # test "$_mga" = yes && _syncfb=yes
4177 # if test "$_syncfb" = yes ; then
4178 # _def_syncfb='#define HAVE_SYNCFB 1'
4179 # _vosrc="$_vosrc vo_syncfb.c"
4181 # _def_syncfb='#undef HAVE_SYNCFB'
4183 # echores "$_syncfb"
4187 if test "$_xmga" = auto
; then
4189 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4191 if test "$_xmga" = yes ; then
4192 _def_xmga
='#define HAVE_XMGA 1'
4193 _vosrc
="$_vosrc vo_xmga.c"
4194 _vomodules
="xmga $_vomodules"
4196 _def_xmga
='#undef HAVE_XMGA'
4197 _novomodules
="xmga $_novomodules"
4203 if test "$_ggi" = auto
; then
4205 #include <ggi/ggi.h>
4206 int main(void) { return 0; }
4209 cc_check
-lggi && _ggi
=yes
4211 if test "$_ggi" = yes ; then
4212 _def_ggi
='#define HAVE_GGI 1'
4213 _libs_mplayer
="$_libs_mplayer -lggi"
4214 _vosrc
="$_vosrc vo_ggi.c"
4215 _vomodules
="ggi $_vomodules"
4217 _def_ggi
='#undef HAVE_GGI'
4218 _novomodules
="ggi $_novomodules"
4222 echocheck
"GGI extension: libggiwmh"
4223 if test "$_ggiwmh" = auto
; then
4226 #include <ggi/ggi.h>
4227 #include <ggi/wmh.h>
4228 int main(void) { return 0; }
4230 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4232 # needed to get right output on obscure combination
4233 # like --disable-ggi --enable-ggiwmh
4234 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4235 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4236 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4239 _def_ggiwmh
='#undef HAVE_GGIWMH'
4245 if test "$_aa" = auto
; then
4248 extern struct aa_hardware_params aa_defparams;
4249 extern struct aa_renderparams aa_defrenderparams;
4253 (void) aa_init(0, 0, 0);
4254 c = aa_autoinit(&aa_defparams);
4255 p = aa_getrenderparams();
4256 aa_autoinitkbd(c,0);
4260 for _ld_tmp
in "-laa" ; do
4261 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4264 if test "$_aa" = yes ; then
4265 _def_aa
='#define HAVE_AA 1'
4267 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4269 _vosrc
="$_vosrc vo_aa.c"
4270 _vomodules
="aa $_vomodules"
4272 _def_aa
='#undef HAVE_AA'
4273 _novomodules
="aa $_novomodules"
4279 if test "$_caca" = auto
; then
4281 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4284 #ifdef CACA_API_VERSION_1
4287 int main(void) { (void) caca_init(); return 0; }
4289 cc_check
`caca-config --libs` && _caca
=yes
4292 if test "$_caca" = yes ; then
4293 _def_caca
='#define HAVE_CACA 1'
4294 _inc_extra
="$_inc_extra `caca-config --cflags`"
4295 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4296 _vosrc
="$_vosrc vo_caca.c"
4297 _vomodules
="caca $_vomodules"
4299 _def_caca
='#undef HAVE_CACA'
4300 _novomodules
="caca $_novomodules"
4306 if test "$_svga" = auto
; then
4309 int main(void) { return 0; }
4312 cc_check
-lvga $_ld_lm && _svga
=yes
4314 if test "$_svga" = yes ; then
4315 _def_svga
='#define HAVE_SVGALIB 1'
4316 _libs_mplayer
="$_libs_mplayer -lvga"
4317 _vosrc
="$_vosrc vo_svga.c"
4318 _vomodules
="svga $_vomodules"
4320 _def_svga
='#undef HAVE_SVGALIB'
4321 _novomodules
="svga $_novomodules"
4327 if test "$_fbdev" = auto
; then
4329 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
4331 if test "$_fbdev" = yes ; then
4332 _def_fbdev
='#define HAVE_FBDEV 1'
4333 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4334 _vomodules
="fbdev $_vomodules"
4336 _def_fbdev
='#undef HAVE_FBDEV'
4337 _novomodules
="fbdev $_novomodules"
4344 if test "$_dvb" = auto
; then
4347 #include <sys/poll.h>
4348 #include <sys/ioctl.h>
4353 #include <ost/dmx.h>
4354 #include <ost/frontend.h>
4355 #include <ost/sec.h>
4356 #include <ost/video.h>
4357 #include <ost/audio.h>
4358 int main(void) {return 0;}
4360 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4361 cc_check
$_inc_tmp && _dvb
=yes && \
4362 _inc_extra
="$_inc_extra $_inc_tmp" && break
4366 if test "$_dvb" = yes ; then
4367 _def_dvb
='#define HAVE_DVB 1'
4368 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4369 _aomodules
="mpegpes(dvb) $_aomodules"
4370 _vomodules
="mpegpes(dvb) $_vomodules"
4373 echocheck
"DVB HEAD"
4374 if test "$_dvbhead" = auto
; then
4378 #include <sys/poll.h>
4379 #include <sys/ioctl.h>
4384 #include <linux/dvb/dmx.h>
4385 #include <linux/dvb/frontend.h>
4386 #include <linux/dvb/video.h>
4387 #include <linux/dvb/audio.h>
4388 int main(void) {return 0;}
4390 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4391 cc_check
$_inc_tmp && _dvbhead
=yes && \
4392 _inc_extra
="$_inc_extra $_inc_tmp" && break
4396 if test "$_dvbhead" = yes ; then
4397 _def_dvb
='#define HAVE_DVB_HEAD 1'
4398 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4399 _aomodules
="mpegpes(dvb) $_aomodules"
4400 _vomodules
="mpegpes(dvb) $_vomodules"
4403 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4404 _def_dvb
='#undef HAVE_DVB'
4405 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4406 _aomodules
="mpegpes(file) $_aomodules"
4407 _vomodules
="mpegpes(file) $_vomodules"
4410 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4412 _inputmodules
="dvb $_inputmodules"
4415 _noinputmodules
="dvb $_noinputmodules"
4418 echocheck
"PNG support"
4419 if test "$_png" = auto
; then
4422 # Don't check for -lpng on irix since it has its own libpng
4423 # incompatible with the GNU libpng
4424 _res_comment
="disabled on irix (not GNU libpng)"
4430 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4431 printf("libpng: %s\n", png_libpng_ver);
4432 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4435 if cc_check
-lpng -lz $_ld_lm ; then
4439 _res_comment
="mismatch of library and header versions"
4445 if test "$_png" = yes ; then
4446 _def_png
='#define HAVE_PNG 1'
4447 _ld_extra
="$_ld_extra -lpng -lz"
4448 _vosrc
="$_vosrc vo_png.c"
4449 _vomodules
="png $_vomodules"
4451 _def_png
='#undef HAVE_PNG'
4452 _novomodules
="png $_novomodules"
4455 echocheck
"JPEG support"
4456 if test "$_jpeg" = auto
; then
4463 #include <jpeglib.h>
4468 if cc_check
-ljpeg $_ld_lm ; then
4476 if test "$_jpeg" = yes ; then
4477 _def_jpeg
='#define HAVE_JPEG 1'
4478 _vosrc
="$_vosrc vo_jpeg.c"
4479 _vomodules
="jpeg $_vomodules"
4480 _ld_extra
="$_ld_extra -ljpeg"
4482 _def_jpeg
='#undef HAVE_JPEG'
4483 _novomodules
="jpeg $_novomodules"
4488 echocheck
"PNM support"
4489 if test "$_pnm" = yes; then
4490 _def_pnm
="#define HAVE_PNM"
4491 _vosrc
="$_vosrc vo_pnm.c"
4492 _vomodules
="pnm $_vomodules"
4494 _def_pnm
="#undef HAVE_PNM"
4495 _novomodules
="pnm $_novomodules"
4501 echocheck
"GIF support"
4502 # This is to appease people who want to force gif support.
4503 # If it is forced to yes, then we still do checks to determine
4504 # which gif library to use.
4505 if test "$_gif" = yes ; then
4510 if test "$_gif" = auto
; then
4513 #include <gif_lib.h>
4518 for _ld_gif
in "-lungif" "-lgif" ; do
4519 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4523 # If no library was found, and the user wants support forced,
4524 # then we force it on with libgif, as this is the safest
4525 # assumption IMHO. (libungif & libregif both create symbolic
4526 # links to libgif. We also assume that no x11 support is needed,
4527 # because if you are forcing this, then you _should_ know what
4528 # you are doing. [ Besides, package maintainers should never
4529 # have compiled x11 deps into libungif in the first place. ] )
4532 if test "$_force_gif" = yes && test "$_gif" = no
; then
4537 if test "$_gif" = yes ; then
4538 _def_gif
='#define HAVE_GIF 1'
4539 _vosrc
="$_vosrc vo_gif89a.c"
4540 _codecmodules
="gif $_codecmodules"
4541 _vomodules
="gif89a $_vomodules"
4542 _res_comment
="old version, some encoding functions disabled"
4543 _def_gif_4
='#undef HAVE_GIF_4'
4544 _ld_extra
="$_ld_extra $_ld_gif"
4548 #include <gif_lib.h>
4549 void catch() { exit(1); }
4551 signal(SIGSEGV, catch); // catch segfault
4552 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4553 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4557 if cc_check
"$_ld_gif" && tmp_run
; then
4558 _def_gif_4
='#define HAVE_GIF_4 1'
4562 _def_gif
='#undef HAVE_GIF'
4563 _def_gif_4
='#undef HAVE_GIF_4'
4564 _novomodules
="gif89a $_novomodules"
4565 _nocodecmodules
="gif $_nocodecmodules"
4570 case "$_gif" in yes*)
4571 echocheck
"broken giflib workaround"
4572 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4575 #include <gif_lib.h>
4578 printf("UserData is at address %p\n", gif.UserData);
4582 if cc_check
"$_ld_gif" && tmp_run
; then
4583 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4592 echocheck
"VESA support"
4593 if test "$_vesa" = auto
; then
4596 int main(void) { vbeVersion(); return 0; }
4599 cc_check
-lvbe -llrmi && _vesa
=yes
4601 if test "$_vesa" = yes ; then
4602 _def_vesa
='#define HAVE_VESA 1'
4603 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4604 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4605 _vomodules
="vesa $_vomodules"
4607 _def_vesa
='#undef HAVE_VESA'
4608 _novomodules
="vesa $_novomodules"
4618 if test -z "$_sdlconfig" ; then
4619 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4620 _sdlconfig
="sdl-config"
4621 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4622 _sdlconfig
="sdl11-config"
4627 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4630 int main(int argc, char *argv[]) { return 0; }
4633 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4634 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4635 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4636 if test "$_sdlversion" -gt 116 ; then
4637 if test "$_sdlversion" -lt 121 ; then
4638 _def_sdlbuggy
='#define BUGGY_SDL'
4640 _def_sdlbuggy
='#undef BUGGY_SDL'
4647 if test "$_sdl" = yes ; then
4648 _def_sdl
='#define HAVE_SDL 1'
4650 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4651 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4653 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4654 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4656 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4657 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4659 _vosrc
="$_vosrc vo_sdl.c"
4660 _vomodules
="sdl $_vomodules"
4661 _aosrc
="$_aosrc ao_sdl.c"
4662 _aomodules
="sdl $_aomodules"
4663 _res_comment
="using $_sdlconfig"
4665 _def_sdl
='#undef HAVE_SDL'
4666 _novomodules
="sdl $_novomodules"
4667 _noaomodules
="sdl $_noaomodules"
4674 echocheck
"Windows waveout"
4675 if test "$_win32waveout" = auto
; then
4677 #include <windows.h>
4678 #include <mmsystem.h>
4679 int main(void) { return 0; }
4682 cc_check
-lwinmm && _win32waveout
=yes
4684 if test "$_win32waveout" = yes ; then
4685 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4686 _libs_mplayer
="$_libs_mplayer -lwinmm"
4687 _aosrc
="$_aosrc ao_win32.c"
4688 _aomodules
="win32 $_aomodules"
4690 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4691 _noaomodules
="win32 $_noaomodules"
4693 echores
"$_win32waveout"
4696 if test "$_directx" = auto
; then
4698 #include <windows.h>
4701 int main(void) { return 0; }
4704 cc_check
-lgdi32 && _directx
=yes
4706 if test "$_directx" = yes ; then
4707 _def_directx
='#define HAVE_DIRECTX 1'
4708 _libs_mplayer
="$_libs_mplayer -lgdi32"
4709 _vosrc
="$_vosrc vo_directx.c"
4710 _vomodules
="directx $_vomodules"
4711 _aosrc
="$_aosrc ao_dsound.c"
4712 _aomodules
="dsound $_aomodules"
4714 _def_directx
='#undef HAVE_DIRECTX'
4715 _novomodules
="directx $_novomodules"
4716 _noaomodules
="dsound $_noaomodules"
4724 if test "$_nas" = auto
; then
4726 #include <audio/audiolib.h>
4727 int main(void) { return 0; }
4730 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4732 if test "$_nas" = yes ; then
4733 _def_nas
='#define HAVE_NAS 1'
4734 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4735 _aosrc
="$_aosrc ao_nas.c"
4736 _aomodules
="nas $_aomodules"
4738 _noaomodules
="nas $_noaomodules"
4739 _def_nas
='#undef HAVE_NAS'
4744 if test "$_dxr2" = auto
; then
4747 #include <dxr2ioctl.h>
4748 int main(void) { return 0; }
4750 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4751 cc_check
$_inc_tmp && _dxr2
=yes && \
4752 _inc_extra
="$_inc_extra $_inc_tmp" && break
4755 if test "$_dxr2" = yes; then
4756 _def_dxr2
='#define HAVE_DXR2 1'
4757 _vosrc
="$_vosrc vo_dxr2.c"
4758 _aosrc
="$_aosrc ao_dxr2.c"
4759 _aomodules
="dxr2 $_aomodules"
4760 _vomodules
="dxr2 $_vomodules"
4762 _def_dxr2
='#undef HAVE_DXR2'
4763 _noaomodules
="dxr2 $_noaomodules"
4764 _novomodules
="dxr2 $_novomodules"
4769 if test "$_dxr3" = auto
; then
4771 #include <linux/em8300.h>
4772 int main(void) { return 0; }
4775 cc_check
&& _dxr3
=yes
4777 if test "$_dxr3" = yes ; then
4778 _def_dxr3
='#define HAVE_DXR3 1'
4779 _vosrc
="$_vosrc vo_dxr3.c"
4780 _vomodules
="dxr3 $_vomodules"
4782 _def_dxr3
='#undef HAVE_DXR3'
4783 _novomodules
="dxr3 $_novomodules"
4788 echocheck
"IVTV TV-Out"
4789 if test "$_ivtv" = auto
; then
4792 #include <inttypes.h>
4793 #include <linux/types.h>
4794 #include <linux/videodev2.h>
4795 #include <linux/ivtv.h>
4796 int main(void) { return 0; }
4799 cc_check
&& _ivtv
=yes
4801 if test "$_ivtv" = yes ; then
4802 _def_ivtv
='#define HAVE_IVTV 1'
4803 _vosrc
="$_vosrc vo_ivtv.c"
4804 _vomodules
="ivtv $_vomodules"
4805 _aosrc
="$_aosrc ao_ivtv.c"
4806 _aomodules
="ivtv $_aomodules"
4808 _def_ivtv
='#undef HAVE_IVTV'
4809 _novomodules
="ivtv $_novomodules"
4810 _noaomodules
="ivtv $_noaomodules"
4821 echocheck
"OSS Audio"
4822 if test "$_ossaudio" = auto
; then
4824 #include <sys/ioctl.h>
4826 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4829 cc_check
&& _ossaudio
=yes
4831 if test "$_ossaudio" = yes ; then
4832 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4833 _aosrc
="$_aosrc ao_oss.c"
4834 _aomodules
="oss $_aomodules"
4835 if test "$_linux_devfs" = yes; then
4836 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4837 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4840 #include <sys/ioctl.h>
4842 #ifdef OPEN_SOUND_SYSTEM
4843 int main(void) { return 0; }
4845 #error Not the real thing
4849 cc_check
&& _real_ossaudio
=yes
4850 if test "$_real_ossaudio" = yes; then
4851 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4852 elif netbsd || openbsd
; then
4853 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4854 _ld_extra
="$_ld_extra -lossaudio"
4856 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4858 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4861 _def_ossaudio
='#undef USE_OSS_AUDIO'
4862 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4863 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4864 _noaomodules
="oss $_noaomodules"
4866 echores
"$_ossaudio"
4870 if test "$_arts" = auto
; then
4872 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4876 int main(void) { return 0; }
4878 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4883 if test "$_arts" = yes ; then
4884 _def_arts
='#define USE_ARTS 1'
4885 _aosrc
="$_aosrc ao_arts.c"
4886 _aomodules
="arts $_aomodules"
4887 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
4888 _inc_extra
="$_inc_extra `artsc-config --cflags`"
4890 _noaomodules
="arts $_noaomodules"
4896 if test "$_esd" = auto
; then
4898 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4902 int main(void) { return 0; }
4904 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
4910 if test "$_esd" = yes ; then
4911 _def_esd
='#define USE_ESD 1'
4912 _aosrc
="$_aosrc ao_esd.c"
4913 _aomodules
="esd $_aomodules"
4914 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
4915 _inc_extra
="$_inc_extra `esd-config --cflags`"
4917 echocheck
"esd_get_latency()"
4920 int main(void) { return esd_get_latency(0); }
4922 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4923 echores
"$_esd_latency"
4925 _def_esd
='#undef USE_ESD'
4926 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4927 _noaomodules
="esd $_noaomodules"
4931 if test "$_polyp" = auto
; then
4933 if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
4936 #include <polyp/polyplib.h>
4937 #include <polyp/mainloop.h>
4938 #include <polyp/polyplib-error.h>
4939 int main(void) { return 0; }
4941 cc_check
`$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
4947 if test "$_polyp" = yes ; then
4948 _def_polyp
='#define USE_POLYP 1'
4949 _aosrc
="$_aosrc ao_polyp.c"
4950 _aomodules
="polyp $_aomodules"
4951 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`"
4952 _inc_extra
="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
4954 _def_polyp
='#undef USE_POLYP'
4955 _noaomodules
="polyp $_noaomodules"
4960 if test "$_jack" = auto
; then
4964 #include <jack/jack.h>
4965 int main(void) { jack_client_new("test"); return 0; }
4967 if cc_check
-ljack ; then
4968 _libs_mplayer
="$_libs_mplayer -ljack"
4969 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
4970 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
4971 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
4977 if test "$_jack" = yes ; then
4978 _def_jack
='#define USE_JACK 1'
4979 _aosrc
="$_aosrc ao_jack.c"
4980 _aomodules
="jack $_aomodules"
4982 _noaomodules
="jack $_noaomodules"
4987 if test "$_openal" = auto
; then
4991 #include <OpenAL/al.h>
4996 alSourceQueueBuffers(0, 0, 0);
4997 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
5001 for I
in "-lopenal" "-framework OpenAL" ; do
5002 cc_check
$I && _openal
=yes && break
5003 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5005 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
5007 if test "$_openal" = yes ; then
5008 _def_openal
='#define USE_OPENAL 1'
5009 _aosrc
="$_aosrc ao_openal.c"
5010 _aomodules
="openal $_aomodules"
5012 _noaomodules
="openal $_noaomodules"
5016 echocheck
"ALSA audio"
5017 if test "$_alsa" != no
; then
5020 #include <sys/asoundlib.h>
5021 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5022 #error "alsa version != 0.5.x"
5024 int main(void) { return 0; }
5026 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5029 #include <sys/asoundlib.h>
5030 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5031 #error "alsa version != 0.9.x"
5033 int main(void) { return 0; }
5035 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5037 #include <alsa/asoundlib.h>
5038 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5039 #error "alsa version != 0.9.x"
5041 int main(void) { return 0; }
5043 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5046 #include <sys/asoundlib.h>
5047 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5048 #error "alsa version != 1.0.x"
5050 int main(void) { return 0; }
5052 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5054 #include <alsa/asoundlib.h>
5055 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5056 #error "alsa version != 1.0.x"
5058 int main(void) { return 0; }
5060 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5062 _def_alsa5
='#undef HAVE_ALSA5'
5063 _def_alsa9
='#undef HAVE_ALSA9'
5064 _def_alsa1x
='#undef HAVE_ALSA1X'
5065 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5066 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5067 if test "$_alsaver" ; then
5069 if test "$_alsaver" = '0.5.x' ; then
5071 _aosrc
="$_aosrc ao_alsa5.c"
5072 _aomodules
="alsa5 $_aomodules"
5073 _def_alsa5
='#define HAVE_ALSA5 1'
5074 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5075 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5076 elif test "$_alsaver" = '0.9.x-sys' ; then
5078 _aosrc
="$_aosrc ao_alsa.c"
5079 _aomodules
="alsa $_aomodules"
5080 _def_alsa9
='#define HAVE_ALSA9 1'
5081 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5082 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5083 elif test "$_alsaver" = '0.9.x-alsa' ; then
5085 _aosrc
="$_aosrc ao_alsa.c"
5086 _aomodules
="alsa $_aomodules"
5087 _def_alsa9
='#define HAVE_ALSA9 1'
5088 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5089 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5090 elif test "$_alsaver" = '1.0.x-sys' ; then
5092 _aosrc
="$_aosrc ao_alsa.c"
5093 _aomodules
="alsa $_aomodules"
5094 _def_alsa1x
="#define HAVE_ALSA1X 1"
5095 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5096 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5097 elif test "$_alsaver" = '1.0.x-alsa' ; then
5099 _aosrc
="$_aosrc ao_alsa.c"
5100 _aomodules
="alsa $_aomodules"
5101 _def_alsa1x
="#define HAVE_ALSA1X 1"
5102 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5103 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5106 _res_comment
="unknown version"
5108 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5110 _noaomodules
="alsa $_noaomodules"
5115 echocheck
"Sun audio"
5116 if test "$_sunaudio" = auto
; then
5118 #include <sys/types.h>
5119 #include <sys/audioio.h>
5120 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5123 cc_check
&& _sunaudio
=yes
5125 if test "$_sunaudio" = yes ; then
5126 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5127 _aosrc
="$_aosrc ao_sun.c"
5128 _aomodules
="sun $_aomodules"
5130 _def_sunaudio
='#undef USE_SUN_AUDIO'
5131 _noaomodules
="sun $_noaomodules"
5133 echores
"$_sunaudio"
5137 echocheck
"Sun mediaLib"
5138 if test "$_mlib" = auto
; then
5142 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5144 cc_check
-lmlib && _mlib
=yes
5146 if test "$_mlib" = yes ; then
5147 _def_mlib
='#define HAVE_MLIB 1'
5149 _def_mlib
='#undef HAVE_MLIB'
5156 echocheck
"SGI audio"
5157 if test "$_sgiaudio" = auto
; then
5158 # check for SGI audio
5160 #include <dmedia/audio.h>
5161 int main(void) { return 0; }
5164 cc_check
&& _sgiaudio
=yes
5166 if test "$_sgiaudio" = "yes" ; then
5167 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5168 _libs_mplayer
="$_libs_mplayer -laudio"
5169 _aosrc
="$_aosrc ao_sgi.c"
5170 _aomodules
="sgi $_aomodules"
5172 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5173 _noaomodules
="sgi $_noaomodules"
5175 echores
"$_sgiaudio"
5179 echocheck
"VCD support"
5180 if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32
; then
5181 _inputmodules
="vcd $_inputmodules"
5182 _def_vcd
='#define HAVE_VCD 1'
5185 _def_vcd
='#undef HAVE_VCD'
5186 _noinputmodules
="vcd $_noinputmodules"
5187 _res_comment
="not supported on this OS"
5195 if test "$_dvdread_internal" = auto
; then
5196 _dvdread_internal
=no
5197 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5198 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5199 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5200 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5201 _dvdread_internal
=yes
5203 _res_comment
="internal"
5205 elif test "$_dvdread" = auto
; then
5207 if test "$_dl" = yes; then
5209 #include <inttypes.h>
5210 #include <dvdread/dvd_reader.h>
5211 #include <dvdread/ifo_types.h>
5212 #include <dvdread/ifo_read.h>
5213 #include <dvdread/nav_read.h>
5214 int main(void) { return 0; }
5216 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5217 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5221 if test "$_dvdread_internal" = yes; then
5222 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5223 _def_dvdread
='#define USE_DVDREAD 1'
5224 _inputmodules
="dvdread(internal) $_inputmodules"
5226 elif test "$_dvdread" = yes; then
5227 _def_dvdread
='#define USE_DVDREAD 1'
5229 _ld_extra
="$_ld_extra -ldvdread"
5230 _inputmodules
="dvdread(external) $_inputmodules"
5231 _res_comment
="external"
5233 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5234 _def_dvdread
='#undef USE_DVDREAD'
5235 _noinputmodules
="dvdread $_noinputmodules"
5240 echocheck
"internal libdvdcss"
5241 if test "$_libdvdcss_internal" = auto
; then
5242 _libdvdcss_internal
=no
5243 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5245 if test "$_libdvdcss_internal" = yes ; then
5246 if linux || netbsd || openbsd || bsdos
; then
5247 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5248 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5250 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5252 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5253 _ld_extra
="$_ld_extra -framework IOKit"
5255 _inputmodules
="libdvdcss(internal) $_inputmodules"
5258 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5260 echores
"$_libdvdcss_internal"
5263 echocheck
"cdparanoia"
5264 if test "$_cdparanoia" = auto
; then
5266 #include <cdda_interface.h>
5267 #include <cdda_paranoia.h>
5268 // This need a better test. How ?
5270 void *test = cdda_verbose_set;
5271 return test == (void *)1;
5275 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5276 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5277 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5280 if test "$_cdparanoia" = yes ; then
5282 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5283 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5285 echores
"$_cdparanoia"
5289 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5292 #include <cdio/version.h>
5293 #include <cdio/cdda.h>
5294 #include <cdio/paranoia.h>
5297 void *test = cdda_verbose_set;
5298 printf("%s\n", CDIO_VERSION);
5299 return test == (void *)1;
5304 for _ld_tmp
in "" "-lwinmm" ; do
5305 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5306 cc_check
$_ld_tmp $_ld_lm \
5307 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5309 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5310 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5311 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5312 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5313 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5316 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5318 _def_libcdio
='#define HAVE_LIBCDIO'
5319 _def_havelibcdio
='yes'
5321 if test "$_cdparanoia" = yes ; then
5322 _res_comment
="using cdparanoia"
5324 _def_libcdio
='#undef HAVE_LIBCDIO'
5325 _def_havelibcdio
='no'
5329 if test "$_cdda" = yes ; then
5330 test $_cddb = auto
&& test $_network = yes && not darwin
&& _cddb
=yes
5331 _def_cdparanoia
='#define HAVE_CDDA'
5332 _inputmodules
="cdda $_inputmodules"
5334 _def_cdparanoia
='#undef HAVE_CDDA'
5335 _noinputmodules
="cdda $_noinputmodules"
5338 if test "$_cddb" = yes ; then
5339 _def_cddb
='#define HAVE_CDDB'
5340 _inputmodules
="cddb $_inputmodules"
5343 _def_cddb
='#undef HAVE_CDDB'
5344 _noinputmodules
="cddb $_noinputmodules"
5347 echocheck
"bitmap font support"
5348 if test "$_bitmap_font" = yes ; then
5349 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5351 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5353 echores
"$_bitmap_font"
5356 echocheck
"freetype >= 2.0.9"
5358 # freetype depends on iconv
5359 if test "$_iconv" = no
; then
5361 _res_comment
="iconv support needed"
5364 if test "$_freetype" = auto
; then
5365 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5368 #include <ft2build.h>
5369 #include FT_FREETYPE_H
5370 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5371 #error "Need FreeType 2.0.9 or newer"
5376 FT_Int major=-1,minor=-1,patch=-1;
5377 int err=FT_Init_FreeType(&library);
5379 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5382 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5383 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5384 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5385 (int)major,(int)minor,(int)patch );
5386 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5387 printf("Library and header version mismatch! Fix it in your distribution!\n");
5394 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5399 if test "$_freetype" = yes ; then
5400 _def_freetype
='#define HAVE_FREETYPE'
5401 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5402 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5404 _def_freetype
='#undef HAVE_FREETYPE'
5406 echores
"$_freetype"
5408 if test "$_freetype" = no
; then
5410 _res_comment
="freetype support needed"
5412 echocheck
"fontconfig"
5413 if test "$_fontconfig" = auto
; then
5416 #include <fontconfig/fontconfig.h>
5421 printf("Couldn't initialize fontconfig lib\n");
5429 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5430 _ld_tmp
="-lfontconfig $_ld_tmp"
5431 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5433 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5434 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5435 _ld_tmp
=`$_pkg_config --libs fontconfig`
5436 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5437 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5440 if test "$_fontconfig" = yes ; then
5441 _def_fontconfig
='#define HAVE_FONTCONFIG'
5443 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5445 echores
"$_fontconfig"
5448 echocheck
"SSA/ASS support"
5449 # libass depends on FreeType
5450 if test "$_freetype" = no
; then
5452 _res_comment
="FreeType support needed"
5455 if test "$_ass" = auto
; then
5457 #include <ft2build.h>
5458 #include FT_FREETYPE_H
5459 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5460 #error "Need FreeType 2.1.8 or newer"
5462 int main() { return 0; }
5465 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5466 if test "$_ass" = no
; then
5467 _res_comment
="FreeType >= 2.1.8 needed"
5470 if test "$_ass" = yes ; then
5471 _def_ass
='#define USE_ASS'
5473 _def_ass
='#undef USE_ASS'
5478 echocheck
"fribidi with charsets"
5479 if test "$_fribidi" = auto
; then
5480 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5483 /* workaround for fribidi 0.10.4 and below */
5484 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5485 #include <fribidi/fribidi.h>
5488 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5489 printf("Fribidi headers are not consistents with the library!\n");
5496 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5501 if test "$_fribidi" = yes ; then
5502 _def_fribidi
='#define USE_FRIBIDI'
5503 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5504 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5506 _def_fribidi
='#undef USE_FRIBIDI'
5512 if test "$_enca" = auto
; then
5519 langs = enca_get_languages(&langcnt);
5524 cc_check
-lenca $_ld_lm && _enca
=yes
5526 if test "$_enca" = yes ; then
5527 _def_enca
='#define HAVE_ENCA 1'
5528 _ld_extra
="$_ld_extra -lenca"
5530 _def_enca
='#undef HAVE_ENCA'
5538 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5541 cc_check
-lz && _zlib
=yes
5542 if test "$_zlib" = yes ; then
5543 _def_zlib
='#define HAVE_ZLIB 1'
5544 _ld_extra
="$_ld_extra -lz"
5546 _def_zlib
='#undef HAVE_ZLIB'
5547 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
5548 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
5554 if test "$_rtc" = auto
; then
5556 #include <sys/ioctl.h>
5558 #include <linux/rtc.h>
5561 #define RTC_PIE_ON RTCIO_PIE_ON
5563 int main(void) { return RTC_PIE_ON; }
5566 cc_check
&& _rtc
=yes
5569 if test "$_rtc" = yes ; then
5570 _def_rtc
='#define HAVE_RTC 1'
5572 _def_rtc
='#undef HAVE_RTC'
5577 echocheck
"liblzo2 support"
5578 if test "$_liblzo" = auto
; then
5581 #include <lzo/lzo1x.h>
5582 int main(void) { lzo_init();return 0; }
5584 cc_check
-llzo2 && _liblzo
=yes
5586 if test "$_liblzo" = yes ; then
5587 _def_liblzo
='#define USE_LIBLZO 1'
5588 _ld_extra
="$_ld_extra -llzo2"
5589 _codecmodules
="liblzo $_codecmodules"
5591 _def_liblzo
='#undef USE_LIBLZO'
5592 _nocodecmodules
="liblzo $_nocodecmodules"
5597 echocheck
"mad support"
5598 if test "$_mad" = auto
; then
5602 int main(void) { return 0; }
5604 cc_check
-lmad && _mad
=yes
5606 if test "$_mad" = yes ; then
5607 _def_mad
='#define USE_LIBMAD 1'
5608 _ld_extra
="$_ld_extra -lmad"
5609 _codecmodules
="libmad $_codecmodules"
5611 _def_mad
='#undef USE_LIBMAD'
5612 _nocodecmodules
="libmad $_nocodecmodules"
5617 if test "$_twolame" = auto
; then
5619 #include <twolame.h>
5620 int main(void) { twolame_init(); return 0; }
5623 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5625 if test "$_twolame" = yes ; then
5626 _def_twolame
='#define HAVE_TWOLAME 1'
5627 _libs_mencoder
="$_libs_mencoder -ltwolame"
5628 _codecmodules
="twolame $_codecmodules"
5630 _def_twolame
='#undef HAVE_TWOLAME'
5631 _nocodecmodules
="twolame $_nocodecmodules"
5636 if test "$_toolame" = auto
; then
5638 if test "$_twolame" = yes ; then
5639 _res_comment
="disabled by twolame"
5642 #include <toolame.h>
5643 int main(void) { toolame_init(); return 0; }
5645 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5648 if test "$_toolame" = yes ; then
5649 _def_toolame
='#define HAVE_TOOLAME 1'
5650 _libs_mencoder
="$_libs_mencoder -ltoolame"
5651 _codecmodules
="toolame $_codecmodules"
5653 _def_toolame
='#undef HAVE_TOOLAME'
5654 _nocodecmodules
="toolame $_nocodecmodules"
5656 if test "$_toolamedir" ; then
5657 _res_comment
="using $_toolamedir"
5661 echocheck
"OggVorbis support"
5662 if test "$_tremor_internal" = yes; then
5664 elif test "$_tremor_external" = auto
; then
5667 #include <tremor/ivorbiscodec.h>
5668 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5670 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5672 if test "$_libvorbis" = auto
; then
5675 #include <vorbis/codec.h>
5676 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5678 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5680 if test "$_tremor_internal" = yes ; then
5682 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5683 _def_tremor
='#define TREMOR 1'
5684 _codecmodules
="tremor(internal) $_codecmodules"
5685 _res_comment
="internal Tremor"
5686 if test "$_tremor_low" = yes ; then
5687 _res_comment
="internal low accuracy Tremor"
5689 elif test "$_tremor_external" = yes ; then
5691 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5692 _def_tremor
='#define TREMOR 1'
5693 _codecmodules
="tremor(external) $_codecmodules"
5694 _res_comment
="external Tremor"
5695 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5696 elif test "$_libvorbis" = yes ; then
5698 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5699 _codecmodules
="libvorbis $_codecmodules"
5700 _res_comment
="libvorbis"
5701 _ld_extra
="$_ld_extra -lvorbis -logg"
5704 _nocodecmodules
="libvorbis $_nocodecmodules"
5706 if test "$_libvorbis" = no
; then
5707 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
5708 _libavmuxers
=`echo $_libavmuxers | sed -e s/OGG_MUXER// `
5712 echocheck
"libspeex (version >= 1.1 required)"
5713 if test "$_speex" = auto
; then
5716 #include <speex/speex.h>
5720 speex_decode_int(dec, &bits, dec);
5723 cc_check
-lspeex $_ld_lm && _speex
=yes
5725 if test "$_speex" = yes ; then
5726 _def_speex
='#define HAVE_SPEEX 1'
5727 _ld_extra
="$_ld_extra -lspeex"
5728 _codecmodules
="speex $_codecmodules"
5730 _def_speex
='#undef HAVE_SPEEX'
5731 _nocodecmodules
="speex $_nocodecmodules"
5735 echocheck
"OggTheora support"
5736 if test "$_theora" = auto
; then
5739 #include <theora/theora.h>
5743 /* theora is in flux, make sure that all interface routines and
5744 * datatypes exist and work the way we expect it, so we don't break
5754 theora_info_init (&inf);
5755 theora_comment_init (&tc);
5759 /* we don't want to execute this kind of nonsense; just for making sure
5760 * that compilation works... */
5761 memset(&op, 0, sizeof(op));
5762 r = theora_decode_header (&inf, &tc, &op);
5763 r = theora_decode_init (&st, &inf);
5764 t = theora_granule_time (&st, op.granulepos);
5765 r = theora_decode_packetin (&st, &op);
5766 r = theora_decode_YUVout (&st, &yuv);
5772 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5773 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5774 && _theora
=yes && break
5776 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5777 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5778 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5779 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5783 if test "$_theora" = yes ; then
5784 _def_theora
='#define HAVE_OGGTHEORA 1'
5785 _codecmodules
="libtheora $_codecmodules"
5786 # when --enable-theora is forced, we'd better provide a probably sane
5787 # $_ld_theora than nothing
5788 test -z "$_ld_theora" && _ld_extra
="$_ld_extra -ltheora -logg"
5790 _def_theora
='#undef HAVE_OGGTHEORA'
5791 _nocodecmodules
="libtheora $_nocodecmodules"
5795 echocheck
"mp3lib support"
5796 if test "$_mp3lib" = yes ; then
5797 _def_mp3lib
='#define USE_MP3LIB 1'
5798 _codecmodules
="mp3lib $_codecmodules"
5800 _def_mp3lib
='#undef USE_MP3LIB'
5801 _nocodecmodules
="mp3lib $_nocodecmodules"
5805 echocheck
"liba52 support"
5806 if test "$_liba52" = yes ; then
5807 _def_liba52
='#define USE_LIBA52 1'
5808 _codecmodules
="liba52 $_codecmodules"
5810 _def_liba52
='#undef USE_LIBA52'
5811 _nocodecmodules
="liba52 $_nocodecmodules"
5816 echocheck
"libmpeg2 support"
5817 if test "$_libmpeg2" = yes ; then
5818 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5819 _codecmodules
="libmpeg2 $_codecmodules"
5821 _def_libmpeg2
='#undef USE_LIBMPEG2'
5822 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5824 echores
"$_libmpeg2"
5826 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5827 if test "$_musepack" = auto
; then
5830 #include <mpcdec/mpcdec.h>
5832 mpc_streaminfo info;
5833 mpc_decoder decoder;
5834 mpc_decoder_set_streaminfo(&decoder, &info);
5835 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5838 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5840 if test "$_musepack" = yes ; then
5841 _def_musepack
='#define HAVE_MUSEPACK 1'
5842 _ld_extra
="$_ld_extra -lmpcdec"
5843 _codecmodules
="musepack $_codecmodules"
5845 _def_musepack
='#undef HAVE_MUSEPACK'
5846 _nocodecmodules
="musepack $_nocodecmodules"
5848 echores
"$_musepack"
5851 echocheck
"FAAC (AAC encoder) support"
5852 if test "$_faac" = auto
; then
5854 #include <inttypes.h>
5856 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5859 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5860 cc_check
-O4 $_ld_faac $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
5863 if test "$_faac" = yes ; then
5864 _def_faac
="#define HAVE_FAAC 1"
5865 if echo $_libavencoders |
grep -q FAAC
; then
5867 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
5868 _libs_mplayer
="$_libs_mplayer $_ld_faac"
5871 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
5873 _codecmodules
="faac $_codecmodules"
5875 _def_faac
="#undef HAVE_FAAC"
5876 _nocodecmodules
="faac $_nocodecmodules"
5877 _libavencoders
=`echo $_libavencoders | sed -e s/LIBFAAC_ENCODER// `
5879 echores
"$_faac (in libavcodec: $_lavc_faac)"
5882 echocheck
"FAAD2 (AAC) support"
5883 if test "$_faad_internal" = auto
; then
5884 if x86_32
&& test cc_vendor
=gnu
; then
5886 3.1*|
3.2) # ICE/insn with these versions
5888 _res_comment
="broken gcc"
5897 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
5901 #ifndef FAAD_MIN_STREAMSIZE
5902 #error Too old version
5904 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5906 cc_check
-lfaad $_ld_lm && _faad_external
=yes
5909 if test "$_faad_internal" = yes ; then
5910 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
5912 _res_comment
="internal floating-point"
5913 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
5914 elif test "$_faad_external" = yes ; then
5916 _ld_extra
="$_ld_extra -lfaad"
5918 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
5922 if test "$_faad" = yes ; then
5923 _def_faad
='#define HAVE_FAAD 1'
5924 _codecmodules
="faad2 $_codecmodules"
5926 _def_faad
='#undef HAVE_FAAD'
5927 _nocodecmodules
="faad2 $_nocodecmodules"
5932 echocheck
"LADSPA plugin support"
5933 if test "$_ladspa" = auto
; then
5938 const LADSPA_Descriptor *ld = NULL;
5943 cc_check
&& _ladspa
=yes
5945 if test "$_ladspa" = yes; then
5946 _def_ladspa
="#define HAVE_LADSPA"
5947 _afsrc
="$_afsrc af_ladspa.c"
5948 _afmodules
="ladspa $_afmodules"
5950 _def_ladspa
="#undef HAVE_LADSPA"
5951 _noafmodules
="ladspa $_noafmodules"
5956 if test -z "$_codecsdir" ; then
5957 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
5958 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5959 if test -d "$dir" ; then
5965 # Fall back on default directory.
5966 if test -z "$_codecsdir" ; then
5967 _codecsdir
="$_libdir/codecs"
5968 mingw32
&& _codecsdir
="codecs"
5972 echocheck
"Win32 codecs"
5973 if test "$_win32dll" = auto
; then
5975 if x86_32
&& not qnx
; then
5979 if test "$_win32dll" = yes ; then
5980 _def_win32dll
='#define USE_WIN32DLL 1'
5981 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
5982 _res_comment
="using $_win32codecsdir"
5984 _def_win32_loader
='#define WIN32_LOADER 1'
5986 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
5987 _res_comment
="using native windows"
5989 _codecmodules
="win32 $_codecmodules"
5991 _def_win32dll
='#undef USE_WIN32DLL'
5992 _def_win32_loader
='#undef WIN32_LOADER'
5993 _nocodecmodules
="win32 $_nocodecmodules"
5995 echores
"$_win32dll"
5998 echocheck
"XAnim codecs"
5999 if test "$_xanim" = auto
; then
6001 _res_comment
="dynamic loader support needed"
6002 if test "$_dl" = yes ; then
6006 if test "$_xanim" = yes ; then
6007 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6008 _def_xanim
='#define USE_XANIM 1'
6009 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6010 _codecmodules
="xanim $_codecmodules"
6011 _res_comment
="using $_xanimcodecsdir"
6013 _def_xanim
='#undef USE_XANIM'
6014 _def_xanim_path
='#undef XACODEC_PATH'
6015 _nocodecmodules
="xanim $_nocodecmodules"
6020 echocheck
"RealPlayer codecs"
6021 if test "$_real" = auto
; then
6023 _res_comment
="dynamic loader support needed"
6024 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6025 (linux || freebsd || netbsd || win32 || darwin
) ; then
6029 if test "$_real" = yes ; then
6030 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6031 _def_real
='#define USE_REALCODECS 1'
6032 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6033 _codecmodules
="real $_codecmodules"
6034 _res_comment
="using $_realcodecsdir"
6036 _def_real
='#undef USE_REALCODECS'
6037 _def_real_path
="#undef REALCODEC_PATH"
6038 _nocodecmodules
="real $_nocodecmodules"
6043 echocheck
"LIVE555 Streaming Media libraries"
6044 if test "$_live" = auto
&& test "$_network" = yes ; then
6045 cat > $TMPCPP << EOF
6046 #include <liveMedia.hh>
6047 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6048 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6054 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6055 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6056 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6057 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6058 $_livelibdir/groupsock/libgroupsock.a \
6059 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6060 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6061 $_ld_extra -lstdc++" \
6062 _inc_extraxx
="-I$_livelibdir/liveMedia/include \
6063 -I$_livelibdir/UsageEnvironment/include \
6064 -I$_livelibdir/BasicUsageEnvironment/include \
6065 -I$_livelibdir/groupsock/include" && \
6068 if test "$_live" != yes ; then
6069 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6074 if test "$_live" = yes && test "$_network" = yes ; then
6075 _res_comment
="using $_livelibdir"
6076 _def_live
='#define STREAMING_LIVE555 1'
6077 _inputmodules
="live555 $_inputmodules"
6078 elif test "$_live_dist" = yes && test "$_network" = yes ; then
6079 _res_comment
="using distribution version"
6081 _def_live
='#define STREAMING_LIVE555 1'
6082 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6083 _inc_extraxx
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6084 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6085 _inputmodules
="live555 $_inputmodules"
6087 _def_live
='#undef STREAMING_LIVE555'
6088 _noinputmodules
="live555 $_noinputmodules"
6093 echocheck
"FFmpeg libavutil"
6094 if test "$_libavutil_a" = auto
; then
6095 if test -d libavutil
; then
6097 _res_comment
="static"
6099 die
"MPlayer will not compile without libavutil in the source tree."
6101 elif test "$_libavutil_so" = auto
; then
6104 #include <ffmpeg/common.h>
6105 int main(void) { ff_gcd(1,1); return 0; }
6107 if $_pkg_config --exists libavutil
; then
6108 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6109 _ld_tmp
=`$_pkg_config --libs libavutil`
6110 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6111 && _libavutil_so
=yes
6112 elif cc_check
-lavutil $_ld_lm ; then
6113 _ld_extra
="$_ld_extra -lavutil"
6115 _res_comment
="using libavutil.so, but static libavutil is recommended"
6119 _def_libavutil
='#undef USE_LIBAVUTIL'
6120 _def_libavutil_a
='#undef USE_LIBAVUTIL_A'
6121 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6122 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
6123 test "$_libavutil" = yes && _def_libavutil
='#define USE_LIBAVUTIL 1'
6124 test "$_libavutil_a" = yes && _def_libavutil_a
='#define USE_LIBAVUTIL_A 1'
6125 test "$_libavutil_so" = yes && _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6126 # neither static nor shared libavutil is available, but it is mandatory ...
6127 if test "$_libavutil" = no
; then
6128 die
"You need static or shared libavutil, MPlayer will not compile without!"
6130 echores
"$_libavutil"
6132 echocheck
"FFmpeg libavcodec"
6133 if test "$_libavcodec_a" = auto
; then
6135 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6137 _res_comment
="static"
6139 elif test "$_libavcodec_so" = auto
; then
6141 _res_comment
="libavcodec.so is discouraged over static libavcodec"
6143 #include <ffmpeg/avcodec.h>
6144 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6146 if $_pkg_config --exists libavcodec
; then
6147 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6148 _ld_tmp
=`$_pkg_config --libs libavcodec`
6149 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6150 && _libavcodec_so
=yes
6151 elif cc_check
-lavcodec $_ld_lm ; then
6152 _ld_extra
="$_ld_extra -lavcodec"
6154 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6158 _def_libavcodec
='#undef USE_LIBAVCODEC'
6159 _def_libavcodec_a
='#undef USE_LIBAVCODEC_A'
6160 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6161 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
6162 test "$_libavcodec" = yes && _def_libavcodec
='#define USE_LIBAVCODEC 1'
6163 test "$_libavcodec_a" = yes && _def_libavcodec_a
='#define USE_LIBAVCODEC_A 1'
6164 test "$_libavcodec_so" = yes && _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6165 test "$_libavcodec_mpegaudio_hp" = yes \
6166 && _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6167 if test "$_libavcodec_a" = yes ; then
6168 _codecmodules
="libavcodec $_codecmodules"
6169 elif test "$_libavcodec_so" = yes ; then
6170 _codecmodules
="libavcodec.so $_codecmodules"
6172 _nocodecmodules
="libavcodec $_nocodecmodules"
6174 echores
"$_libavcodec"
6176 echocheck
"FFmpeg libavformat"
6177 if test "$_libavformat_a" = auto
; then
6179 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6181 _res_comment
="static"
6183 elif test "$_libavformat_so" = auto
; then
6186 #include <ffmpeg/avformat.h>
6187 #include <ffmpeg/opt.h>
6188 int main(void) { av_alloc_format_context(); return 0; }
6190 if $_pkg_config --exists libavformat
; then
6191 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6192 _ld_tmp
=`$_pkg_config --libs libavformat`
6193 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6194 && _libavformat_so
=yes
6195 elif cc_check
$_ld_lm -lavformat ; then
6196 _ld_extra
="$_ld_extra -lavformat"
6198 _res_comment
="using libavformat.so, but static libavformat is recommended"
6202 _def_libavformat
='#undef USE_LIBAVFORMAT'
6203 _def_libavformat_a
='#undef USE_LIBAVFORMAT_A'
6204 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6205 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
6206 test "$_libavformat" = yes && _def_libavformat
='#define USE_LIBAVFORMAT 1'
6207 test "$_libavformat_a" = yes && _def_libavformat_a
='#define USE_LIBAVFORMAT_A 1'
6208 test "$_libavformat_so" = yes \
6209 && _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6210 echores
"$_libavformat"
6212 echocheck
"FFmpeg libpostproc"
6213 if test "$_libpostproc_a" = auto
; then
6215 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6216 _libpostproc_a
='yes'
6217 _res_comment
="static"
6219 elif test "$_libpostproc_so" = auto
; then
6222 #define USE_LIBPOSTPROC 1
6223 #include <inttypes.h>
6224 #include <postproc/postprocess.h>
6225 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6227 if cc_check
-lpostproc $_ld_lm ; then
6228 _ld_extra
="$_ld_extra -lpostproc"
6230 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6234 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6235 _def_libpostproc_a
='#undef USE_LIBPOSTPROC_A'
6236 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6237 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
6238 test "$_libpostproc" = yes && _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6239 test "$_libpostproc_a" = yes && _def_libpostproc_a
='#define USE_LIBPOSTPROC_A 1'
6240 test "$_libpostproc_so" = yes \
6241 && _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6242 echores
"$_libpostproc"
6245 echocheck
"md5sum support"
6246 if test "$_md5sum" = yes; then
6247 _def_md5sum
="#define HAVE_MD5SUM"
6248 _vosrc
="$_vosrc vo_md5sum.c"
6249 _vomodules
="md5sum $_vomodules"
6251 _def_md5sum
="#undef HAVE_MD5SUM"
6252 _novomodules
="md5sum $_novomodules"
6256 echocheck
"libamr narrowband"
6257 if test "$_libamr_nb" = auto
; then
6260 #include <amrnb/interf_dec.h>
6261 int main(void) { Speech_Decode_Frame_init(); return 0; }
6263 cc_check
-lamrnb && _libamr_nb
=yes
6264 if test "$_libavcodec_a" != yes ; then
6266 _res_comment
="libavcodec (static) is required by libamr_nb, sorry"
6269 if test "$_libamr_nb" = yes ; then
6271 _ld_extra
="$_ld_extra -lamrnb"
6272 _def_libamr
='#define CONFIG_LIBAMR 1'
6273 _def_libamr_nb
='#define CONFIG_LIBAMR_NB 1'
6274 _codecmodules
="libamr_nb $_codecmodules"
6276 _def_libamr_nb
='#undef CONFIG_LIBAMR_NB'
6277 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_NB_DECODER// `
6278 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_NB_ENCODER// `
6279 _nocodecmodules
="libamr_nb $_nocodecmodules"
6281 echores
"$_libamr_nb"
6284 echocheck
"libamr wideband"
6285 if test "$_libamr_wb" = auto
; then
6288 #include <amrwb/dec_if.h>
6289 int main(void) { D_IF_init(); return 0; }
6291 cc_check
-lamrwb && _libamr_wb
=yes
6292 if test "$_libavcodec_a" != yes ; then
6294 _res_comment
="libavcodec (static) is required by libamr_wb, sorry"
6297 if test "$_libamr_wb" = yes ; then
6299 _ld_extra
="$_ld_extra -lamrwb"
6300 _def_libamr
='#define CONFIG_LIBAMR 1'
6301 _def_libamr_wb
='#define CONFIG_LIBAMR_WB 1'
6302 _codecmodules
="libamr_wb $_codecmodules"
6304 _def_libamr_wb
='#undef CONFIG_LIBAMR_WB'
6305 _nocodecmodules
="libamr_wb $_nocodecmodules"
6306 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_WB_DECODER// `
6307 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_WB_ENCODER// `
6309 echores
"$_libamr_wb"
6311 echocheck
"libdv-0.9.5+"
6312 if test "$_libdv" = auto
; then
6315 #include <libdv/dv.h>
6316 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6318 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6320 if test "$_libdv" = yes ; then
6321 _def_libdv
='#define HAVE_LIBDV095 1'
6322 _ld_extra
="$_ld_extra -ldv"
6323 _codecmodules
="libdv $_codecmodules"
6325 _def_libdv
='#undef HAVE_LIBDV095'
6326 _nocodecmodules
="libdv $_nocodecmodules"
6331 if test "$_zr" = auto
; then
6332 #36067's seem to identify themselves as 36057PQC's, so the line
6333 #below should work for 36067's and 36057's.
6334 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
6340 if test "$_zr" = yes ; then
6341 if test "$_libavcodec_a" = yes ; then
6342 _def_zr
='#define HAVE_ZR 1'
6343 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6344 _vomodules
="zr zr2 $_vomodules"
6346 _res_comment
="libavcodec (static) is required by zr, sorry"
6347 _novomodules
="zr $_novomodules"
6348 _def_zr
='#undef HAVE_ZR'
6351 _def_zr
='#undef HAVE_ZR'
6352 _novomodules
="zr zr2 $_novomodules"
6357 if test "$_bl" = yes ; then
6358 _def_bl
='#define HAVE_BL 1'
6359 _vosrc
="$_vosrc vo_bl.c"
6360 _vomodules
="bl $_vomodules"
6362 _def_bl
='#undef HAVE_BL'
6363 _novomodules
="bl $_novomodules"
6369 if test "$_xvid" = auto
; then
6373 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6375 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6376 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6380 if test "$_xvid" = yes ; then
6381 _def_xvid
='#define HAVE_XVID4 1'
6382 _codecmodules
="xvid $_codecmodules"
6384 _def_xvid
='#undef HAVE_XVID4'
6385 _nocodecmodules
="xvid $_nocodecmodules"
6386 _libavencoders
=`echo $_libavencoders | sed -e s/LIBXVID_ENCODER// `
6390 if test "$_xvid" = yes ; then
6391 echocheck
"XviD two pass plugin"
6394 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6398 _def_lavc_xvid
='#define CONFIG_XVID 1'
6401 _def_lavc_xvid
='#undef CONFIG_XVID'
6403 echores
"$_lavc_xvid"
6408 if test "$_x264" = auto
; then
6410 #include <inttypes.h>
6413 #error We do not support old versions of x264. Get the latest from SVN.
6415 int main(void) { x264_encoder_open((void*)0); return 0; }
6418 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6419 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6423 if test "$_x264" = yes ; then
6425 _def_x264
='#define HAVE_X264 1'
6426 _codecmodules
="x264 $_codecmodules"
6427 if echo $_libavencoders |
grep -q X264
; then
6429 _def_lavc_x264
='#define CONFIG_X264 1'
6430 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6433 _def_lavc_x264
='#undef CONFIG_X264'
6438 _def_x264
='#undef HAVE_X264'
6439 _def_lavc_x264
='#undef CONFIG_X264'
6440 _nocodecmodules
="x264 $_nocodecmodules"
6441 _libavencoders
=`echo $_libavencoders | sed -e s/LIBX264_ENCODER// `
6443 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6447 if test "$_nut" = auto
; then
6451 #include <inttypes.h>
6453 int main(void) { (void)nut_error(0); return 0; }
6456 cc_check
-lnut && _nut
=yes
6459 if test "$_nut" = yes ; then
6460 _def_nut
='#define HAVE_LIBNUT 1'
6461 _ld_extra
="$_ld_extra -lnut"
6463 _def_nut
='#undef HAVE_LIBNUT'
6464 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
6469 # mencoder requires (optional) those libs: libmp3lame
6470 if test "$_mencoder" != no
; then
6472 echocheck
"libmp3lame (for mencoder)"
6474 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6475 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6477 #include <lame/lame.h>
6478 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; }
6480 # Note: libmp3lame usually depends on vorbis
6481 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6482 if test "$_mp3lame" = yes ; then
6483 _def_mp3lame
="#define HAVE_MP3LAME"
6484 _ld_mp3lame
=-lmp3lame
6485 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6487 #include <lame/lame.h>
6488 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6490 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6492 #include <lame/lame.h>
6493 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6495 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6496 if echo $_libavencoders |
grep -q MP3LAME
; then
6498 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6499 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6502 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6505 _def_mp3lame
='#undef HAVE_MP3LAME'
6506 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
6512 echocheck
"mencoder"
6513 _mencoder_flag
='#undef HAVE_MENCODER'
6514 if test "$_mencoder" = yes ; then
6515 _mencoder_flag
='#define HAVE_MENCODER'
6516 _def_muxers
='#define CONFIG_MUXERS 1'
6518 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6519 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6522 echores
"$_mencoder"
6524 echocheck
"fastmemcpy"
6525 # fastmemcpy check is done earlier with tests of CPU & binutils features
6526 if test "$_fastmemcpy" = yes ; then
6527 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6529 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6531 echores
"$_fastmemcpy"
6533 echocheck
"UniquE RAR File Library"
6534 if test "$_unrarlib" = yes ; then
6535 _def_unrarlib
='#define USE_UNRARLIB 1'
6537 _def_unrarlib
='#undef USE_UNRARLIB'
6539 echores
"$_unrarlib"
6541 echocheck
"TV interface"
6542 if test "$_tv" = yes ; then
6543 _def_tv
='#define USE_TV 1'
6544 _inputmodules
="tv $_inputmodules"
6546 _noinputmodules
="tv $_noinputmodules"
6547 _def_tv
='#undef USE_TV'
6553 echocheck
"*BSD BT848 bt8xx header"
6555 for file in "machine/ioctl_bt848.h" \
6556 "dev/bktr/ioctl_bt848.h" \
6557 "dev/video/bktr/ioctl_bt848.h" \
6558 "dev/ic/bt8xx.h" ; do
6560 #include <sys/types.h>
6563 ioctl(0, TVTUNER_GETFREQ, 0);
6569 _ioctl_bt848_h_name
="$file"
6573 if test "$_ioctl_bt848_h" = yes ; then
6574 _def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6575 _res_comment
="using $_ioctl_bt848_h_name"
6577 _def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6579 echores
"$_ioctl_bt848_h"
6581 echocheck
"*BSD ioctl_meteor.h"
6583 for file in "machine/ioctl_meteor.h" \
6584 "dev/bktr/ioctl_meteor.h" \
6585 "dev/video/bktr/ioctl_meteor.h" ; do
6587 #include <sys/types.h>
6590 ioctl(0, METEORSINPUT, 0);
6596 _ioctl_meteor_h_name
="$file"
6600 if test "$_ioctl_meteor_h" = yes ; then
6601 _def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6602 _res_comment
="using $_ioctl_meteor_h_name"
6604 _def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6606 echores
"$_ioctl_meteor_h"
6608 echocheck
"*BSD BrookTree 848 TV interface"
6609 if test "$_tv_bsdbt848" = auto
; then
6611 if test "$_tv" = yes ; then
6613 #include <sys/types.h>
6614 $_def_ioctl_meteor_h_name
6615 $_def_ioctl_bt848_h_name
6616 #ifdef IOCTL_METEOR_H_NAME
6617 #include IOCTL_METEOR_H_NAME
6619 #ifdef IOCTL_BT848_H_NAME
6620 #include IOCTL_BT848_H_NAME
6623 ioctl(0, METEORSINPUT, 0);
6624 ioctl(0, TVTUNER_GETFREQ, 0);
6628 cc_check
&& _tv_bsdbt848
=yes
6631 if test "$_tv_bsdbt848" = yes ; then
6632 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6633 _inputmodules
="tv-bsdbt848 $_inputmodules"
6635 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6636 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6638 echores
"$_tv_bsdbt848"
6642 echocheck
"Video 4 Linux TV interface"
6643 if test "$_tv_v4l1" = auto
; then
6645 if test "$_tv" = yes && linux
; then
6648 #include <linux/videodev.h>
6649 int main(void) { return 0; }
6651 cc_check
&& _tv_v4l1
=yes
6654 if test "$_tv_v4l1" = yes ; then
6657 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6658 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6659 _inputmodules
="tv-v4l $_inputmodules"
6661 _noinputmodules
="tv-v4l1 $_noinputmodules"
6662 _def_tv_v4l
='#undef HAVE_TV_V4L'
6667 echocheck
"Video 4 Linux 2 TV interface"
6668 if test "$_tv_v4l2" = auto
; then
6670 if test "$_tv" = yes && linux
; then
6673 #include <linux/types.h>
6674 #include <linux/videodev2.h>
6675 int main(void) { return 0; }
6677 cc_check
&& _tv_v4l2
=yes
6680 if test "$_tv_v4l2" = yes ; then
6683 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6684 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6685 _inputmodules
="tv-v4l2 $_inputmodules"
6687 _noinputmodules
="tv-v4l2 $_noinputmodules"
6688 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6692 echocheck
"TV teletext interface"
6693 if test "$_tv_teletext" = auto
; then
6695 if test linux
; then
6698 #include <libzvbi.h>
6699 int main(void) { return 0; }
6701 cc_check
&& _tv_teletext
=yes
6704 if test "$_tv_teletext" = yes ; then
6705 _def_tv_teletext
='#define HAVE_TV_TELETEXT 1'
6706 _ld_extra
="$_ld_extra -lzvbi"
6707 _inputmodules
="tv-teletext $_inputmodules"
6709 _noinputmodules
="tv-teletext $_noinputmodules"
6710 _def_tv_teletext
='#undef HAVE_TV_TELETEXT'
6712 echores
"$_tv_teletext"
6715 echocheck
"Radio interface"
6716 if test "$_radio" = yes ; then
6717 _def_radio
='#define USE_RADIO 1'
6718 _inputmodules
="radio $_inputmodules"
6719 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6722 if test "$_radio_capture" = yes ; then
6724 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6726 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6729 _noinputmodules
="radio $_noinputmodules"
6730 _def_radio
='#undef USE_RADIO'
6731 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6735 echocheck
"Capture for Radio interface"
6736 echores
"$_radio_capture"
6738 echocheck
"Video 4 Linux 2 Radio interface"
6739 if test "$_radio_v4l2" = auto
; then
6741 if test "$_radio" = yes && linux
; then
6744 #include <linux/types.h>
6745 #include <linux/videodev2.h>
6746 int main(void) { return 0; }
6748 cc_check
&& _radio_v4l2
=yes
6751 if test "$_radio_v4l2" = yes ; then
6752 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6754 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6756 echores
"$_radio_v4l2"
6758 echocheck
"Video 4 Linux Radio interface"
6759 if test "$_radio_v4l" = auto
; then
6761 if test "$_radio" = yes && linux
; then
6764 #include <linux/videodev.h>
6765 int main(void) { return 0; }
6767 cc_check
&& _radio_v4l
=yes
6770 if test "$_radio_v4l" = yes ; then
6771 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6773 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6775 echores
"$_radio_v4l"
6777 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6778 echocheck
"*BSD BrookTree 848 Radio interface"
6781 #include <sys/types.h>
6782 $_def_ioctl_bt848_h_name
6783 #ifdef IOCTL_BT848_H_NAME
6784 #include IOCTL_BT848_H_NAME
6787 ioctl(0, RADIO_GETFREQ, 0);
6791 cc_check
&& _radio_bsdbt848
=yes
6792 echores
"$_radio_bsdbt848"
6793 fi #if bsd && radio && radio_bsdbt848
6795 if test "$_radio_bsdbt848" = yes ; then
6796 _def_radio_bsdbt848
='#define HAVE_RADIO_BSDBT848 1'
6798 _def_radio_bsdbt848
='#undef HAVE_RADIO_BSDBT848'
6801 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6802 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6803 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6806 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6807 if test "$_pvr" = auto
; then
6809 if test "$_tv_v4l2" = yes && linux
; then
6812 #include <inttypes.h>
6813 #include <linux/types.h>
6814 #include <linux/videodev2.h>
6815 int main(void) { struct v4l2_ext_controls ext; return 0; }
6817 cc_check
&& _pvr
=yes
6820 if test "$_pvr" = yes ; then
6821 _def_pvr
='#define HAVE_PVR 1'
6822 _inputmodules
="pvr $_inputmodules"
6824 _noinputmodules
="pvr $_noinputmodules"
6825 _def_pvr
='#undef HAVE_PVR'
6830 echocheck
"audio select()"
6831 if test "$_select" = no
; then
6832 _def_select
='#undef HAVE_AUDIO_SELECT'
6833 elif test "$_select" = yes ; then
6834 _def_select
='#define HAVE_AUDIO_SELECT 1'
6840 if not beos
&& test "$_ftp" = yes ; then
6841 _def_ftp
='#define HAVE_FTP 1'
6842 _inputmodules
="ftp $_inputmodules"
6844 _noinputmodules
="ftp $_noinputmodules"
6845 _def_ftp
='#undef HAVE_FTP'
6849 echocheck
"vstream client"
6850 if test "$_vstream" = auto
; then
6853 #include <vstream-client.h>
6854 void vstream_error(const char *format, ... ) {}
6855 int main(void) { vstream_start(); return 0; }
6857 cc_check
-lvstream-client && _vstream
=yes
6859 if test "$_vstream" = yes ; then
6860 _def_vstream
='#define HAVE_VSTREAM 1'
6861 _inputmodules
="vstream $_inputmodules"
6862 _ld_extra
="$_ld_extra -lvstream-client"
6864 _noinputmodules
="vstream $_noinputmodules"
6865 _def_vstream
='#undef HAVE_VSTREAM'
6870 echocheck
"byte order"
6871 if test "$_big_endian" = auto
; then
6873 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6874 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6876 return (int)ascii_name;
6880 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6886 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
6889 if test "$_big_endian" = yes ; then
6890 _byte_order
='big-endian'
6891 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6893 _byte_order
='little-endian'
6894 _def_words_endian
='#undef WORDS_BIGENDIAN'
6896 echores
"$_byte_order"
6898 echocheck
"OSD menu"
6899 if test "$_menu" = yes ; then
6900 _def_menu
='#define HAVE_MENU 1'
6902 _def_menu
='#undef HAVE_MENU'
6907 echocheck
"QuickTime codecs"
6908 if test "$_qtx" = auto
; then
6909 test "$_win32dll" = yes || darwin
&& _qtx
=yes
6911 if test "$_qtx" = yes ; then
6912 _def_qtx
='#define USE_QTX_CODECS 1'
6913 _codecmodules
="qtx $_codecmodules"
6915 _def_qtx
='#undef USE_QTX_CODECS'
6916 _nocodecmodules
="qtx $_nocodecmodules"
6921 echocheck
"Subtitles sorting"
6922 if test "$_sortsub" = yes ; then
6923 _def_sortsub
='#define USE_SORTSUB 1'
6925 _def_sortsub
='#undef USE_SORTSUB'
6930 echocheck
"XMMS inputplugin support"
6931 if test "$_xmms" = yes ; then
6932 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6933 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6934 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6936 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6937 _xmmslibdir
=/usr
/lib
6940 _def_xmms
='#define HAVE_XMMS 1'
6942 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
6944 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6947 _def_xmms
='#undef HAVE_XMMS'
6952 if test "$_inet6" = auto
; then
6954 #include <sys/types.h>
6955 #include <sys/socket.h>
6956 #include <netinet/in.h>
6957 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6964 if test "$_inet6" = yes ; then
6965 _def_inet6
='#define HAVE_AF_INET6 1'
6967 _def_inet6
='#undef HAVE_AF_INET6'
6972 echocheck
"gethostbyname2"
6973 if test "$_gethostbyname2" = auto
; then
6975 #include <sys/types.h>
6976 #include <sys/socket.h>
6978 int main(void) { gethostbyname2("", AF_INET); }
6986 if test "$_gethostbyname2" = yes ; then
6987 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6989 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6991 echores
"$_gethostbyname2"
6994 # --------------- GUI specific tests begin -------------------
6997 if test "$_gui" = yes ; then
6999 # Required libraries
7000 test "$_libavcodec" != yes && die
"The GUI requires libavcodec with PNG support."
7002 test "$_x11" != yes && die
"X11 support required for GUI compilation."
7004 echocheck
"XShape extension"
7005 if test "$_xshape" = auto
; then
7008 #include <X11/Xlib.h>
7009 #include <X11/Xproto.h>
7010 #include <X11/Xutil.h>
7011 #include <X11/extensions/shape.h>
7014 char *name = ":0.0";
7017 int eventbase, errorbase;
7018 if (getenv("DISPLAY"))
7019 name=getenv("DISPLAY");
7020 wsDisplay=XOpenDisplay(name);
7021 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
7023 XCloseDisplay(wsDisplay);
7027 cc_check
&& _xshape
=yes
7029 if test "$_xshape" = yes ; then
7030 _def_xshape
='#define HAVE_XSHAPE 1'
7032 die
"The GUI requires the X11 extension XShape (which was not found)."
7037 if test "$_gtk1" = no
; then
7039 echocheck
"GTK+ version"
7041 if $_pkg_config gtk
+-2.0
--exists ; then
7042 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7043 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7044 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7048 if $_pkg_config glib-2.0
--exists ; then
7049 echocheck
"glib version"
7050 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7051 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7054 _def_gui
='#define HAVE_NEW_GUI 1'
7055 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7058 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7061 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7066 if test "$_gtk1" = yes ; then
7067 # Check for old GTK (1.2.x)
7068 echocheck
"GTK version"
7069 if test -z "$_gtkconfig" ; then
7070 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7071 _gtkconfig
="gtk-config"
7072 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7073 _gtkconfig
="gtk12-config"
7075 die
"The GUI requires GTK devel packages (which were not found)."
7078 _gtk
=`$_gtkconfig --version 2>&1`
7079 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7080 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7081 echores
"$_gtk (using $_gtkconfig)"
7084 echocheck
"glib version"
7085 if test -z "$_glibconfig" ; then
7086 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7087 _glibconfig
="glib-config"
7088 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7089 _glibconfig
="glib12-config"
7091 die
"The GUI requires GLIB devel packages (which were not found)"
7094 _glib
=`$_glibconfig --version 2>&1`
7095 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7096 echores
"$_glib (using $_glibconfig)"
7098 _def_gui
='#define HAVE_NEW_GUI 1'
7099 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7103 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7104 _def_gui
='#define HAVE_NEW_GUI 1'
7105 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7108 else #if test "$_gui"
7109 _def_gui
='#undef HAVE_NEW_GUI'
7110 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7112 # --------------- GUI specific tests end -------------------
7115 if test "$_charset" = "noconv" ; then
7118 if test "$_charset" ; then
7119 _def_charset
="#define MSG_CHARSET \"$_charset\""
7121 _def_charset
="#undef MSG_CHARSET"
7124 if test "$_charset" = "UTF-8" ; then
7125 # hack to disable conversion in the Makefile
7129 if test "$_charset" ; then
7130 echocheck
"iconv program"
7131 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7132 if test "$?" -ne 0 ; then
7134 echo "No working iconv program found, use "
7135 echo "--charset=UTF-8 to continue anyway."
7136 echo "If you also have problems with iconv library functions use --charset=noconv."
7137 echo "Messages in the GTK-2 interface will be broken then."
7144 #############################################################################
7146 echocheck
"automatic gdb attach"
7147 if test "$_crash_debug" = yes ; then
7148 _def_crash_debug
='#define CRASH_DEBUG 1'
7150 _def_crash_debug
='#undef CRASH_DEBUG'
7153 echores
"$_crash_debug"
7155 echocheck
"compiler support for noexecstack"
7157 int main(void) { return 0; }
7159 if cc_check
-Wl,-z,noexecstack
; then
7160 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7166 echocheck
"ftello()"
7167 # if we don't have ftello use the osdep/ compatibility module
7170 #include <sys/types.h>
7171 int main (void) { ftello(stdin); return 0; }
7174 cc_check
&& _ftello
=yes
7175 if test "$_ftello" = yes ; then
7176 _def_ftello
='#define HAVE_FTELLO 1'
7179 _def_ftello
='#undef HAVE_FTELLO'
7184 # Dynamic linking flags
7185 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7187 bsd
&& _ld_dl_dynamic
='-rdynamic'
7188 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
&& not darwin
; then
7189 _ld_dl_dynamic
='-rdynamic'
7192 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7193 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7194 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7195 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7197 _def_debug
='#undef MP_DEBUG'
7198 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7200 _def_linux
='#undef TARGET_LINUX'
7201 linux
&& _def_linux
='#define TARGET_LINUX 1'
7206 _def_vidix
='#undef CONFIG_VIDIX'
7207 _def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
7208 _vidix_drv_cyberblade
=no
7209 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
7211 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
7213 _def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
7214 _vidix_drv_mach64
=no
7215 _def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
7217 _def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
7218 _vidix_drv_mga_crtc2
=no
7219 _def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
7220 _vidix_drv_nvidia
=no
7221 _def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
7223 _def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
7225 _def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
7226 _vidix_drv_radeon
=no
7227 _def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
7228 _vidix_drv_rage128
=no
7229 _def_vidix_drv_savage
='#undef CONFIG_VIDIX_DRV_SAVAGE'
7230 _vidix_drv_savage
=no
7231 _def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
7233 _def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
7234 _vidix_drv_unichrome
=no
7235 if test "$_vidix_internal" = auto
; then
7237 x86
&& _vidix_internal
=yes
7238 # this is broken currently, undefined references to inw, outw etc.
7239 #ppc && linux && _vidix_internal=yes
7240 alpha
&& linux
&& _vidix_internal
=yes
7241 qnx || beos || darwin
&& _vidix_internal
=no
7243 if test "$_vidix_internal" = yes; then
7244 _res_comment
="internal"
7247 elif test "$_vidix_external" = auto
; then
7250 #include <vidix/vidix.h>
7251 int main(void) { return 0; }
7253 cc_check
-lvidix && _vidix_external
=yes && _res_comment
="external" \
7258 if test "$_vidix" = yes ; then
7259 _def_vidix
='#define CONFIG_VIDIX 1'
7260 _vosrc
="$_vosrc vo_cvidix.c"
7261 _vomodules
="cvidix $_vomodules"
7262 test "$_vidix_drivers" || _vidix_drivers
="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 savage sis unichrome"
7263 test $_ivtv = "yes" || _vidix_drivers
=`echo $_vidix_drivers | sed s/ivtv//`
7265 for driver
in $_vidix_drivers ; do
7266 uc_driver
=`echo $driver | tr '[a-z]' '[A-Z]'`
7267 eval _vidix_drv_
${driver}=yes
7268 eval _def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
7271 _novomodules
="cvidix $_novomodules"
7274 if test "$_vidix_internal" = yes ; then
7275 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
7276 elif test "$_vidix_external" = yes ; then
7277 _libs_mplayer
="$_libs_mplayer -lvidix"
7278 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
7281 if test "$_vidix" = yes && win32
; then
7282 _vosrc
="$_vosrc vo_winvidix.c"
7283 _vomodules
="winvidix $_vomodules"
7284 _libs_mplayer
="$_libs_mplayer -lgdi32"
7286 _novomodules
="winvidix $_novomodules"
7288 if test "$_vidix" = yes && test "$_x11" = yes; then
7289 _vosrc
="$_vosrc vo_xvidix.c"
7290 _vomodules
="xvidix $_vomodules"
7292 _novomodules
="xvidix $_novomodules"
7295 echocheck
"joystick"
7296 _def_joystick
='#undef HAVE_JOYSTICK'
7297 if test "$_joystick" = yes ; then
7299 # TODO add some check
7300 _def_joystick
='#define HAVE_JOYSTICK 1'
7302 _joystick
="no (unsupported under $system_name)"
7305 echores
"$_joystick"
7308 if test "$_lirc" = auto
; then
7311 #include <lirc/lirc_client.h>
7312 int main(void) { return 0; }
7314 cc_check
-llirc_client && _lirc
=yes
7316 if test "$_lirc" = yes ; then
7317 _def_lirc
='#define HAVE_LIRC 1'
7318 _ld_extra
="$_ld_extra -llirc_client"
7320 _def_lirc
='#undef HAVE_LIRC'
7325 if test "$_lircc" = auto
; then
7328 #include <lirc/lircc.h>
7329 int main(void) { return 0; }
7331 cc_check
-llircc && _lircc
=yes
7333 if test "$_lircc" = yes ; then
7334 _def_lircc
='#define HAVE_LIRCC 1'
7335 _ld_extra
="$_ld_extra -llircc"
7337 _def_lircc
='#undef HAVE_LIRCC'
7342 # Detect maemo development platform libraries availability (http://www.maemo.org),
7343 # they are used when run on Nokia 770
7344 echocheck
"maemo (Nokia 770)"
7345 if test "$_maemo" = auto
; then
7348 #include <libosso.h>
7349 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7351 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7353 if test "$_maemo" = yes ; then
7354 _def_maemo
='#define HAVE_MAEMO 1'
7355 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7356 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7358 _def_maemo
='#undef HAVE_MAEMO'
7363 echocheck
"color console output"
7364 if test "$_color_console" = yes ; then
7365 _def_color_console
='#define MSG_USE_COLORS 1'
7367 _def_color_console
='#undef MSG_USE_COLORS'
7369 echores
"$_color_console"
7371 # linker paths should be the same for mencoder and mplayer
7373 for I
in $_libs_mplayer ; do
7374 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7375 if test -z "$_tmp" ; then
7376 _ld_extra
="$I $_ld_extra"
7378 _ld_tmp
="$_ld_tmp $I"
7381 _libs_mplayer
=$_ld_tmp
7384 #############################################################################
7386 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN -shared-libgcc"
7387 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7388 CFLAGS
="$CFLAGS -no-cpp-precomp"
7392 CFLAGS
="$CFLAGS -DNEWLIB -D__USE_INLINE__ -DSYS_AMIGAOS4"
7395 # use flag for HPUX missing setenv()
7396 CFLAGS
="$CFLAGS -DHPUX"
7400 CFLAGS
="$CFLAGS -D_REENTRANT"
7402 # FIXME bsd needs this so maybe other OS'es
7403 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7406 CFLAGS
="$CFLAGS -D__CYGWIN__ -DSYS_CYGWIN"
7408 # 64 bit file offsets?
7409 if test "$_largefiles" = yes || freebsd
; then
7410 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7411 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7412 # dvdread support requires this (for off64_t)
7413 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7417 CFLAGS
="-I. -I.. -I../libavutil $CFLAGS"
7418 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
7421 int main() { return 0; }
7423 if test "$cc_vendor" = "gnu" ; then
7424 cc_check
-Wdeclaration-after-statement && CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7425 cc_check
-Wno-pointer-sign && CFLAGS
="-Wno-pointer-sign $CFLAGS"
7426 cc_check
-Wdisabled-optimization && CFLAGS
="-Wdisabled-optimization $CFLAGS"
7430 #this must be the last test to be performed or the ones following it will likely fail
7431 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
7432 # to use its own copy of the library)
7433 echocheck
"DVD support (libdvdnav)"
7434 if test "$_dvdnav" = auto
; then
7435 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7437 if test "$_dvdnav" = auto
; then
7439 #include <inttypes.h>
7441 int main(void) { dvdnav_t *dvd=0; return 0; }
7444 _dvdnavdir
=`$_dvdnavconfig --cflags`
7445 _dvdnavlibs
=`$_dvdnavconfig --libs`
7446 _dvdnavvsn
=`$_dvdnavconfig --version | sed "s/\.//g"`
7447 _dvdnavmajor
=`echo $_dvdnavvsn | cut -d. -f2`
7448 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
7449 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7451 if test "$_dvdnav" = yes ; then
7453 _def_dvdnav
='#define USE_DVDNAV 1'
7454 _dvdnav_version
=`$_dvdnavconfig --version | sed "s/\.//g"`
7455 _def_dvdnav_version
="#define DVDNAVVERSION $_dvdnav_version"
7456 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
7457 _ld_extra
="$_ld_extra `$_dvdnavconfig --minilibs`"
7458 _inputmodules
="dvdnav $_inputmodules"
7460 _def_dvdnav
='#undef USE_DVDNAV'
7461 _noinputmodules
="dvdnav $_noinputmodules"
7465 #############################################################################
7466 echo "Creating config.mak"
7467 cat > config.mak
<< EOF
7468 # -------- Generated by configure -----------
7471 MAN_LANG = $MAN_LANG
7472 TARGET_OS = $system_name
7474 prefix = \$(DESTDIR)$_prefix
7475 BINDIR = \$(DESTDIR)$_bindir
7476 DATADIR = \$(DESTDIR)$_datadir
7477 MANDIR = \$(DESTDIR)$_mandir
7478 CONFDIR = \$(DESTDIR)$_confdir
7479 LIBDIR = \$(DESTDIR)$_libdir
7480 # FFmpeg uses libdir instead of LIBDIR
7487 LDCONFIG = $_ldconfig
7489 EXTRA_INC = $_inc_extra
7490 EXTRAXX_INC = $_inc_extra $_inc_extraxx
7491 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7492 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
7493 INSTALLSTRIP = $_install_strip
7495 HELP_FILE = $_mp_help
7499 MPLAYER_NETWORK = $_network
7501 STREAMING_LIVE555 = $_live
7503 STREAM_CACHE = $_stream_cache
7506 VIDIX_INTERNAL = $_vidix_internal
7507 VIDIX_EXTERNAL = $_vidix_external
7514 LIBMPEG2 = $_libmpeg2
7515 TREMOR_INTERNAL = $_tremor_internal
7516 TREMOR_LOW = $_tremor_low
7520 MUSEPACK = $_musepack
7522 UNRARLIB = $_unrarlib
7527 EXTRALIBS = $_extra_libs
7528 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7529 EXTRALIBS_MPLAYER = $_libs_mplayer
7530 EXTRALIBS_MENCODER = $_libs_mencoder
7533 HAVE_PTHREADS = $_pthreads
7535 HAVE_XVMC_ACCEL = $_xvmc
7537 HAVE_SYS_MMAN_H = $_mman
7538 HAVE_POSIX_SELECT = $_posix_select
7540 NEED_FSEEKO = $_need_fseeko
7541 NEED_FTELLO = $_need_ftello
7542 NEED_GETTIMEOFDAY = $_need_gettimeofday
7543 NEED_GLOB = $_need_glob
7544 NEED_SCANDIR = $_need_scandir
7545 NEED_SETENV = $_need_setenv
7546 NEED_SHMEM = $_need_shmem
7547 NEED_STRLCAT = $_need_strlcat
7548 NEED_STRLCPY = $_need_strlcpy
7549 NEED_STRSEP = $_need_strsep
7550 NEED_SWAB = $_need_swab
7551 NEED_VSSCANF = $_need_vsscanf
7558 LIB=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7567 # input/demuxer/codecs
7568 JOYSTICK = $_joystick
7574 TV_BSDBT848 = $_tv_bsdbt848
7575 TV_TELETEXT = $_tv_teletext
7576 AUDIO_INPUT = $_audio_input
7580 DVDREAD_INTERNAL = $_dvdread_internal
7581 DVDCSS_INTERNAL = $_libdvdcss_internal
7583 WIN32DLL = $_win32dll
7585 REAL_CODECS = $_real
7586 XANIM_CODECS = $_xanim
7587 LIBAVUTIL = $_libavutil
7588 LIBAVUTIL_A = $_libavutil_a
7589 LIBAVUTIL_SO = $_libavutil_so
7590 LIBAVCODEC = $_libavcodec
7591 LIBAVCODEC_A = $_libavcodec_a
7592 LIBAVCODEC_SO = $_libavcodec_so
7593 LIBAVFORMAT = $_libavformat
7594 LIBAVFORMAT_A = $_libavformat_a
7595 LIBAVFORMAT_SO = $_libavformat_so
7596 LIBPOSTPROC = $_libpostproc
7597 LIBPOSTPROC_A = $_libpostproc_a
7598 LIBPOSTPROC_SO = $_libpostproc_so
7606 MENCODER = $_mencoder
7609 BITMAP_FONT = $_bitmap_font
7610 FREETYPE = $_freetype
7613 LIBVORBIS = $_vorbis
7614 LIBTHEORA = $_theora
7615 FAAD_INTERNAL = $_faad_internal
7616 FAAD_FIXED = $_faad_fixed
7617 LIBSMBCLIENT = $_smbsupport
7618 XMMS_PLUGINS = $_xmms
7620 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7621 MACOSX_BUNDLE = $_macosx_bundle
7622 MACOSX_COREVIDEO = $_macosx_corevideo
7626 CONFIG_LIBAMR=$_libamr
7627 CONFIG_LIBAMR_NB=$_libamr_nb
7628 CONFIG_LIBAMR_WB=$_libamr_wb
7629 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7630 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7631 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7632 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7633 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7634 `echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7635 CONFIG_LIBFAAC=$_lavc_faac
7636 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7637 CONFIG_LIBXVID=$_lavc_xvid
7638 CONFIG_LIBX264=$_lavc_x264
7641 CONFIG_ENCODERS=$_mencoder
7642 CONFIG_MUXERS=$_mencoder
7644 RADIO_CAPTURE=$_radio_capture
7645 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7646 VIDIX_IVTV=$_vidix_drv_ivtv
7647 VIDIX_MACH64=$_vidix_drv_mach64
7648 VIDIX_MGA=$_vidix_drv_mga
7649 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7650 VIDIX_NVIDIA=$_vidix_drv_nvidia
7651 VIDIX_PM2=$_vidix_drv_pm2
7652 VIDIX_PM3=$_vidix_drv_pm3
7653 VIDIX_RADEON=$_vidix_drv_radeon
7654 VIDIX_RAGE128=$_vidix_drv_rage128
7655 VIDIX_SAVAGE=$_vidix_drv_savage
7656 VIDIX_SIS=$_vidix_drv_sis
7657 VIDIX_UNICHROME=$_vidix_drv_unichrome
7659 # --- Some stuff for autoconfigure ----
7665 TARGET_MMX2 = $_mmxext
7666 TARGET_3DNOW = $_3dnow
7667 TARGET_3DNOWEX = $_3dnowext
7669 TARGET_CMOV = $_cmov
7670 TARGET_ALTIVEC = $_altivec
7671 TARGET_ARMV5TE = $_armv5te
7672 TARGET_ARMV6 = $_armv6
7673 TARGET_IWMMXT = $_iwmmxt
7679 # --- libvo stuff ---
7682 # --- libao2 stuff ---
7685 # --- libaf stuff ---
7690 #############################################################################
7692 ff_config_enable
() {
7694 if ` echo $2 | grep $part > /dev/null `; then
7695 echo "#define CONFIG_$part 1"
7696 echo "#define ENABLE_$part 1"
7698 echo "#define ENABLE_$part 0"
7703 echo "Creating config.h"
7704 cat > config.h
<< EOF
7705 /* -------- This file has been automatically generated by configure ---------
7706 Note: Any changes in it will be lost when you run configure again. */
7708 /* Protect against multiple inclusion */
7709 #ifndef MPLAYER_CONFIG_H
7710 #define MPLAYER_CONFIG_H 1
7712 #define CONFIGURATION "$_configuration"
7714 /* make sure we never get lavformat's poll() emulation, the results are
7715 horrible if the X libs try to actually use it, see MPlayer-users
7716 Message-ID: <45D49541.8060101@infernix.net>
7717 Date: Thu, 15 Feb 2007 18:15:45 +0100
7718 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7720 #define HAVE_SYS_POLL_H 1
7722 /* use GNU internationalization */
7725 /* name of messages charset */
7728 /* Runtime CPU detection */
7729 $_def_runtime_cpudetection
7731 /* Dynamic a/v plugins */
7732 $_def_dynamic_plugins
7734 /* "restrict" keyword */
7735 $_def_restrict_keyword
7737 /* __builtin_expect branch prediction hint */
7738 $_def_builtin_expect
7739 #ifdef HAVE_BUILTIN_EXPECT
7740 #define likely(x) __builtin_expect ((x) != 0, 1)
7741 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7743 #define likely(x) (x)
7744 #define unlikely(x) (x)
7747 /* attribute(used) as needed by some compilers */
7748 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7749 # define attribute_used __attribute__((used))
7751 # define attribute_used
7754 /* compiler support for named assembler arguments */
7755 $_def_named_asm_args
7757 #define PREFIX "$_prefix"
7759 /* enable/disable SIGHANDLER */
7762 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7765 /* Toggles debugging informations */
7768 /* Toggles color console output */
7771 /* Indicates that libcdio is available for VCD and CD-DA playback */
7774 /* Indicates that Ogle's libdvdread is available for DVD playback */
7777 /* Indicates that dvdread is internal */
7778 $_def_dvdread_internal
7780 /* Additional options for libdvdread/libdvdcss */
7794 /* Common data directory (for fonts, etc) */
7795 #define MPLAYER_DATADIR "$_datadir"
7796 #define MPLAYER_CONFDIR "$_confdir"
7797 #define MPLAYER_LIBDIR "$_libdir"
7799 /* Define this to compile stream-caching support, it can be enabled via
7800 -cache <kilobytes> */
7803 /* Define if you are using XviD library */
7806 /* Define if you are using the X.264 library */
7809 /* Define if you are using libnut */
7812 /* Define to include support for libdv-0.9.5 */
7815 /* If build mencoder */
7818 /* Indicates if libmp3lame is available
7819 Note: for mencoder */
7821 $_def_mp3lame_preset
7822 $_def_mp3lame_preset_medium
7824 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7825 (use -bps or -nobps commandline option for run-time method selection)
7826 -bps gives better sync for vbr mp3 audio, it is now default */
7827 #define AVI_SYNC_BPS 1
7829 /* Undefine this if you do not want to select mono audio (left or right)
7830 with a stereo MPEG layer 2/3 audio stream. The command line option
7831 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7832 right-only), with 0 being the default.
7834 #define USE_FAKE_MONO 1
7836 /* Undefine this if your sound card driver has no working select().
7837 If you have kernel Oops, player hangups, or just no audio, you should
7838 try to recompile MPlayer with this option disabled! */
7841 /* define this to use iconv(3) function to codepage conversions */
7844 /* define this to use nl_langinfo function */
7847 /* define this to use RTC (/dev/rtc) for video timers */
7850 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7851 #define MAX_OUTBURST 65536
7853 /* set up audio OUTBURST. Do not change this! */
7854 #define OUTBURST 512
7856 /* Define this if your system has the header file for the OSS sound interface */
7859 /* Define this if your system has the header file for the OSS sound interface
7860 * in /usr/include */
7863 /* Define this if your system has the sysinfo header */
7866 /* Define this if your system has ftello() */
7870 /* Need these for FILE and off_t an config.h is usually before other includes*/
7872 #include <sys/types.h>
7873 off_t ftello(FILE *);
7876 /* Define this if your system has the "malloc.h" header file */
7879 /* memalign is mapped to malloc if unsupported */
7884 /* assembler handling of .align */
7887 /* Define this if your system has the "alloca.h" header file */
7890 /* Define this if your system has the "sys/mman.h" header file */
7892 $_def_mman_has_map_failed
7894 /* Define this if you have the elf dynamic linker -ldl library */
7897 /* Define this if you have the kstat kernel statistics library */
7900 /* Define this if you have zlib */
7903 #define CONFIG_ZLIB 1
7906 /* Define this if you have shm support */
7909 /* Define this if your system has scandir & alphasort */
7912 /* Define this if your system has strsep */
7915 /* Define this if your system has strlcpy */
7917 #ifndef HAVE_STRLCPY
7918 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7921 /* Define this if your system has strlcat */
7923 #ifndef HAVE_STRLCAT
7924 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7927 /* Define this if your system has fseeko */
7930 /* Need these for FILE and off_t an config.h is usually before other includes*/
7932 #include <sys/types.h>
7933 int fseeko(FILE *, off_t, int);
7938 /* Define this if your system has vsscanf */
7941 /* Define this if your system has swab */
7944 /* Define this if your system has posix select */
7947 /* Define this if your system has gettimeofday */
7950 /* Define this if your system has glob */
7953 /* Define this if your system has setenv */
7956 int setenv(const char *name, const char *val, int overwrite);
7959 /* Define this if your system has sysi86 */
7963 /* Define this if your system has pthreads */
7966 /* Define this if you enabled thread support for libavcodec */
7969 /* LIRC (remote control, see www.lirc.org) support: */
7972 /* Support for maemo (http://www.maemo.org) */
7976 * LIRCCD (LIRC client daemon)
7977 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7981 /* DVD navigation support using libdvdnav */
7983 $_def_dvdnav_version
7985 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7986 #define MPEG12_POSTPROC 1
7988 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7991 $_def_libpostproc_so
7993 /* Win32 DLL support */
7995 #define WIN32_PATH "$_win32codecsdir"
7997 /* Mac OS X specific features */
7999 $_def_macosx_finder_support
8001 $_def_macosx_corevideo
8003 /* Build our Win32-loader */
8006 /* ffmpeg's libavcodec support (requires libavcodec source) */
8010 $_def_libavcodec_mpegaudio_hp
8012 /* ffmpeg's libavformat support (requires libavformat source) */
8015 $_def_libavformat_so
8021 /* Use libavcodec's decoders */
8022 #define CONFIG_DECODERS 1
8023 /* Use libavcodec's encoders */
8024 #define CONFIG_ENCODERS 1
8026 /* Use libavformat's demuxers */
8027 #define CONFIG_DEMUXERS 1
8028 /* Use libavformat's muxers */
8031 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8032 #define HAVE_EBX_AVAILABLE 1
8033 #define HAVE_EBP_AVAILABLE 1
8035 #define CONFIG_GPL 1
8037 /* Use AMR codecs from libavcodec. */
8042 /* Use specific parts from FFmpeg. */
8043 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
8044 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
8045 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
8046 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
8047 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
8048 `ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
8049 `ff_config_enable "$_libavbsfs_all" "$_libavbsfs"`
8056 /* Use codec libs included in mplayer CVS / source dist: */
8061 /* XAnim DLL support */
8063 /* Default search path */
8066 /* RealPlayer DLL support */
8068 /* Default search path */
8071 /* LIVE555 Streaming Media library support */
8074 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8077 /* Use unrarlib for Vobsubs */
8080 /* gui support, please do not edit this option */
8084 /* Audio output drivers */
8086 $_def_ossaudio_devdsp
8087 $_def_ossaudio_devmixer
8098 $_def_sys_asoundlib_h
8099 $_def_alsa_asoundlib_h
8105 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8107 #undef FAST_OSD_TABLE
8109 /* Enable TV Interface support */
8112 /* Enable Video 4 Linux TV interface support */
8115 /* Enable Video 4 Linux 1 TV interface support */
8118 /* Enable Video 4 Linux 2 TV interface support */
8121 /* *BSD BrookTree headers */
8122 $_def_ioctl_meteor_h_name
8123 $_def_ioctl_bt848_h_name
8125 /* Enable *BSD BrookTree TV interface support */
8128 /* Enable TV Teletext Interface support */
8131 /* Enable Radio Interface support */
8134 /* Enable Capture for Radio Interface support */
8137 /* Enable Video 4 Linux Radio interface support */
8140 /* Enable Video 4 Linux 2 Radio interface support */
8143 /* Enable *BSD BrookTree Radio interface support */
8144 $_def_radio_bsdbt848
8146 /* Enable Video 4 Linux 2 MPEG PVR support */
8149 /* Define if your processor stores words with the most significant
8150 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8156 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8157 have the instruction. */
8160 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
8161 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
8167 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
8172 /* only gcc3 can compile mvi instructions */
8173 $_def_gcc_mvi_support
8175 /* Define this for Cygwin build for win32 */
8178 /* Define this to any prefered value from 386 up to infinity with step 100 */
8179 #define __CPU__ $iproc
8188 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8189 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8191 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8192 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8193 #elif defined(WIN32)
8194 #define DEFAULT_CDROM_DEVICE "D:"
8195 #define DEFAULT_DVD_DEVICE "D:"
8196 #elif defined(SYS_DARWIN)
8197 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8198 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8199 #elif defined(__OpenBSD__)
8200 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8201 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8202 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8203 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8204 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8205 #elif defined(SYS_AMIGAOS4)
8206 #define DEFAULT_CDROM_DEVICE "a1ide.device:2"
8207 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8209 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8210 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8214 /*----------------------------------------------------------------------------
8216 ** NOTE: Instead of modifying these definitions here, use the
8217 ** --enable/--disable options of the ./configure script!
8218 ** See ./configure --help for details.
8220 *---------------------------------------------------------------------------*/
8222 /* C99 lrintf function available */
8225 /* round function is available */
8228 /* yes, we have inttypes.h */
8229 #define HAVE_INTTYPES_H 1
8231 /* int_fastXY_t emulation */
8234 /* nanosleep support */
8240 /* termcap flag for getch2.c */
8243 /* termios flag for getch2.c */
8248 /* enable PNG support */
8251 /* enable JPEG support */
8254 /* enable PNM support */
8257 /* enable md5sum support */
8260 /* enable GIF support */
8265 /* enable bitmap font support */
8268 /* enable FreeType support */
8271 /* enable Fontconfig support */
8274 /* enable SSA/ASS support */
8277 /* enable FriBiDi usage */
8280 /* enable ENCA usage */
8283 /* liblzo support */
8286 #define CONFIG_LZO 1
8289 /* libmad support */
8292 /* enable OggVorbis support */
8296 /* enable Speex support */
8299 /* enable musepack support */
8302 /* enable OggTheora support */
8305 /* enable FAAD (AAC) support */
8309 /* enable FAAC (AAC encoder) support */
8312 /* enable LADSPA plugin support */
8315 /* enable network */
8318 /* enable ftp support */
8321 /* enable vstream support */
8324 /* enable winsock2 instead of Unix functions*/
8327 /* define this to use inet_aton() instead of inet_pton() */
8330 /* enables / disables cdparanoia support */
8334 /* enables / disables VIDIX usage */
8336 $_def_vidix_drv_cyberblade
8337 $_def_vidix_drv_ivtv
8338 $_def_vidix_drv_mach64
8340 $_def_vidix_drv_mga_crtc2
8341 $_def_vidix_drv_nvidia
8343 $_def_vidix_drv_radeon
8344 $_def_vidix_drv_rage128
8345 $_def_vidix_drv_savage
8347 $_def_vidix_drv_unichrome
8350 /* enables / disables new input joystick support */
8353 /* enables / disables QTX codecs */
8356 /* enables / disables osd menu */
8359 /* enables / disables subtitles sorting */
8362 /* XMMS input plugin support */
8364 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8366 /* enables inet6 support */
8369 /* do we have gethostbyname2? */
8370 $_def_gethostbyname2
8372 /* Extension defines */
8373 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
8374 $_def_3dnowext // only define if you have 3DNOWEXT (AMD Athlon, etc.)
8375 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
8376 $_def_mmxext // only define if you have MMX2 (Athlon/PIII/4/CelII)
8377 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
8378 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
8379 $_def_ssse3 // only define if you have SSSE3 (Intel Core 2)
8380 $_def_cmov // only define if you have CMOV (i686+, without VIA C3)
8381 $_def_fast_cmov // only define if CMOV is fast
8382 $_def_altivec // only define if you have Altivec (G4)
8383 $_def_armv5te // only define if you have Enhanced DSP Extensions (ARM)
8384 $_def_armv6 // only define if you have ARMv6
8385 $_def_iwmmxt // only define if you have XScale IWMMX (ARM)
8387 $_def_altivec_h // enables usage of altivec.h
8389 $_def_mlib // Sun mediaLib, available only on solaris
8390 $_def_vis // only define if you have VIS ( ultrasparc )
8392 /* libmpeg2 uses a different feature test macro for mediaLib */
8394 #define LIBMPEG2_MLIB 1
8398 #define SCREEN_SIZE_X 1
8399 #define SCREEN_SIZE_Y 1
8411 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8421 $_def_directfb_version
8446 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8447 #define X11_FULLSCREEN 1
8450 #endif /* MPLAYER_CONFIG_H */
8453 #############################################################################
8457 Config files successfully generated by ./configure $_configuration !
8459 Install prefix: $_prefix
8460 Data directory: $_datadir
8461 Config direct.: $_confdir
8463 Byte order: $_byte_order
8464 Optimizing for: $_optimizing
8467 Messages/GUI: $_language
8470 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8471 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8476 Enabled optional drivers:
8477 Input: $_inputmodules
8478 Codecs: $_codecmodules
8479 Audio output: $_aomodules
8480 Video output: $_vomodules
8481 Audio filters: $_afmodules
8482 Disabled optional drivers:
8483 Input: $_noinputmodules
8484 Codecs: $_nocodecmodules
8485 Audio output: $_noaomodules
8486 Video output: $_novomodules
8487 Audio filters: $_noafmodules
8489 'config.h' and 'config.mak' contain your configuration options.
8490 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8491 compile *** DO NOT REPORT BUGS if you tweak these files ***
8493 'make' will now compile MPlayer and 'make install' will install it.
8494 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8499 if test "$_mtrr" = yes ; then
8500 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8506 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8507 operating system ($system_name). You may encounter a few files that cannot
8508 be played due to missing open source video/audio codec support.
8515 Check $TMPLOG if you wonder why an autodetection failed (make sure
8516 development headers/packages are installed).
8518 NOTE: The --enable-* parameters unconditionally force options on, completely
8519 skipping autodetection. This behavior is unlike what you may be used to from
8520 autoconf-based configure scripts that can decide to override you. This greater
8521 level of control comes at a price. You may have to provide the correct compiler
8522 and linker flags yourself.
8523 If you used one of these options (except --enable-gui and similar ones that
8524 turn on internal features) and experience a compilation or linking failure,
8525 make sure you have passed the necessary compiler/linker flags to configure.
8527 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8531 if test "$_warn_CFLAGS" = yes; then
8534 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8536 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8538 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8539 To do so, execute 'CFLAGS= ./configure <options>'
8545 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"