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-pvr disable Video4Linux2 MPEG PVR [autodetect]
244 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
245 --disable-network disable networking [enable]
246 --enable-winsock2 enable winsock2 [autodetect]
247 --enable-smb enable Samba (SMB) input [autodetect]
248 --enable-live enable LIVE555 Streaming Media [autodetect]
249 --disable-dvdnav disable libdvdnav [autodetect]
250 --disable-dvdread disable libdvdread [autodetect]
251 --disable-dvdread-internal disable internal libdvdread [autodetect]
252 --disable-libdvdcss-internal disable internal libdvdcss [autodetect]
253 --disable-cdparanoia disable cdparanoia [autodetect]
254 --disable-cddb disable cddb [autodetect]
255 --disable-bitmap-font disable bitmap font support [enable]
256 --disable-freetype disable FreeType 2 font rendering [autodetect]
257 --disable-fontconfig disable fontconfig font lookup [autodetect]
258 --disable-unrarlib disable Unique RAR File Library [enabled]
259 --enable-menu enable OSD menu (not DVD menu) [disabled]
260 --disable-sortsub disable subtitle sorting [enabled]
261 --enable-fribidi enable the FriBiDi libs [autodetect]
262 --disable-enca disable ENCA charset oracle library [autodetect]
263 --disable-macosx disable Mac OS X specific features [autodetect]
264 --disable-maemo disable maemo specific features [autodetect]
265 --enable-macosx-finder-support enable Mac OS X Finder invocation
266 parameter parsing [disabled]
267 --enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
268 --disable-inet6 disable IPv6 support [autodetect]
269 --disable-gethostbyname2 gethostbyname2 part of the C library [autodetect]
270 --disable-ftp disable FTP support [enabled]
271 --disable-vstream disable TiVo vstream client support [autodetect]
272 --disable-pthreads disable Posix threads support [autodetect]
273 --disable-ass disable internal SSA/ASS subtitle support [autodetect]
274 --enable-rpath enable runtime linker path for extra libs [disabled]
277 --enable-gif enable GIF support [autodetect]
278 --enable-png enable PNG input/output support [autodetect]
279 --enable-jpeg enable JPEG input/output support [autodetect]
280 --enable-libcdio enable external libcdio [autodetect]
281 --enable-liblzo enable external liblzo [autodetect]
282 --disable-win32dll disable Win32 DLL support [enabled]
283 --disable-qtx disable QuickTime codecs support [enabled]
284 --disable-xanim disable XAnim codecs support [enabled]
285 --disable-real disable RealPlayer codecs support [enabled]
286 --disable-xvid disable XviD [autodetect]
287 --disable-x264 disable x264 [autodetect]
288 --disable-nut disable libnut [autodetect]
289 --disable-libavutil_a disable static libavutil [autodetect]
290 --disable-libavcodec_a disable static libavcodec [autodetect]
291 --disable-libavformat_a disable static libavformat [autodetect]
292 --disable-libpostproc_a disable static libpostproc [autodetect]
293 --disable-libavutil_so disable shared libavutil [autodetect]
294 --disable-libavcodec_so disable shared libavcodec [autodetect]
295 --disable-libavformat_so disable shared libavformat [autodetect]
296 --disable-libpostproc_so disable shared libpostproc [autodetect]
297 --disable-libavcodec_mpegaudio_hp disable high precision audio decoding
298 in libavcodec [enabled]
299 --disable-tremor-internal disable internal Tremor [enabled]
300 --enable-tremor-low enable lower accuracy internal Tremor [disabled]
301 --enable-tremor-external enable external Tremor [autodetect]
302 --disable-libvorbis disable libvorbis support [autodetect]
303 --disable-speex disable Speex support [autodetect]
304 --enable-theora enable OggTheora libraries [autodetect]
305 --enable-faad-external enable external FAAD2 (AAC) [autodetect]
306 --disable-faad-internal disable internal FAAD2 (AAC) [autodetect]
307 --enable-faad-fixed enable fixed-point mode in internal FAAD2 [disabled]
308 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
309 --disable-ladspa disable LADSPA plugin support [autodetect]
310 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
311 --disable-mad disable libmad (MPEG audio) support [autodetect]
312 --disable-toolame disable Toolame (MPEG layer 2) encoding [autodetect]
313 --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect]
314 --enable-xmms enable XMMS input plugin support [disabled]
315 --disable-mp3lib disable builtin mp3lib [enabled]
316 --disable-liba52 disable builtin liba52 [enabled]
317 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
318 --disable-musepack disable musepack support [autodetect]
319 --disable-libamr_nb disable libamr narrowband [autodetect]
320 --disable-libamr_wb disable libamr wideband [autodetect]
321 --disable-decoder=DECODER disable specified FFmpeg decoder
322 --enable-decoder=DECODER enable specified FFmpeg decoder
323 --disable-encoder=ENCODER disable specified FFmpeg encoder
324 --enable-encoder=ENCODER enable specified FFmpeg encoder
325 --disable-parser=PARSER disable specified FFmpeg parser
326 --enable-parser=PARSER enable specified FFmpeg parser
327 --disable-demuxer=DEMUXER disable specified FFmpeg demuxer
328 --enable-demuxer=DEMUXER enable specified FFmpeg demuxer
329 --disable-muxer=MUXER disable specified FFmpeg muxer
330 --enable-muxer=MUXER enable specified FFmpeg muxer
333 --disable-vidix-internal disable internal VIDIX [for x86 *nix]
334 --disable-vidix-external disable external VIDIX [for x86 *nix]
335 --with-vidix-drivers[=*] list of VIDIX drivers to be compiled in
336 Available: cyberblade,ivtv,mach64,mga,mga_crtc2,
337 nvidia,pm2,pm3,radeon,rage128,savage,sis,unichrome
338 --enable-gl enable OpenGL video output [autodetect]
339 --enable-dga[=n] enable DGA [n in {1, 2} ] support [autodetect]
340 --enable-vesa enable VESA video output [autodetect]
341 --enable-svga enable SVGAlib video output [autodetect]
342 --enable-sdl enable SDL video output [autodetect]
343 --enable-aa enable AAlib video output [autodetect]
344 --enable-caca enable CACA video output [autodetect]
345 --enable-ggi enable GGI video output [autodetect]
346 --enable-ggiwmh enable GGI libggiwmh extension [autodetect]
347 --enable-directx enable DirectX video output [autodetect]
348 --enable-dxr2 enable DXR2 video output [autodetect]
349 --enable-dxr3 enable DXR3/H+ video output [autodetect]
350 --enable-ivtv enable IVTV TV-Out video output [autodetect]
351 --enable-dvb enable DVB video output [autodetect]
352 --enable-dvbhead enable DVB video output (HEAD version) [autodetect]
353 --enable-mga enable mga_vid video output [autodetect]
354 --enable-xmga enable mga_vid X11 video output [autodetect]
355 --enable-xv enable Xv video output [autodetect]
356 --enable-xvmc enable XvMC acceleration [disable]
357 --enable-vm enable XF86VidMode support [autodetect]
358 --enable-xinerama enable Xinerama support [autodetect]
359 --enable-x11 enable X11 video output [autodetect]
360 --enable-xshape enable XShape support [autodetect]
361 --enable-fbdev enable FBDev video output [autodetect]
362 --enable-mlib enable mediaLib video output (Solaris) [disable]
363 --enable-3dfx enable obsolete /dev/3dfx video output [disable]
364 --enable-tdfxfb enable tdfxfb video output [disable]
365 --enable-s3fb enable s3fb (S3 ViRGE) video output [disable]
366 --enable-directfb enable DirectFB video output [autodetect]
367 --enable-zr enable ZR360[56]7/ZR36060 video output [autodetect]
368 --enable-bl enable Blinkenlights video output [disable]
369 --enable-tdfxvid enable tdfx_vid video output [disable]
370 --disable-tga disable Targa video output [enable]
371 --disable-pnm disable PNM video output [enable]
372 --disable-md5sum disable md5sum video output [enable]
375 --disable-alsa disable ALSA audio output [autodetect]
376 --disable-ossaudio disable OSS audio output [autodetect]
377 --disable-arts disable aRts audio output [autodetect]
378 --disable-esd disable esd audio output [autodetect]
379 --disable-polyp disable Polypaudio audio output [autodetect]
380 --disable-jack disable JACK audio output [autodetect]
381 --disable-openal disable OpenAL audio output [autodetect]
382 --disable-nas disable NAS audio output [autodetect]
383 --disable-sgiaudio disable SGI audio output [autodetect]
384 --disable-sunaudio disable Sun audio output [autodetect]
385 --disable-win32waveout disable Windows waveout audio output [autodetect]
386 --disable-select disable using select() on the audio device [enable]
388 Miscellaneous options:
389 --enable-runtime-cpudetection enable runtime CPU detection [disable]
390 --enable-cross-compile enable cross-compilation [autodetect]
391 --cc=COMPILER C compiler to build MPlayer [gcc]
392 --host-cc=COMPILER C compiler for tools needed while building [gcc]
393 --as=ASSEMBLER assembler to build MPlayer [as]
394 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
395 --enable-static build a statically linked binary
396 --charset=charset convert the console messages to this character set
397 --language=list a white space or comma separated list of languages for
398 translated man pages, the first language is used for
399 messages and the GUI (the environment variable
400 \$LINGUAS is also honored) [en]
401 (Available: $LANGUAGES all)
402 --with-install=PATH path to a custom install program
403 --enable-color-console enable color console output (UNSUPPORTED) [disable]
406 --enable-mmx enable MMX [autodetect]
407 --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect]
408 --enable-3dnow enable 3DNow! [autodetect]
409 --enable-3dnowext enable extended 3DNow! [autodetect]
410 --enable-sse enable SSE [autodetect]
411 --enable-sse2 enable SSE2 [autodetect]
412 --enable-ssse3 enable SSSE3 [autodetect]
413 --enable-shm enable shm [autodetect]
414 --enable-altivec enable AltiVec (PowerPC) [autodetect]
415 --enable-armv5te enable DSP extensions (ARM) [autodetect]
416 --enable-armv6 enable ARMv6 (ARM) [autodetect]
417 --enable-iwmmxt enable iWMMXt (ARM) [autodetect]
418 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable]
419 --enable-big-endian force byte order to big-endian [autodetect]
420 --enable-debug[=1-3] compile-in debugging information [disable]
421 --enable-profile compile-in profiling information [disable]
422 --disable-sighandler disable sighandler for crashes [enable]
423 --enable-crash-debug enable automatic gdb attach on crash [disable]
424 --enable-dynamic-plugins enable dynamic A/V plugins [disable]
426 Hazardous options AKA "DO NOT REPORT ANY BUGS!"
427 --disable-gcc-check disable gcc version checking [enable]
429 Use these options if autodetection fails (Options marked with (*) accept
430 multiple paths separated by ':'):
431 --extra-libs=FLAGS extra linker flags
432 --extra-libs-mplayer=FLAGS extra linker flags for MPlayer
433 --extra-libs-mencoder=FLAGS extra linker flags for MEncoder
434 --with-extraincdir=DIR extra header search paths in DIR (*)
435 --with-extralibdir=DIR extra linker search paths in DIR (*)
436 --with-xvmclib=NAME adapter-specific library name (e.g. XvMCNVIDIA)
438 --with-freetype-config=PATH path to freetype-config
439 --with-fribidi-config=PATH path to fribidi-config
440 --with-glib-config=PATH path to glib*-config
441 --with-gtk-config=PATH path to gtk*-config
442 --with-sdl-config=PATH path to sdl*-config
443 --with-dvdnav-config=PATH path to dvdnav-config
445 This configure script is NOT autoconf-based, even though its output is similar.
446 It will try to autodetect all configuration options. If you --enable an option
447 it will be forcefully turned on, skipping autodetection. This can break
448 compilation, so you need to know what you are doing.
453 # GOTCHA: the variables below defines the default behavior for autodetection
454 # and have - unless stated otherwise - at least 2 states : yes no
455 # If autodetection is available then the third state is: auto
473 test "$CC" && _cc
="$CC"
476 _runtime_cpudetection
=no
484 _libavdecoders_all
=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
485 _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// `
486 _libavencoders_all
=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
487 _libavencoders
=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// `
488 _libavparsers_all
=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
489 _libavparsers
=$_libavparsers_all
490 _libavbsfs_all
=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
491 _libavbsfs
=$_libavbsfs_all
492 _libavdemuxers_all
=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
493 _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// `
494 _libavmuxers_all
=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
495 _libavmuxers
=`echo $_libavmuxers_all | sed -e s/AUDIO_MUXER// -e s/RTP_MUXER// `
496 _libavprotocols_all
=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`
502 _libavcodec_mpegaudio_hp
=yes
507 _dga
=auto
# 1 2 no auto
509 _xvmc
=no
#auto when complete
548 _tremor_external
=auto
562 _dvdnavconfig
=dvdnav-config
564 _dvdread_internal
=auto
565 _libdvdcss_internal
=auto
574 _mlib
=no
#broken, thus disabled
634 _macosx_finder_support
=no
637 _freetypeconfig
='freetype-config'
639 _fribidiconfig
='fribidi-config'
652 _def_stream_cache
="#define USE_STREAM_CACHE 1"
660 _prefix
=`echo $ac_option | cut -d '=' -f 2`
663 _bindir
=`echo $ac_option | cut -d '=' -f 2`
666 _datadir
=`echo $ac_option | cut -d '=' -f 2`
669 _mandir
=`echo $ac_option | cut -d '=' -f 2`
672 _confdir
=`echo $ac_option | cut -d '=' -f 2`
675 _libdir
=`echo $ac_option | cut -d '=' -f 2`
678 _codecsdir
=`echo $ac_option | cut -d '=' -f 2`
681 _win32codecsdir
=`echo $ac_option | cut -d '=' -f 2`
684 _xanimcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
687 _realcodecsdir
=`echo $ac_option | cut -d '=' -f 2`
689 --with-extraincdir=*)
690 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
692 --with-extralibdir=*)
693 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
697 _install
=`echo $ac_option | cut -d '=' -f 2 `
700 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
704 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
706 --with-freetype-config=*)
707 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
709 --with-fribidi-config=*)
710 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
713 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
715 --with-glib-config=*)
716 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
718 --with-dvdnav-config=*)
719 _dvdnavconfig
=`echo $ac_option | cut -d '=' -f 2`
723 _extra_libs
=`echo $ac_option | cut -d '=' -f 2`
725 --extra-libs-mplayer=*)
726 _libs_mplayer
=`echo $ac_option | cut -d '=' -f 2`
728 --extra-libs-mencoder=*)
729 _libs_mencoder
=`echo $ac_option | cut -d '=' -f 2`
733 _target
=`echo $ac_option | cut -d '=' -f 2`
736 _cc
=`echo $ac_option | cut -d '=' -f 2`
739 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
742 _as
=`echo $ac_option | cut -d '=' -f 2`
745 _charset
=`echo $ac_option | cut -d '=' -f 2`
748 _language
=`echo $ac_option | cut -d '=' -f 2`
767 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
772 --enable-gcc-check) _gcc_check
=yes ;;
773 --disable-gcc-check) _gcc_check
=no
;;
774 --enable-runtime-cpudetection) _runtime_cpudetection
=yes ;;
775 --disable-runtime-cpudetection) _runtime_cpudetection
=no
;;
776 --enable-cross-compile) _cross_compile
=yes ;;
777 --disable-cross-compile) _cross_compile
=no
;;
778 --enable-mencoder) _mencoder
=yes ;;
779 --disable-mencoder) _mencoder
=no
;;
780 --enable-mplayer) _mplayer
=yes ;;
781 --disable-mplayer) _mplayer
=no
;;
782 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
783 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
784 --enable-x11) _x11
=yes ;;
785 --disable-x11) _x11
=no
;;
786 --enable-xshape) _xshape
=yes ;;
787 --disable-xshape) _xshape
=no
;;
788 --enable-xv) _xv
=yes ;;
789 --disable-xv) _xv
=no
;;
790 --enable-xvmc) _xvmc
=yes ;;
791 --disable-xvmc) _xvmc
=no
;;
792 --enable-sdl) _sdl
=yes ;;
793 --disable-sdl) _sdl
=no
;;
794 --enable-directx) _directx
=yes ;;
795 --disable-directx) _directx
=no
;;
796 --enable-win32waveout) _win32waveout
=yes ;;
797 --disable-win32waveout) _win32waveout
=no
;;
798 --enable-nas) _nas
=yes ;;
799 --disable-nas) _nas
=no
;;
800 --enable-png) _png
=yes ;;
801 --disable-png) _png
=no
;;
802 --enable-jpeg) _jpeg
=yes ;;
803 --disable-jpeg) _jpeg
=no
;;
804 --enable-pnm) _pnm
=yes ;;
805 --disable-pnm) _pnm
=no
;;
806 --enable-md5sum) _md5sum
=yes ;;
807 --disable-md5sum) _md5sum
=no
;;
808 --enable-gif) _gif
=yes ;;
809 --disable-gif) _gif
=no
;;
810 --enable-gl) _gl
=yes ;;
811 --disable-gl) _gl
=no
;;
812 --enable-ggi) _ggi
=yes ;;
813 --disable-ggi) _ggi
=no
;;
814 --enable-ggiwmh) _ggiwmh
=yes ;;
815 --disable-ggiwmh) _ggiwmh
=no
;;
816 --enable-aa) _aa
=yes ;;
817 --disable-aa) _aa
=no
;;
818 --enable-caca) _caca
=yes ;;
819 --disable-caca) _caca
=no
;;
820 --enable-svga) _svga
=yes ;;
821 --disable-svga) _svga
=no
;;
822 --enable-vesa) _vesa
=yes ;;
823 --disable-vesa) _vesa
=no
;;
824 --enable-fbdev) _fbdev
=yes ;;
825 --disable-fbdev) _fbdev
=no
;;
826 --enable-dvb) _dvb
=yes ;;
827 --disable-dvb) _dvb
=no
;;
828 --enable-dvbhead) _dvbhead
=yes ;;
829 --disable-dvbhead) _dvbhead
=no
;;
830 --enable-dxr2) _dxr2
=yes ;;
831 --disable-dxr2) _dxr2
=no
;;
832 --enable-dxr3) _dxr3
=yes ;;
833 --disable-dxr3) _dxr3
=no
;;
834 --enable-ivtv) _ivtv
=yes ;;
835 --disable-ivtv) _ivtv
=no
;;
836 --enable-iconv) _iconv
=yes ;;
837 --disable-iconv) _iconv
=no
;;
838 --enable-langinfo) _langinfo
=yes ;;
839 --disable-langinfo) _langinfo
=no
;;
840 --enable-rtc) _rtc
=yes ;;
841 --disable-rtc) _rtc
=no
;;
842 --enable-libdv) _libdv
=yes ;;
843 --disable-libdv) _libdv
=no
;;
844 --enable-ossaudio) _ossaudio
=yes ;;
845 --disable-ossaudio) _ossaudio
=no
;;
846 --enable-arts) _arts
=yes ;;
847 --disable-arts) _arts
=no
;;
848 --enable-esd) _esd
=yes ;;
849 --disable-esd) _esd
=no
;;
850 --enable-polyp) _polyp
=yes ;;
851 --disable-polyp) _polyp
=no
;;
852 --enable-jack) _jack
=yes ;;
853 --disable-jack) _jack
=no
;;
854 --enable-openal) _openal
=yes ;;
855 --disable-openal) _openal
=no
;;
856 --enable-mad) _mad
=yes ;;
857 --disable-mad) _mad
=no
;;
858 --enable-toolame) _toolame
=yes ;;
859 --disable-toolame) _toolame
=no
;;
860 --enable-twolame) _twolame
=yes ;;
861 --disable-twolame) _twolame
=no
;;
862 --enable-libcdio) _libcdio
=yes ;;
863 --disable-libcdio) _libcdio
=no
;;
864 --enable-liblzo) _liblzo
=yes ;;
865 --disable-liblzo) _liblzo
=no
;;
866 --enable-libvorbis) _libvorbis
=yes ;;
867 --disable-libvorbis) _libvorbis
=no
;;
868 --enable-speex) _speex
=yes ;;
869 --disable-speex) _speex
=no
;;
870 --enable-tremor-internal) _tremor_internal
=yes ;;
871 --disable-tremor-internal) _tremor_internal
=no
;;
872 --enable-tremor-low) _tremor_low
=yes ;;
873 --disable-tremor-low) _tremor_low
=no
;;
874 --enable-tremor-external) _tremor_external
=yes ;;
875 --disable-tremor-external) _tremor_external
=no
;;
876 --enable-theora) _theora
=yes ;;
877 --disable-theora) _theora
=no
;;
878 --enable-mp3lib) _mp3lib
=yes ;;
879 --disable-mp3lib) _mp3lib
=no
;;
880 --enable-liba52) _liba52
=yes ;;
881 --disable-liba52) _liba52
=no
;;
882 --enable-libmpeg2) _libmpeg2
=yes ;;
883 --disable-libmpeg2) _libmpeg2
=no
;;
884 --enable-musepack) _musepack
=yes ;;
885 --disable-musepack) _musepack
=no
;;
886 --enable-faad-internal) _faad_internal
=yes ;;
887 --disable-faad-internal) _faad_internal
=no
;;
888 --enable-faad-external) _faad_external
=yes ;;
889 --disable-faad-external) _faad_external
=no
;;
890 --enable-faad-fixed) _faad_fixed
=yes ;;
891 --disable-faad-fixed) _faad_fixed
=no
;;
892 --enable-faac) _faac
=yes ;;
893 --disable-faac) _faac
=no
;;
894 --enable-ladspa) _ladspa
=yes ;;
895 --disable-ladspa) _ladspa
=no
;;
896 --enable-xmms) _xmms
=yes ;;
897 --disable-xmms) _xmms
=no
;;
898 --enable-dvdread) _dvdread
=yes ;;
899 --disable-dvdread) _dvdread
=no
;;
900 --enable-dvdread-internal) _dvdread_internal
=yes ;;
901 --disable-dvdread-internal) _dvdread_internal
=no
;;
902 --enable-libdvdcss-internal) _libdvdcss_internal
=yes ;;
903 --disable-libdvdcss-internal) _libdvdcss_internal
=no
;;
904 --enable-dvdnav) _dvdnav
=yes ;;
905 --disable-dvdnav) _dvdnav
=no
;;
906 --enable-xanim) _xanim
=yes ;;
907 --disable-xanim) _xanim
=no
;;
908 --enable-real) _real
=yes ;;
909 --disable-real) _real
=no
;;
910 --enable-live) _live
=yes ;;
911 --disable-live) _live
=no
;;
912 --enable-xinerama) _xinerama
=yes ;;
913 --disable-xinerama) _xinerama
=no
;;
914 --enable-mga) _mga
=yes ;;
915 --disable-mga) _mga
=no
;;
916 --enable-xmga) _xmga
=yes ;;
917 --disable-xmga) _xmga
=no
;;
918 --enable-vm) _vm
=yes ;;
919 --disable-vm) _vm
=no
;;
920 --enable-xf86keysym) _xf86keysym
=yes ;;
921 --disable-xf86keysym) _xf86keysym
=no
;;
922 --enable-mlib) _mlib
=yes ;;
923 --disable-mlib) _mlib
=no
;;
924 --enable-sunaudio) _sunaudio
=yes ;;
925 --disable-sunaudio) _sunaudio
=no
;;
926 --enable-sgiaudio) _sgiaudio
=yes ;;
927 --disable-sgiaudio) _sgiaudio
=no
;;
928 --enable-alsa) _alsa
=yes ;;
929 --disable-alsa) _alsa
=no
;;
930 --enable-tv) _tv
=yes ;;
931 --disable-tv) _tv
=no
;;
932 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
933 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
934 --enable-tv-v4l1) _tv_v4l1
=yes ;;
935 --disable-tv-v4l1) _tv_v4l1
=no
;;
936 --enable-tv-v4l2) _tv_v4l2
=yes ;;
937 --disable-tv-v4l2) _tv_v4l2
=no
;;
938 --enable-radio) _radio
=yes ;;
939 --enable-radio-capture) _radio_capture
=yes ;;
940 --disable-radio-capture) _radio_capture
=no
;;
941 --disable-radio) _radio
=no
;;
942 --enable-radio-v4l) _radio_v4l
=yes ;;
943 --disable-radio-v4l) _radio_v4l
=no
;;
944 --enable-radio-v4l2) _radio_v4l2
=yes ;;
945 --disable-radio-v4l2) _radio_v4l2
=no
;;
946 --enable-radio-bsdbt848) _radio_bsdbt848
=yes ;;
947 --disable-radio-bsdbt848) _radio_bsdbt848
=no
;;
948 --enable-pvr) _pvr
=yes ;;
949 --disable-pvr) _pvr
=no
;;
950 --enable-fastmemcpy) _fastmemcpy
=yes ;;
951 --disable-fastmemcpy) _fastmemcpy
=no
;;
952 --enable-network) _network
=yes ;;
953 --disable-network) _network
=no
;;
954 --enable-winsock2) _winsock2
=yes ;;
955 --disable-winsock2) _winsock2
=no
;;
956 --enable-smb) _smbsupport
=yes ;;
957 --disable-smb) _smbsupport
=no
;;
958 --enable-vidix-internal) _vidix_internal
=yes ;;
959 --disable-vidix-internal) _vidix_internal
=no
;;
960 --enable-vidix-external) _vidix_external
=yes ;;
961 --disable-vidix-external) _vidix_external
=no
;;
962 --with-vidix-drivers=*)
963 _vidix_drivers
=`echo $ac_option | cut -d '=' -f 2`
965 --enable-joystick) _joystick
=yes ;;
966 --disable-joystick) _joystick
=no
;;
967 --enable-xvid) _xvid
=yes ;;
968 --disable-xvid) _xvid
=no
;;
969 --enable-x264) _x264
=yes ;;
970 --disable-x264) _x264
=no
;;
971 --enable-nut) _nut
=yes ;;
972 --disable-nut) _nut
=no
;;
973 --enable-libavutil_a) _libavutil_a
=yes ;;
974 --disable-libavutil_a) _libavutil_a
=no
;;
975 --enable-libavutil_so) _libavutil_so
=yes ;;
976 --disable-libavutil_so) _libavutil_so
=no
;;
977 --enable-libavcodec_a) _libavcodec_a
=yes ;;
978 --disable-libavcodec_a) _libavcodec_a
=no
;;
979 --enable-libavcodec_so) _libavcodec_so
=yes ;;
980 --disable-libavcodec_so) _libavcodec_so
=no
;;
981 --enable-libamr_nb) _libamr_nb
=yes ;;
982 --disable-libamr_nb) _libamr_nb
=no
;;
983 --enable-libamr_wb) _libamr_wb
=yes ;;
984 --disable-libamr_wb) _libamr_wb
=no
;;
985 --enable-decoder=*) _libavdecoders
="$_libavdecoders `echo $ac_option | cut -d '=' -f 2`" ;;
986 --disable-decoder=*) _libavdecoders
=`echo $_libavdecoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
987 --enable-encoder=*) _libavencoders
="$_libavencoders `echo $ac_option | cut -d '=' -f 2`" ;;
988 --disable-encoder=*) _libavencoders
=`echo $_libavencoders | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
989 --enable-parser=*) _libavparsers
="$_libavparsers `echo $ac_option | cut -d '=' -f 2`" ;;
990 --disable-parser=*) _libavparsers
=`echo $_libavparsers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
991 --enable-demuxer=*) _libavdemuxers
="$_libavdemuxers `echo $ac_option | cut -d '=' -f 2`" ;;
992 --disable-demuxer=*) _libavdemuxers
=`echo $_libavdemuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
993 --enable-muxer=*) _libavmuxers
="$_libavmuxers `echo $ac_option | cut -d '=' -f 2`" ;;
994 --disable-muxer=*) _libavmuxers
=`echo $_libavmuxers | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
995 --enable-libavformat_a) _libavformat_a
=yes ;;
996 --disable-libavformat_a) _libavformat_a
=no
;;
997 --enable-libavformat_so) _libavformat_so
=yes ;;
998 --disable-libavformat_so) _libavformat_so
=no
;;
999 --enable-libpostproc_a) _libpostproc_a
=yes ;;
1000 --disable-libpostproc_a) _libpostproc_a
=no
;;
1001 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1002 --disable-libpostproc_so) _libpostproc_so
=no
;;
1003 --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=yes ;;
1004 --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp
=no
;;
1006 --enable-lirc) _lirc
=yes ;;
1007 --disable-lirc) _lirc
=no
;;
1008 --enable-lircc) _lircc
=yes ;;
1009 --disable-lircc) _lircc
=no
;;
1010 --enable-gui) _gui
=yes ;;
1011 --disable-gui) _gui
=no
;;
1012 --enable-gtk1) _gtk1
=yes ;;
1013 --disable-gtk1) _gtk1
=no
;;
1014 --enable-termcap) _termcap
=yes ;;
1015 --disable-termcap) _termcap
=no
;;
1016 --enable-termios) _termios
=yes ;;
1017 --disable-termios) _termios
=no
;;
1018 --enable-3dfx) _3dfx
=yes ;;
1019 --disable-3dfx) _3dfx
=no
;;
1020 --enable-s3fb) _s3fb
=yes ;;
1021 --disable-s3fb) _s3fb
=no
;;
1022 --enable-tdfxfb) _tdfxfb
=yes ;;
1023 --disable-tdfxfb) _tdfxfb
=no
;;
1024 --disable-tdfxvid) _tdfxvid
=no
;;
1025 --enable-tdfxvid) _tdfxvid
=yes ;;
1026 --disable-tga) _tga
=no
;;
1027 --enable-tga) _tga
=yes ;;
1028 --enable-directfb) _directfb
=yes ;;
1029 --disable-directfb) _directfb
=no
;;
1030 --enable-zr) _zr
=yes ;;
1031 --disable-zr) _zr
=no
;;
1032 --enable-bl) _bl
=yes ;;
1033 --disable-bl) _bl
=no
;;
1034 --enable-mtrr) _mtrr
=yes ;;
1035 --disable-mtrr) _mtrr
=no
;;
1036 --enable-largefiles) _largefiles
=yes ;;
1037 --disable-largefiles) _largefiles
=no
;;
1038 --enable-shm) _shm
=yes ;;
1039 --disable-shm) _shm
=no
;;
1040 --enable-select) _select
=yes ;;
1041 --disable-select) _select
=no
;;
1042 --enable-linux-devfs) _linux_devfs
=yes ;;
1043 --disable-linux-devfs) _linux_devfs
=no
;;
1044 --enable-cdparanoia) _cdparanoia
=yes ;;
1045 --disable-cdparanoia) _cdparanoia
=no
;;
1046 --enable-cddb) _cddb
=yes ;;
1047 --disable-cddb) _cddb
=no
;;
1048 --enable-big-endian) _big_endian
=yes ;;
1049 --disable-big-endian) _big_endian
=no
;;
1050 --enable-bitmap-font) _bitmap_font
=yes ;;
1051 --disable-bitmap-font) _bitmap_font
=no
;;
1052 --enable-freetype) _freetype
=yes ;;
1053 --disable-freetype) _freetype
=no
;;
1054 --enable-fontconfig) _fontconfig
=yes ;;
1055 --disable-fontconfig) _fontconfig
=no
;;
1056 --enable-unrarlib) _unrarlib
=yes ;;
1057 --disable-unrarlib) _unrarlib
=no
;;
1058 --enable-ftp) _ftp
=yes ;;
1059 --disable-ftp) _ftp
=no
;;
1060 --enable-vstream) _vstream
=yes ;;
1061 --disable-vstream) _vstream
=no
;;
1062 --enable-pthreads) _pthreads
=yes ;;
1063 --disable-pthreads) _pthreads
=no
;;
1064 --enable-ass) _ass
=yes ;;
1065 --disable-ass) _ass
=no
;;
1066 --enable-rpath) _rpath
=yes ;;
1067 --disable-rpath) _rpath
=no
;;
1068 --enable-color-console) _color_console
=yes ;;
1069 --disable-color-console) _color_console
=no
;;
1071 --enable-fribidi) _fribidi
=yes ;;
1072 --disable-fribidi) _fribidi
=no
;;
1074 --enable-enca) _enca
=yes ;;
1075 --disable-enca) _enca
=no
;;
1077 --enable-inet6) _inet6
=yes ;;
1078 --disable-inet6) _inet6
=no
;;
1080 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1081 --disable-gethostbyname2) _gethostbyname2
=no
;;
1083 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1084 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1085 --disable-dga) _dga
=no
;;
1087 --enable-menu) _menu
=yes ;;
1088 --disable-menu) _menu
=no
;;
1090 --enable-qtx) _qtx
=yes ;;
1091 --disable-qtx) _qtx
=no
;;
1093 --enable-macosx) _macosx
=yes ;;
1094 --disable-macosx) _macosx
=no
;;
1095 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1096 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1097 --enable-macosx-bundle) _macosx_bundle
=yes;;
1098 --disable-macosx-bundle) _macosx_bundle
=no
;;
1100 --enable-maemo) _maemo
=yes ;;
1101 --disable-maemo) _maemo
=no
;;
1103 --enable-sortsub) _sortsub
=yes ;;
1104 --disable-sortsub) _sortsub
=no
;;
1106 --enable-crash-debug) _crash_debug
=yes ;;
1107 --disable-crash-debug) _crash_debug
=no
;;
1108 --enable-sighandler) _sighandler
=yes ;;
1109 --disable-sighandler) _sighandler
=no
;;
1110 --enable-win32dll) _win32dll
=yes ;;
1111 --disable-win32dll) _win32dll
=no
;;
1113 --enable-sse) _sse
=yes ;;
1114 --disable-sse) _sse
=no
;;
1115 --enable-sse2) _sse2
=yes ;;
1116 --disable-sse2) _sse2
=no
;;
1117 --enable-ssse3) _ssse3
=yes ;;
1118 --disable-ssse3) _ssse3
=no
;;
1119 --enable-mmxext) _mmxext
=yes ;;
1120 --disable-mmxext) _mmxext
=no
;;
1121 --enable-3dnow) _3dnow
=yes ;;
1122 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
1123 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
1124 --disable-3dnowext) _3dnowext
=no
;;
1125 --enable-cmov) _cmov
=yes ;;
1126 --disable-cmov) _cmov
=no
;;
1127 --enable-fast-cmov) _fast_cmov
=yes ;;
1128 --disable-fast-cmov) _fast_cmov
=no
;;
1129 --enable-altivec) _altivec
=yes ;;
1130 --disable-altivec) _altivec
=no
;;
1131 --enable-armv5te) _armv5te
=yes ;;
1132 --disable-armv5te) _armv5te
=no
;;
1133 --enable-armv6) _armv6
=yes ;;
1134 --disable-armv6) _armv6
=no
;;
1135 --enable-iwmmxt) _iwmmxt
=yes ;;
1136 --disable-iwmmxt) _iwmmxt
=no
;;
1137 --enable-mmx) _mmx
=yes ;;
1138 --disable-mmx) # 3Dnow! and MMX2 require MMX
1139 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
1142 echo "Unknown parameter: $ac_option"
1149 # Atmos: moved this here, to be correct, if --prefix is specified
1150 test -z "$_bindir" && _bindir
="$_prefix/bin"
1151 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1152 test -z "$_mandir" && _mandir
="$_prefix/man"
1153 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1154 test -z "$_libdir" && _libdir
="$_prefix/lib"
1156 # Determine our OS name and CPU architecture
1157 if test -z "$_target" ; then
1159 system_name
=`uname -s 2>&1`
1160 case "$system_name" in
1161 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX|AmigaOS
)
1172 [cC
][yY
][gG
][wW
][iI
][nN
]*)
1179 system_name
="$system_name-UNKNOWN"
1184 # host's CPU/instruction set
1185 host_arch
=`uname -p 2>&1`
1186 case "$host_arch" in
1187 i386|sparc|ppc|alpha|arm|mips|vax
)
1189 powerpc
) # Darwin returns 'powerpc'
1192 *) # uname -p on Linux returns 'unknown' for the processor type,
1193 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
1195 # Maybe uname -m (machine hardware name) returns something we
1198 # x86/x86pc is used by QNX
1199 case "`uname -m 2>&1`" in
1200 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
;;
1201 ia64
) host_arch
=ia64
;;
1203 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
1204 -z "`echo $CFLAGS | grep -- -m32`" ]; then
1210 macppc|ppc|ppc64
) host_arch
=ppc
;;
1211 alpha
) host_arch
=alpha
;;
1212 sparc
) host_arch
=sparc
;;
1213 sparc64
) host_arch
=sparc64
;;
1214 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
1215 arm
*|zaurus|cats
) host_arch
=arm
;;
1216 s390
) host_arch
=s390
;;
1217 s390x
) host_arch
=s390x
;;
1218 mips
*) host_arch
=mips
;;
1219 vax
) host_arch
=vax
;;
1220 *) host_arch
=UNKNOWN
;;
1224 else # if test -z "$_target"
1225 system_name
=`echo $_target | cut -d '-' -f 2`
1226 case "`echo $system_name | tr A-Z a-z`" in
1227 linux
) system_name
=Linux
;;
1228 freebsd
) system_name
=FreeBSD
;;
1229 gnu
/kfreebsd
) system_name
=FreeBSD
;;
1230 netbsd
) system_name
=NetBSD
;;
1231 bsd
/os
) system_name
=BSD
/OS
;;
1232 openbsd
) system_name
=OpenBSD
;;
1233 sunos
) system_name
=SunOS
;;
1234 qnx
) system_name
=QNX
;;
1235 morphos
) system_name
=MorphOS
;;
1236 amigaos
) system_name
=AmigaOS
;;
1237 mingw32msvc
) system_name
=MINGW32
;;
1239 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1240 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
1243 echo "Detected operating system: $system_name"
1244 echo "Detected host architecture: $host_arch"
1246 if test "$_runtime_cpudetection" = yes && not x86
&& not ppc
; then
1247 die
"Runtime CPU detection only works for x86, x86-64 and PPC!"
1250 # LGB: temporary files
1251 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
1255 TMPLOG
="configure.log"
1257 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
1258 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
1259 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
1260 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
1264 # FIXME: A lot of stuff is installed under /usr/local
1265 # NK: But we should never use this stuff implicitly since we call compiler
1266 # from /usr we should be sure that there no effects from other compilers
1267 # (libraries) which might be installed into /usr/local. Let users use this
1268 # stuff explicitly as command line argument. In other words: It would be
1269 # resonable to have only /usr/include or only /usr/local/include.
1272 _ldconfig
="ldconfig -R"
1276 _ld_extra
="$_ld_extra -L/usr/local/lib"
1277 _inc_extra
="$_inc_extra -I/usr/local/include"
1281 _ld_extra
="$_ld_extra -L/usr/local/lib"
1282 _inc_extra
="$_inc_extra -I/usr/local/include"
1286 _ld_extra
="$_ld_extra -lC"
1289 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
1298 # -lwinmm is always needed for osdep/timer-win2.c
1299 _ld_extra
="$_ld_extra -lwinmm"
1300 _confwin32
='TARGET_WIN32 = yes'
1302 _confwin32
='TARGET_WIN32 = no'
1310 _def_confwin32
='#define WIN32'
1317 _def_stream_cache
="#undef USE_STREAM_CACHE"
1321 _ld_extra
="$_ld_extra -lph"
1324 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
1325 # if used as 'head -1' instead of 'head -n 1', but older versions don't
1327 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
1328 _head
() { head -$1 2>/dev
/null
; }
1330 _head
() { head -n $1 2>/dev
/null
; }
1332 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
1333 _tail
() { tail -$1 2>/dev
/null
; }
1335 _tail
() { tail -n $1 2>/dev
/null
; }
1338 # Checking CC version...
1339 if test "$_gcc_check" = yes ; then
1340 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
1341 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
1342 echocheck
"$_cc version"
1344 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
1345 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
1346 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1347 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1348 # TODO verify older icc/ecc compatibility
1351 cc_version
="v. ?.??, bad"
1355 cc_version
="$cc_version, ok"
1359 cc_version
="$cc_version, bad"
1363 echores
"$cc_version"
1365 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
1366 echocheck
"$_cc version"
1368 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
1369 cc_version
=`$_cc -dumpversion 2>&1`
1370 if test "$?" -gt 0; then
1371 cc_version
="not found"
1375 cc_version
="v. ?.??, bad"
1378 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
1379 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
1380 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
1381 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
1382 cc_version
="$cc_version, ok"
1389 cc_version
="$cc_version, bad"
1393 echores
"$cc_version"
1394 test "$cc_verc_fail" = "no" && break
1397 if test "$cc_verc_fail" = yes ; then
1400 *** Please downgrade/upgrade C compiler to version gcc-2.95, 3.x or 4.x! ***
1402 You are not using a supported compiler. We do not have the time to make sure
1403 everything works with compilers other than the ones we use. Use either the
1404 same compiler as we do, or use --disable-gcc-check but DO *NOT* REPORT BUGS
1405 unless you can reproduce them after recompiling with a 2.95.x or 3/4.x version!
1407 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
1408 mplayer and lame (which is used for mencoder). If you get compile errors,
1409 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
1410 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
1413 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
1416 die
"Bad gcc version"
1421 ******************************************************************************
1423 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
1424 Ok. You know. Do it.
1426 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
1427 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
1428 Lame which is used by mencoder produces weird errors, too.
1430 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
1431 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
1433 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
1435 ******************************************************************************
1443 test "$_host_cc" || _host_cc
=$_cc
1446 echocheck
"cross compilation"
1447 if test $_cross_compile = auto
; then
1449 int main() { return 0; }
1452 cc_check
&& "$TMPO" && _cross_compile
=no
1454 echores
$_cross_compile
1456 if test $_cross_compile = yes; then
1464 # now that we know what compiler should be used for compilation, try to find
1465 # out which assembler is used by the $_cc compiler
1466 if test "$_as" = auto
; then
1467 _as
=`$_cc -print-prog-name=as`
1468 test -z "$_as" && _as
=as
1471 # XXX: this should be ok..
1474 if test "$_runtime_cpudetection" = no
; then
1476 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
1477 # FIXME: Remove the cygwin check once AMD CPUs are supported
1478 if test -r /proc
/cpuinfo
&& not cygwin
; then
1479 # Linux with /proc mounted, extract CPU information from it
1480 _cpuinfo
="cat /proc/cpuinfo"
1481 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86_32
; then
1482 # FreeBSD with Linux emulation /proc mounted,
1483 # extract CPU information from it
1484 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
1485 elif darwin
&& not x86_32
; then
1486 # use hostinfo on Darwin
1489 # use 'lsattr' on AIX
1490 _cpuinfo
="lsattr -E -l proc0 -a type"
1492 # all other OSes try to extract CPU information from a small helper
1493 # program cpuinfo instead
1494 $_cc -o cpuinfo cpuinfo.c
1495 _cpuinfo
="./cpuinfo"
1499 # gather more CPU information
1500 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
1501 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1502 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1503 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1504 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
1506 exts
=`$_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | _head 1`
1508 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
1509 -e s/xmm/sse/ -e s/kni/sse/`
1511 for ext
in $pparam ; do
1512 eval test \"\
$_$ext\" = auto
2>/dev
/null
&& eval _
$ext=kernel_check
1515 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
1516 test $_sse = kernel_check
&& _mmxext
=kernel_check
1518 echocheck
"CPU vendor"
1519 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
1521 echocheck
"CPU type"
1525 fi # test "$_runtime_cpudetection" = no
1527 if x86
&& test "$_runtime_cpudetection" = no
; then
1529 if test "$1" = kernel_check
; then
1530 echocheck
"kernel support of $2"
1533 void catch() { exit(1); }
1535 signal(SIGILL, catch);
1536 __asm__ __volatile__ ("$3":::"memory");return(0);
1540 if cc_check
&& tmp_run
; then
1543 _optimizing
="$_optimizing $2"
1548 echo "It seems that your kernel does not correctly support $2."
1549 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1556 extcheck
$_mmx "mmx" "emms"
1557 extcheck
$_mmxext "mmxext" "sfence"
1558 extcheck
$_3dnow "3dnow" "femms"
1559 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0"
1560 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse"
1561 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _gcc3_ext
="$_gcc3_ext -mno-sse2"
1562 extcheck
$_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
1563 extcheck
$_cmov "cmov" "cmovb %%eax,%%ebx"
1565 echocheck
"mtrr support"
1566 if test "$_mtrr" = kernel_check
; then
1568 _optimizing
="$_optimizing mtrr"
1572 if test "$_gcc3_ext" != ""; then
1573 # if we had to disable sse/sse2 because the active kernel does not
1574 # support this instruction set extension, we also have to tell
1575 # gcc3 to not generate sse/sse2 instructions for normal C code
1577 int main(void) { return 0; }
1579 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1584 case "$host_arch" in
1585 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
1586 _def_arch_x86
="#define ARCH_X86 1"
1587 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1588 _def_arch
="#define ARCH_X86_32 1"
1589 _target_arch
="TARGET_ARCH_X86_32 = yes"
1594 if test "$_runtime_cpudetection" = no
; then
1598 3) proc
=i386 iproc
=386 ;;
1599 4) proc
=i486 iproc
=486 ;;
1600 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
1601 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
1602 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
1604 elif test "$pmodel" -eq 5 -o "$pmodel" -eq 10; then
1606 elif test "$pmodel" -ge 8; then
1608 elif test "$pmodel" -ge 6; then
1615 # It's a bit difficult to determine the correct type of Family 6
1616 # AMD CPUs just from their signature. Instead, we check directly
1617 # whether it supports SSE.
1618 if test "$_sse" = yes; then
1619 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
1622 # Again, gcc treats athlon and athlon-tbird similarly.
1627 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1628 # caught and remedied in the optimization tests below.
1632 *) proc
=k8 iproc
=686 ;;
1637 3) proc
=i386 iproc
=386 ;;
1638 4) proc
=i486 iproc
=486 ;;
1640 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
1641 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
1647 if test "$pmodel" -ge 15; then
1649 elif test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
1651 elif test "$pmodel" -ge 7; then
1653 elif test "$pmodel" -ge 3; then
1660 # A nocona in 32-bit mode has no more capabilities than a prescott.
1661 if test "$pmodel" -ge 3; then
1667 *) proc
=prescott iproc
=686 ;;
1673 if test "$pmodel" -ge 8; then
1675 elif test "$pmodel" -ge 4; then
1682 if test "$pmodel" -ge 9; then
1689 *) proc
=i686 iproc
=i686
;;
1694 3) proc
=i386 iproc
=386 ;;
1695 4) proc
=i486 iproc
=486 ;;
1696 *) proc
=i586 iproc
=586 ;;
1700 proc
=i586 iproc
=586 ;;
1702 fi # test "$_runtime_cpudetection" = no
1705 # check that gcc supports our CPU, if not, fall back to earlier ones
1706 # LGB: check -mcpu and -march swithing step by step with enabling
1707 # to fall back till 386.
1709 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1711 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
1717 echocheck
"GCC & CPU optimization abilities"
1719 int main(void) { return 0; }
1721 if test "$_runtime_cpudetection" = no
; then
1722 if test "$proc" = "k8"; then
1723 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1725 if test "$proc" = "athlon-xp"; then
1726 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
1728 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
1729 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
1731 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
1732 if not cc_check
-march=$proc $cpuopt=$proc; then
1733 if cc_check
-march=i586
$cpuopt=i686
; then
1740 if test "$proc" = "prescott" ; then
1741 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1743 if test "$proc" = "core2" ; then
1744 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium-m
1746 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
1747 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1749 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1750 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1752 if test "$proc" = "i586"; then
1753 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1755 if test "$proc" = "i486" ; then
1756 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1758 if test "$proc" = "i386" ; then
1759 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1761 if test "$proc" = "error" ; then
1762 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1766 elif test "$proc" = "i586-i686"; then
1767 _march
="-march=i586"
1768 _mcpu
="$cpuopt=i686"
1771 _march
="-march=$proc"
1772 _mcpu
="$cpuopt=$proc"
1775 else # if test "$_runtime_cpudetection" = no
1776 _mcpu
="$cpuopt=generic"
1777 # at least i486 required, for bswap instruction
1778 _march
="-march=i486"
1779 cc_check
$_mcpu || _mcpu
="$cpuopt=i686"
1780 cc_check
$_mcpu || _mcpu
=""
1781 cc_check
$_march $_mcpu || _march
=""
1784 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1785 ## autodetected mcpu/march parameters
1786 if test "$_target" ; then
1787 # TODO: it may be a good idea to check GCC and fall back in all cases
1788 if test "$host_arch" = "i586-i686"; then
1789 _march
="-march=i586"
1790 _mcpu
="$cpuopt=i686"
1792 _march
="-march=$host_arch"
1793 _mcpu
="$cpuopt=$host_arch"
1801 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1802 i686|athlon
*|pentium
*) iproc
=686 ;;
1807 if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
1810 pentium4|prescott|nocona
)
1821 _def_arch
='#define ARCH_IA64 1'
1822 _target_arch
='TARGET_ARCH_IA64 = yes'
1831 _def_arch
='#define ARCH_X86_64 1'
1832 _target_arch
='TARGET_ARCH_X86_64 = yes'
1833 _def_arch_x86
="#define ARCH_X86 1"
1834 _target_arch_x86
="TARGET_ARCH_X86 = yes"
1837 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1838 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1843 if test "$_runtime_cpudetection" = no
; then
1851 # 64-bit prescotts exist, but as far as GCC is concerned they
1852 # have the same capabilities as a nocona.
1859 fi # test "$_runtime_cpudetection" = no
1861 echocheck
"GCC & CPU optimization abilities"
1863 int main(void) { return 0; }
1865 # This is a stripped-down version of the i386 fallback.
1866 if test "$_runtime_cpudetection" = no
; then
1867 # --- AMD processors ---
1868 if test "$proc" = "k8"; then
1869 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1871 # This will fail if gcc version < 3.3, which is ok because earlier
1872 # versions don't really support 64-bit on amd64.
1873 # Is this a valid assumption? -Corey
1874 if test "$proc" = "athlon-xp"; then
1875 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1877 # --- Intel processors ---
1878 if test "$proc" = "core2"; then
1879 cc_check
-march=$proc $cpuopt=$proc || proc
=nocona
1881 if test "$proc" = "nocona"; then
1882 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1884 if test "$proc" = "pentium4"; then
1885 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1888 _march
="-march=$proc"
1889 _mcpu
="$cpuopt=$proc"
1890 if test "$proc" = "error" ; then
1891 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1895 else # if test "$_runtime_cpudetection" = no
1896 # x86-64 is an undocumented option, an intersection of k8 and nocona.
1897 _march
="-march=x86-64"
1898 _mcpu
="$cpuopt=generic"
1899 cc_check
$_mcpu || _mcpu
="x86-64"
1900 cc_check
$_mcpu || _mcpu
=""
1901 cc_check
$_march $_mcpu || _march
=""
1910 _def_arch
='#define ARCH_SPARC 1'
1911 _target_arch
='TARGET_ARCH_SPARC = yes'
1914 echocheck
"CPU type"
1916 case "`echo $karch`" in
1921 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1935 _def_arch
='#define ARCH_SPARC 1'
1936 _target_arch
='TARGET_ARCH_SPARC = yes'
1938 _def_vis
='#define HAVE_VIS = yes'
1946 arm|armv4l|armv5tel
)
1947 _def_arch
='#define ARCH_ARMV4L 1'
1948 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1957 _def_arch
='#define ARCH_POWERPC 1'
1958 _def_dcbzl
='#define NO_DCBZL 1'
1959 _target_arch
='TARGET_ARCH_POWERPC = yes'
1967 echocheck
"CPU type"
1968 case $system_name in
1970 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1971 if test -n "`$_cpuinfo | grep altivec`"; then
1976 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1977 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
1978 "`sysctl -n hw.optional.altivec 2> /dev/null`" = "1" ]; then
1983 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1985 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1988 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1995 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
1998 if test "$_altivec" = yes; then
1999 echores
"$proc altivec"
2004 echocheck
"GCC & CPU optimization abilities"
2006 if test -n "$proc"; then
2008 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
2009 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
2010 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
2011 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
2012 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
2013 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
2014 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
2015 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
2016 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
2019 # gcc 3.1(.1) and up supports 7400 and 7450
2020 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
2022 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
2023 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
2027 # gcc 3.2 and up supports 970
2028 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2030 970*|PPC970
*) _march
='-mcpu=970' _mcpu
='-mtune=970'
2031 _def_dcbzl
='#undef NO_DCBZL' ;;
2035 # gcc 3.3 and up supports POWER4
2036 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
2038 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
2042 # gcc 3.4 and up supports 440*
2043 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" ||
test "$_cc_major" -ge "4"; then
2045 440EP
*) _march
='-mcpu=440fp' _mcpu
='-mtune=440fp' ;;
2046 440G
* ) _march
='-mcpu=440' _mcpu
='-mtune=440' ;;
2050 # gcc 4.0 and up supports POWER5
2051 if test "$_cc_major" -ge "4"; then
2053 POWER5
*) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
2059 if test -n "$_mcpu"; then
2060 _optimizing
=`echo $_mcpu | cut -c 8-`
2061 echores
"$_optimizing"
2069 _def_arch
='#define ARCH_ALPHA 1'
2070 _target_arch
='TARGET_ARCH_ALPHA = yes'
2074 echocheck
"CPU type"
2077 unsigned long ver, mask;
2078 asm ("implver %0" : "=r" (ver));
2079 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2080 printf("%ld-%x\n", ver, ~mask);
2084 $_cc -o "$TMPO" "$TMPC"
2087 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
2088 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
2089 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
2090 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
2091 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
2092 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
2093 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
2097 echocheck
"GCC & CPU optimization abilities"
2098 if test "$proc" = "ev68" ; then
2099 cc_check
-mcpu=$proc || proc
=ev67
2101 if test "$proc" = "ev67" ; then
2102 cc_check
-mcpu=$proc || proc
=ev6
2109 echocheck
"MVI instruction support in GCC"
2110 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
2111 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
2114 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
2115 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
2120 _def_arch
='#define ARCH_SGI_MIPS 1'
2121 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
2129 echocheck
"CPU type"
2130 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
2131 case "`echo $proc`" in
2132 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
2133 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
2134 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
2135 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
2136 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
2137 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
2139 # gcc < 3.x does not support -mtune.
2140 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
2149 _def_arch
='#define ARCH_PA_RISC 1'
2150 _target_arch
='TARGET_ARCH_PA_RISC = yes'
2159 _def_arch
='#define ARCH_S390 1'
2160 _target_arch
='TARGET_ARCH_S390 = yes'
2169 _def_arch
='#define ARCH_S390X 1'
2170 _target_arch
='TARGET_ARCH_S390X = yes'
2179 _def_arch
='#define ARCH_VAX 1'
2180 _target_arch
='TARGET_ARCH_VAX = yes'
2189 _def_arch
='#define ARCH_GENERIC 1'
2190 _target_arch
='TARGET_ARCH_GENERIC = yes'
2199 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
2200 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
2201 die
"unsupported architecture $host_arch"
2203 esac # case "$host_arch" in
2205 if test "$_runtime_cpudetection" = yes ; then
2225 echocheck
"assembler support of -pipe option"
2227 int main(void) { return 0; }
2229 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
2232 echocheck
"compiler support of named assembler arguments"
2234 _def_named_asm_args
="#define NAMED_ASM_ARGS 1"
2235 if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \
2236 -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then
2238 _def_named_asm_args
="#undef NAMED_ASM_ARGS"
2240 echores
$_named_asm_args
2243 # Checking for CFLAGS
2245 if test "$_profile" != "" ||
test "$_debug" != "" ; then
2246 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
2248 elif test -z "$CFLAGS" ; then
2249 if test "$cc_vendor" = "intel" ; then
2250 CFLAGS
="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
2251 elif test "$cc_vendor" != "gnu" ; then
2252 CFLAGS
="-O2 $_march $_mcpu $_pipe"
2254 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
2259 if test -n "$LDFLAGS" ; then
2260 _ld_extra
="$_ld_extra $LDFLAGS"
2262 elif test "$cc_vendor" = "intel" ; then
2263 _ld_extra
="$_ld_extra -i-static"
2265 if test -n "$CPPFLAGS" ; then
2266 _inc_extra
="$_inc_extra $CPPFLAGS"
2273 # Checking assembler (_as) compatibility...
2274 # Added workaround for older as that reads from stdin by default - atmos
2275 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2276 echocheck
"assembler ($_as $as_version)"
2278 _pref_as_version
='2.9.1'
2280 if test "$_mmx" = yes ; then
2281 echo 'emms' >> $TMPS
2283 if test "$_3dnow" = yes ; then
2284 _pref_as_version
='2.10.1'
2285 echo 'femms' >> $TMPS
2287 if test "$_3dnowext" = yes ; then
2288 _pref_as_version
='2.10.1'
2289 echo 'pswapd %mm0, %mm0' >> $TMPS
2291 if test "$_mmxext" = yes ; then
2292 _pref_as_version
='2.10.1'
2293 echo 'movntq %mm0, (%eax)' >> $TMPS
2295 if test "$_sse" = yes ; then
2296 _pref_as_version
='2.10.1'
2297 echo 'xorps %xmm0, %xmm0' >> $TMPS
2299 #if test "$_sse2" = yes ; then
2300 # _pref_as_version='2.11'
2301 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2303 if test "$_cmov" = yes ; then
2304 _pref_as_version
='2.10.1'
2305 echo 'cmovb %eax, %ebx' >> $TMPS
2307 if test "$_ssse3" = yes ; then
2308 _pref_as_version
='2.16.92'
2309 echo 'pabsd %xmm0, %xmm1' >> $TMPS
2311 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2313 if test "$as_verc_fail" != yes ; then
2316 _res_comment
="Upgrade binutils to ${_pref_as_version} ..."
2318 die
"obsolete binutils version"
2323 echocheck
".align is a power of two"
2324 if test "$_asmalign_pot" = auto
; then
2327 main() { asm (".align 3"); }
2329 cc_check
&& _asmalign_pot
=yes
2331 if test "$_asmalign_pot" = "yes" ; then
2332 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2334 _def_asmalign_pot
='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
2336 echores
$_asmalign_pot
2339 #FIXME: This should happen before the check for CFLAGS..
2342 # check if altivec is supported by the compiler, and how to enable it
2344 _altivec_gcc_flags
=''
2346 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2347 echocheck
"GCC altivec support"
2355 FSF_flags
='-maltivec -mabi=altivec'
2356 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2358 # check for Darwin-style flags first, since
2359 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2360 # accepts but ignores FSF-style flags...
2362 if test -z "$p"; then
2363 cc_check
$Darwin_flags && p
='Darwin'
2365 if test -z "$p"; then
2366 cc_check
$FSF_flags && p
='FSF'
2370 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2371 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2375 if test -z "$p"; then
2378 p
="$p-style ($_altivec_gcc_flags)"
2384 # check if <altivec.h> should be included
2386 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2388 if test "$_altivec" = yes ; then
2389 echocheck
"altivec.h"
2391 #include <altivec.h>
2392 int main(void) { return 0; }
2395 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2396 if test "$_have_altivec_h" = yes ; then
2397 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2399 echores
"$_have_altivec_h"
2402 # disable runtime cpudetection if
2403 # - we cannot generate altivec code
2404 # - altivec is disabled by the user
2406 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2407 _runtime_cpudetection
=no
2410 # show that we are optimizing for altivec (if enabled and supported)
2412 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2413 _optimizing
="$_optimizing altivec"
2416 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2418 if test "$_altivec" = yes ; then
2419 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2420 #_mcpu="$_mcpu $_altivec_gcc_flags"
2421 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2424 # setup _def_altivec correctly
2426 if test "$_altivec" = yes ; then
2427 _def_altivec
='#define HAVE_ALTIVEC 1'
2429 _def_altivec
='#undef HAVE_ALTIVEC'
2434 echocheck
"ARMv5TE (Enhanced DSP Extensions)"
2435 if test $_armv5te = "auto" ; then
2438 __asm__ __volatile__ ("qadd r0, r0, r0");
2442 cc_check
&& _armv5te
=yes
2446 echocheck
"ARMv6 (SIMD instructions)"
2447 if test $_armv6 = "auto" ; then
2449 int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); }
2452 cc_check
&& _armv6
=yes
2456 echocheck
"iWMMXt (Intel XScale SIMD instructions)"
2457 if test $_iwmmxt = "auto" ; then
2460 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2464 cc_check
&& _iwmmxt
=yes
2469 _def_mmx
='#undef HAVE_MMX'
2470 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2471 _def_mmxext
='#undef HAVE_MMX2'
2472 test "$_mmxext" = yes && _def_mmxext
='#define HAVE_MMX2 1'
2473 _def_3dnow
='#undef HAVE_3DNOW'
2474 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2475 _def_3dnowext
='#undef HAVE_3DNOWEX'
2476 test "$_3dnowext" = yes && _def_3dnowext
='#define HAVE_3DNOWEX 1'
2477 _def_sse
='#undef HAVE_SSE'
2478 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2479 _def_sse2
='#undef HAVE_SSE2'
2480 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2481 _def_ssse3
='#undef HAVE_SSSE3'
2482 test "$_ssse3" = yes && _def_ssse3
='#define HAVE_SSSE3 1'
2483 _def_cmov
='#undef HAVE_CMOV'
2484 test "$_cmov" = yes && _def_cmov
='#define HAVE_CMOV 1'
2485 _def_fast_cmov
='#undef HAVE_FAST_CMOV'
2486 test "$_fast_cmov" = yes && _def_fast_cmov
='#define HAVE_FAST_CMOV 1'
2487 _def_armv5te
='#undef HAVE_ARMV5TE'
2488 test "$_armv5te" = yes && _def_armv5te
='#define HAVE_ARMV5TE 1'
2489 _def_armv6
='#undef HAVE_ARMV6'
2490 test "$_armv6" = yes && _def_armv6
='#define HAVE_ARMV6 1'
2491 _def_iwmmxt
='#undef HAVE_IWMMXT'
2492 test "$_iwmmxt" = yes && _def_iwmmxt
='#define HAVE_IWMMXT 1'
2494 # Checking kernel version...
2495 if x86_32
&& linux
; then
2497 kernel_version
=`uname -r 2>&1`
2498 echocheck
"$system_name kernel version"
2499 case "$kernel_version" in
2500 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2501 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2502 _k_verc_problem
=yes;;
2504 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2507 if test "$_k_verc_fail" ; then
2508 echores
"$kernel_version, fail"
2509 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2510 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2511 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2512 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2513 echo "2.2.x you must upgrade it to get SSE support!"
2514 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2516 echores
"$kernel_version, ok"
2520 ######################
2521 # MAIN TESTS GO HERE #
2522 ######################
2525 echocheck
"extra headers"
2526 if test "$_inc_extra" ; then
2527 echores
"$_inc_extra"
2533 echocheck
"extra libs"
2534 if test "$_ld_extra" ; then
2535 echores
"$_ld_extra"
2542 int main(void) { return 0; }
2544 if cc_check
-lposix ; then
2545 _ld_extra
="$_ld_extra -lposix"
2553 int main(void) { return 0; }
2555 if cc_check
-lm ; then
2564 echocheck
"langinfo"
2565 if test "$_langinfo" = auto
; then
2567 #include <langinfo.h>
2568 int main(void) { nl_langinfo(CODESET); return 0; }
2571 cc_check
&& _langinfo
=yes
2573 if test "$_langinfo" = yes ; then
2574 _def_langinfo
='#define USE_LANGINFO 1'
2576 _def_langinfo
='#undef USE_LANGINFO'
2578 echores
"$_langinfo"
2581 echocheck
"language"
2582 test -z "$_language" && _language
=$LINGUAS
2583 _language
=`echo $_language | sed 's/,/ /g'`
2584 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2585 for lang
in $_language ; do
2586 test "$lang" = all
&& lang
=en
2587 if test -f "help/help_mp-${lang}.h" ; then
2591 echo ${_echo_n} "$lang not found, ${_echo_c}"
2592 _language
=`echo $_language | sed "s/$lang *//"`
2595 test -z "$_language" && _language
=en
2596 _mp_help
="help/help_mp-${_language}.h"
2597 test -f $_mp_help || die
"$_mp_help not found"
2598 for lang
in $LANGUAGES ; do
2599 if test -f "DOCS/man/$lang/mplayer.1" ; then
2600 MAN_LANG
="$lang $MAN_LANG"
2603 _doc_lang
=$_language
2604 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2605 echores
"using $_language (man pages: $MAN_LANG)"
2608 echocheck
"enable sighandler"
2609 if test "$_sighandler" = yes ; then
2610 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2612 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2614 echores
"$_sighandler"
2616 echocheck
"runtime cpudetection"
2617 if test "$_runtime_cpudetection" = yes ; then
2618 _optimizing
="Runtime CPU-Detection enabled"
2619 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2621 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2623 echores
"$_runtime_cpudetection"
2626 echocheck
"restrict keyword"
2627 for restrict_keyword
in restrict __restrict __restrict__
; do
2628 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2630 _def_restrict_keyword
=$restrict_keyword
2634 if [ -n "$_def_restrict_keyword" ]; then
2635 echores
"$_def_restrict_keyword"
2639 # Avoid infinite recursion loop ("#define restrict restrict")
2640 if [ "$_def_restrict_keyword" != "restrict" ]; then
2641 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2643 _def_restrict_keyword
=""
2647 echocheck
"__builtin_expect"
2648 # GCC branch prediction hint
2651 a = __builtin_expect (a, 10);
2652 return a == 10 ? 0 : 1;
2654 int main() { return foo(10) && foo(0); }
2657 cc_check
&& _builtin_expect
=yes
2658 if test "$_builtin_expect" = yes ; then
2659 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2661 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2663 echores
"$_builtin_expect"
2669 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2672 cc_check
-lkstat && _kstat
=yes
2673 if test "$_kstat" = yes ; then
2674 _def_kstat
="#define HAVE_LIBKSTAT 1"
2675 _ld_extra
="$_ld_extra -lkstat"
2677 _def_kstat
="#undef HAVE_LIBKSTAT"
2683 # required for nanosleep on some systems
2686 int main(void) { (void) nanosleep(0, 0); return 0; }
2689 cc_check
-lposix4 && _posix4
=yes
2690 if test "$_posix4" = yes ; then
2691 _ld_extra
="$_ld_extra -lposix4"
2698 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2701 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2702 if test "$_lrintf" = yes ; then
2703 _def_lrintf
="#define HAVE_LRINTF 1"
2705 _def_lrintf
="#undef HAVE_LRINTF"
2712 int main(void) { (void) round(0.0); return 0; }
2715 cc_check
$_ld_lm && _round
=yes
2716 if test "$_round" = yes ; then
2717 _def_round
="#define HAVE_ROUND 1"
2719 _def_round
="#undef HAVE_ROUND"
2723 echocheck
"nanosleep"
2724 # also check for nanosleep
2727 int main(void) { (void) nanosleep(0, 0); return 0; }
2730 cc_check
&& _nanosleep
=yes
2731 if test "$_nanosleep" = yes ; then
2732 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2734 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2736 echores
"$_nanosleep"
2740 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2741 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2744 #include <sys/socket.h>
2745 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2748 for _ld_tmp
in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2749 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && _socklib
=yes && break
2751 if test $_winsock2 = auto
&& not cygwin
; then
2754 #include <winsock2.h>
2755 int main(void) { (void) gethostbyname(0); return 0; }
2757 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2759 test "$_ld_sock" && _res_comment
="using $_ld_sock"
2763 if test $_winsock2 = yes ; then
2765 _def_winsock2
='#define HAVE_WINSOCK2 1'
2767 _def_winsock2
='#undef HAVE_WINSOCK2'
2772 echocheck
"inet_pton()"
2774 #include <sys/types.h>
2775 #include <sys/socket.h>
2776 #include <arpa/inet.h>
2777 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2779 if test "$_winsock2" = yes ; then
2780 _res_comment
="using winsock2 functions instead"
2782 elif cc_check
$_ld_sock ; then
2783 # NOTE: Linux has libresolv but does not need it
2785 _res_comment
="using $_ld_sock"
2787 elif cc_check
$_ld_sock -lresolv ; then
2788 # NOTE: needed for SunOS at least
2789 _ld_sock
="$_ld_sock -lresolv"
2790 _res_comment
="using $_ld_sock"
2793 _res_comment
="trying inet_aton next"
2796 echocheck
"inet_aton()"
2798 #include <sys/types.h>
2799 #include <sys/socket.h>
2800 #include <arpa/inet.h>
2801 int main(void) { (void) inet_aton(0, 0); return 0; }
2804 if cc_check
$_ld_sock ; then
2805 # NOTE: Linux has libresolv but does not need it
2807 _res_comment
="using $_ld_sock"
2808 elif cc_check
$_ld_sock -lresolv ; then
2809 # NOTE: needed for SunOS at least
2810 _ld_sock
="$_ld_sock -lresolv"
2811 _res_comment
="using $_ld_sock"
2815 _res_comment
="network support disabled"
2817 echores
"$_use_aton"
2820 _def_use_aton
='#undef USE_ATON'
2821 if test "$_use_aton" = yes; then
2822 _def_use_aton
='#define USE_ATON 1'
2826 # FIXME network check
2827 if test "$_network" = yes ; then
2828 _def_network
='#define MPLAYER_NETWORK 1'
2829 _ld_extra
="$_ld_extra $_ld_sock"
2830 _inputmodules
="network $_inputmodules"
2832 _noinputmodules
="network $_noinputmodules"
2833 _def_network
='#undef MPLAYER_NETWORK'
2838 echocheck
"inttypes.h (required)"
2840 #include <inttypes.h>
2841 int main(void) { return 0; }
2844 cc_check
&& _inttypes
=yes
2845 echores
"$_inttypes"
2847 if test "$_inttypes" = no
; then
2848 echocheck
"bitypes.h (inttypes.h predecessor)"
2850 #include <sys/bitypes.h>
2851 int main(void) { return 0; }
2853 cc_check
&& _inttypes
=yes
2854 if test "$_inttypes" = yes ; then
2855 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."
2857 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2862 echocheck
"int_fastXY_t in inttypes.h"
2864 #include <inttypes.h>
2866 volatile int_fast16_t v= 0;
2870 cc_check
&& _fast_inttypes
=yes
2871 if test "$_fast_inttypes" = yes ; then
2875 _def_fast_inttypes
='
2876 typedef signed char int_fast8_t;
2877 typedef signed int int_fast16_t;
2878 typedef signed int int_fast32_t;
2879 typedef signed long long int_fast64_t;
2880 typedef unsigned char uint_fast8_t;
2881 typedef unsigned int uint_fast16_t;
2882 typedef unsigned int uint_fast32_t;
2883 typedef unsigned long long uint_fast64_t;'
2885 echores
"$_fast_inttypes"
2888 echocheck
"word size"
2889 _mp_wordsize
="#undef MP_WORDSIZE"
2892 #include <sys/types.h>
2893 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2895 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2896 echores
"$_wordsize"
2899 echocheck
"stddef.h"
2902 int main(void) { return 0; }
2905 cc_check
&& _stddef
=yes
2906 if test "$_stddef" = yes ; then
2907 _def_stddef
='#define HAVE_STDDEF_H 1'
2909 _def_stddef
='#undef HAVE_STDDEF_H'
2914 echocheck
"malloc.h"
2917 int main(void) { (void) malloc(0); return 0; }
2920 cc_check
&& _malloc
=yes
2921 if test "$_malloc" = yes ; then
2922 _def_malloc
='#define HAVE_MALLOC_H 1'
2924 _def_malloc
='#undef HAVE_MALLOC_H'
2926 # malloc.h emits a warning in FreeBSD and OpenBSD
2927 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2931 echocheck
"memalign()"
2932 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2935 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2938 cc_check
&& _memalign
=yes
2939 if test "$_memalign" = yes ; then
2940 _def_memalign
='#define HAVE_MEMALIGN 1'
2942 _def_memalign
='#undef HAVE_MEMALIGN'
2943 _def_map_memalign
='#define memalign(a,b) malloc(b)'
2944 not darwin
&& _def_memalign_hack
='#define CONFIG_MEMALIGN_HACK 1'
2946 echores
"$_memalign"
2949 echocheck
"alloca.h"
2952 int main(void) { (void) alloca(0); return 0; }
2955 cc_check
&& _alloca
=yes
2957 _def_alloca
='#define HAVE_ALLOCA_H 1'
2959 _def_alloca
='#undef HAVE_ALLOCA_H'
2966 #include <sys/types.h>
2967 #include <sys/mman.h>
2968 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2971 cc_check
&& _mman
=yes
2972 if test "$_mman" = yes ; then
2973 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2975 _def_mman
='#undef HAVE_SYS_MMAN_H'
2980 #include <sys/types.h>
2981 #include <sys/mman.h>
2982 int main(void) { void *p = MAP_FAILED; return 0; }
2984 _mman_has_map_failed
=no
2985 cc_check
&& _mman_has_map_failed
=yes
2986 if test "$_mman_has_map_failed" = yes ; then
2987 _def_mman_has_map_failed
=''
2989 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2992 echocheck
"dynamic loader"
2995 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2998 for _ld_tmp
in "" "-ldl" ; do
2999 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
3001 if test "$_dl" = yes ; then
3002 _def_dl
='#define HAVE_LIBDL 1'
3004 _def_dl
='#undef HAVE_LIBDL'
3009 echocheck
"dynamic a/v plugins support"
3010 if test "$_dl" = no
; then
3013 if test "$_dynamic_plugins" = yes ; then
3014 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
3016 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
3018 echores
"$_dynamic_plugins"
3021 #echocheck "dynamic linking"
3022 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
3023 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
3025 #int main(void) { return 0; }
3027 #if cc_check -rdynamic ; then
3028 # _ld_dl_dynamic='-rdynamic'
3029 #elif cc_check -Bdynamic ; then
3030 # _ld_dl_dynamic='-Bdynamic'
3031 #elif cc_check ; then
3034 #echores "using $_ld_dl_dynamic"
3036 _def_threads
='#undef HAVE_THREADS'
3039 if test "$_pthreads" = auto
; then
3041 #include <pthread.h>
3042 void* func(void *arg) { return arg; }
3043 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
3047 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3048 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3049 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
3053 if test "$_pthreads" = yes ; then
3054 _res_comment
="using $_ld_pthread"
3055 _def_pthreads
='#define HAVE_PTHREADS 1'
3056 _def_threads
='#define HAVE_THREADS 1'
3058 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
3059 _def_pthreads
='#undef HAVE_PTHREADS'
3060 _nas
=no
; _tv_v4l1
=no
; _macosx
=no
3061 if not mingw32
; then
3065 echores
"$_pthreads"
3069 if test "$_rpath" = yes ; then
3070 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
3071 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
3078 if test "$_iconv" = auto
; then
3079 _iconv_tmp
='#include <iconv.h>'
3085 #define INBUFSIZE 1024
3086 #define OUTBUFSIZE 4096
3088 char inbuffer[INBUFSIZE];
3089 char outbuffer[OUTBUFSIZE];
3094 char *tocode="UTF-8";
3095 char *fromcode="cp1250";
3096 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
3097 while ((numread = read (0, inbuffer, INBUFSIZE))) {
3098 char *iptr=inbuffer;
3099 char *optr=outbuffer;
3100 size_t inleft=numread;
3101 size_t outleft=OUTBUFSIZE;
3102 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3104 write (1, outbuffer, OUTBUFSIZE - outleft);
3107 if (iconv_close(icdsc) == -1)
3113 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
3114 cc_check
$_ld_lm $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3118 if test "$_iconv" = yes ; then
3119 _def_iconv
='#define USE_ICONV 1'
3121 _def_iconv
='#undef USE_ICONV'
3126 echocheck
"sys/soundcard.h"
3128 #include <sys/soundcard.h>
3129 int main(void) { return 0; }
3132 cc_check
&& _sys_soundcard
=yes
3133 if test "$_sys_soundcard" = yes ; then
3134 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
3135 _include_soundcard
='#include <sys/soundcard.h>'
3137 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
3139 echores
"$_sys_soundcard"
3141 if test "$_sys_soundcard" != yes ; then
3142 echocheck
"soundcard.h"
3144 #include <soundcard.h>
3145 int main(void) { return 0; }
3148 cc_check
&& _soundcard
=yes
3149 if linux ||
test "$_ossaudio" != no
; then
3150 # use soundcard.h on Linux, or when OSS support is enabled
3151 echores
"$_soundcard"
3153 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
3154 _res_comment
= "but ignored!"
3155 echores
"$_soundcard"
3158 if test "$_soundcard" = yes ; then
3159 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3160 _include_soundcard
='#include <soundcard.h>'
3162 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3165 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3169 echocheck
"sys/dvdio.h"
3172 #include <sys/dvdio.h>
3173 int main(void) { return 0; }
3176 cc_check
&& _dvdio
=yes
3177 if test "$_dvdio" = yes ; then
3178 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3180 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3185 echocheck
"sys/cdio.h"
3188 #include <sys/cdio.h>
3189 int main(void) { return 0; }
3192 cc_check
&& _cdio
=yes
3193 if test "$_cdio" = yes ; then
3194 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3196 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3201 echocheck
"linux/cdrom.h"
3203 #include <sys/types.h>
3204 #include <linux/cdrom.h>
3205 int main(void) { return 0; }
3208 cc_check
&& _cdrom
=yes
3209 if test "$_cdrom" = yes ; then
3210 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3212 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3220 int main(void) { return 0; }
3223 cc_check
&& _dvd
=yes
3224 if test "$_dvd" = yes ; then
3225 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3227 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3233 echocheck
"BSDI dvd.h"
3236 int main(void) { return 0; }
3239 cc_check
&& _bsdi_dvd
=yes
3240 if test "$_bsdi_dvd" = yes ; then
3241 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3243 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3245 echores
"$_bsdi_dvd"
3250 # also used by AIX, but AIX does not support VCD and/or libdvdread
3251 echocheck
"HP-UX SCSI header"
3253 #include <sys/scsi.h>
3254 int main(void) { return 0; }
3257 cc_check
&& _hpux_scsi_h
=yes
3258 if test "$_hpux_scsi_h" = yes ; then
3259 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3261 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3263 echores
"$_hpux_scsi_h"
3268 echocheck
"userspace SCSI headers (Solaris)"
3270 # include <unistd.h>
3271 # include <stropts.h>
3272 # include <sys/scsi/scsi_types.h>
3273 # include <sys/scsi/impl/uscsi.h>
3274 int main(void) { return 0; }
3277 cc_check
&& _sol_scsi_h
=yes
3278 if test "$_sol_scsi_h" = yes ; then
3279 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3281 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3283 echores
"$_sol_scsi_h"
3288 if test "$_termcap" = auto
; then
3290 int main(void) { tgetent(); return 0; }
3293 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3294 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
3295 && _termcap
=yes && break
3298 if test "$_termcap" = yes ; then
3299 _def_termcap
='#define USE_TERMCAP 1'
3300 _res_comment
="using $_ld_tmp"
3302 _def_termcap
='#undef USE_TERMCAP'
3308 if test "$_termios" = auto
; then
3310 #include <sys/termios.h>
3311 int main(void) { return 0; }
3314 cc_check
&& _termios
=yes
3315 _def_termios_h_name
='sys/termios.h'
3318 if test "$_termios" = auto
; then
3320 #include <termios.h>
3321 int main(void) { return 0; }
3324 cc_check
&& _termios
=yes
3325 _def_termios_h_name
='termios.h'
3328 if test "$_termios" = yes ; then
3329 _def_termios
='#define HAVE_TERMIOS 1'
3330 _def_termios_h
='#undef HAVE_TERMIOS_H'
3331 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3333 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3334 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3335 elif test "$_def_termios_h_name" = 'termios.h' ; then
3336 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3338 _res_comment
="using $_def_termios_h_name"
3340 _def_termios
='#undef HAVE_TERMIOS'
3341 _def_termios_h_name
=''
3348 if test "$_shm" = auto
; then
3350 #include <sys/types.h>
3351 #include <sys/shm.h>
3352 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3355 cc_check
&& _shm
=yes
3357 if test "$_shm" = yes ; then
3358 _def_shm
='#define HAVE_SHM 1'
3360 _def_shm
='#undef HAVE_SHM'
3365 # XXX: FIXME, add runtime checking
3366 echocheck
"linux devfs"
3367 echores
"$_linux_devfs"
3370 echocheck
"scandir()"
3372 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3375 cc_check
&& _scandir
=yes
3376 if test "$_scandir" = yes ; then
3377 _def_scandir
='#define HAVE_SCANDIR 1'
3380 _def_scandir
='#undef HAVE_SCANDIR'
3386 echocheck
"strsep()"
3389 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3392 cc_check
&& _strsep
=yes
3393 if test "$_strsep" = yes ; then
3394 _def_strsep
='#define HAVE_STRSEP 1'
3397 _def_strsep
='#undef HAVE_STRSEP'
3402 echocheck
"strlcpy()"
3405 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3408 cc_check
&& _strlcpy
=yes
3409 if test "$_strlcpy" = yes ; then
3410 _def_strlcpy
='#define HAVE_STRLCPY 1'
3413 _def_strlcpy
='#undef HAVE_STRLCPY'
3418 echocheck
"strlcat()"
3421 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3424 cc_check
&& _strlcat
=yes
3425 if test "$_strlcat" = yes ; then
3426 _def_strlcat
='#define HAVE_STRLCAT 1'
3429 _def_strlcat
='#undef HAVE_STRLCAT'
3434 echocheck
"fseeko()"
3437 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3440 cc_check
&& _fseeko
=yes
3441 if test "$_fseeko" = yes ; then
3442 _def_fseeko
='#define HAVE_FSEEKO 1'
3445 _def_fseeko
='#undef HAVE_FSEEKO'
3450 echocheck
"localtime_r()"
3453 int main( void ) { localtime_r(NULL, NULL); }
3456 cc_check
&& _localtime_r
=yes
3457 if test "$_localtime_r" = yes ; then
3458 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3460 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3462 echores
"$_localtime_r"
3464 echocheck
"vsscanf()"
3467 int main(void) { vsscanf(0, 0, 0); return 0; }
3470 cc_check
&& _vsscanf
=yes
3471 if test "$_vsscanf" = yes ; then
3472 _def_vsscanf
='#define HAVE_VSSCANF 1'
3475 _def_vsscanf
='#undef HAVE_VSSCANF'
3484 int main(void) { swab(0, 0, 0); return 0; }
3487 cc_check
&& _swab
=yes
3488 if test "$_swab" = yes ; then
3489 _def_swab
='#define HAVE_SWAB 1'
3492 _def_swab
='#undef HAVE_SWAB'
3497 echocheck
"POSIX select()"
3501 #include <sys/types.h>
3503 #include <sys/time.h>
3505 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3508 _def_posix_select
='#undef HAVE_POSIX_SELECT'
3509 cc_check
&& _posix_select
=yes \
3510 && _def_posix_select
='#define HAVE_POSIX_SELECT 1'
3511 echores
"$_posix_select"
3514 echocheck
"gettimeofday()"
3517 #include <sys/time.h>
3518 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3521 cc_check
&& _gettimeofday
=yes
3522 if test "$_gettimeofday" = yes ; then
3523 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3524 _need_gettimeofday
=no
3526 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3527 _need_gettimeofday
=yes
3529 echores
"$_gettimeofday"
3536 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3539 cc_check
&& _glob
=yes
3540 if test "$_glob" = yes ; then
3541 _def_glob
='#define HAVE_GLOB 1'
3544 _def_glob
='#undef HAVE_GLOB'
3550 echocheck
"setenv()"
3553 int main (void){ setenv("","",0); return 0; }
3556 cc_check
&& _setenv
=yes
3557 if test "$_setenv" = yes ; then
3558 _def_setenv
='#define HAVE_SETENV 1'
3561 _def_setenv
='#undef HAVE_SETENV'
3568 echocheck
"sysi86()"
3570 #include <sys/sysi86.h>
3571 int main (void) { sysi86(0); return 0; }
3574 cc_check
&& _sysi86
=yes
3575 if test "$_sysi86" = yes ; then
3576 _def_sysi86
='#define HAVE_SYSI86 1'
3578 #include <sys/sysi86.h>
3579 int main (void) { int sysi86(int, void*); sysi86(0); return 0; }
3581 cc_check
&& _def_sysi86_iv
='#define HAVE_SYSI86_iv 1'
3583 _def_sysi86
='#undef HAVE_SYSI86'
3589 echocheck
"sys/sysinfo.h"
3591 #include <sys/sysinfo.h>
3593 struct sysinfo s_info;
3599 cc_check
&& _sys_sysinfo
=yes
3600 if test "$_sys_sysinfo" = yes ; then
3601 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3603 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3605 echores
"$_sys_sysinfo"
3610 echocheck
"Mac OS X APIs"
3611 if test "$_macosx" = auto
; then
3612 productName
=`/usr/bin/sw_vers -productName`
3613 if test "$productName" = "Mac OS X" ||
3614 test "$productName" = "Mac OS X Server" ; then
3618 _def_macosx
='#undef MACOSX'
3619 _noaomodules
="macosx $_noaomodules"
3620 _novomodules
="quartz $_novomodules"
3623 if test "$_macosx" = yes ; then
3625 #include <Carbon/Carbon.h>
3626 #include <QuickTime/QuickTime.h>
3627 #include <CoreAudio/CoreAudio.h>
3631 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3634 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3635 _ld_extra
="$_ld_extra -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3636 _def_macosx
='#define MACOSX 1'
3637 _aosrc
="$_aosrc ao_macosx.c"
3638 _aomodules
="macosx $_aomodules"
3639 _vosrc
="$_vosrc vo_quartz.c"
3640 _vomodules
="quartz $_vomodules"
3643 _def_macosx
='#undef MACOSX'
3644 _noaomodules
="macosx $_noaomodules"
3645 _novomodules
="quartz $_novomodules"
3648 #include <Carbon/Carbon.h>
3649 #include <QuartzCore/CoreVideo.h>
3652 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3653 _vosrc
="$_vosrc vo_macosx.m"
3654 _vomodules
="macosx $_vomodules"
3655 _ld_extra
="$_ld_extra -framework Cocoa -framework QuartzCore -framework OpenGL"
3656 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3657 _macosx_corevideo
=yes
3659 _novomodules
="macosx $_novomodules"
3660 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3661 _macosx_corevideo
=no
3666 echocheck
"Mac OS X Finder Support"
3667 if test "$_macosx_finder_support" = auto
; then
3668 _macosx_finder_support
=$_macosx
3670 if test "$_macosx_finder_support" = yes; then
3671 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3672 _macosx_finder_support
=yes
3674 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3675 _macosx_finder_support
=no
3677 echores
"$_macosx_finder_support"
3679 echocheck
"Mac OS X Bundle file locations"
3680 if test "$_macosx_bundle" = auto
; then
3681 _macosx_bundle
=$_macosx_finder_support
3683 if test "$_macosx_bundle" = yes; then
3684 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3686 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3689 echores
"$_macosx_bundle"
3694 echocheck
"pkg-config"
3695 _pkg_config
=pkg-config
3696 if `$_pkg_config --version > /dev/null 2>&1`; then
3704 echocheck
"Samba support (libsmbclient)"
3705 if test "$_smbsupport" = yes; then
3706 _ld_extra
="$_ld_extra -lsmbclient"
3708 if test "$_smbsupport" = auto
; then
3711 #include <libsmbclient.h>
3712 int main(void) { smbc_opendir("smb://"); return 0; }
3714 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3715 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && \
3716 _smbsupport
=yes && break
3720 if test "$_smbsupport" = yes; then
3721 _def_smbsupport
="#define LIBSMBCLIENT"
3722 _inputmodules
="smb $_inputmodules"
3724 _def_smbsupport
="#undef LIBSMBCLIENT"
3725 _noinputmodules
="smb $_noinputmodules"
3727 echores
"$_smbsupport"
3736 if test "$_3dfx" = yes ; then
3737 _def_3dfx
='#define HAVE_3DFX 1'
3738 _vosrc
="$_vosrc vo_3dfx.c"
3739 _vomodules
="3dfx $_vomodules"
3741 _def_3dfx
='#undef HAVE_3DFX'
3742 _novomodules
="3dfx $_novomodules"
3748 if test "$_tdfxfb" = yes ; then
3749 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3750 _vosrc
="$_vosrc vo_tdfxfb.c"
3751 _vomodules
="tdfxfb $_vomodules"
3753 _def_tdfxfb
='#undef HAVE_TDFXFB'
3754 _novomodules
="tdfxfb $_novomodules"
3759 if test "$_s3fb" = yes ; then
3760 _def_s3fb
='#define HAVE_S3FB 1'
3761 _vosrc
="$_vosrc vo_s3fb.c"
3762 _vomodules
="s3fb $_vomodules"
3764 _def_s3fb
='#undef HAVE_S3FB'
3765 _novomodules
="s3fb $_novomodules"
3770 if test "$_tdfxvid" = yes ; then
3771 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3772 _vosrc
="$_vosrc vo_tdfx_vid.c"
3773 _vomodules
="tdfx_vid $_vomodules"
3775 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3776 _novomodules
="tdfx_vid $_novomodules"
3781 if test "$_tga" = yes ; then
3782 _def_tga
='#define HAVE_TGA 1'
3783 _vosrc
="$_vosrc vo_tga.c"
3784 _vomodules
="tga $_vomodules"
3786 _def_tga
='#undef HAVE_TGA'
3787 _novomodules
="tga $_novomodules"
3792 echocheck
"DirectFB"
3793 if test "$_directfb" = auto
; then
3796 #include <directfb.h>
3797 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3799 for _inc_tmp
in "" -I/usr
/local
/include
/directfb \
3800 -I/usr
/include
/directfb
-I/usr
/local
/include
-I/usr
/include
; do
3801 cc_check
$_inc_tmp -ldirectfb && _directfb
=yes && \
3802 _inc_extra
="$_inc_extra $_inc_tmp" && break
3807 expr $1 \
* 65536 + $2 \
* 256 + $3
3810 if test "$_directfb" = yes; then
3812 #include <directfb_version.h>
3814 dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
3817 if $_cc -E $TMPC $_inc_extra > "$TMPO"; then
3818 _directfb_version
=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPO" | tr -d '()'`
3819 _dfb_major
=`echo $_directfb_version | cut -d . -f 1`
3820 _dfb_minor
=`echo $_directfb_version | cut -d . -f 2`
3821 _dfb_micro
=`echo $_directfb_version | cut -d . -f 3`
3822 _dfb_version
=`dfb_version $_dfb_major $_dfb_minor $_dfb_micro`
3823 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3824 _def_directfb_version
="#define DIRECTFBVERSION $_dfb_version"
3825 _res_comment
="$_directfb_version"
3827 _def_directfb_version
='#undef DIRECTFBVERSION'
3829 _res_comment
="version >=0.9.13 required"
3833 _res_comment
="failed to get version"
3836 echores
"$_directfb"
3838 if test "$_directfb" = yes ; then
3839 _def_directfb
='#define HAVE_DIRECTFB 1'
3840 if test "$_dfb_version" -ge `dfb_version 0 9 13`; then
3841 _vosrc
="$_vosrc vo_directfb2.c"
3842 _vomodules
="directfb $_vomodules"
3843 _libs_mplayer
="$_libs_mplayer -ldirectfb"
3845 _novomodules
="directfb $_novomodules"
3848 if test "$_dfb_version" -ge `dfb_version 0 9 15`; then
3849 _vosrc
="$_vosrc vo_dfbmga.c"
3850 _vomodules
="dfbmga $_vomodules"
3851 _def_dfbmga
='#define HAVE_DFBMGA 1'
3853 _novomodules
="dfbmga $_novomodules"
3854 _def_dfbmga
='#undef HAVE_DFBMGA'
3857 _def_directfb
='#undef HAVE_DIRECTFB'
3858 _novomodules
="dfbmga directfb $_novomodules"
3862 echocheck
"X11 headers presence"
3863 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
3864 if test -f "$I/X11/Xlib.h" ; then
3867 _res_comment
="using $I"
3871 if test -z "$_inc_x11" ; then
3874 _res_comment
="check if the dev(el) packages are installed"
3876 echores
"$_x11_headers"
3880 if test "$_x11" != no
; then
3882 #include <X11/Xlib.h>
3883 #include <X11/Xutil.h>
3884 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3886 for I
in "" -L/usr
/X11R
6/lib
-L/usr
/lib
/X11R6
-L/usr
/X11
/lib \
3887 -L/usr
/lib32
-L/usr
/openwin
/lib
-L/usr
/X11R
6/lib64
-L/usr
/lib
; do
3889 _ld_tmp
="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
3891 _ld_tmp
="$I -lXext -lX11 $_ld_pthread"
3893 cc_check
$_inc_x11 $_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" \
3894 && _x11
=yes && break
3897 if test "$_x11" = yes ; then
3898 #FIXME: This is ugly as it can duplicate a -I parameter..
3899 _inc_extra
="$_inc_extra $_inc_x11"
3900 _def_x11
='#define HAVE_X11 1'
3901 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3902 _vomodules
="x11 xover $_vomodules"
3905 _def_x11
='#undef HAVE_X11'
3906 _novomodules
="x11 $_novomodules"
3907 _res_comment
="check if the dev(el) packages are installed"
3908 # disable stuff that depends on X
3909 _xv
=no
; _xvmc
=no
; _xinerama
=no
; _vm
=no
; _xf86keysym
=no
; _dga
=no
3917 if test "$_x11" = yes ; then
3919 #include <X11/Xmd.h>
3920 #include <X11/Xlib.h>
3921 #include <X11/Xutil.h>
3922 #include <X11/Xatom.h>
3923 #include <X11/extensions/dpms.h>
3925 (void) DPMSQueryExtension(0, 0, 0);
3928 cc_check
-lXdpms && _xdpms3
=yes
3930 #include <X11/Xlib.h>
3931 #include <X11/extensions/dpms.h>
3933 (void) DPMSQueryExtension(0, 0, 0);
3936 cc_check
&& _xdpms4
=yes
3938 if test "$_xdpms4" = yes ; then
3939 _def_xdpms
='#define HAVE_XDPMS 1'
3940 _res_comment
="using Xdpms 4"
3942 elif test "$_xdpms3" = yes ; then
3943 _def_xdpms
='#define HAVE_XDPMS 1'
3944 _libs_mplayer
="$_libs_mplayer -lXdpms"
3945 _res_comment
="using Xdpms 3"
3948 _def_xdpms
='#undef HAVE_XDPMS'
3954 if test "$_xv" = auto
; then
3956 #include <X11/Xlib.h>
3957 #include <X11/extensions/Xvlib.h>
3959 (void) XvGetPortAttribute(0, 0, 0, 0);
3960 (void) XvQueryPortAttributes(0, 0, 0);
3964 cc_check
-lXv && _xv
=yes
3967 if test "$_xv" = yes ; then
3968 _def_xv
='#define HAVE_XV 1'
3969 _libs_mplayer
="$_libs_mplayer -lXv"
3970 _vosrc
="$_vosrc vo_xv.c"
3971 _vomodules
="xv $_vomodules"
3973 _def_xv
='#undef HAVE_XV'
3974 _novomodules
="xv $_novomodules"
3980 if test "$_xv" = yes && test "$_xvmc" != no
; then
3983 #include <X11/Xlib.h>
3984 #include <X11/extensions/Xvlib.h>
3985 #include <X11/extensions/XvMClib.h>
3987 (void) XvMCQueryExtension(0,0,0);
3988 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3991 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3992 cc_check
-lXvMC -l$_ld_tmp && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3995 if test "$_xvmc" = yes ; then
3996 _def_xvmc
='#define HAVE_XVMC 1'
3997 _libs_mplayer
="$_libs_mplayer -lXvMC -l$_xvmclib"
3998 _vosrc
="$_vosrc vo_xvmc.c"
3999 _vomodules
="xvmc $_vomodules"
4000 _res_comment
="using $_xvmclib"
4002 _def_xvmc
='#undef HAVE_XVMC'
4003 _novomodules
="xvmc $_novomodules"
4004 _libavdecoders
=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
4009 echocheck
"Xinerama"
4010 if test "$_xinerama" = auto
; then
4012 #include <X11/Xlib.h>
4013 #include <X11/extensions/Xinerama.h>
4014 int main(void) { (void) XineramaIsActive(0); return 0; }
4017 cc_check
-lXinerama && _xinerama
=yes
4020 if test "$_xinerama" = yes ; then
4021 _def_xinerama
='#define HAVE_XINERAMA 1'
4022 _libs_mplayer
="$_libs_mplayer -lXinerama"
4024 _def_xinerama
='#undef HAVE_XINERAMA'
4026 echores
"$_xinerama"
4029 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
4030 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
4031 # named 'X extensions' or something similar.
4032 # This check may be useful for future mplayer versions (to change resolution)
4033 # If you run into problems, remove '-lXxf86vm'.
4035 if test "$_vm" = auto
; then
4037 #include <X11/Xlib.h>
4038 #include <X11/extensions/xf86vmode.h>
4039 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
4042 cc_check
-lXxf86vm && _vm
=yes
4044 if test "$_vm" = yes ; then
4045 _def_vm
='#define HAVE_XF86VM 1'
4046 _libs_mplayer
="$_libs_mplayer -lXxf86vm"
4048 _def_vm
='#undef HAVE_XF86VM'
4052 # Check for the presence of special keycodes, like audio control buttons
4053 # that XFree86 might have. Used to be bundled with the xf86vm check, but
4054 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
4055 # have these new keycodes.
4056 echocheck
"XF86keysym"
4057 if test "$_xf86keysym" = auto
; then
4060 #include <X11/Xlib.h>
4061 #include <X11/XF86keysym.h>
4062 int main(void) { return XF86XK_AudioPause; }
4064 cc_check
&& _xf86keysym
=yes
4066 if test "$_xf86keysym" = yes ; then
4067 _def_xf86keysym
='#define HAVE_XF86XK 1'
4069 _def_xf86keysym
='#undef HAVE_XF86XK'
4071 echores
"$_xf86keysym"
4074 # Version 2 is preferred to version 1 if available
4075 if test "$_dga" = auto
; then
4077 #include <X11/Xlib.h>
4078 #include <X11/extensions/xf86dga.h>
4079 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4082 cc_check
-lXxf86dga -lXxf86vm && _dga
=1
4085 #include <X11/Xlib.h>
4086 #include <X11/extensions/xf86dga.h>
4087 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4089 cc_check
-lXxf86dga && _dga
=2
4092 _def_dga
='#undef HAVE_DGA'
4093 _def_dga2
='#undef HAVE_DGA2'
4094 if test "$_dga" = 1 ; then
4095 _def_dga
='#define HAVE_DGA 1'
4096 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4097 _vosrc
="$_vosrc vo_dga.c"
4098 _vomodules
="dga $_vomodules"
4099 _res_comment
="using DGA 1.0"
4100 elif test "$_dga" = 2 ; then
4101 _def_dga
='#define HAVE_DGA 1'
4102 _def_dga2
='#define HAVE_DGA2 1'
4103 _libs_mplayer
="$_libs_mplayer -lXxf86dga"
4104 _vosrc
="$_vosrc vo_dga.c"
4105 _vomodules
="dga $_vomodules"
4106 _res_comment
="using DGA 2.0"
4107 elif test "$_dga" = no
; then
4108 _novomodules
="dga $_novomodules"
4110 die
"DGA version must be 1 or 2"
4116 #Note: this test is run even with --enable-gl since we autodetect linker flags
4117 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
4120 int main(void) { return 0; }
4123 if cc_check
-lGL $_ld_lm ; then
4125 _libs_mplayer
="$_libs_mplayer -lGL $_ld_dl"
4126 elif cc_check
-lGL $_ld_lm $_ld_pthread ; then
4128 _libs_mplayer
="$_libs_mplayer -lGL $_ld_pthread $_ld_dl"
4129 elif cc_check
-lopengl32 ; then
4132 _libs_mplayer
="$_libs_mplayer -lopengl32 -lgdi32"
4137 if test "$_gl" = yes ; then
4138 _def_gl
='#define HAVE_GL 1'
4139 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
4140 if test "$_gl_win32" = yes ; then
4141 _def_gl_win32
='#define GL_WIN32 1'
4142 _vosrc
="$_vosrc w32_common.c"
4143 _res_comment
="win32 version"
4145 _vomodules
="opengl $_vomodules"
4147 _def_gl
='#undef HAVE_GL'
4148 _def_gl_win32
='#undef GL_WIN32'
4149 _novomodules
="opengl $_novomodules"
4154 echocheck
"/dev/mga_vid"
4155 if test "$_mga" = auto
; then
4157 test -c /dev
/mga_vid
&& _mga
=yes
4159 if test "$_mga" = yes ; then
4160 _def_mga
='#define HAVE_MGA 1'
4161 _vosrc
="$_vosrc vo_mga.c"
4162 _vomodules
="mga $_vomodules"
4164 _def_mga
='#undef HAVE_MGA'
4165 _novomodules
="mga $_novomodules"
4170 # echocheck "syncfb"
4172 # test "$_mga" = yes && _syncfb=yes
4173 # if test "$_syncfb" = yes ; then
4174 # _def_syncfb='#define HAVE_SYNCFB 1'
4175 # _vosrc="$_vosrc vo_syncfb.c"
4177 # _def_syncfb='#undef HAVE_SYNCFB'
4179 # echores "$_syncfb"
4183 if test "$_xmga" = auto
; then
4185 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4187 if test "$_xmga" = yes ; then
4188 _def_xmga
='#define HAVE_XMGA 1'
4189 _vosrc
="$_vosrc vo_xmga.c"
4190 _vomodules
="xmga $_vomodules"
4192 _def_xmga
='#undef HAVE_XMGA'
4193 _novomodules
="xmga $_novomodules"
4199 if test "$_ggi" = auto
; then
4201 #include <ggi/ggi.h>
4202 int main(void) { return 0; }
4205 cc_check
-lggi && _ggi
=yes
4207 if test "$_ggi" = yes ; then
4208 _def_ggi
='#define HAVE_GGI 1'
4209 _libs_mplayer
="$_libs_mplayer -lggi"
4210 _vosrc
="$_vosrc vo_ggi.c"
4211 _vomodules
="ggi $_vomodules"
4213 _def_ggi
='#undef HAVE_GGI'
4214 _novomodules
="ggi $_novomodules"
4218 echocheck
"GGI extension: libggiwmh"
4219 if test "$_ggiwmh" = auto
; then
4222 #include <ggi/ggi.h>
4223 #include <ggi/wmh.h>
4224 int main(void) { return 0; }
4226 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4228 # needed to get right output on obscure combination
4229 # like --disable-ggi --enable-ggiwmh
4230 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4231 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4232 _libs_mplayer
="$_libs_mplayer -lggiwmh"
4235 _def_ggiwmh
='#undef HAVE_GGIWMH'
4241 if test "$_aa" = auto
; then
4244 extern struct aa_hardware_params aa_defparams;
4245 extern struct aa_renderparams aa_defrenderparams;
4249 (void) aa_init(0, 0, 0);
4250 c = aa_autoinit(&aa_defparams);
4251 p = aa_getrenderparams();
4252 aa_autoinitkbd(c,0);
4256 for _ld_tmp
in "-laa" ; do
4257 cc_check
$_ld_tmp && _libs_mplayer
="$_libs_mplayer $_ld_tmp" && _aa
=yes && break
4260 if test "$_aa" = yes ; then
4261 _def_aa
='#define HAVE_AA 1'
4263 _libs_mplayer
="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
4265 _vosrc
="$_vosrc vo_aa.c"
4266 _vomodules
="aa $_vomodules"
4268 _def_aa
='#undef HAVE_AA'
4269 _novomodules
="aa $_novomodules"
4275 if test "$_caca" = auto
; then
4277 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4280 #ifdef CACA_API_VERSION_1
4283 int main(void) { (void) caca_init(); return 0; }
4285 cc_check
`caca-config --libs` && _caca
=yes
4288 if test "$_caca" = yes ; then
4289 _def_caca
='#define HAVE_CACA 1'
4290 _inc_extra
="$_inc_extra `caca-config --cflags`"
4291 _libs_mplayer
="$_libs_mplayer `caca-config --libs`"
4292 _vosrc
="$_vosrc vo_caca.c"
4293 _vomodules
="caca $_vomodules"
4295 _def_caca
='#undef HAVE_CACA'
4296 _novomodules
="caca $_novomodules"
4302 if test "$_svga" = auto
; then
4305 int main(void) { return 0; }
4308 cc_check
-lvga $_ld_lm && _svga
=yes
4310 if test "$_svga" = yes ; then
4311 _def_svga
='#define HAVE_SVGALIB 1'
4312 _libs_mplayer
="$_libs_mplayer -lvga"
4313 _vosrc
="$_vosrc vo_svga.c"
4314 _vomodules
="svga $_vomodules"
4316 _def_svga
='#undef HAVE_SVGALIB'
4317 _novomodules
="svga $_novomodules"
4323 if test "$_fbdev" = auto
; then
4325 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
4327 if test "$_fbdev" = yes ; then
4328 _def_fbdev
='#define HAVE_FBDEV 1'
4329 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4330 _vomodules
="fbdev $_vomodules"
4332 _def_fbdev
='#undef HAVE_FBDEV'
4333 _novomodules
="fbdev $_novomodules"
4340 if test "$_dvb" = auto
; then
4343 #include <sys/poll.h>
4344 #include <sys/ioctl.h>
4349 #include <ost/dmx.h>
4350 #include <ost/frontend.h>
4351 #include <ost/sec.h>
4352 #include <ost/video.h>
4353 #include <ost/audio.h>
4354 int main(void) {return 0;}
4356 for _inc_tmp
in "" "-I/usr/src/DVB/ost/include" ; do
4357 cc_check
$_inc_tmp && _dvb
=yes && \
4358 _inc_extra
="$_inc_extra $_inc_tmp" && break
4362 if test "$_dvb" = yes ; then
4363 _def_dvb
='#define HAVE_DVB 1'
4364 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4365 _aomodules
="mpegpes(dvb) $_aomodules"
4366 _vomodules
="mpegpes(dvb) $_vomodules"
4369 echocheck
"DVB HEAD"
4370 if test "$_dvbhead" = auto
; then
4374 #include <sys/poll.h>
4375 #include <sys/ioctl.h>
4380 #include <linux/dvb/dmx.h>
4381 #include <linux/dvb/frontend.h>
4382 #include <linux/dvb/video.h>
4383 #include <linux/dvb/audio.h>
4384 int main(void) {return 0;}
4386 for _inc_tmp
in "" "-I/usr/src/DVB/include" ; do
4387 cc_check
$_inc_tmp && _dvbhead
=yes && \
4388 _inc_extra
="$_inc_extra $_inc_tmp" && break
4392 if test "$_dvbhead" = yes ; then
4393 _def_dvb
='#define HAVE_DVB_HEAD 1'
4394 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4395 _aomodules
="mpegpes(dvb) $_aomodules"
4396 _vomodules
="mpegpes(dvb) $_vomodules"
4399 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4400 _def_dvb
='#undef HAVE_DVB'
4401 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4402 _aomodules
="mpegpes(file) $_aomodules"
4403 _vomodules
="mpegpes(file) $_vomodules"
4406 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4408 _inputmodules
="dvb $_inputmodules"
4411 _noinputmodules
="dvb $_noinputmodules"
4414 echocheck
"PNG support"
4415 if test "$_png" = auto
; then
4418 # Don't check for -lpng on irix since it has its own libpng
4419 # incompatible with the GNU libpng
4420 _res_comment
="disabled on irix (not GNU libpng)"
4426 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4427 printf("libpng: %s\n", png_libpng_ver);
4428 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4431 if cc_check
-lpng -lz $_ld_lm ; then
4435 _res_comment
="mismatch of library and header versions"
4441 if test "$_png" = yes ; then
4442 _def_png
='#define HAVE_PNG 1'
4443 _ld_extra
="$_ld_extra -lpng -lz"
4444 _vosrc
="$_vosrc vo_png.c"
4445 _vomodules
="png $_vomodules"
4447 _def_png
='#undef HAVE_PNG'
4448 _novomodules
="png $_novomodules"
4451 echocheck
"JPEG support"
4452 if test "$_jpeg" = auto
; then
4459 #include <jpeglib.h>
4464 if cc_check
-ljpeg $_ld_lm ; then
4472 if test "$_jpeg" = yes ; then
4473 _def_jpeg
='#define HAVE_JPEG 1'
4474 _vosrc
="$_vosrc vo_jpeg.c"
4475 _vomodules
="jpeg $_vomodules"
4476 _ld_extra
="$_ld_extra -ljpeg"
4478 _def_jpeg
='#undef HAVE_JPEG'
4479 _novomodules
="jpeg $_novomodules"
4484 echocheck
"PNM support"
4485 if test "$_pnm" = yes; then
4486 _def_pnm
="#define HAVE_PNM"
4487 _vosrc
="$_vosrc vo_pnm.c"
4488 _vomodules
="pnm $_vomodules"
4490 _def_pnm
="#undef HAVE_PNM"
4491 _novomodules
="pnm $_novomodules"
4497 echocheck
"GIF support"
4498 # This is to appease people who want to force gif support.
4499 # If it is forced to yes, then we still do checks to determine
4500 # which gif library to use.
4501 if test "$_gif" = yes ; then
4506 if test "$_gif" = auto
; then
4509 #include <gif_lib.h>
4514 for _ld_gif
in "-lungif" "-lgif" ; do
4515 cc_check
$_ld_gif && tmp_run
&& _gif
=yes && break
4519 # If no library was found, and the user wants support forced,
4520 # then we force it on with libgif, as this is the safest
4521 # assumption IMHO. (libungif & libregif both create symbolic
4522 # links to libgif. We also assume that no x11 support is needed,
4523 # because if you are forcing this, then you _should_ know what
4524 # you are doing. [ Besides, package maintainers should never
4525 # have compiled x11 deps into libungif in the first place. ] )
4528 if test "$_force_gif" = yes && test "$_gif" = no
; then
4533 if test "$_gif" = yes ; then
4534 _def_gif
='#define HAVE_GIF 1'
4535 _vosrc
="$_vosrc vo_gif89a.c"
4536 _codecmodules
="gif $_codecmodules"
4537 _vomodules
="gif89a $_vomodules"
4538 _res_comment
="old version, some encoding functions disabled"
4539 _def_gif_4
='#undef HAVE_GIF_4'
4540 _ld_extra
="$_ld_extra $_ld_gif"
4544 #include <gif_lib.h>
4545 void catch() { exit(1); }
4547 signal(SIGSEGV, catch); // catch segfault
4548 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4549 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4553 if cc_check
"$_ld_gif" && tmp_run
; then
4554 _def_gif_4
='#define HAVE_GIF_4 1'
4558 _def_gif
='#undef HAVE_GIF'
4559 _def_gif_4
='#undef HAVE_GIF_4'
4560 _novomodules
="gif89a $_novomodules"
4561 _nocodecmodules
="gif $_nocodecmodules"
4566 case "$_gif" in yes*)
4567 echocheck
"broken giflib workaround"
4568 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4571 #include <gif_lib.h>
4574 printf("UserData is at address %p\n", gif.UserData);
4578 if cc_check
"$_ld_gif" && tmp_run
; then
4579 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4588 echocheck
"VESA support"
4589 if test "$_vesa" = auto
; then
4592 int main(void) { vbeVersion(); return 0; }
4595 cc_check
-lvbe -llrmi && _vesa
=yes
4597 if test "$_vesa" = yes ; then
4598 _def_vesa
='#define HAVE_VESA 1'
4599 _libs_mplayer
="$_libs_mplayer -lvbe -llrmi"
4600 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4601 _vomodules
="vesa $_vomodules"
4603 _def_vesa
='#undef HAVE_VESA'
4604 _novomodules
="vesa $_novomodules"
4614 if test -z "$_sdlconfig" ; then
4615 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4616 _sdlconfig
="sdl-config"
4617 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4618 _sdlconfig
="sdl11-config"
4623 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4626 int main(int argc, char *argv[]) { return 0; }
4629 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4630 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4631 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4632 if test "$_sdlversion" -gt 116 ; then
4633 if test "$_sdlversion" -lt 121 ; then
4634 _def_sdlbuggy
='#define BUGGY_SDL'
4636 _def_sdlbuggy
='#undef BUGGY_SDL'
4643 if test "$_sdl" = yes ; then
4644 _def_sdl
='#define HAVE_SDL 1'
4646 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`"
4647 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`"
4649 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//`"
4650 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`"
4652 _libs_mplayer
="$_libs_mplayer `$_sdlconfig --libs`"
4653 _inc_extra
="$_inc_extra `$_sdlconfig --cflags | sed s/-D_GNU_SOURCE=1//`"
4655 _vosrc
="$_vosrc vo_sdl.c"
4656 _vomodules
="sdl $_vomodules"
4657 _aosrc
="$_aosrc ao_sdl.c"
4658 _aomodules
="sdl $_aomodules"
4659 _res_comment
="using $_sdlconfig"
4661 _def_sdl
='#undef HAVE_SDL'
4662 _novomodules
="sdl $_novomodules"
4663 _noaomodules
="sdl $_noaomodules"
4670 echocheck
"Windows waveout"
4671 if test "$_win32waveout" = auto
; then
4673 #include <windows.h>
4674 #include <mmsystem.h>
4675 int main(void) { return 0; }
4678 cc_check
-lwinmm && _win32waveout
=yes
4680 if test "$_win32waveout" = yes ; then
4681 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4682 _libs_mplayer
="$_libs_mplayer -lwinmm"
4683 _aosrc
="$_aosrc ao_win32.c"
4684 _aomodules
="win32 $_aomodules"
4686 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4687 _noaomodules
="win32 $_noaomodules"
4689 echores
"$_win32waveout"
4692 if test "$_directx" = auto
; then
4694 #include <windows.h>
4697 int main(void) { return 0; }
4700 cc_check
-lgdi32 && _directx
=yes
4702 if test "$_directx" = yes ; then
4703 _def_directx
='#define HAVE_DIRECTX 1'
4704 _libs_mplayer
="$_libs_mplayer -lgdi32"
4705 _vosrc
="$_vosrc vo_directx.c"
4706 _vomodules
="directx $_vomodules"
4707 _aosrc
="$_aosrc ao_dsound.c"
4708 _aomodules
="dsound $_aomodules"
4710 _def_directx
='#undef HAVE_DIRECTX'
4711 _novomodules
="directx $_novomodules"
4712 _noaomodules
="dsound $_noaomodules"
4720 if test "$_nas" = auto
; then
4722 #include <audio/audiolib.h>
4723 int main(void) { return 0; }
4726 cc_check
$_ld_lm -laudio -lXt && _nas
=yes
4728 if test "$_nas" = yes ; then
4729 _def_nas
='#define HAVE_NAS 1'
4730 _libs_mplayer
="$_libs_mplayer -laudio -lXt"
4731 _aosrc
="$_aosrc ao_nas.c"
4732 _aomodules
="nas $_aomodules"
4734 _noaomodules
="nas $_noaomodules"
4735 _def_nas
='#undef HAVE_NAS'
4740 if test "$_dxr2" = auto
; then
4743 #include <dxr2ioctl.h>
4744 int main(void) { return 0; }
4746 for _inc_tmp
in "" -I/usr
/local
/include
/dxr2
-I/usr
/include
/dxr2
; do
4747 cc_check
$_inc_tmp && _dxr2
=yes && \
4748 _inc_extra
="$_inc_extra $_inc_tmp" && break
4751 if test "$_dxr2" = yes; then
4752 _def_dxr2
='#define HAVE_DXR2 1'
4753 _vosrc
="$_vosrc vo_dxr2.c"
4754 _aosrc
="$_aosrc ao_dxr2.c"
4755 _aomodules
="dxr2 $_aomodules"
4756 _vomodules
="dxr2 $_vomodules"
4758 _def_dxr2
='#undef HAVE_DXR2'
4759 _noaomodules
="dxr2 $_noaomodules"
4760 _novomodules
="dxr2 $_novomodules"
4765 if test "$_dxr3" = auto
; then
4767 #include <linux/em8300.h>
4768 int main(void) { return 0; }
4771 cc_check
&& _dxr3
=yes
4773 if test "$_dxr3" = yes ; then
4774 _def_dxr3
='#define HAVE_DXR3 1'
4775 _vosrc
="$_vosrc vo_dxr3.c"
4776 _vomodules
="dxr3 $_vomodules"
4778 _def_dxr3
='#undef HAVE_DXR3'
4779 _novomodules
="dxr3 $_novomodules"
4784 echocheck
"IVTV TV-Out"
4785 if test "$_ivtv" = auto
; then
4788 #include <inttypes.h>
4789 #include <linux/types.h>
4790 #include <linux/videodev2.h>
4791 #include <linux/ivtv.h>
4792 int main(void) { return 0; }
4795 cc_check
&& _ivtv
=yes
4797 if test "$_ivtv" = yes ; then
4798 _def_ivtv
='#define HAVE_IVTV 1'
4799 _vosrc
="$_vosrc vo_ivtv.c"
4800 _vomodules
="ivtv $_vomodules"
4801 _aosrc
="$_aosrc ao_ivtv.c"
4802 _aomodules
="ivtv $_aomodules"
4804 _def_ivtv
='#undef HAVE_IVTV'
4805 _novomodules
="ivtv $_novomodules"
4806 _noaomodules
="ivtv $_noaomodules"
4817 echocheck
"OSS Audio"
4818 if test "$_ossaudio" = auto
; then
4820 #include <sys/ioctl.h>
4822 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4825 cc_check
&& _ossaudio
=yes
4827 if test "$_ossaudio" = yes ; then
4828 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4829 _aosrc
="$_aosrc ao_oss.c"
4830 _aomodules
="oss $_aomodules"
4831 if test "$_linux_devfs" = yes; then
4832 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4833 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4836 #include <sys/ioctl.h>
4838 #ifdef OPEN_SOUND_SYSTEM
4839 int main(void) { return 0; }
4841 #error Not the real thing
4845 cc_check
&& _real_ossaudio
=yes
4846 if test "$_real_ossaudio" = yes; then
4847 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4848 elif netbsd || openbsd
; then
4849 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4850 _ld_extra
="$_ld_extra -lossaudio"
4852 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4854 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4857 _def_ossaudio
='#undef USE_OSS_AUDIO'
4858 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4859 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4860 _noaomodules
="oss $_noaomodules"
4862 echores
"$_ossaudio"
4866 if test "$_arts" = auto
; then
4868 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4872 int main(void) { return 0; }
4874 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4879 if test "$_arts" = yes ; then
4880 _def_arts
='#define USE_ARTS 1'
4881 _aosrc
="$_aosrc ao_arts.c"
4882 _aomodules
="arts $_aomodules"
4883 _libs_mplayer
="$_libs_mplayer `artsc-config --libs`"
4884 _inc_extra
="$_inc_extra `artsc-config --cflags`"
4886 _noaomodules
="arts $_noaomodules"
4892 if test "$_esd" = auto
; then
4894 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4898 int main(void) { return 0; }
4900 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
4906 if test "$_esd" = yes ; then
4907 _def_esd
='#define USE_ESD 1'
4908 _aosrc
="$_aosrc ao_esd.c"
4909 _aomodules
="esd $_aomodules"
4910 _libs_mplayer
="$_libs_mplayer `esd-config --libs`"
4911 _inc_extra
="$_inc_extra `esd-config --cflags`"
4913 echocheck
"esd_get_latency()"
4916 int main(void) { return esd_get_latency(0); }
4918 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4919 echores
"$_esd_latency"
4921 _def_esd
='#undef USE_ESD'
4922 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4923 _noaomodules
="esd $_noaomodules"
4927 if test "$_polyp" = auto
; then
4929 if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
4932 #include <polyp/polyplib.h>
4933 #include <polyp/mainloop.h>
4934 #include <polyp/polyplib-error.h>
4935 int main(void) { return 0; }
4937 cc_check
`$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
4943 if test "$_polyp" = yes ; then
4944 _def_polyp
='#define USE_POLYP 1'
4945 _aosrc
="$_aosrc ao_polyp.c"
4946 _aomodules
="polyp $_aomodules"
4947 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`"
4948 _inc_extra
="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
4950 _def_polyp
='#undef USE_POLYP'
4951 _noaomodules
="polyp $_noaomodules"
4956 if test "$_jack" = auto
; then
4960 #include <jack/jack.h>
4961 int main(void) { jack_client_new("test"); return 0; }
4963 if cc_check
-ljack ; then
4964 _libs_mplayer
="$_libs_mplayer -ljack"
4965 elif cc_check
`$_pkg_config --libs --cflags --silence-errors jack` ; then
4966 _libs_mplayer
="$_libs_mplayer `$_pkg_config --libs jack`"
4967 _inc_extra
="$_inc_extra "`$_pkg_config --cflags jack`""
4973 if test "$_jack" = yes ; then
4974 _def_jack
='#define USE_JACK 1'
4975 _aosrc
="$_aosrc ao_jack.c"
4976 _aomodules
="jack $_aomodules"
4978 _noaomodules
="jack $_noaomodules"
4983 if test "$_openal" = auto
; then
4987 #include <OpenAL/al.h>
4992 alSourceQueueBuffers(0, 0, 0);
4993 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
4997 for I
in "-lopenal" "-framework OpenAL" ; do
4998 cc_check
$I && _openal
=yes && break
4999 cc_check
-DOPENAL_AL_H=1 $I && _def_openal_h
='#define OPENAL_AL_H 1' && _openal
=yes && break
5001 test "$_openal" = yes && _libs_mplayer
="$_libs_mplayer $I"
5003 if test "$_openal" = yes ; then
5004 _def_openal
='#define USE_OPENAL 1'
5005 _aosrc
="$_aosrc ao_openal.c"
5006 _aomodules
="openal $_aomodules"
5008 _noaomodules
="openal $_noaomodules"
5012 echocheck
"ALSA audio"
5013 if test "$_alsa" != no
; then
5016 #include <sys/asoundlib.h>
5017 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
5018 #error "alsa version != 0.5.x"
5020 int main(void) { return 0; }
5022 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
5025 #include <sys/asoundlib.h>
5026 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5027 #error "alsa version != 0.9.x"
5029 int main(void) { return 0; }
5031 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
5033 #include <alsa/asoundlib.h>
5034 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
5035 #error "alsa version != 0.9.x"
5037 int main(void) { return 0; }
5039 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
5042 #include <sys/asoundlib.h>
5043 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5044 #error "alsa version != 1.0.x"
5046 int main(void) { return 0; }
5048 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
5050 #include <alsa/asoundlib.h>
5051 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
5052 #error "alsa version != 1.0.x"
5054 int main(void) { return 0; }
5056 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
5058 _def_alsa5
='#undef HAVE_ALSA5'
5059 _def_alsa9
='#undef HAVE_ALSA9'
5060 _def_alsa1x
='#undef HAVE_ALSA1X'
5061 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
5062 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
5063 if test "$_alsaver" ; then
5065 if test "$_alsaver" = '0.5.x' ; then
5067 _aosrc
="$_aosrc ao_alsa5.c"
5068 _aomodules
="alsa5 $_aomodules"
5069 _def_alsa5
='#define HAVE_ALSA5 1'
5070 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5071 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
5072 elif test "$_alsaver" = '0.9.x-sys' ; then
5074 _aosrc
="$_aosrc ao_alsa.c"
5075 _aomodules
="alsa $_aomodules"
5076 _def_alsa9
='#define HAVE_ALSA9 1'
5077 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5078 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
5079 elif test "$_alsaver" = '0.9.x-alsa' ; then
5081 _aosrc
="$_aosrc ao_alsa.c"
5082 _aomodules
="alsa $_aomodules"
5083 _def_alsa9
='#define HAVE_ALSA9 1'
5084 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5085 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
5086 elif test "$_alsaver" = '1.0.x-sys' ; then
5088 _aosrc
="$_aosrc ao_alsa.c"
5089 _aomodules
="alsa $_aomodules"
5090 _def_alsa1x
="#define HAVE_ALSA1X 1"
5091 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
5092 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
5093 elif test "$_alsaver" = '1.0.x-alsa' ; then
5095 _aosrc
="$_aosrc ao_alsa.c"
5096 _aomodules
="alsa $_aomodules"
5097 _def_alsa1x
="#define HAVE_ALSA1X 1"
5098 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
5099 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
5102 _res_comment
="unknown version"
5104 _ld_extra
="$_ld_extra -lasound $_ld_dl $_ld_pthread"
5106 _noaomodules
="alsa $_noaomodules"
5111 echocheck
"Sun audio"
5112 if test "$_sunaudio" = auto
; then
5114 #include <sys/types.h>
5115 #include <sys/audioio.h>
5116 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
5119 cc_check
&& _sunaudio
=yes
5121 if test "$_sunaudio" = yes ; then
5122 _def_sunaudio
='#define USE_SUN_AUDIO 1'
5123 _aosrc
="$_aosrc ao_sun.c"
5124 _aomodules
="sun $_aomodules"
5126 _def_sunaudio
='#undef USE_SUN_AUDIO'
5127 _noaomodules
="sun $_noaomodules"
5129 echores
"$_sunaudio"
5133 echocheck
"Sun mediaLib"
5134 if test "$_mlib" = auto
; then
5138 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5140 cc_check
-lmlib && _mlib
=yes
5142 if test "$_mlib" = yes ; then
5143 _def_mlib
='#define HAVE_MLIB 1'
5145 _def_mlib
='#undef HAVE_MLIB'
5152 echocheck
"SGI audio"
5153 if test "$_sgiaudio" = auto
; then
5154 # check for SGI audio
5156 #include <dmedia/audio.h>
5157 int main(void) { return 0; }
5160 cc_check
&& _sgiaudio
=yes
5162 if test "$_sgiaudio" = "yes" ; then
5163 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5164 _libs_mplayer
="$_libs_mplayer -laudio"
5165 _aosrc
="$_aosrc ao_sgi.c"
5166 _aomodules
="sgi $_aomodules"
5168 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5169 _noaomodules
="sgi $_noaomodules"
5171 echores
"$_sgiaudio"
5175 echocheck
"VCD support"
5176 if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32
; then
5177 _inputmodules
="vcd $_inputmodules"
5178 _def_vcd
='#define HAVE_VCD 1'
5181 _def_vcd
='#undef HAVE_VCD'
5182 _noinputmodules
="vcd $_noinputmodules"
5183 _res_comment
="not supported on this OS"
5191 if test "$_dvdread_internal" = auto
; then
5192 _dvdread_internal
=no
5193 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
&& \
5194 test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes || \
5195 test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes || \
5196 test "$_hpux_scsi_h" = yes || darwin || win32
; then
5197 _dvdread_internal
=yes
5199 _res_comment
="internal"
5201 elif test "$_dvdread" = auto
; then
5203 if test "$_dl" = yes; then
5205 #include <inttypes.h>
5206 #include <dvdread/dvd_reader.h>
5207 #include <dvdread/ifo_types.h>
5208 #include <dvdread/ifo_read.h>
5209 #include <dvdread/nav_read.h>
5210 int main(void) { return 0; }
5212 cc_check
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
5213 -ldvdread $_ld_dl && _dvdread
=yes && _res_comment
="external"
5217 if test "$_dvdread_internal" = yes; then
5218 _def_dvdread_internal
="#define USE_DVDREAD_INTERNAL 1"
5219 _def_dvdread
='#define USE_DVDREAD 1'
5220 _inputmodules
="dvdread(internal) $_inputmodules"
5222 elif test "$_dvdread" = yes; then
5223 _def_dvdread
='#define USE_DVDREAD 1'
5225 _ld_extra
="$_ld_extra -ldvdread"
5226 _inputmodules
="dvdread(external) $_inputmodules"
5227 _res_comment
="external"
5229 _def_dvdread_internal
="#undef USE_DVDREAD_INTERNAL"
5230 _def_dvdread
='#undef USE_DVDREAD'
5231 _noinputmodules
="dvdread $_noinputmodules"
5236 echocheck
"internal libdvdcss"
5237 if test "$_libdvdcss_internal" = auto
; then
5238 _libdvdcss_internal
=no
5239 test "$_dvdread_internal" = yes && _libdvdcss_internal
=yes
5241 if test "$_libdvdcss_internal" = yes ; then
5242 if linux || netbsd || openbsd || bsdos
; then
5243 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5244 openbsd
&& _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5246 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5248 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5249 _ld_extra
="$_ld_extra -framework IOKit"
5251 _inputmodules
="libdvdcss(internal) $_inputmodules"
5254 _noinputmodules
="libdvdcss(internal) $_noinputmodules"
5256 echores
"$_libdvdcss_internal"
5259 echocheck
"cdparanoia"
5260 if test "$_cdparanoia" = auto
; then
5262 #include <cdda_interface.h>
5263 #include <cdda_paranoia.h>
5264 // This need a better test. How ?
5266 void *test = cdda_verbose_set;
5267 return test == (void *)1;
5271 for _inc_tmp
in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5272 cc_check
$_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5273 _cdparanoia
=yes && _inc_extra
="$_inc_extra $_inc_tmp" && break
5276 if test "$_cdparanoia" = yes ; then
5278 _ld_extra
="$_ld_extra -lcdda_interface -lcdda_paranoia"
5279 openbsd
&& _ld_extra
="$_ld_extra -lutil"
5281 echores
"$_cdparanoia"
5285 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5288 #include <cdio/version.h>
5289 #include <cdio/cdda.h>
5290 #include <cdio/paranoia.h>
5293 void *test = cdda_verbose_set;
5294 printf("%s\n", CDIO_VERSION);
5295 return test == (void *)1;
5300 for _ld_tmp
in "" "-lwinmm" ; do
5301 _ld_tmp
="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5302 cc_check
$_ld_tmp $_ld_lm \
5303 && _libcdio
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5305 if test "$_libcdio" = no
&& $_pkg_config --exists libcdio_paranoia
; then
5306 _inc_tmp
=`$_pkg_config --cflags libcdio_paranoia`
5307 _ld_tmp
=`$_pkg_config --libs libcdio_paranoia`
5308 cc_check
$_inc_tmp $_ld_tmp $_ld_lm && _libcdio
=yes \
5309 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5312 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5314 _def_libcdio
='#define HAVE_LIBCDIO'
5315 _def_havelibcdio
='yes'
5317 if test "$_cdparanoia" = yes ; then
5318 _res_comment
="using cdparanoia"
5320 _def_libcdio
='#undef HAVE_LIBCDIO'
5321 _def_havelibcdio
='no'
5325 if test "$_cdda" = yes ; then
5326 test $_cddb = auto
&& test $_network = yes && not darwin
&& _cddb
=yes
5327 _def_cdparanoia
='#define HAVE_CDDA'
5328 _inputmodules
="cdda $_inputmodules"
5330 _def_cdparanoia
='#undef HAVE_CDDA'
5331 _noinputmodules
="cdda $_noinputmodules"
5334 if test "$_cddb" = yes ; then
5335 _def_cddb
='#define HAVE_CDDB'
5336 _inputmodules
="cddb $_inputmodules"
5339 _def_cddb
='#undef HAVE_CDDB'
5340 _noinputmodules
="cddb $_noinputmodules"
5343 echocheck
"bitmap font support"
5344 if test "$_bitmap_font" = yes ; then
5345 _def_bitmap_font
="#define HAVE_BITMAP_FONT 1"
5347 _def_bitmap_font
="#undef HAVE_BITMAP_FONT"
5349 echores
"$_bitmap_font"
5352 echocheck
"freetype >= 2.0.9"
5354 # freetype depends on iconv
5355 if test "$_iconv" = no
; then
5357 _res_comment
="iconv support needed"
5360 if test "$_freetype" = auto
; then
5361 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5364 #include <ft2build.h>
5365 #include FT_FREETYPE_H
5366 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5367 #error "Need FreeType 2.0.9 or newer"
5372 FT_Int major=-1,minor=-1,patch=-1;
5373 int err=FT_Init_FreeType(&library);
5375 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5378 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5379 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5380 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5381 (int)major,(int)minor,(int)patch );
5382 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5383 printf("Library and header version mismatch! Fix it in your distribution!\n");
5390 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5395 if test "$_freetype" = yes ; then
5396 _def_freetype
='#define HAVE_FREETYPE'
5397 _inc_extra
="$_inc_extra `$_freetypeconfig --cflags`"
5398 _ld_extra
="$_ld_extra `$_freetypeconfig --libs`"
5400 _def_freetype
='#undef HAVE_FREETYPE'
5402 echores
"$_freetype"
5404 if test "$_freetype" = no
; then
5406 _res_comment
="freetype support needed"
5408 echocheck
"fontconfig"
5409 if test "$_fontconfig" = auto
; then
5412 #include <fontconfig/fontconfig.h>
5417 printf("Couldn't initialize fontconfig lib\n");
5425 for _ld_tmp
in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5426 _ld_tmp
="-lfontconfig $_ld_tmp"
5427 cc_check
$_ld_tmp && _fontconfig
=yes && _ld_extra
="$_ld_extra $_ld_tmp" && break
5429 if test "$_fontconfig" = no
&& $_pkg_config --exists fontconfig
; then
5430 _inc_tmp
=`$_pkg_config --cflags fontconfig`
5431 _ld_tmp
=`$_pkg_config --libs fontconfig`
5432 cc_check
$_inc_tmp $_ld_tmp && _fontconfig
=yes \
5433 && _ld_extra
="$_ld_extra $_ld_tmp" && _inc_extra
="$_inc_extra $_inc_tmp"
5436 if test "$_fontconfig" = yes ; then
5437 _def_fontconfig
='#define HAVE_FONTCONFIG'
5439 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5441 echores
"$_fontconfig"
5444 echocheck
"SSA/ASS support"
5445 # libass depends on FreeType
5446 if test "$_freetype" = no
; then
5448 _res_comment
="FreeType support needed"
5451 if test "$_ass" = auto
; then
5453 #include <ft2build.h>
5454 #include FT_FREETYPE_H
5455 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5456 #error "Need FreeType 2.1.8 or newer"
5458 int main() { return 0; }
5461 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _ass
=yes
5462 if test "$_ass" = no
; then
5463 _res_comment
="FreeType >= 2.1.8 needed"
5466 if test "$_ass" = yes ; then
5467 _def_ass
='#define USE_ASS'
5469 _def_ass
='#undef USE_ASS'
5474 echocheck
"fribidi with charsets"
5475 if test "$_fribidi" = auto
; then
5476 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5479 /* workaround for fribidi 0.10.4 and below */
5480 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5481 #include <fribidi/fribidi.h>
5484 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5485 printf("Fribidi headers are not consistents with the library!\n");
5492 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5497 if test "$_fribidi" = yes ; then
5498 _def_fribidi
='#define USE_FRIBIDI'
5499 _inc_extra
="$_inc_extra `$_fribidiconfig --cflags`"
5500 _ld_extra
="$_ld_extra `$_fribidiconfig --libs`"
5502 _def_fribidi
='#undef USE_FRIBIDI'
5508 if test "$_enca" = auto
; then
5515 langs = enca_get_languages(&langcnt);
5520 cc_check
-lenca $_ld_lm && _enca
=yes
5522 if test "$_enca" = yes ; then
5523 _def_enca
='#define HAVE_ENCA 1'
5524 _ld_extra
="$_ld_extra -lenca"
5526 _def_enca
='#undef HAVE_ENCA'
5534 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5537 cc_check
-lz && _zlib
=yes
5538 if test "$_zlib" = yes ; then
5539 _def_zlib
='#define HAVE_ZLIB 1'
5540 _ld_extra
="$_ld_extra -lz"
5542 _def_zlib
='#undef HAVE_ZLIB'
5543 _libavdecoders
=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
5544 _libavencoders
=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
5550 if test "$_rtc" = auto
; then
5552 #include <sys/ioctl.h>
5554 #include <linux/rtc.h>
5557 #define RTC_PIE_ON RTCIO_PIE_ON
5559 int main(void) { return RTC_PIE_ON; }
5562 cc_check
&& _rtc
=yes
5565 if test "$_rtc" = yes ; then
5566 _def_rtc
='#define HAVE_RTC 1'
5568 _def_rtc
='#undef HAVE_RTC'
5573 echocheck
"liblzo2 support"
5574 if test "$_liblzo" = auto
; then
5577 #include <lzo/lzo1x.h>
5578 int main(void) { lzo_init();return 0; }
5580 cc_check
-llzo2 && _liblzo
=yes
5582 if test "$_liblzo" = yes ; then
5583 _def_liblzo
='#define USE_LIBLZO 1'
5584 _ld_extra
="$_ld_extra -llzo2"
5585 _codecmodules
="liblzo $_codecmodules"
5587 _def_liblzo
='#undef USE_LIBLZO'
5588 _nocodecmodules
="liblzo $_nocodecmodules"
5593 echocheck
"mad support"
5594 if test "$_mad" = auto
; then
5598 int main(void) { return 0; }
5600 cc_check
-lmad && _mad
=yes
5602 if test "$_mad" = yes ; then
5603 _def_mad
='#define USE_LIBMAD 1'
5604 _ld_extra
="$_ld_extra -lmad"
5605 _codecmodules
="libmad $_codecmodules"
5607 _def_mad
='#undef USE_LIBMAD'
5608 _nocodecmodules
="libmad $_nocodecmodules"
5613 if test "$_twolame" = auto
; then
5615 #include <twolame.h>
5616 int main(void) { twolame_init(); return 0; }
5619 cc_check
-ltwolame $_ld_lm && _twolame
=yes
5621 if test "$_twolame" = yes ; then
5622 _def_twolame
='#define HAVE_TWOLAME 1'
5623 _libs_mencoder
="$_libs_mencoder -ltwolame"
5624 _codecmodules
="twolame $_codecmodules"
5626 _def_twolame
='#undef HAVE_TWOLAME'
5627 _nocodecmodules
="twolame $_nocodecmodules"
5632 if test "$_toolame" = auto
; then
5634 if test "$_twolame" = yes ; then
5635 _res_comment
="disabled by twolame"
5638 #include <toolame.h>
5639 int main(void) { toolame_init(); return 0; }
5641 cc_check
-ltoolame $_ld_lm && _toolame
=yes
5644 if test "$_toolame" = yes ; then
5645 _def_toolame
='#define HAVE_TOOLAME 1'
5646 _libs_mencoder
="$_libs_mencoder -ltoolame"
5647 _codecmodules
="toolame $_codecmodules"
5649 _def_toolame
='#undef HAVE_TOOLAME'
5650 _nocodecmodules
="toolame $_nocodecmodules"
5652 if test "$_toolamedir" ; then
5653 _res_comment
="using $_toolamedir"
5657 echocheck
"OggVorbis support"
5658 if test "$_tremor_internal" = yes; then
5660 elif test "$_tremor_external" = auto
; then
5663 #include <tremor/ivorbiscodec.h>
5664 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5666 cc_check
-logg -lvorbisidec $_ld_lm && _tremor_external
=yes && _libvorbis
=no
5668 if test "$_libvorbis" = auto
; then
5671 #include <vorbis/codec.h>
5672 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5674 cc_check
-lvorbis -logg $_ld_lm && _libvorbis
=yes
5676 if test "$_tremor_internal" = yes ; then
5678 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5679 _def_tremor
='#define TREMOR 1'
5680 _codecmodules
="tremor(internal) $_codecmodules"
5681 _res_comment
="internal Tremor"
5682 if test "$_tremor_low" = yes ; then
5683 _res_comment
="internal low accuracy Tremor"
5685 elif test "$_tremor_external" = yes ; then
5687 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5688 _def_tremor
='#define TREMOR 1'
5689 _codecmodules
="tremor(external) $_codecmodules"
5690 _res_comment
="external Tremor"
5691 _ld_extra
="$_ld_extra -logg -lvorbisidec"
5692 elif test "$_libvorbis" = yes ; then
5694 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5695 _codecmodules
="libvorbis $_codecmodules"
5696 _res_comment
="libvorbis"
5697 _ld_extra
="$_ld_extra -lvorbis -logg"
5700 _nocodecmodules
="libvorbis $_nocodecmodules"
5702 if test "$_libvorbis" = no
; then
5703 _libavencoders
=`echo $_libavencoders | sed -e s/LIBVORBIS_ENCODER// `
5704 _libavmuxers
=`echo $_libavmuxers | sed -e s/OGG_MUXER// `
5708 echocheck
"libspeex (version >= 1.1 required)"
5709 if test "$_speex" = auto
; then
5712 #include <speex/speex.h>
5716 speex_decode_int(dec, &bits, dec);
5719 cc_check
-lspeex $_ld_lm && _speex
=yes
5721 if test "$_speex" = yes ; then
5722 _def_speex
='#define HAVE_SPEEX 1'
5723 _ld_extra
="$_ld_extra -lspeex"
5724 _codecmodules
="speex $_codecmodules"
5726 _def_speex
='#undef HAVE_SPEEX'
5727 _nocodecmodules
="speex $_nocodecmodules"
5731 echocheck
"OggTheora support"
5732 if test "$_theora" = auto
; then
5735 #include <theora/theora.h>
5739 /* theora is in flux, make sure that all interface routines and
5740 * datatypes exist and work the way we expect it, so we don't break
5750 theora_info_init (&inf);
5751 theora_comment_init (&tc);
5755 /* we don't want to execute this kind of nonsense; just for making sure
5756 * that compilation works... */
5757 memset(&op, 0, sizeof(op));
5758 r = theora_decode_header (&inf, &tc, &op);
5759 r = theora_decode_init (&st, &inf);
5760 t = theora_granule_time (&st, op.granulepos);
5761 r = theora_decode_packetin (&st, &op);
5762 r = theora_decode_YUVout (&st, &yuv);
5768 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5769 cc_check
$_ld_theora && _ld_extra
="$_ld_extra $_ld_theora" \
5770 && _theora
=yes && break
5772 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5773 for _ld_theora
in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
5774 cc_check
-I. tremor
/bitwise.c
$_ld_theora \
5775 && _ld_extra
="$_ld_extra $_ld_theora" && theora
=yes && break
5779 if test "$_theora" = yes ; then
5780 _def_theora
='#define HAVE_OGGTHEORA 1'
5781 _codecmodules
="libtheora $_codecmodules"
5782 # when --enable-theora is forced, we'd better provide a probably sane
5783 # $_ld_theora than nothing
5784 test -z "$_ld_theora" && _ld_extra
="$_ld_extra -ltheora -logg"
5786 _def_theora
='#undef HAVE_OGGTHEORA'
5787 _nocodecmodules
="libtheora $_nocodecmodules"
5791 echocheck
"mp3lib support"
5792 if test "$_mp3lib" = yes ; then
5793 _def_mp3lib
='#define USE_MP3LIB 1'
5794 _codecmodules
="mp3lib $_codecmodules"
5796 _def_mp3lib
='#undef USE_MP3LIB'
5797 _nocodecmodules
="mp3lib $_nocodecmodules"
5801 echocheck
"liba52 support"
5802 if test "$_liba52" = yes ; then
5803 _def_liba52
='#define USE_LIBA52 1'
5804 _codecmodules
="liba52 $_codecmodules"
5806 _def_liba52
='#undef USE_LIBA52'
5807 _nocodecmodules
="liba52 $_nocodecmodules"
5812 echocheck
"libmpeg2 support"
5813 if test "$_libmpeg2" = yes ; then
5814 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5815 _codecmodules
="libmpeg2 $_codecmodules"
5817 _def_libmpeg2
='#undef USE_LIBMPEG2'
5818 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5820 echores
"$_libmpeg2"
5822 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5823 if test "$_musepack" = auto
; then
5826 #include <mpcdec/mpcdec.h>
5828 mpc_streaminfo info;
5829 mpc_decoder decoder;
5830 mpc_decoder_set_streaminfo(&decoder, &info);
5831 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5834 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5836 if test "$_musepack" = yes ; then
5837 _def_musepack
='#define HAVE_MUSEPACK 1'
5838 _ld_extra
="$_ld_extra -lmpcdec"
5839 _codecmodules
="musepack $_codecmodules"
5841 _def_musepack
='#undef HAVE_MUSEPACK'
5842 _nocodecmodules
="musepack $_nocodecmodules"
5844 echores
"$_musepack"
5847 echocheck
"FAAC (AAC encoder) support"
5848 if test "$_faac" = auto
; then
5850 #include <inttypes.h>
5852 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5855 for _ld_faac
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5856 cc_check
-O4 $_ld_faac $_ld_lm && _libs_mencoder
="$_libs_mencoder $_ld_faac" && _faac
=yes && break
5859 if test "$_faac" = yes ; then
5860 _def_faac
="#define HAVE_FAAC 1"
5861 if echo $_libavencoders |
grep -q FAAC
; then
5863 _def_lavc_faac
="#define CONFIG_LIBFAAC 1"
5864 _libs_mplayer
="$_libs_mplayer $_ld_faac"
5867 _def_lavc_faac
="#undef CONFIG_LIBFAAC"
5869 _codecmodules
="faac $_codecmodules"
5871 _def_faac
="#undef HAVE_FAAC"
5872 _nocodecmodules
="faac $_nocodecmodules"
5873 _libavencoders
=`echo $_libavencoders | sed -e s/FAAC_ENCODER// `
5875 echores
"$_faac (in libavcodec: $_lavc_faac)"
5878 echocheck
"FAAD2 (AAC) support"
5879 if test "$_faad_internal" = auto
; then
5880 if x86_32
&& test cc_vendor
=gnu
; then
5882 3.1*|
3.2) # ICE/insn with these versions
5884 _res_comment
="broken gcc"
5893 elif test "$_faad_internal" = no
&& test "$_faad_external" = auto
; then
5897 #ifndef FAAD_MIN_STREAMSIZE
5898 #error Too old version
5900 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5902 cc_check
-lfaad $_ld_lm && _faad_external
=yes
5905 if test "$_faad_internal" = yes ; then
5906 _def_faad_internal
="#define USE_FAAD_INTERNAL 1"
5908 _res_comment
="internal floating-point"
5909 test "$_faad_fixed" = yes && _res_comment
="internal fixed-point"
5910 elif test "$_faad_external" = yes ; then
5912 _ld_extra
="$_ld_extra -lfaad"
5914 _def_faad_internal
="#undef USE_FAAD_INTERNAL"
5918 if test "$_faad" = yes ; then
5919 _def_faad
='#define HAVE_FAAD 1'
5920 _codecmodules
="faad2 $_codecmodules"
5922 _def_faad
='#undef HAVE_FAAD'
5923 _nocodecmodules
="faad2 $_nocodecmodules"
5928 echocheck
"LADSPA plugin support"
5929 if test "$_ladspa" = auto
; then
5934 const LADSPA_Descriptor *ld = NULL;
5939 cc_check
&& _ladspa
=yes
5941 if test "$_ladspa" = yes; then
5942 _def_ladspa
="#define HAVE_LADSPA"
5943 _afsrc
="$_afsrc af_ladspa.c"
5944 _afmodules
="ladspa $_afmodules"
5946 _def_ladspa
="#undef HAVE_LADSPA"
5947 _noafmodules
="ladspa $_noafmodules"
5952 if test -z "$_codecsdir" ; then
5953 for dir
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs \
5954 /usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5955 if test -d "$dir" ; then
5961 # Fall back on default directory.
5962 if test -z "$_codecsdir" ; then
5963 _codecsdir
="$_libdir/codecs"
5964 mingw32
&& _codecsdir
="codecs"
5968 echocheck
"Win32 codecs"
5969 if test "$_win32dll" = auto
; then
5971 if x86_32
&& not qnx
; then
5975 if test "$_win32dll" = yes ; then
5976 _def_win32dll
='#define USE_WIN32DLL 1'
5977 test -z "$_win32codecsdir" && _win32codecsdir
=$_codecsdir
5978 _res_comment
="using $_win32codecsdir"
5980 _def_win32_loader
='#define WIN32_LOADER 1'
5982 _ld_extra
="$_ld_extra -ladvapi32 -lole32"
5983 _res_comment
="using native windows"
5985 _codecmodules
="win32 $_codecmodules"
5987 _def_win32dll
='#undef USE_WIN32DLL'
5988 _def_win32_loader
='#undef WIN32_LOADER'
5989 _nocodecmodules
="win32 $_nocodecmodules"
5991 echores
"$_win32dll"
5994 echocheck
"XAnim codecs"
5995 if test "$_xanim" = auto
; then
5997 _res_comment
="dynamic loader support needed"
5998 if test "$_dl" = yes ; then
6002 if test "$_xanim" = yes ; then
6003 test -z "$_xanimcodecsdir" && _xanimcodecsdir
=$_codecsdir
6004 _def_xanim
='#define USE_XANIM 1'
6005 _def_xanim_path
="#define XACODEC_PATH \"$_xanimcodecsdir\""
6006 _codecmodules
="xanim $_codecmodules"
6007 _res_comment
="using $_xanimcodecsdir"
6009 _def_xanim
='#undef USE_XANIM'
6010 _def_xanim_path
='#undef XACODEC_PATH'
6011 _nocodecmodules
="xanim $_nocodecmodules"
6016 echocheck
"RealPlayer codecs"
6017 if test "$_real" = auto
; then
6019 _res_comment
="dynamic loader support needed"
6020 if test "$_dl" = yes ||
test "$_win32dll" = yes &&
6021 (linux || freebsd || netbsd || win32 || darwin
) ; then
6025 if test "$_real" = yes ; then
6026 test -z "$_realcodecsdir" && _realcodecsdir
="$_codecsdir"
6027 _def_real
='#define USE_REALCODECS 1'
6028 _def_real_path
="#define REALCODEC_PATH \"$_realcodecsdir\""
6029 _codecmodules
="real $_codecmodules"
6030 _res_comment
="using $_realcodecsdir"
6032 _def_real
='#undef USE_REALCODECS'
6033 _def_real_path
="#undef REALCODEC_PATH"
6034 _nocodecmodules
="real $_nocodecmodules"
6039 echocheck
"LIVE555 Streaming Media libraries"
6040 if test "$_live" = auto
&& test "$_network" = yes ; then
6041 cat > $TMPCPP << EOF
6042 #include <liveMedia.hh>
6043 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1141257600)
6044 #error Please upgrade to version 2006.03.03 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6050 for I
in $_inc_extra "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do
6051 cxx_check
$I/liveMedia
/include
$I/UsageEnvironment
/include \
6052 $I/groupsock
/include
&& _livelibdir
=`echo $I| sed s/-I//` && \
6053 _ld_extra
="$_livelibdir/liveMedia/libliveMedia.a \
6054 $_livelibdir/groupsock/libgroupsock.a \
6055 $_livelibdir/UsageEnvironment/libUsageEnvironment.a \
6056 $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \
6057 $_ld_extra -lstdc++" \
6058 _inc_extraxx
="-I$_livelibdir/liveMedia/include \
6059 -I$_livelibdir/UsageEnvironment/include \
6060 -I$_livelibdir/BasicUsageEnvironment/include \
6061 -I$_livelibdir/groupsock/include" && \
6064 if test "$_live" != yes ; then
6065 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6070 if test "$_live" = yes && test "$_network" = yes ; then
6071 _res_comment
="using $_livelibdir"
6072 _def_live
='#define STREAMING_LIVE555 1'
6073 _inputmodules
="live555 $_inputmodules"
6074 elif test "$_live_dist" = yes && test "$_network" = yes ; then
6075 _res_comment
="using distribution version"
6077 _def_live
='#define STREAMING_LIVE555 1'
6078 _ld_extra
="$_ld_extra -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++"
6079 _inc_extraxx
="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \
6080 -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock"
6081 _inputmodules
="live555 $_inputmodules"
6083 _def_live
='#undef STREAMING_LIVE555'
6084 _noinputmodules
="live555 $_noinputmodules"
6089 echocheck
"FFmpeg libavutil"
6090 if test "$_libavutil_a" = auto
; then
6091 if test -d libavutil
; then
6093 _res_comment
="static"
6095 die
"MPlayer will not compile without libavutil in the source tree."
6097 elif test "$_libavutil_so" = auto
; then
6100 #include <ffmpeg/common.h>
6101 int main(void) { ff_gcd(1,1); return 0; }
6103 if $_pkg_config --exists libavutil
; then
6104 _inc_libavutil
=`$_pkg_config --cflags libavutil`
6105 _ld_tmp
=`$_pkg_config --libs libavutil`
6106 cc_check
$_inc_libavutil $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6107 && _libavutil_so
=yes
6108 elif cc_check
-lavutil $_ld_lm ; then
6109 _ld_extra
="$_ld_extra -lavutil"
6111 _res_comment
="using libavutil.so, but static libavutil is recommended"
6115 _def_libavutil
='#undef USE_LIBAVUTIL'
6116 _def_libavutil_a
='#undef USE_LIBAVUTIL_A'
6117 _def_libavutil_so
='#undef USE_LIBAVUTIL_SO'
6118 test "$_libavutil_a" = yes ||
test "$_libavutil_so" = yes && _libavutil
=yes
6119 test "$_libavutil" = yes && _def_libavutil
='#define USE_LIBAVUTIL 1'
6120 test "$_libavutil_a" = yes && _def_libavutil_a
='#define USE_LIBAVUTIL_A 1'
6121 test "$_libavutil_so" = yes && _def_libavutil_so
='#define USE_LIBAVUTIL_SO 1'
6122 # neither static nor shared libavutil is available, but it is mandatory ...
6123 if test "$_libavutil" = no
; then
6124 die
"You need static or shared libavutil, MPlayer will not compile without!"
6126 echores
"$_libavutil"
6128 echocheck
"FFmpeg libavcodec"
6129 if test "$_libavcodec_a" = auto
; then
6131 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6133 _res_comment
="static"
6135 elif test "$_libavcodec_so" = auto
; then
6137 _res_comment
="libavcodec.so is discouraged over static libavcodec"
6139 #include <ffmpeg/avcodec.h>
6140 int main(void) { avcodec_find_encoder_by_name(""); return 0; }
6142 if $_pkg_config --exists libavcodec
; then
6143 _inc_libavcodec
=`$_pkg_config --cflags libavcodec`
6144 _ld_tmp
=`$_pkg_config --libs libavcodec`
6145 cc_check
$_inc_libavcodec $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6146 && _libavcodec_so
=yes
6147 elif cc_check
-lavcodec $_ld_lm ; then
6148 _ld_extra
="$_ld_extra -lavcodec"
6150 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6154 _def_libavcodec
='#undef USE_LIBAVCODEC'
6155 _def_libavcodec_a
='#undef USE_LIBAVCODEC_A'
6156 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6157 test "$_libavcodec_a" = yes ||
test "$_libavcodec_so" = yes && _libavcodec
=yes
6158 test "$_libavcodec" = yes && _def_libavcodec
='#define USE_LIBAVCODEC 1'
6159 test "$_libavcodec_a" = yes && _def_libavcodec_a
='#define USE_LIBAVCODEC_A 1'
6160 test "$_libavcodec_so" = yes && _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6161 test "$_libavcodec_mpegaudio_hp" = yes \
6162 && _def_libavcodec_mpegaudio_hp
='#define CONFIG_MPEGAUDIO_HP 1'
6163 if test "$_libavcodec_a" = yes ; then
6164 _codecmodules
="libavcodec $_codecmodules"
6165 elif test "$_libavcodec_so" = yes ; then
6166 _codecmodules
="libavcodec.so $_codecmodules"
6168 _nocodecmodules
="libavcodec $_nocodecmodules"
6170 echores
"$_libavcodec"
6172 echocheck
"FFmpeg libavformat"
6173 if test "$_libavformat_a" = auto
; then
6175 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6177 _res_comment
="static"
6179 elif test "$_libavformat_so" = auto
; then
6182 #include <ffmpeg/avformat.h>
6183 #include <ffmpeg/opt.h>
6184 int main(void) { av_alloc_format_context(); return 0; }
6186 if $_pkg_config --exists libavformat
; then
6187 _inc_libavformat
=`$_pkg_config --cflags libavformat`
6188 _ld_tmp
=`$_pkg_config --libs libavformat`
6189 cc_check
$_inc_libavformat $_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" \
6190 && _libavformat_so
=yes
6191 elif cc_check
$_ld_lm -lavformat ; then
6192 _ld_extra
="$_ld_extra -lavformat"
6194 _res_comment
="using libavformat.so, but static libavformat is recommended"
6198 _def_libavformat
='#undef USE_LIBAVFORMAT'
6199 _def_libavformat_a
='#undef USE_LIBAVFORMAT_A'
6200 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6201 test "$_libavformat_a" = yes ||
test "$_libavformat_so" = yes && _libavformat
=yes
6202 test "$_libavformat" = yes && _def_libavformat
='#define USE_LIBAVFORMAT 1'
6203 test "$_libavformat_a" = yes && _def_libavformat_a
='#define USE_LIBAVFORMAT_A 1'
6204 test "$_libavformat_so" = yes \
6205 && _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6206 echores
"$_libavformat"
6208 echocheck
"FFmpeg libpostproc"
6209 if test "$_libpostproc_a" = auto
; then
6211 if test -d libpostproc
&& test -f libpostproc
/postprocess.h
; then
6212 _libpostproc_a
='yes'
6213 _res_comment
="static"
6215 elif test "$_libpostproc_so" = auto
; then
6218 #define USE_LIBPOSTPROC 1
6219 #include <inttypes.h>
6220 #include <postproc/postprocess.h>
6221 int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
6223 if cc_check
-lpostproc $_ld_lm ; then
6224 _ld_extra
="$_ld_extra -lpostproc"
6226 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6230 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6231 _def_libpostproc_a
='#undef USE_LIBPOSTPROC_A'
6232 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6233 test "$_libpostproc_a" = yes ||
test "$_libpostproc_so" = yes && _libpostproc
=yes
6234 test "$_libpostproc" = yes && _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6235 test "$_libpostproc_a" = yes && _def_libpostproc_a
='#define USE_LIBPOSTPROC_A 1'
6236 test "$_libpostproc_so" = yes \
6237 && _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6238 echores
"$_libpostproc"
6241 echocheck
"md5sum support"
6242 if test "$_md5sum" = yes; then
6243 _def_md5sum
="#define HAVE_MD5SUM"
6244 _vosrc
="$_vosrc vo_md5sum.c"
6245 _vomodules
="md5sum $_vomodules"
6247 _def_md5sum
="#undef HAVE_MD5SUM"
6248 _novomodules
="md5sum $_novomodules"
6252 echocheck
"libamr narrowband"
6253 if test "$_libamr_nb" = auto
; then
6256 #include <amrnb/interf_dec.h>
6257 int main(void) { Speech_Decode_Frame_init(); return 0; }
6259 cc_check
-lamrnb && _libamr_nb
=yes
6260 if test "$_libavcodec_a" != yes ; then
6262 _res_comment
="libavcodec (static) is required by libamr_nb, sorry"
6265 if test "$_libamr_nb" = yes ; then
6267 _ld_extra
="$_ld_extra -lamrnb"
6268 _def_libamr
='#define CONFIG_LIBAMR 1'
6269 _def_libamr_nb
='#define CONFIG_LIBAMR_NB 1'
6270 _codecmodules
="libamr_nb $_codecmodules"
6272 _def_libamr_nb
='#undef CONFIG_LIBAMR_NB'
6273 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_NB_DECODER// `
6274 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_NB_ENCODER// `
6275 _nocodecmodules
="libamr_nb $_nocodecmodules"
6277 echores
"$_libamr_nb"
6280 echocheck
"libamr wideband"
6281 if test "$_libamr_wb" = auto
; then
6284 #include <amrwb/dec_if.h>
6285 int main(void) { D_IF_init(); return 0; }
6287 cc_check
-lamrwb && _libamr_wb
=yes
6288 if test "$_libavcodec_a" != yes ; then
6290 _res_comment
="libavcodec (static) is required by libamr_wb, sorry"
6293 if test "$_libamr_wb" = yes ; then
6295 _ld_extra
="$_ld_extra -lamrwb"
6296 _def_libamr
='#define CONFIG_LIBAMR 1'
6297 _def_libamr_wb
='#define CONFIG_LIBAMR_WB 1'
6298 _codecmodules
="libamr_wb $_codecmodules"
6300 _def_libamr_wb
='#undef CONFIG_LIBAMR_WB'
6301 _nocodecmodules
="libamr_wb $_nocodecmodules"
6302 _libavdecoders
=`echo $_libavdecoders | sed -e s/LIBAMR_WB_DECODER// `
6303 _libavencoders
=`echo $_libavencoders | sed -e s/LIBAMR_WB_ENCODER// `
6305 echores
"$_libamr_wb"
6307 echocheck
"libdv-0.9.5+"
6308 if test "$_libdv" = auto
; then
6311 #include <libdv/dv.h>
6312 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6314 cc_check
-ldv $_ld_pthread $_ld_lm && _libdv
=yes
6316 if test "$_libdv" = yes ; then
6317 _def_libdv
='#define HAVE_LIBDV095 1'
6318 _ld_extra
="$_ld_extra -ldv"
6319 _codecmodules
="libdv $_codecmodules"
6321 _def_libdv
='#undef HAVE_LIBDV095'
6322 _nocodecmodules
="libdv $_nocodecmodules"
6327 if test "$_zr" = auto
; then
6328 #36067's seem to identify themselves as 36057PQC's, so the line
6329 #below should work for 36067's and 36057's.
6330 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
6336 if test "$_zr" = yes ; then
6337 if test "$_libavcodec_a" = yes ; then
6338 _def_zr
='#define HAVE_ZR 1'
6339 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6340 _vomodules
="zr zr2 $_vomodules"
6342 _res_comment
="libavcodec (static) is required by zr, sorry"
6343 _novomodules
="zr $_novomodules"
6344 _def_zr
='#undef HAVE_ZR'
6347 _def_zr
='#undef HAVE_ZR'
6348 _novomodules
="zr zr2 $_novomodules"
6353 if test "$_bl" = yes ; then
6354 _def_bl
='#define HAVE_BL 1'
6355 _vosrc
="$_vosrc vo_bl.c"
6356 _vomodules
="bl $_vomodules"
6358 _def_bl
='#undef HAVE_BL'
6359 _novomodules
="bl $_novomodules"
6365 if test "$_xvid" = auto
; then
6369 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6371 for _ld_tmp
in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do
6372 cc_check
$_ld_tmp && _ld_extra
="$_ld_extra $_ld_tmp" && _xvid
=yes && break
6376 if test "$_xvid" = yes ; then
6377 _def_xvid
='#define HAVE_XVID4 1'
6378 _codecmodules
="xvid $_codecmodules"
6380 _def_xvid
='#undef HAVE_XVID4'
6381 _nocodecmodules
="xvid $_nocodecmodules"
6382 _libavencoders
=`echo $_libavencoders | sed -e s/XVID_ENCODER// `
6386 if test "$_xvid" = yes ; then
6387 echocheck
"XviD two pass plugin"
6390 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6394 _def_lavc_xvid
='#define CONFIG_XVID 1'
6397 _def_lavc_xvid
='#undef CONFIG_XVID'
6399 echores
"$_lavc_xvid"
6404 if test "$_x264" = auto
; then
6406 #include <inttypes.h>
6409 #error We do not support old versions of x264. Get the latest from SVN.
6411 int main(void) { x264_encoder_open((void*)0); return 0; }
6414 for _ld_x264
in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
6415 cc_check
$_ld_x264 && _libs_mencoder
="$_libs_mencoder $_ld_x264" && _x264
=yes && break
6419 if test "$_x264" = yes ; then
6421 _def_x264
='#define HAVE_X264 1'
6422 _codecmodules
="x264 $_codecmodules"
6423 if echo $_libavencoders |
grep -q X264
; then
6425 _def_lavc_x264
='#define CONFIG_X264 1'
6426 _libs_mplayer
="$_libs_mplayer $_ld_x264"
6429 _def_lavc_x264
='#undef CONFIG_X264'
6434 _def_x264
='#undef HAVE_X264'
6435 _def_lavc_x264
='#undef CONFIG_X264'
6436 _nocodecmodules
="x264 $_nocodecmodules"
6437 _libavencoders
=`echo $_libavencoders | sed -e s/X264_ENCODER// `
6439 echores
"$_x264 (in libavcodec: $_lavc_x264)"
6443 if test "$_nut" = auto
; then
6447 #include <inttypes.h>
6449 int main(void) { (void)nut_error(0); return 0; }
6452 cc_check
-lnut && _nut
=yes
6455 if test "$_nut" = yes ; then
6456 _def_nut
='#define HAVE_LIBNUT 1'
6457 _ld_extra
="$_ld_extra -lnut"
6459 _def_nut
='#undef HAVE_LIBNUT'
6460 _libavmuxers
=`echo $_libavmuxers | sed -e s/LIBNUT_MUXER// `
6465 # mencoder requires (optional) those libs: libmp3lame
6466 if test "$_mencoder" != no
; then
6468 echocheck
"libmp3lame (for mencoder)"
6470 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6471 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6473 #include <lame/lame.h>
6474 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; }
6476 # Note: libmp3lame usually depends on vorbis
6477 cc_check
-lmp3lame $_ld_lm && tmp_run
&& _mp3lame
=yes
6478 if test "$_mp3lame" = yes ; then
6479 _def_mp3lame
="#define HAVE_MP3LAME"
6480 _ld_mp3lame
=-lmp3lame
6481 _libs_mencoder
="$_libs_mencoder $_ld_mp3lame"
6483 #include <lame/lame.h>
6484 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
6486 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6488 #include <lame/lame.h>
6489 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
6491 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6492 if echo $_libavencoders |
grep -q MP3LAME
; then
6494 _def_lavc_mp3lame
="#define CONFIG_LIBMP3LAME 1"
6495 _libs_mplayer
="$_libs_mplayer $_ld_mp3lame"
6498 _def_lavc_mp3lame
="#undef CONFIG_LIBMP3LAME"
6501 _def_mp3lame
='#undef HAVE_MP3LAME'
6502 _libavencoders
=`echo $_libavencoders | sed -e s/MP3LAME_ENCODER// `
6508 echocheck
"mencoder"
6509 _mencoder_flag
='#undef HAVE_MENCODER'
6510 if test "$_mencoder" = yes ; then
6511 _mencoder_flag
='#define HAVE_MENCODER'
6512 _def_muxers
='#define CONFIG_MUXERS 1'
6514 # mpeg1video for vf_lavc, snow for vf_uspp and vf_mcdeint
6515 _libavencoders
="MPEG1VIDEO_ENCODER SNOW_ENCODER"
6518 echores
"$_mencoder"
6520 echocheck
"fastmemcpy"
6521 # fastmemcpy check is done earlier with tests of CPU & binutils features
6522 if test "$_fastmemcpy" = yes ; then
6523 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6525 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6527 echores
"$_fastmemcpy"
6529 echocheck
"UniquE RAR File Library"
6530 if test "$_unrarlib" = yes ; then
6531 _def_unrarlib
='#define USE_UNRARLIB 1'
6533 _def_unrarlib
='#undef USE_UNRARLIB'
6535 echores
"$_unrarlib"
6537 echocheck
"TV interface"
6538 if test "$_tv" = yes ; then
6539 _def_tv
='#define USE_TV 1'
6540 _inputmodules
="tv $_inputmodules"
6542 _noinputmodules
="tv $_noinputmodules"
6543 _def_tv
='#undef USE_TV'
6549 echocheck
"*BSD BT848 bt8xx header"
6551 for file in "machine/ioctl_bt848.h" \
6552 "dev/bktr/ioctl_bt848.h" \
6553 "dev/video/bktr/ioctl_bt848.h" \
6554 "dev/ic/bt8xx.h" ; do
6556 #include <sys/types.h>
6559 ioctl(0, TVTUNER_GETFREQ, 0);
6565 _ioctl_bt848_h_name
="$file"
6569 if test "$_ioctl_bt848_h" = yes ; then
6570 _def_ioctl_bt848_h_name
="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6571 _res_comment
="using $_ioctl_bt848_h_name"
6573 _def_ioctl_bt848_h_name
="#undef IOCTL_BT848_H_NAME"
6575 echores
"$_ioctl_bt848_h"
6577 echocheck
"*BSD ioctl_meteor.h"
6579 for file in "machine/ioctl_meteor.h" \
6580 "dev/bktr/ioctl_meteor.h" \
6581 "dev/video/bktr/ioctl_meteor.h" ; do
6583 #include <sys/types.h>
6586 ioctl(0, METEORSINPUT, 0);
6592 _ioctl_meteor_h_name
="$file"
6596 if test "$_ioctl_meteor_h" = yes ; then
6597 _def_ioctl_meteor_h_name
="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6598 _res_comment
="using $_ioctl_meteor_h_name"
6600 _def_ioctl_meteor_h_name
="#undef IOCTL_METEOR_H_NAME"
6602 echores
"$_ioctl_meteor_h"
6604 echocheck
"*BSD BrookTree 848 TV interface"
6605 if test "$_tv_bsdbt848" = auto
; then
6607 if test "$_tv" = yes ; then
6609 #include <sys/types.h>
6610 $_def_ioctl_meteor_h_name
6611 $_def_ioctl_bt848_h_name
6612 #ifdef IOCTL_METEOR_H_NAME
6613 #include IOCTL_METEOR_H_NAME
6615 #ifdef IOCTL_BT848_H_NAME
6616 #include IOCTL_BT848_H_NAME
6619 ioctl(0, METEORSINPUT, 0);
6620 ioctl(0, TVTUNER_GETFREQ, 0);
6624 cc_check
&& _tv_bsdbt848
=yes
6627 if test "$_tv_bsdbt848" = yes ; then
6628 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6629 _inputmodules
="tv-bsdbt848 $_inputmodules"
6631 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6632 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6634 echores
"$_tv_bsdbt848"
6638 echocheck
"Video 4 Linux TV interface"
6639 if test "$_tv_v4l1" = auto
; then
6641 if test "$_tv" = yes && linux
; then
6644 #include <linux/videodev.h>
6645 int main(void) { return 0; }
6647 cc_check
&& _tv_v4l1
=yes
6650 if test "$_tv_v4l1" = yes ; then
6653 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6654 _def_tv_v4l1
='#define HAVE_TV_V4L1 1'
6655 _inputmodules
="tv-v4l $_inputmodules"
6657 _noinputmodules
="tv-v4l1 $_noinputmodules"
6658 _def_tv_v4l
='#undef HAVE_TV_V4L'
6663 echocheck
"Video 4 Linux 2 TV interface"
6664 if test "$_tv_v4l2" = auto
; then
6666 if test "$_tv" = yes && linux
; then
6669 #include <linux/types.h>
6670 #include <linux/videodev2.h>
6671 int main(void) { return 0; }
6673 cc_check
&& _tv_v4l2
=yes
6676 if test "$_tv_v4l2" = yes ; then
6679 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6680 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6681 _inputmodules
="tv-v4l2 $_inputmodules"
6683 _noinputmodules
="tv-v4l2 $_noinputmodules"
6684 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6689 echocheck
"Radio interface"
6690 if test "$_radio" = yes ; then
6691 _def_radio
='#define USE_RADIO 1'
6692 _inputmodules
="radio $_inputmodules"
6693 if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
6696 if test "$_radio_capture" = yes ; then
6698 _def_radio_capture
="#define USE_RADIO_CAPTURE 1"
6700 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6703 _noinputmodules
="radio $_noinputmodules"
6704 _def_radio
='#undef USE_RADIO'
6705 _def_radio_capture
="#undef USE_RADIO_CAPTURE"
6709 echocheck
"Capture for Radio interface"
6710 echores
"$_radio_capture"
6712 echocheck
"Video 4 Linux 2 Radio interface"
6713 if test "$_radio_v4l2" = auto
; then
6715 if test "$_radio" = yes && linux
; then
6718 #include <linux/types.h>
6719 #include <linux/videodev2.h>
6720 int main(void) { return 0; }
6722 cc_check
&& _radio_v4l2
=yes
6725 if test "$_radio_v4l2" = yes ; then
6726 _def_radio_v4l2
='#define HAVE_RADIO_V4L2 1'
6728 _def_radio_v4l2
='#undef HAVE_RADIO_V4L2'
6730 echores
"$_radio_v4l2"
6732 echocheck
"Video 4 Linux Radio interface"
6733 if test "$_radio_v4l" = auto
; then
6735 if test "$_radio" = yes && linux
; then
6738 #include <linux/videodev.h>
6739 int main(void) { return 0; }
6741 cc_check
&& _radio_v4l
=yes
6744 if test "$_radio_v4l" = yes ; then
6745 _def_radio_v4l
='#define HAVE_RADIO_V4L 1'
6747 _def_radio_v4l
='#undef HAVE_RADIO_V4L'
6749 echores
"$_radio_v4l"
6751 if bsd
&& test "$_radio" = yes && test "$_radio_bsdbt848" = auto
; then
6752 echocheck
"*BSD BrookTree 848 Radio interface"
6755 #include <sys/types.h>
6756 $_def_ioctl_bt848_h_name
6757 #ifdef IOCTL_BT848_H_NAME
6758 #include IOCTL_BT848_H_NAME
6761 ioctl(0, RADIO_GETFREQ, 0);
6765 cc_check
&& _radio_bsdbt848
=yes
6766 echores
"$_radio_bsdbt848"
6767 fi #if bsd && radio && radio_bsdbt848
6769 if test "$_radio_bsdbt848" = yes ; then
6770 _def_radio_bsdbt848
='#define HAVE_RADIO_BSDBT848 1'
6772 _def_radio_bsdbt848
='#undef HAVE_RADIO_BSDBT848'
6775 if test "$_radio_v4l" = no
&& test "$_radio_v4l2" = no
&& \
6776 test "$_radio_bsdbt848" = no
&& test "$_radio" = yes ; then
6777 die
"Radio driver requires BSD BT848, V4L or V4L2!"
6780 echocheck
"Video 4 Linux 2 MPEG PVR interface"
6781 if test "$_pvr" = auto
; then
6783 if test "$_tv_v4l2" = yes && linux
; then
6786 #include <inttypes.h>
6787 #include <linux/types.h>
6788 #include <linux/videodev2.h>
6789 int main(void) { struct v4l2_ext_controls ext; return 0; }
6791 cc_check
&& _pvr
=yes
6794 if test "$_pvr" = yes ; then
6795 _def_pvr
='#define HAVE_PVR 1'
6796 _inputmodules
="pvr $_inputmodules"
6798 _noinputmodules
="pvr $_noinputmodules"
6799 _def_pvr
='#undef HAVE_PVR'
6804 echocheck
"audio select()"
6805 if test "$_select" = no
; then
6806 _def_select
='#undef HAVE_AUDIO_SELECT'
6807 elif test "$_select" = yes ; then
6808 _def_select
='#define HAVE_AUDIO_SELECT 1'
6814 if not beos
&& test "$_ftp" = yes ; then
6815 _def_ftp
='#define HAVE_FTP 1'
6816 _inputmodules
="ftp $_inputmodules"
6818 _noinputmodules
="ftp $_noinputmodules"
6819 _def_ftp
='#undef HAVE_FTP'
6823 echocheck
"vstream client"
6824 if test "$_vstream" = auto
; then
6827 #include <vstream-client.h>
6828 void vstream_error(const char *format, ... ) {}
6829 int main(void) { vstream_start(); return 0; }
6831 cc_check
-lvstream-client && _vstream
=yes
6833 if test "$_vstream" = yes ; then
6834 _def_vstream
='#define HAVE_VSTREAM 1'
6835 _inputmodules
="vstream $_inputmodules"
6836 _ld_extra
="$_ld_extra -lvstream-client"
6838 _noinputmodules
="vstream $_noinputmodules"
6839 _def_vstream
='#undef HAVE_VSTREAM'
6844 echocheck
"byte order"
6845 if test "$_big_endian" = auto
; then
6847 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6848 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6850 return (int)ascii_name;
6854 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6860 echo ${_echo_n} "failed to autodetect byte order, defaulting to ${_echo_c}"
6863 if test "$_big_endian" = yes ; then
6864 _byte_order
='big-endian'
6865 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6867 _byte_order
='little-endian'
6868 _def_words_endian
='#undef WORDS_BIGENDIAN'
6870 echores
"$_byte_order"
6872 echocheck
"OSD menu"
6873 if test "$_menu" = yes ; then
6874 _def_menu
='#define HAVE_MENU 1'
6876 _def_menu
='#undef HAVE_MENU'
6881 echocheck
"QuickTime codecs"
6882 if test "$_qtx" = auto
; then
6883 test "$_win32dll" = yes || darwin
&& _qtx
=yes
6885 if test "$_qtx" = yes ; then
6886 _def_qtx
='#define USE_QTX_CODECS 1'
6887 _codecmodules
="qtx $_codecmodules"
6889 _def_qtx
='#undef USE_QTX_CODECS'
6890 _nocodecmodules
="qtx $_nocodecmodules"
6895 echocheck
"Subtitles sorting"
6896 if test "$_sortsub" = yes ; then
6897 _def_sortsub
='#define USE_SORTSUB 1'
6899 _def_sortsub
='#undef USE_SORTSUB'
6904 echocheck
"XMMS inputplugin support"
6905 if test "$_xmms" = yes ; then
6906 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6907 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6908 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6910 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6911 _xmmslibdir
=/usr
/lib
6914 _def_xmms
='#define HAVE_XMMS 1'
6916 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.dylib"
6918 _ld_extra
="$_ld_extra ${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6921 _def_xmms
='#undef HAVE_XMMS'
6926 if test "$_inet6" = auto
; then
6928 #include <sys/types.h>
6929 #include <sys/socket.h>
6930 #include <netinet/in.h>
6931 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6938 if test "$_inet6" = yes ; then
6939 _def_inet6
='#define HAVE_AF_INET6 1'
6941 _def_inet6
='#undef HAVE_AF_INET6'
6946 echocheck
"gethostbyname2"
6947 if test "$_gethostbyname2" = auto
; then
6949 #include <sys/types.h>
6950 #include <sys/socket.h>
6952 int main(void) { gethostbyname2("", AF_INET); }
6960 if test "$_gethostbyname2" = yes ; then
6961 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6963 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6965 echores
"$_gethostbyname2"
6968 # --------------- GUI specific tests begin -------------------
6971 if test "$_gui" = yes ; then
6973 # Required libraries
6974 test "$_libavcodec" != yes && die
"The GUI requires libavcodec with PNG support."
6976 test "$_x11" != yes && die
"X11 support required for GUI compilation."
6978 echocheck
"XShape extension"
6979 if test "$_xshape" = auto
; then
6982 #include <X11/Xlib.h>
6983 #include <X11/Xproto.h>
6984 #include <X11/Xutil.h>
6985 #include <X11/extensions/shape.h>
6988 char *name = ":0.0";
6991 int eventbase, errorbase;
6992 if (getenv("DISPLAY"))
6993 name=getenv("DISPLAY");
6994 wsDisplay=XOpenDisplay(name);
6995 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6997 XCloseDisplay(wsDisplay);
7001 cc_check
&& _xshape
=yes
7003 if test "$_xshape" = yes ; then
7004 _def_xshape
='#define HAVE_XSHAPE 1'
7006 die
"The GUI requires the X11 extension XShape (which was not found)."
7011 if test "$_gtk1" = no
; then
7013 echocheck
"GTK+ version"
7015 if $_pkg_config gtk
+-2.0
--exists ; then
7016 _gtk
=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
7017 _inc_extra
="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
7018 _libs_mplayer
="$_libs_mplayer `$_pkg_config gtk+-2.0 --libs 2>/dev/null`"
7022 if $_pkg_config glib-2.0
--exists ; then
7023 echocheck
"glib version"
7024 _glib
=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
7025 _libs_mplayer
="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`"
7028 _def_gui
='#define HAVE_NEW_GUI 1'
7029 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
7032 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
7035 echo "GTK-2 devel packages were not found, trying GTK 1.2"
7040 if test "$_gtk1" = yes ; then
7041 # Check for old GTK (1.2.x)
7042 echocheck
"GTK version"
7043 if test -z "$_gtkconfig" ; then
7044 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
7045 _gtkconfig
="gtk-config"
7046 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
7047 _gtkconfig
="gtk12-config"
7049 die
"The GUI requires GTK devel packages (which were not found)."
7052 _gtk
=`$_gtkconfig --version 2>&1`
7053 _inc_extra
="$_inc_extra `$_gtkconfig --cflags 2>&1`"
7054 _libs_mplayer
="$_libs_mplayer `$_gtkconfig --libs 2>&1`"
7055 echores
"$_gtk (using $_gtkconfig)"
7058 echocheck
"glib version"
7059 if test -z "$_glibconfig" ; then
7060 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7061 _glibconfig
="glib-config"
7062 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7063 _glibconfig
="glib12-config"
7065 die
"The GUI requires GLIB devel packages (which were not found)"
7068 _glib
=`$_glibconfig --version 2>&1`
7069 _libs_mplayer
="$_libs_mplayer `$_glibconfig --libs 2>&1`"
7070 echores
"$_glib (using $_glibconfig)"
7072 _def_gui
='#define HAVE_NEW_GUI 1'
7073 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7077 _libs_mplayer
="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32"
7078 _def_gui
='#define HAVE_NEW_GUI 1'
7079 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7082 else #if test "$_gui"
7083 _def_gui
='#undef HAVE_NEW_GUI'
7084 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7086 # --------------- GUI specific tests end -------------------
7089 if test "$_charset" = "noconv" ; then
7092 if test "$_charset" ; then
7093 _def_charset
="#define MSG_CHARSET \"$_charset\""
7095 _def_charset
="#undef MSG_CHARSET"
7098 if test "$_charset" = "UTF-8" ; then
7099 # hack to disable conversion in the Makefile
7103 if test "$_charset" ; then
7104 echocheck
"iconv program"
7105 iconv -f UTF-8
-t $_charset ${_mp_help} > /dev
/null
2>> "$TMPLOG"
7106 if test "$?" -ne 0 ; then
7108 echo "No working iconv program found, use "
7109 echo "--charset=UTF-8 to continue anyway."
7110 echo "If you also have problems with iconv library functions use --charset=noconv."
7111 echo "Messages in the GTK-2 interface will be broken then."
7118 #############################################################################
7120 echocheck
"automatic gdb attach"
7121 if test "$_crash_debug" = yes ; then
7122 _def_crash_debug
='#define CRASH_DEBUG 1'
7124 _def_crash_debug
='#undef CRASH_DEBUG'
7127 echores
"$_crash_debug"
7129 echocheck
"compiler support for noexecstack"
7131 int main(void) { return 0; }
7133 if cc_check
-Wl,-z,noexecstack
; then
7134 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7140 echocheck
"ftello()"
7141 # if we don't have ftello use the osdep/ compatibility module
7144 #include <sys/types.h>
7145 int main (void) { ftello(stdin); return 0; }
7148 cc_check
&& _ftello
=yes
7149 if test "$_ftello" = yes ; then
7150 _def_ftello
='#define HAVE_FTELLO 1'
7153 _def_ftello
='#undef HAVE_FTELLO'
7158 # Dynamic linking flags
7159 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7161 bsd
&& _ld_dl_dynamic
='-rdynamic'
7162 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
&& not darwin
; then
7163 _ld_dl_dynamic
='-rdynamic'
7166 _ld_extra
="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7167 bsdos
&& _ld_extra
="$_ld_extra -ldvd"
7168 netbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7169 openbsd
&& x86_32
&& _ld_extra
="$_ld_extra -li386"
7171 _def_debug
='#undef MP_DEBUG'
7172 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7174 _def_linux
='#undef TARGET_LINUX'
7175 linux
&& _def_linux
='#define TARGET_LINUX 1'
7180 _def_vidix
='#undef CONFIG_VIDIX'
7181 _def_vidix_drv_cyberblade
='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
7182 _vidix_drv_cyberblade
=no
7183 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
7185 _def_vidix_drv_ivtv
='#undef CONFIG_VIDIX_DRV_IVTV'
7187 _def_vidix_drv_mach64
='#undef CONFIG_VIDIX_DRV_MACH64'
7188 _vidix_drv_mach64
=no
7189 _def_vidix_drv_mga
='#undef CONFIG_VIDIX_DRV_MGA'
7191 _def_vidix_drv_mga_crtc2
='#undef CONFIG_VIDIX_DRV_MGA_CRTC2'
7192 _vidix_drv_mga_crtc2
=no
7193 _def_vidix_drv_nvidia
='#undef CONFIG_VIDIX_DRV_NVIDIA'
7194 _vidix_drv_nvidia
=no
7195 _def_vidix_drv_pm2
='#undef CONFIG_VIDIX_DRV_PM2'
7197 _def_vidix_drv_pm3
='#undef CONFIG_VIDIX_DRV_PM3'
7199 _def_vidix_drv_radeon
='#undef CONFIG_VIDIX_DRV_RADEON'
7200 _vidix_drv_radeon
=no
7201 _def_vidix_drv_rage128
='#undef CONFIG_VIDIX_DRV_RAGE128'
7202 _vidix_drv_rage128
=no
7203 _def_vidix_drv_savage
='#undef CONFIG_VIDIX_DRV_SAVAGE'
7204 _vidix_drv_savage
=no
7205 _def_vidix_drv_sis
='#undef CONFIG_VIDIX_DRV_SIS'
7207 _def_vidix_drv_unichrome
='#undef CONFIG_VIDIX_DRV_UNICHROME'
7208 _vidix_drv_unichrome
=no
7209 if test "$_vidix_internal" = auto
; then
7211 x86
&& _vidix_internal
=yes
7212 # this is broken currently, undefined references to inw, outw etc.
7213 #ppc && linux && _vidix_internal=yes
7214 alpha
&& linux
&& _vidix_internal
=yes
7215 qnx || beos || darwin
&& _vidix_internal
=no
7217 if test "$_vidix_internal" = yes; then
7218 _res_comment
="internal"
7221 elif test "$_vidix_external" = auto
; then
7224 #include <vidix/vidix.h>
7225 int main(void) { return 0; }
7227 cc_check
-lvidix && _vidix_external
=yes && _res_comment
="external" \
7232 if test "$_vidix" = yes ; then
7233 _def_vidix
='#define CONFIG_VIDIX 1'
7234 _vosrc
="$_vosrc vo_cvidix.c"
7235 _vomodules
="cvidix $_vomodules"
7236 test $_vidix_drivers || _vidix_drivers
="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 savage sis unichrome"
7237 test $_ivtv = "yes" || _vidix_drivers
=`echo $_vidix_drivers | sed s/ivtv//`
7239 for driver
in $_vidix_drivers ; do
7240 uc_driver
=`echo $driver | tr [a-z] [A-Z]`
7241 eval _vidix_drv_
${driver}=yes
7242 eval _def_vidix_drv_
${driver}=\"\
#define CONFIG_VIDIX_DRV_${uc_driver} 1\"
7245 _novomodules
="cvidix $_novomodules"
7248 if test "$_vidix_internal" = yes ; then
7249 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
7250 elif test "$_vidix_external" = yes ; then
7251 _libs_mplayer
="$_libs_mplayer -lvidix"
7252 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
7255 if test "$_vidix" = yes && win32
; then
7256 _vosrc
="$_vosrc vo_winvidix.c"
7257 _vomodules
="winvidix $_vomodules"
7258 _libs_mplayer
="$_libs_mplayer -lgdi32"
7260 _novomodules
="winvidix $_novomodules"
7262 if test "$_vidix" = yes && test "$_x11" = yes; then
7263 _vosrc
="$_vosrc vo_xvidix.c"
7264 _vomodules
="xvidix $_vomodules"
7266 _novomodules
="xvidix $_novomodules"
7269 echocheck
"joystick"
7270 _def_joystick
='#undef HAVE_JOYSTICK'
7271 if test "$_joystick" = yes ; then
7273 # TODO add some check
7274 _def_joystick
='#define HAVE_JOYSTICK 1'
7276 _joystick
="no (unsupported under $system_name)"
7279 echores
"$_joystick"
7282 if test "$_lirc" = auto
; then
7285 #include <lirc/lirc_client.h>
7286 int main(void) { return 0; }
7288 cc_check
-llirc_client && _lirc
=yes
7290 if test "$_lirc" = yes ; then
7291 _def_lirc
='#define HAVE_LIRC 1'
7292 _ld_extra
="$_ld_extra -llirc_client"
7294 _def_lirc
='#undef HAVE_LIRC'
7299 if test "$_lircc" = auto
; then
7302 #include <lirc/lircc.h>
7303 int main(void) { return 0; }
7305 cc_check
-llircc && _lircc
=yes
7307 if test "$_lircc" = yes ; then
7308 _def_lircc
='#define HAVE_LIRCC 1'
7309 _ld_extra
="$_ld_extra -llircc"
7311 _def_lircc
='#undef HAVE_LIRCC'
7316 # Detect maemo development platform libraries availability (http://www.maemo.org),
7317 # they are used when run on Nokia 770
7318 echocheck
"maemo (Nokia 770)"
7319 if test "$_maemo" = auto
; then
7322 #include <libosso.h>
7323 int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
7325 cc_check
`$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo
=yes
7327 if test "$_maemo" = yes ; then
7328 _def_maemo
='#define HAVE_MAEMO 1'
7329 _inc_extra
="$_inc_extra `$_pkg_config --cflags libosso`"
7330 _ld_extra
="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
7332 _def_maemo
='#undef HAVE_MAEMO'
7337 echocheck
"color console output"
7338 if test "$_color_console" = yes ; then
7339 _def_color_console
='#define MSG_USE_COLORS 1'
7341 _def_color_console
='#undef MSG_USE_COLORS'
7343 echores
"$_color_console"
7345 # linker paths should be the same for mencoder and mplayer
7347 for I
in $_libs_mplayer ; do
7348 _tmp
=`echo $I | sed -e 's/^-L.*$//'`
7349 if test -z "$_tmp" ; then
7350 _ld_extra
="$I $_ld_extra"
7352 _ld_tmp
="$_ld_tmp $I"
7355 _libs_mplayer
=$_ld_tmp
7358 #############################################################################
7360 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN -shared-libgcc"
7361 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7362 CFLAGS
="$CFLAGS -no-cpp-precomp"
7366 CFLAGS
="$CFLAGS -DNEWLIB -D__USE_INLINE__ -DSYS_AMIGAOS4"
7369 # use flag for HPUX missing setenv()
7370 CFLAGS
="$CFLAGS -DHPUX"
7374 CFLAGS
="$CFLAGS -D_REENTRANT"
7376 # FIXME bsd needs this so maybe other OS'es
7377 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7380 CFLAGS
="$CFLAGS -D__CYGWIN__ -DSYS_CYGWIN"
7382 # 64 bit file offsets?
7383 if test "$_largefiles" = yes || freebsd
; then
7384 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7385 if test "$_dvdread" = yes ||
test "$_libdvdcss_internal" = yes ; then
7386 # dvdread support requires this (for off64_t)
7387 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7391 CFLAGS
="-I. -I.. -I../libavutil $CFLAGS"
7392 CXXFLAGS
=" $CFLAGS -D__STDC_LIMIT_MACROS"
7395 int main() { return 0; }
7397 if cc_check
-Wdeclaration-after-statement ; then
7398 CFLAGS
="-Wdeclaration-after-statement $CFLAGS"
7402 #this must be the last test to be performed or the ones following it will likely fail
7403 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
7404 # to use its own copy of the library)
7405 echocheck
"DVD support (libdvdnav)"
7406 if test "$_dvdnav" = auto
; then
7407 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav
=no
7409 if test "$_dvdnav" = auto
; then
7411 #include <inttypes.h>
7413 int main(void) { dvdnav_t *dvd=0; return 0; }
7416 _dvdnavdir
=`$_dvdnavconfig --cflags`
7417 _dvdnavlibs
=`$_dvdnavconfig --libs`
7418 _dvdnavvsn
=`$_dvdnavconfig --version | sed "s/\.//g"`
7419 _dvdnavmajor
=`echo $_dvdnavvsn | cut -d. -f2`
7420 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
7421 cc_check
$_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav
=yes
7423 if test "$_dvdnav" = yes ; then
7425 _def_dvdnav
='#define USE_DVDNAV 1'
7426 _dvdnav_version
=`$_dvdnavconfig --version | sed "s/\.//g"`
7427 _def_dvdnav_version
="#define DVDNAVVERSION $_dvdnav_version"
7428 _inc_extra
="$_inc_extra `$_dvdnavconfig --cflags`"
7429 _ld_extra
="$_ld_extra `$_dvdnavconfig --minilibs`"
7430 _inputmodules
="dvdnav $_inputmodules"
7432 _def_dvdnav
='#undef USE_DVDNAV'
7433 _noinputmodules
="dvdnav $_noinputmodules"
7437 #############################################################################
7438 echo "Creating config.mak"
7439 cat > config.mak
<< EOF
7440 # -------- Generated by configure -----------
7443 MAN_LANG = $MAN_LANG
7444 TARGET_OS = $system_name
7446 prefix = \$(DESTDIR)$_prefix
7447 BINDIR = \$(DESTDIR)$_bindir
7448 DATADIR = \$(DESTDIR)$_datadir
7449 MANDIR = \$(DESTDIR)$_mandir
7450 CONFDIR = \$(DESTDIR)$_confdir
7451 LIBDIR = \$(DESTDIR)$_libdir
7452 # FFmpeg uses libdir instead of LIBDIR
7458 LDCONFIG = $_ldconfig
7460 EXTRA_INC = $_inc_extra
7461 EXTRAXX_INC = $_inc_extra $_inc_extraxx
7462 OPTFLAGS = $CFLAGS \$(EXTRA_INC)
7463 CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
7464 INSTALLSTRIP = $_install_strip
7466 HELP_FILE = $_mp_help
7470 MPLAYER_NETWORK = $_network
7472 STREAMING_LIVE555 = $_live
7474 STREAM_CACHE = $_stream_cache
7477 VIDIX_INTERNAL = $_vidix_internal
7478 VIDIX_EXTERNAL = $_vidix_external
7485 LIBMPEG2 = $_libmpeg2
7486 TREMOR_INTERNAL = $_tremor_internal
7487 TREMOR_LOW = $_tremor_low
7491 MUSEPACK = $_musepack
7493 UNRARLIB = $_unrarlib
7498 EXTRALIBS = $_extra_libs
7499 EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
7500 EXTRALIBS_MPLAYER = $_libs_mplayer
7501 EXTRALIBS_MENCODER = $_libs_mencoder
7504 HAVE_PTHREADS = $_pthreads
7506 HAVE_XVMC_ACCEL = $_xvmc
7508 HAVE_SYS_MMAN_H = $_mman
7509 HAVE_POSIX_SELECT = $_posix_select
7511 NEED_FSEEKO = $_need_fseeko
7512 NEED_FTELLO = $_need_ftello
7513 NEED_GETTIMEOFDAY = $_need_gettimeofday
7514 NEED_GLOB = $_need_glob
7515 NEED_SCANDIR = $_need_scandir
7516 NEED_SETENV = $_need_setenv
7517 NEED_SHMEM = $_need_shmem
7518 NEED_STRLCAT = $_need_strlcat
7519 NEED_STRLCPY = $_need_strlcpy
7520 NEED_STRSEP = $_need_strsep
7521 NEED_SWAB = $_need_swab
7522 NEED_VSSCANF = $_need_vsscanf
7529 LIB=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7538 # input/demuxer/codecs
7539 JOYSTICK = $_joystick
7545 TV_BSDBT848 = $_tv_bsdbt848
7546 AUDIO_INPUT = $_audio_input
7550 DVDREAD_INTERNAL = $_dvdread_internal
7551 DVDCSS_INTERNAL = $_libdvdcss_internal
7553 WIN32DLL = $_win32dll
7555 REAL_CODECS = $_real
7556 XANIM_CODECS = $_xanim
7557 LIBAVUTIL = $_libavutil
7558 LIBAVUTIL_A = $_libavutil_a
7559 LIBAVUTIL_SO = $_libavutil_so
7560 LIBAVCODEC = $_libavcodec
7561 LIBAVCODEC_A = $_libavcodec_a
7562 LIBAVCODEC_SO = $_libavcodec_so
7563 LIBAVFORMAT = $_libavformat
7564 LIBAVFORMAT_A = $_libavformat_a
7565 LIBAVFORMAT_SO = $_libavformat_so
7566 LIBPOSTPROC = $_libpostproc
7567 LIBPOSTPROC_A = $_libpostproc_a
7568 LIBPOSTPROC_SO = $_libpostproc_so
7576 MENCODER = $_mencoder
7579 BITMAP_FONT = $_bitmap_font
7580 FREETYPE = $_freetype
7583 LIBVORBIS = $_vorbis
7584 LIBTHEORA = $_theora
7585 FAAD_INTERNAL = $_faad_internal
7586 FAAD_FIXED = $_faad_fixed
7587 LIBSMBCLIENT = $_smbsupport
7588 XMMS_PLUGINS = $_xmms
7590 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7591 MACOSX_BUNDLE = $_macosx_bundle
7592 MACOSX_COREVIDEO = $_macosx_corevideo
7596 CONFIG_LIBAMR=$_libamr
7597 CONFIG_LIBAMR_NB=$_libamr_nb
7598 CONFIG_LIBAMR_WB=$_libamr_wb
7599 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7600 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7601 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7602 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7603 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7604 `echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7605 CONFIG_LIBFAAC=$_lavc_faac
7606 CONFIG_LIBMP3LAME=$_lavc_mp3lame
7607 CONFIG_XVID=$_lavc_xvid
7608 CONFIG_X264=$_lavc_x264
7611 CONFIG_ENCODERS=$_mencoder
7612 CONFIG_MUXERS=$_mencoder
7614 RADIO_CAPTURE=$_radio_capture
7615 VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
7616 VIDIX_IVTV=$_vidix_drv_ivtv
7617 VIDIX_MACH64=$_vidix_drv_mach64
7618 VIDIX_MGA=$_vidix_drv_mga
7619 VIDIX_MGA_CRTC2=$_vidix_drv_mga_crtc2
7620 VIDIX_NVIDIA=$_vidix_drv_nvidia
7621 VIDIX_PM2=$_vidix_drv_pm2
7622 VIDIX_PM3=$_vidix_drv_pm3
7623 VIDIX_RADEON=$_vidix_drv_radeon
7624 VIDIX_RAGE128=$_vidix_drv_rage128
7625 VIDIX_SAVAGE=$_vidix_drv_savage
7626 VIDIX_SIS=$_vidix_drv_sis
7627 VIDIX_UNICHROME=$_vidix_drv_unichrome
7629 # --- Some stuff for autoconfigure ----
7635 TARGET_MMX2 = $_mmxext
7636 TARGET_3DNOW = $_3dnow
7637 TARGET_3DNOWEX = $_3dnowext
7639 TARGET_CMOV = $_cmov
7640 TARGET_ALTIVEC = $_altivec
7641 TARGET_ARMV5TE = $_armv5te
7642 TARGET_ARMV6 = $_armv6
7643 TARGET_IWMMXT = $_iwmmxt
7649 # --- libvo stuff ---
7652 # --- libao2 stuff ---
7655 # --- libaf stuff ---
7660 #############################################################################
7662 ff_config_enable
() {
7664 if ` echo $2 | grep $part > /dev/null `; then
7665 echo "#define CONFIG_$part 1"
7666 echo "#define ENABLE_$part 1"
7668 echo "#define ENABLE_$part 0"
7673 echo "Creating config.h"
7674 cat > config.h
<< EOF
7675 /* -------- This file has been automatically generated by configure ---------
7676 Note: Any changes in it will be lost when you run configure again. */
7678 /* Protect against multiple inclusion */
7679 #ifndef MPLAYER_CONFIG_H
7680 #define MPLAYER_CONFIG_H 1
7682 #define CONFIGURATION "$_configuration"
7684 /* make sure we never get lavformat's poll() emulation, the results are
7685 horrible if the X libs try to actually use it, see MPlayer-users
7686 Message-ID: <45D49541.8060101@infernix.net>
7687 Date: Thu, 15 Feb 2007 18:15:45 +0100
7688 Subject: [MPlayer-users] Crash with backtrace when playing back demuxed...
7690 #define HAVE_SYS_POLL_H 1
7692 /* use GNU internationalization */
7695 /* name of messages charset */
7698 /* Runtime CPU detection */
7699 $_def_runtime_cpudetection
7701 /* Dynamic a/v plugins */
7702 $_def_dynamic_plugins
7704 /* "restrict" keyword */
7705 $_def_restrict_keyword
7707 /* __builtin_expect branch prediction hint */
7708 $_def_builtin_expect
7709 #ifdef HAVE_BUILTIN_EXPECT
7710 #define likely(x) __builtin_expect ((x) != 0, 1)
7711 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7713 #define likely(x) (x)
7714 #define unlikely(x) (x)
7717 /* attribute(used) as needed by some compilers */
7718 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7719 # define attribute_used __attribute__((used))
7721 # define attribute_used
7724 /* compiler support for named assembler arguments */
7725 $_def_named_asm_args
7727 #define PREFIX "$_prefix"
7729 /* enable/disable SIGHANDLER */
7732 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7735 /* Toggles debugging informations */
7738 /* Toggles color console output */
7741 /* Indicates that libcdio is available for VCD and CD-DA playback */
7744 /* Indicates that Ogle's libdvdread is available for DVD playback */
7747 /* Indicates that dvdread is internal */
7748 $_def_dvdread_internal
7750 /* Additional options for libdvdread/libdvdcss */
7764 /* Common data directory (for fonts, etc) */
7765 #define MPLAYER_DATADIR "$_datadir"
7766 #define MPLAYER_CONFDIR "$_confdir"
7767 #define MPLAYER_LIBDIR "$_libdir"
7769 /* Define this to compile stream-caching support, it can be enabled via
7770 -cache <kilobytes> */
7773 /* Define if you are using XviD library */
7776 /* Define if you are using the X.264 library */
7779 /* Define if you are using libnut */
7782 /* Define to include support for libdv-0.9.5 */
7785 /* If build mencoder */
7788 /* Indicates if libmp3lame is available
7789 Note: for mencoder */
7791 $_def_mp3lame_preset
7792 $_def_mp3lame_preset_medium
7794 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7795 (use -bps or -nobps commandline option for run-time method selection)
7796 -bps gives better sync for vbr mp3 audio, it is now default */
7797 #define AVI_SYNC_BPS 1
7799 /* Undefine this if you do not want to select mono audio (left or right)
7800 with a stereo MPEG layer 2/3 audio stream. The command line option
7801 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7802 right-only), with 0 being the default.
7804 #define USE_FAKE_MONO 1
7806 /* Undefine this if your sound card driver has no working select().
7807 If you have kernel Oops, player hangups, or just no audio, you should
7808 try to recompile MPlayer with this option disabled! */
7811 /* define this to use iconv(3) function to codepage conversions */
7814 /* define this to use nl_langinfo function */
7817 /* define this to use RTC (/dev/rtc) for video timers */
7820 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7821 #define MAX_OUTBURST 65536
7823 /* set up audio OUTBURST. Do not change this! */
7824 #define OUTBURST 512
7826 /* Define this if your system has the header file for the OSS sound interface */
7829 /* Define this if your system has the header file for the OSS sound interface
7830 * in /usr/include */
7833 /* Define this if your system has the sysinfo header */
7836 /* Define this if your system has ftello() */
7840 /* Need these for FILE and off_t an config.h is usually before other includes*/
7842 #include <sys/types.h>
7843 off_t ftello(FILE *);
7846 /* Define this if your system has the "malloc.h" header file */
7849 /* memalign is mapped to malloc if unsupported */
7854 /* assembler handling of .align */
7857 /* Define this if your system has the "alloca.h" header file */
7860 /* Define this if your system has the "sys/mman.h" header file */
7862 $_def_mman_has_map_failed
7864 /* Define this if you have the elf dynamic linker -ldl library */
7867 /* Define this if you have the kstat kernel statistics library */
7870 /* Define this if you have zlib */
7873 #define CONFIG_ZLIB 1
7876 /* Define this if you have shm support */
7879 /* Define this if your system has scandir & alphasort */
7882 /* Define this if your system has strsep */
7885 /* Define this if your system has strlcpy */
7887 #ifndef HAVE_STRLCPY
7888 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7891 /* Define this if your system has strlcat */
7893 #ifndef HAVE_STRLCAT
7894 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7897 /* Define this if your system has fseeko */
7900 /* Need these for FILE and off_t an config.h is usually before other includes*/
7902 #include <sys/types.h>
7903 int fseeko(FILE *, off_t, int);
7908 /* Define this if your system has vsscanf */
7911 /* Define this if your system has swab */
7914 /* Define this if your system has posix select */
7917 /* Define this if your system has gettimeofday */
7920 /* Define this if your system has glob */
7923 /* Define this if your system has setenv */
7926 int setenv(const char *name, const char *val, int overwrite);
7929 /* Define this if your system has sysi86 */
7933 /* Define this if your system has pthreads */
7936 /* Define this if you enabled thread support for libavcodec */
7939 /* LIRC (remote control, see www.lirc.org) support: */
7942 /* Support for maemo (http://www.maemo.org) */
7946 * LIRCCD (LIRC client daemon)
7947 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7951 /* DVD navigation support using libdvdnav */
7953 $_def_dvdnav_version
7955 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7956 #define MPEG12_POSTPROC 1
7958 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7961 $_def_libpostproc_so
7963 /* Win32 DLL support */
7965 #define WIN32_PATH "$_win32codecsdir"
7967 /* Mac OS X specific features */
7969 $_def_macosx_finder_support
7971 $_def_macosx_corevideo
7973 /* Build our Win32-loader */
7976 /* ffmpeg's libavcodec support (requires libavcodec source) */
7980 $_def_libavcodec_mpegaudio_hp
7982 /* ffmpeg's libavformat support (requires libavformat source) */
7985 $_def_libavformat_so
7991 /* Use libavcodec's decoders */
7992 #define CONFIG_DECODERS 1
7993 /* Use libavcodec's encoders */
7994 #define CONFIG_ENCODERS 1
7996 /* Use libavformat's demuxers */
7997 #define CONFIG_DEMUXERS 1
7998 /* Use libavformat's muxers */
8001 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
8002 #define HAVE_EBX_AVAILABLE 1
8003 #define HAVE_EBP_AVAILABLE 1
8005 #define CONFIG_GPL 1
8007 /* Use AMR codecs from libavcodec. */
8012 /* Use specific parts from FFmpeg. */
8013 `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
8014 `ff_config_enable "$_libavencoders_all" "$_libavencoders"`
8015 `ff_config_enable "$_libavparsers_all" "$_libavparsers"`
8016 `ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
8017 `ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
8018 `ff_config_enable "$_libavprotocols_all" "$_libavprotocols"`
8019 `ff_config_enable "$_libavbsfs_all" "$_libavbsfs"`
8026 /* Use codec libs included in mplayer CVS / source dist: */
8031 /* XAnim DLL support */
8033 /* Default search path */
8036 /* RealPlayer DLL support */
8038 /* Default search path */
8041 /* LIVE555 Streaming Media library support */
8044 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
8047 /* Use unrarlib for Vobsubs */
8050 /* gui support, please do not edit this option */
8054 /* Audio output drivers */
8056 $_def_ossaudio_devdsp
8057 $_def_ossaudio_devmixer
8068 $_def_sys_asoundlib_h
8069 $_def_alsa_asoundlib_h
8075 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
8077 #undef FAST_OSD_TABLE
8079 /* Enable TV Interface support */
8082 /* Enable Video 4 Linux TV interface support */
8085 /* Enable Video 4 Linux 1 TV interface support */
8088 /* Enable Video 4 Linux 2 TV interface support */
8091 /* *BSD BrookTree headers */
8092 $_def_ioctl_meteor_h_name
8093 $_def_ioctl_bt848_h_name
8095 /* Enable *BSD BrookTree TV interface support */
8098 /* Enable Radio Interface support */
8101 /* Enable Capture for Radio Interface support */
8104 /* Enable Video 4 Linux Radio interface support */
8107 /* Enable Video 4 Linux 2 Radio interface support */
8110 /* Enable *BSD BrookTree Radio interface support */
8111 $_def_radio_bsdbt848
8113 /* Enable Video 4 Linux 2 MPEG PVR support */
8116 /* Define if your processor stores words with the most significant
8117 byte first (like Motorola and SPARC, unlike Intel and VAX). */
8123 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
8124 have the instruction. */
8127 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
8128 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
8134 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
8139 /* only gcc3 can compile mvi instructions */
8140 $_def_gcc_mvi_support
8142 /* Define this for Cygwin build for win32 */
8145 /* Define this to any prefered value from 386 up to infinity with step 100 */
8146 #define __CPU__ $iproc
8155 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
8156 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8158 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8159 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8160 #elif defined(WIN32)
8161 #define DEFAULT_CDROM_DEVICE "D:"
8162 #define DEFAULT_DVD_DEVICE "D:"
8163 #elif defined(SYS_DARWIN)
8164 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
8165 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
8166 #elif defined(__OpenBSD__)
8167 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
8168 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8169 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
8170 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
8171 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8172 #elif defined(SYS_AMIGAOS4)
8173 #define DEFAULT_CDROM_DEVICE "a1ide.device:2"
8174 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
8176 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
8177 #define DEFAULT_DVD_DEVICE "/dev/dvd"
8181 /*----------------------------------------------------------------------------
8183 ** NOTE: Instead of modifying these definitions here, use the
8184 ** --enable/--disable options of the ./configure script!
8185 ** See ./configure --help for details.
8187 *---------------------------------------------------------------------------*/
8189 /* C99 lrintf function available */
8192 /* round function is available */
8195 /* yes, we have inttypes.h */
8196 #define HAVE_INTTYPES_H 1
8198 /* int_fastXY_t emulation */
8201 /* nanosleep support */
8207 /* termcap flag for getch2.c */
8210 /* termios flag for getch2.c */
8215 /* enable PNG support */
8218 /* enable JPEG support */
8221 /* enable PNM support */
8224 /* enable md5sum support */
8227 /* enable GIF support */
8232 /* enable bitmap font support */
8235 /* enable FreeType support */
8238 /* enable Fontconfig support */
8241 /* enable SSA/ASS support */
8244 /* enable FriBiDi usage */
8247 /* enable ENCA usage */
8250 /* liblzo support */
8253 #define CONFIG_LZO 1
8256 /* libmad support */
8259 /* enable OggVorbis support */
8263 /* enable Speex support */
8266 /* enable musepack support */
8269 /* enable OggTheora support */
8272 /* enable FAAD (AAC) support */
8276 /* enable FAAC (AAC encoder) support */
8279 /* enable LADSPA plugin support */
8282 /* enable network */
8285 /* enable ftp support */
8288 /* enable vstream support */
8291 /* enable winsock2 instead of Unix functions*/
8294 /* define this to use inet_aton() instead of inet_pton() */
8297 /* enables / disables cdparanoia support */
8301 /* enables / disables VIDIX usage */
8303 $_def_vidix_drv_cyberblade
8304 $_def_vidix_drv_ivtv
8305 $_def_vidix_drv_mach64
8307 $_def_vidix_drv_mga_crtc2
8308 $_def_vidix_drv_nvidia
8310 $_def_vidix_drv_radeon
8311 $_def_vidix_drv_rage128
8312 $_def_vidix_drv_savage
8314 $_def_vidix_drv_unichrome
8317 /* enables / disables new input joystick support */
8320 /* enables / disables QTX codecs */
8323 /* enables / disables osd menu */
8326 /* enables / disables subtitles sorting */
8329 /* XMMS input plugin support */
8331 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8333 /* enables inet6 support */
8336 /* do we have gethostbyname2? */
8337 $_def_gethostbyname2
8339 /* Extension defines */
8340 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
8341 $_def_3dnowext // only define if you have 3DNOWEXT (AMD Athlon, etc.)
8342 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
8343 $_def_mmxext // only define if you have MMX2 (Athlon/PIII/4/CelII)
8344 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
8345 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
8346 $_def_ssse3 // only define if you have SSSE3 (Intel Core 2)
8347 $_def_cmov // only define if you have CMOV (i686+, without VIA C3)
8348 $_def_fast_cmov // only define if CMOV is fast
8349 $_def_altivec // only define if you have Altivec (G4)
8350 $_def_armv5te // only define if you have Enhanced DSP Extensions (ARM)
8351 $_def_armv6 // only define if you have ARMv6
8352 $_def_iwmmxt // only define if you have XScale IWMMX (ARM)
8354 $_def_altivec_h // enables usage of altivec.h
8356 $_def_mlib // Sun mediaLib, available only on solaris
8357 $_def_vis // only define if you have VIS ( ultrasparc )
8359 /* libmpeg2 uses a different feature test macro for mediaLib */
8361 #define LIBMPEG2_MLIB 1
8365 #define SCREEN_SIZE_X 1
8366 #define SCREEN_SIZE_Y 1
8378 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8388 $_def_directfb_version
8413 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8414 #define X11_FULLSCREEN 1
8417 #endif /* MPLAYER_CONFIG_H */
8420 #############################################################################
8424 Config files successfully generated by ./configure $_configuration !
8426 Install prefix: $_prefix
8427 Data directory: $_datadir
8428 Config direct.: $_confdir
8430 Byte order: $_byte_order
8431 Optimizing for: $_optimizing
8434 Messages/GUI: $_language
8437 echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
8438 test "$LANGUAGES" = en
&& echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
8443 Enabled optional drivers:
8444 Input: $_inputmodules
8445 Codecs: $_codecmodules
8446 Audio output: $_aomodules
8447 Video output: $_vomodules
8448 Audio filters: $_afmodules
8449 Disabled optional drivers:
8450 Input: $_noinputmodules
8451 Codecs: $_nocodecmodules
8452 Audio output: $_noaomodules
8453 Video output: $_novomodules
8454 Audio filters: $_noafmodules
8456 'config.h' and 'config.mak' contain your configuration options.
8457 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8458 compile *** DO NOT REPORT BUGS if you tweak these files ***
8460 'make' will now compile MPlayer and 'make install' will install it.
8461 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8466 if test "$_mtrr" = yes ; then
8467 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8473 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8474 operating system ($system_name). You may encounter a few files that cannot
8475 be played due to missing open source video/audio codec support.
8482 Check $TMPLOG if you wonder why an autodetection failed (make sure
8483 development headers/packages are installed).
8485 NOTE: The --enable-* parameters unconditionally force options on, completely
8486 skipping autodetection. This behavior is unlike what you may be used to from
8487 autoconf-based configure scripts that can decide to override you. This greater
8488 level of control comes at a price. You may have to provide the correct compiler
8489 and linker flags yourself.
8490 If you used one of these options (except --enable-gui and similar ones that
8491 turn on internal features) and experience a compilation or linking failure,
8492 make sure you have passed the necessary compiler/linker flags to configure.
8494 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8498 if test "$_warn_CFLAGS" = yes; then
8501 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8503 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8505 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8506 To do so, execute 'CFLAGS= ./configure <options>'
8512 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"