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 libvo/config.mak libao2/config.mak Gui/config.mak
21 # and libaf/config.mak are included from the Makefiles.
23 # If you want to add a new check for $feature, here is a simple skeleton:
25 # echocheck "$feature"
26 # if "$_feature" = auto; then
28 # #include <feature.h>
29 # int main(void) { return 0; }
32 # cc_check && _feature=yes
33 # if test "$_feature" = yes ; then
34 # _def_feature='#define HAVE_FEATURE 1'
36 # _def_feature='#undef HAVE_FEATURE'
40 # Furthermore you need to add the variable _feature to the list of default
41 # settings and set it to one of yes/no/auto. Also add appropriate
42 # --enable-feature/--disable-feature command line options.
43 # The results of the check should be written to config.h and config.mak
44 # at the end of this script. The variable names used for this should be
45 # uniform, i.e. if the option is named 'feature':
47 # _feature : should have a value of yes/no/auto
48 # _def_feature : '#define ... 1' or '#undef ...' for conditional compilation
49 # _ld_feature : '-L/path/dir -lfeature' GCC options
50 # _inc_feature : '-I/path/dir/include' extra include paths
52 #############################################################################
54 # Prevent locale nonsense from breaking basic text processing utils
58 # Prefer these macros to full length text !
59 # These macros only return an error code - NO display is done
64 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra -o $TMPO $@" >> "$TMPLOG"
66 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra -o "$TMPO" "$@" >> "$TMPLOG" 2>&1
69 echo "ldd $TMPO" >> "$TMPLOG"
70 $_ldd "$TMPO" >> "$TMPLOG" 2>&1
76 compile_check
$TMPC $@
80 compile_check
$TMPCPP $@
-lstdc++
84 "$TMPO" >> "$TMPLOG" 2>&1
87 # Display error message, flushes tempfile, exit
92 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
93 echo "Check \"$TMPLOG\" if you do not understand why it failed."
97 # OS test booleans functions
99 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
101 linux
() { issystem
"Linux" ; return "$?" ; }
102 sunos
() { issystem
"SunOS" ; return "$?" ; }
103 hpux
() { issystem
"HP-UX" ; return "$?" ; }
104 irix
() { issystem
"IRIX" ; return "$?" ; }
105 aix
() { issystem
"AIX" ; return "$?" ; }
106 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
107 freebsd
() { issystem
"FreeBSD" ; return "$?" ; }
108 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
109 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
110 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
111 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
112 qnx
() { issystem
"QNX" ; return "$?" ; }
113 darwin
() { issystem
"Darwin" ; return "$?" ; }
114 gnu
() { issystem
"GNU" ; return "$?" ; }
115 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
116 morphos
() { issystem
"MorphOS" ; 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 ;;
150 # not boolean test: implement the posix shell "!" operator for a
152 # usage: not {command}
153 # returns exit status "success" when the execution of "command"
160 # Use this before starting a check
162 echo "============ Checking for $@ ============" >> "$TMPLOG"
163 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
166 # Use this to echo the results of a check
168 if test "$_res_comment" ; then
169 _res_comment
="($_res_comment)"
171 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
172 echo "##########################################" >> "$TMPLOG"
174 echo "$@ $_res_comment"
177 #############################################################################
179 # Check how echo works in this /bin/sh
181 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
182 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
185 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"`
187 for parm
in "$@" ; do
188 if test "$parm" = "--help" ||
test "$parm" = "-help" ||
test "$parm" = "-h" ; then
191 Usage: $0 [OPTIONS]...
194 -h, --help display this help and exit
196 Installation directories:
197 --prefix=DIR use this prefix for installing mplayer [/usr/local]
198 --bindir=DIR use this prefix for installing mplayer binary
200 --datadir=DIR use this prefix for installing machine independent
201 data files (fonts, skins) [PREFIX/share/mplayer]
202 --mandir=DIR use this prefix for installing manpages [PREFIX/man]
203 --confdir=DIR use this prefix for installing configuration files
205 --libdir=DIR use this prefix for object code libraries [PREFIX/lib]
208 --disable-mencoder disable mencoder (a/v encoder) compilation [enable]
209 --enable-gui enable gmplayer compilation (GTK+ GUI) [disable]
210 --enable-old-gtk force using GTK 1.2 for GUI [disable]
211 --enable-largefiles enable support for files > 2 GBytes [disable]
212 --enable-linux-devfs set default devices to devfs ones [disable]
213 --enable-termcap use termcap database for key codes [autodetect]
214 --enable-termios use termios database for key codes [autodetect]
215 --disable-iconv do not use iconv(3) function [autodetect]
216 --disable-setlocale disable setlocale using in mplayer [autodetect]
217 --disable-langinfo do not use langinfo [autodetect]
218 --enable-lirc enable LIRC (remote control) support [autodetect]
219 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
220 --enable-joystick enable joystick support [disable]
221 --disable-vm disable support X video mode extensions [autodetect]
222 --disable-xf86keysym disable support for 'multimedia' keys [autodetect]
223 --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
224 --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
225 --disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
226 --disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
227 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
228 --disable-network disable network support (for: http/mms/rtp) [enable]
229 --enable-winsock2 enable winsock2 usage [autodetect]
230 --enable-smb enable Samba (SMB) input support [autodetect]
231 --enable-live enable LIVE555 Streaming Media support [autodetect]
232 --disable-dvdread Disable libdvdread support [autodetect]
233 --disable-mpdvdkit Disable mpdvdkit2 support [autodetect]
234 --disable-cdparanoia Disable cdparanoia support [autodetect]
235 --disable-freetype Disable freetype2 font rendering support [autodetect]
236 --disable-fontconfig Disable fontconfig font lookup support [autodetect]
237 --disable-unrarlib Disable Unique RAR File Library [enabled]
238 --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
239 --disable-sortsub Disable subtitles sorting [enabled]
240 --enable-fribidi Enable using the FriBiDi libs [autodetect]
241 --disable-enca Disable using ENCA charset oracle library [autodetect]
242 --disable-macosx Disable Mac OS X specific features [autodetect]
243 --enable-macosx-finder-support Enable Mac OS X Finder invocation parameter parsing [disabled]
244 --enable-macosx-bundle Enable Mac OS X bundle file locations [autodetect]
245 --disable-inet6 Disable IPv6 support [autodetect]
246 --disable-gethostbyname2 gethostbyname() function is not provided by the C
248 --disable-ftp Disable ftp support [enabled]
249 --disable-vstream Disable tivo vstream client support [autodetect]
250 --disable-pthreads Disable Posix threads support [autodetect]
253 --enable-gif enable gif support [autodetect]
254 --enable-png enable png input/output support [autodetect]
255 --enable-jpeg enable jpeg input/output support [autodetect]
256 --enable-libcdio enable external libcdio support [autodetect]
257 --enable-liblzo enable external liblzo support [autodetect]
258 --disable-win32 disable Win32 DLL support [autodetect]
259 --disable-dshow disable Win32/DirectShow support [autodetect]
260 --disable-qtx disable Quicktime codecs [autodetect]
261 --disable-xanim disable XAnim DLL support [autodetect]
262 --disable-real disable RealPlayer DLL support [autodetect]
263 --disable-xvid disable XviD codec [autodetect]
264 --disable-x264 disable H.264 encoder [autodetect]
265 --disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
266 --enable-opendivx enable _old_ OpenDivx codec [disable]
267 --disable-libavutil disable libavutil [autodetect]
268 --disable-libavcodec disable libavcodec [autodetect]
269 --disable-libavformat disable libavformat [autodetect]
270 --disable-libpostproc disable libpostproc [autodetect]
271 --disable-libavutil_so disable shared libavutil [autodetect]
272 --disable-libavcodec_so disable shared libavcodec [autodetect]
273 --disable-libavformat_so disable shared libavformat [autodetect]
274 --disable-libpostproc_so disable shared libpostproc [autodetect]
275 --enable-libfame enable libfame realtime encoder [autodetect]
276 --disable-internal-tremor do not build internal OggVorbis support [enabled]
277 --enable-tremor-low build with lower accuracy internal tremor [disabled]
278 --enable-external-tremor build with external tremor [disabled]
279 --disable-vorbis disable OggVorbis support entirely [autodetect]
280 --disable-speex disable Speex support [autodetect]
281 --enable-theora build with OggTheora support [autodetect]
282 --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
283 --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
284 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
285 --disable-ladspa disable LADSPA plugin support [autodetect]
286 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
287 --disable-mad disable libmad (MPEG audio) support [autodetect]
288 --disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
289 --disable-twolame disable Twolame (MPEG layer 2 audio) support in mencoder [autodetect]
290 --enable-xmms build with XMMS inputplugin support [disabled]
291 --disable-mp3lib disable builtin mp3lib [enabled]
292 --disable-liba52 disable builtin liba52 [enabled]
293 --enable-libdts enable libdts support [autodetect]
294 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
295 --disable-musepack disable musepack support [autodetect]
296 --disable-amr_nb disable amr narrowband, floating point [autodetect]
297 --disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect]
298 --disable-amr_wb disable amr wideband, floating point [autodetect]
299 --disable-codec=CODEC disable specified codec
300 --enable-codec=CODEC dnable specified codec
303 --disable-internal-vidix disable internal VIDIX [for x86 *nix]
304 --disable-external-vidix disable external VIDIX [for x86 *nix]
305 --enable-gl build with OpenGL render support [autodetect]
306 --enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
307 --enable-vesa build with VESA support [autodetect]
308 --enable-svga build with SVGAlib support [autodetect]
309 --enable-sdl build with SDL render support [autodetect]
310 --enable-aa build with AAlib render support [autodetect]
311 --enable-caca build with CACA render support [autodetect]
312 --enable-ggi build with GGI render support [autodetect]
313 --enable-ggiwmh build with GGI libggiwmh extension [autodetect]
314 --enable-directx build with DirectX support [autodetect]
315 --enable-dxr2 build with DXR2 render support [autodetect]
316 --enable-dxr3 build with DXR3/H+ render support [autodetect]
317 --enable-dvb build with support for output via DVB-Card [autodetect]
318 --enable-dvbhead build with DVB support (HEAD version) [autodetect]
319 --enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
320 (check for /dev/mga_vid) [autodetect]
321 --enable-xmga build with mga_vid X Window support
322 (check for X & /dev/mga_vid) [autodetect]
323 --enable-xv build with Xv render support for X 4.x [autodetect]
324 --enable-xvmc build with XvMC acceleration for X 4.x [disable]
325 --enable-vm build with XF86VidMode support for X11 [autodetect]
326 --enable-xinerama build with Xinerama support for X11 [autodetect]
327 --enable-x11 build with X11 render support [autodetect]
328 --enable-fbdev build with FBDev render support [autodetect]
329 --enable-mlib build with mediaLib support (Solaris only) [disable]
330 --enable-3dfx build with obsolete /dev/3dfx support [disable]
331 --enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
332 --enable-directfb build with DirectFB support [autodetect]
333 --enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
334 --enable-bl build with Blinkenlights support [disable]
335 --enable-tdfxvid build with tdfx_vid support [disable]
336 --disable-tga disable targa output support [enable]
337 --disable-pnm disable pnm output support [enable]
338 --disable-md5sum disable md5sum output support [enable]
341 --disable-alsa disable ALSA sound support [autodetect]
342 --disable-ossaudio disable OSS sound support [autodetect]
343 --disable-arts disable aRts sound support [autodetect]
344 --disable-esd disable esd sound support [autodetect]
345 --disable-polyp disable Polypaudio sound support [autodetect]
346 --disable-jack disable JACK sound support [autodetect]
347 --disable-openal disable OpenAL sound support [autodetect]
348 --disable-nas disable NAS sound support [autodetect]
349 --disable-sgiaudio disable SGI sound support [autodetect]
350 --disable-sunaudio disable Sun sound support [autodetect]
351 --disable-win32waveout disable Windows waveout sound support [autodetect]
352 --disable-select disable using select() on audio device [enable]
354 Miscellaneous options:
355 --enable-runtime-cpudetection Enable runtime CPU detection [disable]
356 --enable-cross-compile Enable cross-compilation [autodetect]
357 --cc=COMPILER use this C compiler to build MPlayer [gcc]
358 --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
359 --as=ASSEMBLER use this assembler to build MPlayer [as]
360 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
361 --enable-static build a statically linked binary. Set further linking
362 options with --enable-static="-lslang -lncurses"
363 --charset convert the help messages to this charset
364 --language=list a white space or comma separated list of languages
365 for translated man pages, the first language is the
366 primary and therefore used for translated messages
367 and GUI (also the environment variable \$LINGUAS is
369 (Available: $LANGUAGES all)
370 --with-install=PATH use a custom install program (useful if your OS uses
371 a GNU-incompatible install utility by default and
372 you want to use GNU version)
373 --install-path=PATH the path to a custom install program
374 this option is obsolete and will be removed soon,
375 use --with-install instead.
378 --enable-mmx build with MMX support [autodetect]
379 --enable-mmxext build with MMX2 support (PIII, Athlon) [autodetect]
380 --enable-3dnow build with 3DNow! support [autodetect]
381 --enable-3dnowext build with extended 3DNow! support [autodetect]
382 --enable-sse build with SSE support [autodetect]
383 --enable-sse2 build with SSE2 support [autodetect]
384 --enable-shm build with shm support [autodetect]
385 --enable-altivec build with Altivec support (PowerPC) [autodetect]
386 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
387 --enable-big-endian Force byte order to big-endian [autodetect]
388 --enable-debug[=1-3] compile debugging information into mplayer [disable]
389 --enable-profile compile profiling information into mplayer [disable]
390 --disable-sighandler disable sighandler for crashes [enable]
391 --enable-crash-debug enable automatic gdb attach on crash [disable]
392 --enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
394 Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
395 --disable-gcc-checking disable gcc version checking [enable]
397 Use these options if autodetection fails (Options marked with (*) accept
398 multiple paths separated by ':'):
399 --with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
400 --with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
401 --with-x11incdir=DIR X headers in DIR (*)
402 --with-x11libdir=DIR X library files in DIR (*)
403 --with-dxr2incdir=DIR DXR2 headers in DIR (*)
404 --with-dvbincdir=DIR DVB headers in DIR (*)
405 --with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
406 --with-mlibdir=DIR libmlib (mediaLib support) in DIR (Solaris only)
407 --with-codecsdir=DIR Binary codec files in DIR
408 --with-win32libdir=DIR W*ndows DLL files in DIR
409 --with-xanimlibdir=DIR XAnim DLL files in DIR
410 --with-reallibdir=DIR RealPlayer DLL files in DIR
411 --with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
412 --with-xvidincdir=DIR XviD header in DIR (*)
413 --with-x264libdir=DIR libx264 in DIR
414 --with-x264incdir=DIR x264 header in DIR
415 --with-dtslibdir=DIR libdts library in DIR (*)
416 --with-dtsincdir=DIR libdts header in DIR (*)
417 --with-livelibdir=DIR LIVE555 Streaming Media libraries in DIR
418 --with-toolamedir=DIR path to Toolame library and include file
419 --with-xmmsplugindir=DIR XMMS plugins in DIR
420 --with-xmmslibdir=DIR libxmms.so.1 in DIR
421 --with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
422 --with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
423 --with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
424 --with-termcaplib=NAME name of library with termcap functionality
425 name should be given without leading "lib"
426 checks for "termcap" and "tinfo"
428 --with-freetype-config=PATH path to freetype-config
429 (e.g. /opt/bin/freetype-config)
430 --with-fribidi-config=PATH path to fribidi-config
431 (e.g. /opt/bin/fribidi-config)
432 --with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
433 --with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
434 --with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
436 This configure script is NOT autoconf-based, even though its output is similar.
437 It will try to autodetect all configuration options. If you --enable an option
438 it will be forcefully turned on, skipping autodetection. This can break
439 compilation, so you need to know what you are doing.
443 done # for parm in ...
446 # 1st pass checking for vital options
457 test "$CC" && _cc
="$CC"
459 _runtime_cpudetection
=no
464 _target
=`echo $ac_option | cut -d '=' -f 2`
467 _cc
=`echo $ac_option | cut -d '=' -f 2`
470 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
473 _as
=`echo $ac_option | cut -d '=' -f 2`
475 --enable-gcc-checking)
478 --disable-gcc-checking)
488 _ld_static
="-static `echo $ac_option | cut -d '=' -f 2`"
490 --with-extraincdir=*)
491 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
493 --with-extralibdir=*)
494 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
496 --enable-runtime-cpudetection)
497 _runtime_cpudetection
=yes
499 --disable-runtime-cpudetection)
500 _runtime_cpudetection
=no
502 --enable-cross-compile)
505 --disable-cross-compile)
509 _install
=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
512 _install
=`echo $ac_option | cut -d '=' -f 2 `
524 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
532 # Determine our OS name and CPU architecture
533 if test -z "$_target" ; then
535 system_name
=`uname -s 2>&1`
536 case "$system_name" in
537 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX
)
545 [cC
][yY
][gG
][wW
][iI
][nN
]*)
552 system_name
="$system_name-UNKNOWN"
557 # host's CPU/instruction set
558 host_arch
=`uname -p 2>&1`
560 i386|sparc|ppc|alpha|arm|mips|vax
)
562 powerpc
) # Darwin returns 'powerpc'
565 *) # uname -p on Linux returns 'unknown' for the processor type,
566 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
568 # Maybe uname -m (machine hardware name) returns something we
571 # x86/x86pc is used by QNX
572 case "`uname -m 2>&1`" in
573 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
;;
574 ia64
) host_arch
=ia64
;;
576 if [ -n "`$_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p'`" -a \
577 -z "`echo $CFLAGS | grep -- -m32`" ]; then
583 macppc|ppc|ppc64
) host_arch
=ppc
;;
584 alpha
) host_arch
=alpha
;;
585 sparc
) host_arch
=sparc
;;
586 sparc64
) host_arch
=sparc64
;;
587 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
588 arm
*|zaurus|cats
) host_arch
=arm
;;
589 s390
) host_arch
=s390
;;
590 s390x
) host_arch
=s390x
;;
591 mips
*) host_arch
=mips
;;
592 vax
) host_arch
=vax
;;
593 *) host_arch
=UNKNOWN
;;
597 else # if test -z "$_target"
598 system_name
=`echo $_target | cut -d '-' -f 2`
599 case "`echo $system_name | tr A-Z a-z`" in
600 linux
) system_name
=Linux
;;
601 freebsd
) system_name
=FreeBSD
;;
602 netbsd
) system_name
=NetBSD
;;
603 bsd
/os
) system_name
=BSD
/OS
;;
604 openbsd
) system_name
=OpenBSD
;;
605 sunos
) system_name
=SunOS
;;
606 qnx
) system_name
=QNX
;;
607 morphos
) system_name
=MorphOS
;;
608 mingw32msvc
) system_name
=MINGW32
;;
610 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
611 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
614 echo "Detected operating system: $system_name"
615 echo "Detected host architecture: $host_arch"
617 # LGB: temporary files
618 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
622 TMPLOG
="configure.log"
624 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
625 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
626 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
627 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
631 # FIXME: A lot of stuff is installed under /usr/local
632 # NK: But we should never use this stuff implicitly since we call compiler
633 # from /usr we should be sure that there no effects from other compilers
634 # (libraries) which might be installed into /usr/local. Let users use this
635 # stuff explicitly as command line argument. In other words: It would be
636 # resonable to have only /usr/include or only /usr/local/include.
639 _ld_extra
="$_ld_extra -L/usr/local/lib"
640 _inc_extra
="$_inc_extra -I/usr/local/include"
644 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
645 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
661 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
662 # if used as 'head -1' instead of 'head -n 1', but older versions don't
664 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
665 _head
() { head -$1 2>/dev
/null
; }
667 _head
() { head -n $1 2>/dev
/null
; }
669 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
670 _tail
() { tail -$1 2>/dev
/null
; }
672 _tail
() { tail -n $1 2>/dev
/null
; }
675 # Checking CC version...
676 if test "$_skip_cc_check" != yes ; then
677 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
678 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
679 echocheck
"$_cc version"
681 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
682 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
683 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
684 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
685 # TODO verify older icc/ecc compatibility
688 cc_version
="v. ?.??, bad"
692 cc_version
="$cc_version, ok"
696 cc_version
="$cc_version, bad"
700 echores
"$cc_version"
702 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
703 echocheck
"$_cc version"
705 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
706 cc_version
=`$_cc -dumpversion 2>&1`
707 if test "$?" -gt 0; then
708 cc_version
="not found"
712 cc_version
="v. ?.??, bad"
715 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
716 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
717 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
718 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
719 cc_version
="$cc_version, ok"
726 cc_version
="$cc_version, bad"
730 echores
"$cc_version"
731 test "$cc_verc_fail" = "no" && break
734 if test "$cc_verc_fail" = yes ; then
737 *** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
739 You are not using a supported compiler. We do not have the time to make sure
740 everything works with compilers other than the ones we use. Use either the
741 same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
742 unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
744 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
745 mplayer and lame (which is used for mencoder). If you get compile errors,
746 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
747 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
750 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
752 *** For details please read DOCS/HTML/en/users-vs-dev.html ***
755 die
"Bad gcc version"
760 ******************************************************************************
762 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
763 Ok. You know. Do it. Did you read DOCS/HTML/en/users-vs-dev.html???
765 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
766 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
767 Lame which is used by mencoder produces weird errors, too.
769 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
770 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
772 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
774 ******************************************************************************
782 test "$_host_cc" || _host_cc
=$_cc
785 echocheck
"cross compilation"
786 if test $_cross_compile = auto
; then
788 int main() { return 0; }
791 cc_check
&& "$TMPO" && _cross_compile
=no
793 echores
$_cross_compile
795 if test $_cross_compile = yes; then
803 # now that we know what compiler should be used for compilation, try to find
804 # out which assembler is used by the $_cc compiler
805 if test "$_as" = auto
; then
806 _as
=`$_cc -print-prog-name=as`
807 test -z "$_as" && _as
=as
810 # XXX: this should be ok..
812 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
813 # FIXME: Remove the cygwin check once AMD CPUs are supported
814 if test -r /proc
/cpuinfo
&& not cygwin
; then
815 # Linux with /proc mounted, extract CPU information from it
816 _cpuinfo
="cat /proc/cpuinfo"
817 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86
; then
818 # FreeBSD with Linux emulation /proc mounted,
819 # extract CPU information from it
820 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
821 elif darwin
&& not x86
; then
822 # use hostinfo on Darwin
825 # use 'lsattr' on AIX
826 _cpuinfo
="lsattr -E -l proc0 -a type"
828 # all other OSes try to extract CPU information from a small helper
829 # program TOOLS/cpuinfo instead
830 $_cc -o TOOLS
/cpuinfo TOOLS
/cpuinfo.c
831 _cpuinfo
="TOOLS/cpuinfo"
834 if x86 || x86_64
; then
835 # gather more CPU information
836 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
837 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
838 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
839 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
840 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
842 exts
=`$_cpuinfo | grep 'features\|flags' | cut -d ':' -f 2 | _head 1`
844 pparam
=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ \
845 -e s/xmm/sse/ -e s/kni/sse/`
847 for ext
in $pparam ; do
848 eval _
$ext=auto
&& eval _
$ext=yes
851 # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
852 test $_sse = yes && _mmxext
=yes
854 echocheck
"CPU vendor"
855 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
862 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
863 _def_arch
="#define ARCH_X86 1"
864 _target_arch
="TARGET_ARCH_X86 = yes"
870 3) proc
=i386 iproc
=386 ;;
871 4) proc
=i486 iproc
=486 ;;
872 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
873 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
874 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
876 elif test "$pmodel" -ge 8; then
878 elif test "$pmodel" -ge 6; then
885 # It's a bit difficult to determine the correct type of Family 6
886 # AMD CPUs just from their signature. Instead, we check directly
887 # whether it supports SSE.
888 if test "$_sse" = yes; then
889 # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
892 # Again, gcc treats athlon and athlon-tbird similarly.
897 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
898 # caught and remedied in the optimization tests below.
902 *) proc
=k8 iproc
=686 ;;
907 3) proc
=i386 iproc
=386 ;;
908 4) proc
=i486 iproc
=486 ;;
910 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
911 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
917 if test "$pmodel" -eq 9 -o "$pmodel" -ge 13; then
919 elif test "$pmodel" -ge 7; then
921 elif test "$pmodel" -ge 3; then
928 # A nocona in 32-bit mode has no more capabilities than a prescott.
929 if test "$pmodel" -ge 3; then
935 *) proc
=prescott iproc
=686 ;;
941 if test "$pmodel" -ge 8; then
943 elif test "$pmodel" -ge 4; then
950 if test "$pmodel" -ge 9; then
957 *) proc
=i686 iproc
=i686
;;
962 3) proc
=i386 iproc
=386 ;;
963 4) proc
=i486 iproc
=486 ;;
964 *) proc
=i586 iproc
=586 ;;
968 proc
=i586 iproc
=586 ;;
971 # check that gcc supports our CPU, if not, fall back to earlier ones
972 # LGB: check -mcpu and -march swithing step by step with enabling
973 # to fall back till 386.
975 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
977 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
983 echocheck
"GCC & CPU optimization abilities"
985 int main(void) { return 0; }
987 if test "$_runtime_cpudetection" = no
; then
988 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
989 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
991 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ||
test "$proc" = "athlon-tbird"; then
992 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
994 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
995 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
997 if test "$proc" = "k6" ||
test "$proc" = "c3"; then
998 if not cc_check
-march=$proc $cpuopt=$proc; then
999 if cc_check
-march=i586
$cpuopt=i686
; then
1006 if test "$proc" = "pentium4" ||
test "$proc" = "pentium-m" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon" ||
test "$proc" = "c3-2"; then
1007 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
1009 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
1010 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
1012 if test "$proc" = "i586"; then
1013 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
1015 if test "$proc" = "i486" ; then
1016 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
1018 if test "$proc" = "i386" ; then
1019 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1021 if test "$proc" = "error" ; then
1022 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1026 elif test "$proc" = "i586-i686"; then
1027 _march
="-march=i586"
1028 _mcpu
="$cpuopt=i686"
1031 _march
="-march=$proc"
1032 _mcpu
="$cpuopt=$proc"
1035 else # if test "$_runtime_cpudetection" = no
1036 # i686 is probably the most common CPU - optimize for it
1037 _mcpu
="$cpuopt=i686"
1038 # at least i486 required, for bswap instruction
1039 _march
="-march=i486"
1040 cc_check
$_mcpu || _mcpu
=""
1041 cc_check
$_march $_mcpu || _march
=""
1044 ## Gabucino : --target takes effect here (hopefully...) by overwriting
1045 ## autodetected mcpu/march parameters
1046 if test "$_target" ; then
1047 # TODO: it may be a good idea to check GCC and fall back in all cases
1048 if test "$host_arch" = "i586-i686"; then
1049 _march
="-march=i586"
1050 _mcpu
="$cpuopt=i686"
1052 _march
="-march=$host_arch"
1053 _mcpu
="$cpuopt=$host_arch"
1061 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1062 i686|athlon
*|pentium
*) iproc
=686 ;;
1071 _def_arch
='#define ARCH_IA64 1'
1072 _target_arch
='TARGET_ARCH_IA64 = yes'
1081 _def_arch
='#define ARCH_X86_64 1'
1082 _target_arch
='TARGET_ARCH_X86_64 = yes'
1085 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1086 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1095 # 64-bit prescotts exist, but as far as GCC is concerned they have the
1096 # same capabilities as a nocona.
1102 echocheck
"GCC & CPU optimization abilities"
1104 int main(void) { return 0; }
1106 # This is a stripped-down version of the i386 fallback.
1107 if test "$_runtime_cpudetection" = no
; then
1108 # --- AMD processors ---
1109 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
1110 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1112 # This will fail if gcc version < 3.3, which is ok because earlier
1113 # versions don't really support 64-bit on amd64.
1114 # Is this a valid assumption? -Corey
1115 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ; then
1116 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1118 # --- Intel processors ---
1119 if test "$proc" = "nocona" ||
test "$proc" = "prescott" ; then
1120 cc_check
-march=$proc $cpuopt=$proc || proc
=pentium4
1122 if test "$proc" = "pentium4" ||
test "$proc" = "pentium4m" ; then
1123 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1126 _march
="-march=$proc"
1127 _mcpu
="$cpuopt=$proc"
1128 if test "$proc" = "error" ; then
1129 echores
"CPU optimization disabled. CPU not recognized or your compiler is too old."
1144 _def_arch
='#define ARCH_SPARC 1'
1145 _target_arch
='TARGET_ARCH_SPARC = yes'
1148 echocheck
"CPU type"
1150 case "`echo $karch`" in
1155 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1168 _def_arch
='#define ARCH_SPARC 1'
1169 _target_arch
='TARGET_ARCH_SPARC = yes'
1171 _def_vis
='#define HAVE_VIS = yes'
1179 arm|armv4l|armv5tel
)
1180 _def_arch
='#define ARCH_ARMV4L 1'
1181 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1190 _def_arch
='#define ARCH_POWERPC 1'
1191 _def_dcbzl
='#define NO_DCBZL 1'
1192 _target_arch
='TARGET_ARCH_POWERPC = yes'
1200 echocheck
"CPU type"
1201 case $system_name in
1203 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1204 if test -n "`$_cpuinfo | grep altivec`"; then
1209 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1210 if [ `sysctl -n hw.vectorunit` -eq 1 -o \
1211 "`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ]; then
1216 # only gcc 3.4 works reliably with AltiVec code under NetBSD
1218 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1221 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1228 proc
=`$_cpuinfo | grep 'type' | cut -f 2 -d ' ' | sed 's/PowerPC_//'`
1231 if test "$_altivec" = yes; then
1232 echores
"$proc altivec"
1237 echocheck
"GCC & CPU optimization abilities"
1239 if test -n "$proc"; then
1241 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1242 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1243 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1244 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1245 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1246 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1247 POWER
) _march
='-mcpu=power' _mcpu
='-mtune=power' ;;
1248 POWER2
) _march
='-mcpu=power2' _mcpu
='-mtune=power2' ;;
1249 POWER3
) _march
='-mcpu=power3' _mcpu
='-mtune=power3' ;;
1252 # gcc 3.1(.1) and up supports 7400 and 7450
1253 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
1255 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1256 7447*|
7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1260 # gcc 3.2 and up supports 970
1261 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1263 970*) _march
='-mcpu=970' _mcpu
='-mtune=970'
1264 _def_dcbzl
='#undef NO_DCBZL' ;;
1268 # gcc 3.3 and up supports POWER4
1269 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1271 POWER4
) _march
='-mcpu=power4' _mcpu
='-mtune=power4' ;;
1275 # gcc 4.0 and up supports POWER5
1276 if test "$_cc_major" -ge "4"; then
1278 POWER5
) _march
='-mcpu=power5' _mcpu
='-mtune=power5' ;;
1284 if test -n "$_mcpu"; then
1285 _optimizing
=`echo $_mcpu | cut -c 8-`
1286 echores
"$_optimizing"
1294 _def_arch
='#define ARCH_ALPHA 1'
1295 _target_arch
='TARGET_ARCH_ALPHA = yes'
1299 echocheck
"CPU type"
1302 unsigned long ver, mask;
1303 asm ("implver %0" : "=r" (ver));
1304 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1305 printf("%ld-%x\n", ver, ~mask);
1309 $_cc -o "$TMPO" "$TMPC"
1312 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
1313 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
1314 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
1315 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
1316 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
1317 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
1318 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
1322 echocheck
"GCC & CPU optimization abilities"
1323 if test "$proc" = "ev68" ; then
1324 cc_check
-mcpu=$proc || proc
=ev67
1326 if test "$proc" = "ev67" ; then
1327 cc_check
-mcpu=$proc || proc
=ev6
1334 echocheck
"MVI instruction support in GCC"
1335 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1336 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
1339 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
1340 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1345 _def_arch
='#define ARCH_SGI_MIPS 1'
1346 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
1354 echocheck
"CPU type"
1355 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
1356 case "`echo $proc`" in
1357 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
1358 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
1359 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
1360 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
1361 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
1362 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
1370 _def_arch
='#define ARCH_PA_RISC 1'
1371 _target_arch
='TARGET_ARCH_PA_RISC = yes'
1380 _def_arch
='#define ARCH_S390 1'
1381 _target_arch
='TARGET_ARCH_S390 = yes'
1390 _def_arch
='#define ARCH_S390X 1'
1391 _target_arch
='TARGET_ARCH_S390X = yes'
1400 _def_arch
='#define ARCH_VAX 1'
1401 _target_arch
='TARGET_ARCH_VAX = yes'
1410 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
1411 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
1412 die
"unsupported architecture $host_arch"
1414 esac # case "$host_arch" in
1416 if test "$_runtime_cpudetection" = yes ; then
1431 if x86
&& test "$_runtime_cpudetection" = no
; then
1433 if test "$1" = yes ; then
1434 echocheck
"kernel support of $2"
1437 void catch() { exit(1); }
1439 signal(SIGILL, catch);
1440 __asm__ __volatile__ ("$3":::"memory");return(0);
1444 if cc_check
&& tmp_run
; then
1446 _optimizing
="$_optimizing $2"
1450 echo "It seems that your kernel does not correctly support $2."
1451 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1458 extcheck
$_mmx "mmx" "emms" || _mmx
=no
1459 extcheck
$_mmxext "mmxext" "sfence" || _mmxext
=no
1460 extcheck
$_3dnow "3dnow" "femms" || _3dnow
=no
1461 extcheck
$_3dnowext "3dnowext" "pswapd %%mm0, %%mm0" || _3dnowext
=no
1462 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _sse
=no _gcc3_ext
="$_gcc3_ext -mno-sse"
1463 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2
=no _gcc3_ext
="$_gcc3_ext -mno-sse2"
1464 echocheck
"mtrr support"
1467 if test "$_mtrr" = yes ; then
1468 _optimizing
="$_optimizing mtrr"
1471 if test "$_gcc3_ext" != ""; then
1472 # if we had to disable sse/sse2 because the active kernel does not
1473 # support this instruction set extension, we also have to tell
1474 # gcc3 to not generate sse/sse2 instructions for normal C code
1476 int main(void) { return 0; }
1478 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1483 echocheck
"assembler support of -pipe option"
1485 int main(void) { return 0; }
1487 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
1489 # Checking for CFLAGS
1491 if test "$_profile" != "" ||
test "$_debug" != "" ; then
1492 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
1493 if test "$_cc_major" -ge "3" ; then
1494 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
1497 elif test -z "$CFLAGS" ; then
1498 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
1502 if test -n "$LDFLAGS" ; then
1503 _ld_extra
="$_ld_extra $LDFLAGS"
1506 if test -n "$CPPFLAGS" ; then
1507 _inc_extra
="$_inc_extra $LDFLAGS"
1511 _prefix
="/usr/local"
1513 # GOTCHA: the variables below defines the default behavior for autodetection
1514 # and have - unless stated otherwise - at least 2 states : yes no
1515 # If autodetection is available then the third state is: auto
1522 _libavcodecs
=`grep 'register_avcodec(&[a-z]' libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
1525 _libavformat_so
=auto
1527 _libpostproc_so
=auto
1532 _dga
=auto
# 1 2 no auto
1534 _xvmc
=no
#auto when complete
1570 _tremor_internal
=yes
1586 # dvdnav disabled, it does not work
1598 _mlib
=no
#broken, thus disabled
1614 _vidix_internal
=auto
1615 _vidix_external
=auto
1650 _macosx_finder_support
=no
1653 _freetypeconfig
='freetype-config'
1655 _fribidiconfig
='fribidi-config'
1658 _gethostbyname2
=auto
1664 case "$ac_option" in
1670 --enable-gcc-checking) ;;
1671 --disable-gcc-checking) ;;
1672 --enable-static*) ;;
1673 --disable-static*) ;;
1674 --with-extraincdir=*) ;;
1675 --with-extralibdir=*) ;;
1676 --enable-runtime-cpudetection) ;;
1677 --disable-runtime-cpudetection) ;;
1678 --enable-cross-compile) ;;
1679 --disable-cross-compile) ;;
1680 --install-path=*) ;;
1681 --with-install=*) ;;
1682 --enable-profile) ;;
1683 --disable-profile) ;;
1685 --enable-debug=*) ;;
1689 --enable-mencoder) _mencoder
=yes ;;
1690 --disable-mencoder) _mencoder
=no
;;
1691 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
1692 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
1693 --enable-x11) _x11
=yes ;;
1694 --disable-x11) _x11
=no
;;
1695 --enable-xv) _xv
=yes ;;
1696 --disable-xv) _xv
=no
;;
1697 --enable-xvmc) _xvmc
=yes ;;
1698 --disable-xvmc) _xvmc
=no
;;
1699 --enable-sdl) _sdl
=yes ;;
1700 --disable-sdl) _sdl
=no
;;
1701 --enable-directx) _directx
=yes ;;
1702 --disable-directx) _directx
=no
;;
1703 --enable-win32waveout) _win32waveout
=yes ;;
1704 --disable-win32waveout) _win32waveout
=no
;;
1705 --enable-nas) _nas
=yes ;;
1706 --disable-nas) _nas
=no
;;
1707 --enable-png) _png
=yes ;;
1708 --disable-png) _png
=no
;;
1709 --enable-jpeg) _jpg
=yes ;;
1710 --disable-jpeg) _jpg
=no
;;
1711 --enable-pnm) _pnm
=yes ;;
1712 --disable-pnm) _pnm
=no
;;
1713 --enable-md5sum) _md5sum
=yes ;;
1714 --disable-md5sum) _md5sum
=no
;;
1715 --enable-gif) _gif
=yes ;;
1716 --disable-gif) _gif
=no
;;
1717 --enable-gl) _gl
=yes ;;
1718 --disable-gl) _gl
=no
;;
1719 --enable-ggi) _ggi
=yes ;;
1720 --disable-ggi) _ggi
=no
;;
1721 --enable-ggiwmh) _ggiwmh
=yes ;;
1722 --disable-ggiwmh) _ggiwmh
=no
;;
1723 --enable-aa) _aa
=yes ;;
1724 --disable-aa) _aa
=no
;;
1725 --enable-caca) _caca
=yes ;;
1726 --disable-caca) _caca
=no
;;
1727 --enable-svga) _svga
=yes ;;
1728 --disable-svga) _svga
=no
;;
1729 --enable-vesa) _vesa
=yes ;;
1730 --disable-vesa) _vesa
=no
;;
1731 --enable-fbdev) _fbdev
=yes ;;
1732 --disable-fbdev) _fbdev
=no
;;
1733 --enable-dvb) _dvb
=yes ;;
1734 --disable-dvb) _dvb
=no
;;
1735 --enable-dvbhead) _dvbhead
=yes ;;
1736 --disable-dvbhead) _dvbhead
=no
;;
1737 --enable-dxr2) _dxr2
=yes ;;
1738 --disable-dxr2) _dxr2
=no
;;
1739 --enable-dxr3) _dxr3
=yes ;;
1740 --disable-dxr3) _dxr3
=no
;;
1741 --enable-iconv) _iconv
=yes ;;
1742 --disable-iconv) _iconv
=no
;;
1743 --enable-langinfo) _langinfo
=yes ;;
1744 --disable-langinfo) _langinfo
=no
;;
1745 --enable-rtc) _rtc
=yes ;;
1746 --disable-rtc) _rtc
=no
;;
1747 --enable-mp1e) _mp1e
=yes ;;
1748 --disable-mp1e) _mp1e
=no
;;
1749 --enable-libdv) _libdv
=yes ;;
1750 --disable-libdv) _libdv
=no
;;
1751 --enable-ossaudio) _ossaudio
=yes ;;
1752 --disable-ossaudio) _ossaudio
=no
;;
1753 --enable-arts) _arts
=yes ;;
1754 --disable-arts) _arts
=no
;;
1755 --enable-esd) _esd
=yes ;;
1756 --disable-esd) _esd
=no
;;
1757 --enable-polyp) _polyp
=yes ;;
1758 --disable-polyp) _polyp
=no
;;
1759 --enable-jack) _jack
=yes ;;
1760 --disable-jack) _jack
=no
;;
1761 --enable-openal) _openal
=yes ;;
1762 --disable-openal) _openal
=no
;;
1763 --enable-mad) _mad
=yes ;;
1764 --disable-mad) _mad
=no
;;
1765 --enable-toolame) _toolame
=yes ;;
1766 --disable-toolame) _toolame
=no
;;
1767 --enable-twolame) _twolame
=yes ;;
1768 --disable-twolame) _twolame
=no
;;
1769 --enable-libcdio) _libcdio
=yes ;;
1770 --disable-libcdio) _libcdio
=no
;;
1771 --enable-liblzo) _liblzo
=yes ;;
1772 --disable-liblzo) _liblzo
=no
;;
1773 --enable-vorbis) _vorbis
=yes ;;
1774 --disable-vorbis) _vorbis
=no
;;
1775 --enable-speex) _speex
=yes ;;
1776 --disable-speex) _speex
=no
;;
1777 --enable-internal-tremor) _tremor_internal
=yes ;;
1778 --disable-internal-tremor) _tremor_internal
=no
;;
1779 --enable-tremor-low) _tremor_low
=yes ;;
1780 --disable-tremor-low) _tremor_low
=no
;;
1781 --enable-external-tremor) _tremor
=yes ;;
1782 --disable-external-tremor) _tremor
=no
;;
1783 --enable-theora) _theora
=yes ;;
1784 --disable-theora) _theora
=no
;;
1785 --enable-mp3lib) _mp3lib
=yes ;;
1786 --disable-mp3lib) _mp3lib
=no
;;
1787 --enable-liba52) _liba52
=yes ;;
1788 --disable-liba52) _liba52
=no
;;
1789 --enable-libdts) _libdts
=yes ;;
1790 --disable-libdts) _libdts
=no
;;
1791 --enable-libmpeg2) _libmpeg2
=yes ;;
1792 --disable-libmpeg2) _libmpeg2
=no
;;
1793 --enable-musepack) _musepack
=yes ;;
1794 --disable-musepack) _musepack
=no
;;
1795 --enable-internal-faad) _faad_internal
=yes _faad_external
=no
;;
1796 --disable-internal-faad) _faad_internal
=no
;;
1797 --enable-external-faad) _faad_external
=yes _faad_internal
=no
;;
1798 --disable-external-faad) _faad_external
=no
;;
1799 --enable-faac) _faac
=yes ;;
1800 --disable-faac) _faac
=no
;;
1801 --enable-ladspa) _ladspa
=yes ;;
1802 --disable-ladspa) _ladspa
=no
;;
1803 --enable-xmms) _xmms
=yes ;;
1804 --disable-xmms) _xmms
=no
;;
1805 --enable-dvdread) _dvdread
=yes ;;
1806 --disable-dvdread) _dvdread
=no
;;
1807 --enable-mpdvdkit) _dvdkit
=yes ;;
1808 --disable-mpdvdkit) _dvdkit
=no
;;
1809 # dvdnav disabled, it does not work
1810 # --enable-dvdnav) _dvdnav=yes ;;
1811 # --disable-dvdnav) _dvdnav=no ;;
1812 --enable-xanim) _xanim
=yes ;;
1813 --disable-xanim) _xanim
=no
;;
1814 --enable-real) _real
=yes ;;
1815 --disable-real) _real
=no
;;
1816 --enable-live) _live
=yes ;;
1817 --disable-live) _live
=no
;;
1818 --enable-xinerama) _xinerama
=yes ;;
1819 --disable-xinerama) _xinerama
=no
;;
1820 --enable-mga) _mga
=yes ;;
1821 --disable-mga) _mga
=no
;;
1822 --enable-xmga) _xmga
=yes ;;
1823 --disable-xmga) _xmga
=no
;;
1824 --enable-vm) _vm
=yes ;;
1825 --disable-vm) _vm
=no
;;
1826 --enable-xf86keysym) _xf86keysym
=yes ;;
1827 --disable-xf86keysym) _xf86keysym
=no
;;
1828 --enable-mlib) _mlib
=yes ;;
1829 --disable-mlib) _mlib
=no
;;
1830 --enable-sunaudio) _sunaudio
=yes ;;
1831 --disable-sunaudio) _sunaudio
=no
;;
1832 --enable-sgiaudio) _sgiaudio
=yes ;;
1833 --disable-sgiaudio) _sgiaudio
=no
;;
1834 --enable-alsa) _alsa
=yes ;;
1835 --disable-alsa) _alsa
=no
;;
1836 --enable-tv) _tv
=yes ;;
1837 --disable-tv) _tv
=no
;;
1838 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1839 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1840 --enable-tv-v4l) _tv_v4l
=yes ;;
1841 --disable-tv-v4l) _tv_v4l
=no
;;
1842 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1843 --disable-tv-v4l2) _tv_v4l2
=no
;;
1844 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1845 --disable-fastmemcpy) _fastmemcpy
=no
;;
1846 --enable-network) _network
=yes ;;
1847 --disable-network) _network
=no
;;
1848 --enable-winsock2) _winsock2
=yes ;;
1849 --disable-winsock2) _winsock2
=no
;;
1850 --enable-smb) _smbsupport
=yes ;;
1851 --disable-smb) _smbsupport
=no
;;
1852 --enable-internal-vidix) _vidix_internal
=yes ;;
1853 --disable-internal-vidix) _vidix_internal
=no
;;
1854 --enable-external-vidix) _vidix_external
=yes ;;
1855 --disable-external-vidix) _vidix_external
=no
;;
1856 --enable-joystick) _joystick
=yes ;;
1857 --disable-joystick) _joystick
=no
;;
1858 --enable-xvid) _xvid
=yes ;;
1859 --disable-xvid) _xvid
=no
;;
1860 --enable-x264) _x264
=yes ;;
1861 --disable-x264) _x264
=no
;;
1862 --enable-divx4linux) _divx4linux
=yes ;;
1863 --disable-divx4linux) _divx4linux
=no
;;
1864 --enable-opendivx) _opendivx
=yes ;;
1865 --disable-opendivx) _opendivx
=no
;;
1866 --enable-libavutil) _libavutil
=yes ;;
1867 --disable-libavutil) _libavutil
=no
;;
1868 --enable-libavutil_so) _libavutil_so
=yes ;;
1869 --disable-libavutil_so) _libavutil_so
=no
;;
1870 --enable-libavcodec) _libavcodec
=yes ;;
1871 --disable-libavcodec) _libavcodec
=no
;;
1872 --enable-libavcodec_so) _libavcodec_so
=yes ;;
1873 --disable-libavcodec_so) _libavcodec_so
=no
;;
1874 --enable-amr_nb) _amr_nb
=yes ;;
1875 --disable-amr_nb) _amr_nb
=no
;;
1876 --enable-amr_nb-fixed) _amr_nb_fixed
=yes ;;
1877 --disable-amr_nb-fixed) _amr_nb_fixed
=no
;;
1878 --enable-amr_wb) _amr_wb
=yes ;;
1879 --disable-amr_wb) _amr_wb
=no
;;
1880 --enable-codec=*) _libavcodecs
="$_libavcodecs `echo $ac_option | cut -d '=' -f 2`" ;;
1881 --disable-codec=*) _libavcodecs
=`echo $_libavcodecs | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1882 --enable-libavformat) _libavformat
=yes;;
1883 --disable-libavformat) _libavformat
=no
;;
1884 --enable-libavformat_so) _libavformat_so
=yes ;;
1885 --disable-libavformat_so) _libavformat_so
=no
;;
1886 --enable-libpostproc) _libpostproc
=yes ;;
1887 --disable-libpostproc) _libpostproc
=no
;;
1888 --enable-libpostproc_so) _libpostproc_so
=yes ;;
1889 --disable-libpostproc_so) _libpostproc_so
=no
;;
1890 --enable-libfame) _fame
=yes ;;
1891 --disable-libfame) _fame
=no
;;
1892 --enable-lirc) _lirc
=yes ;;
1893 --disable-lirc) _lirc
=no
;;
1894 --enable-lircc) _lircc
=yes ;;
1895 --disable-lircc) _lircc
=no
;;
1896 --enable-gui) _gui
=yes ;;
1897 --disable-gui) _gui
=no
;;
1898 --enable-old-gtk) _gtk1
=yes ;;
1899 --enable-termcap) _termcap
=yes ;;
1900 --disable-termcap) _termcap
=no
;;
1901 --enable-termios) _termios
=yes ;;
1902 --disable-termios) _termios
=no
;;
1903 --enable-3dfx) _3dfx
=yes ;;
1904 --disable-3dfx) _3dfx
=no
;;
1905 --enable-tdfxfb) _tdfxfb
=yes ;;
1906 --disable-tdfxvid) _tdfxvid
=no
;;
1907 --enable-tdfxvid) _tdfxvid
=yes ;;
1908 --disable-tga) _tga
=no
;;
1909 --enable-tga) _tga
=yes ;;
1910 --disable-tdfxfb) _tdfxfb
=no
;;
1911 --enable-directfb) _directfb
=yes ;;
1912 --disable-directfb) _directfb
=no
;;
1913 --enable-zr) _zr
=yes ;;
1914 --disable-zr) _zr
=no
;;
1915 --enable-bl) _bl
=yes ;;
1916 --disable-bl) _bl
=no
;;
1917 --enable-mtrr) _mtrr
=yes ;;
1918 --disable-mtrr) _mtrr
=no
;;
1919 --enable-largefiles) _largefiles
=yes ;;
1920 --disable-largefiles) _largefiles
=no
;;
1921 --enable-shm) _shm
=yes ;;
1922 --disable-shm) _shm
=no
;;
1923 --enable-select) _select
=yes ;;
1924 --disable-select) _select
=no
;;
1925 --enable-linux-devfs) _linux_devfs
=yes ;;
1926 --disable-linux-devfs) _linux_devfs
=no
;;
1927 --enable-cdparanoia) _cdparanoia
=yes ;;
1928 --disable-cdparanoia) _cdparanoia
=no
;;
1929 --enable-big-endian) _big_endian
=yes ;;
1930 --disable-big-endian) _big_endian
=no
;;
1931 --enable-freetype) _freetype
=yes ;;
1932 --disable-freetype) _freetype
=no
;;
1933 --enable-fontconfig) _fontconfig
=yes ;;
1934 --disable-fontconfig) _fontconfig
=no
;;
1935 --enable-unrarlib) _unrarlib
=yes ;;
1936 --disable-unrarlib) _unrarlib
=no
;;
1937 --enable-ftp) _ftp
=yes ;;
1938 --disable-ftp) _ftp
=no
;;
1939 --enable-vstream) _vstream
=yes ;;
1940 --disable-vstream) _vstream
=no
;;
1941 --enable-pthreads) _pthreads
=yes ;;
1942 --disable-pthreads) _pthreads
=no
;;
1944 --enable-fribidi) _fribidi
=yes ;;
1945 --disable-fribidi) _fribidi
=no
;;
1947 --enable-enca) _enca
=yes ;;
1948 --disable-enca) _enca
=no
;;
1950 --enable-inet6) _inet6
=yes ;;
1951 --disable-inet6) _inet6
=no
;;
1953 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1954 --disable-gethostbyname2) _gethostbyname2
=no
;;
1956 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1957 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1958 --disable-dga) _dga
=no
;;
1960 --enable-menu) _menu
=yes ;;
1961 --disable-menu) _menu
=no
;;
1963 --enable-qtx) _qtx
=yes ;;
1964 --disable-qtx) _qtx
=no
;;
1966 --enable-macosx) _macosx
=yes ;;
1967 --disable-macosx) _macosx
=no
;;
1968 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1969 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1970 --enable-macosx-bundle) _macosx_bundle
=yes;;
1971 --disable-macosx-bundle) _macosx_bundle
=no
;;
1973 --enable-sortsub) _sortsub
=yes ;;
1974 --disable-sortsub) _sortsub
=no
;;
1977 _charset
=`echo $ac_option | cut -d '=' -f 2`
1980 _language
=`echo $ac_option | cut -d '=' -f 2`
1982 # dvdnav disabled, it does not work
1983 # --with-libdvdnav=*)
1984 # _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
1989 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1990 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1991 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1993 --with-win32libdir=*)
1994 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1997 --with-xanimlibdir=*)
1998 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
2001 --with-reallibdir=*)
2002 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
2005 --with-livelibdir=*)
2006 _livelibdir
=`echo $ac_option | cut -d '=' -f 2`
2008 --with-toolamedir=*)
2009 _toolamedir
=`echo $ac_option | cut -d '=' -f 2`
2012 _mlibdir
=`echo $ac_option | cut -d '=' -f 2`
2016 --with-xmmslibdir=*)
2017 _xmmslibdir
=`echo $ac_option | cut -d '=' -f 2`
2020 --with-xmmsplugindir=*)
2021 _xmmsplugindir
=`echo $ac_option | cut -d '=' -f 2`
2024 --enable-crash-debug)
2027 --disable-crash-debug)
2030 --enable-sighandler)
2033 --disable-sighandler)
2037 --enable-sse) _sse
=yes ;;
2038 --disable-sse) _sse
=no
;;
2039 --enable-sse2) _sse2
=yes ;;
2040 --disable-sse2) _sse2
=no
;;
2041 --enable-mmxext) _mmxext
=yes ;;
2042 --disable-mmxext) _mmxext
=no
;;
2043 --enable-3dnow) _3dnow
=yes ;;
2044 --disable-3dnow) _3dnow
=no _3dnowext
=no
;;
2045 --enable-3dnowext) _3dnow
=yes _3dnowext
=yes ;;
2046 --disable-3dnowext) _3dnowext
=no
;;
2047 --enable-altivec) _altivec
=yes ;;
2048 --disable-altivec) _altivec
=no
;;
2049 --enable-mmx) _mmx
=yes ;;
2050 --disable-mmx) # 3Dnow! and MMX2 require MMX
2051 _3dnow
=no _3dnowext
=no _mmx
=no _mmxext
=no
;;
2053 --enable-win32) _win32
=yes ;;
2054 --disable-win32) _win32
=no _dshow
=no
;;
2055 --enable-dshow) _win32
=yes _dshow
=yes ;;
2056 --disable-dshow) _dshow
=no
;;
2059 _inc_x11
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
2062 _x11_paths
=`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2064 --with-dxr2incdir=*)
2065 _inc_dxr2
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
2068 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
2071 _inc_dvb
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
2073 --with-xvidlibdir=*)
2074 _ld_xvid
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2076 --with-xvidincdir=*)
2077 _inc_xvid
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
2080 _ld_libdts
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2083 _inc_libdts
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
2085 --with-x264libdir=*)
2086 _ld_x264
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2088 --with-x264incdir=*)
2089 _inc_x264
=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
2091 --with-sdl-config=*)
2092 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
2094 --with-freetype-config=*)
2095 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
2097 --with-fribidi-config=*)
2098 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
2100 --with-gtk-config=*)
2101 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
2103 --with-glib-config=*)
2104 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
2106 # dvdnav disabled, it does not work
2107 # --with-dvdnav-config=*)
2108 # _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
2111 _ld_mad
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2113 --with-cdparanoiaincdir=*)
2114 _inc_cdparanoia
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
2116 --with-cdparanoialibdir=*)
2117 _ld_cdparanoia
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2119 --with-termcaplib=*)
2120 _ld_termcap
=-l`echo $ac_option | cut -d '=' -f 2`
2124 _prefix
=`echo $ac_option | cut -d '=' -f 2`
2127 _bindir
=`echo $ac_option | cut -d '=' -f 2`
2130 _datadir
=`echo $ac_option | cut -d '=' -f 2`
2133 _mandir
=`echo $ac_option | cut -d '=' -f 2`
2136 _confdir
=`echo $ac_option | cut -d '=' -f 2`
2139 _libdir
=`echo $ac_option | cut -d '=' -f 2`
2143 echo "Unknown parameter: $ac_option"
2150 # Atmos: moved this here, to be correct, if --prefix is specified
2151 test -z "$_bindir" && _bindir
="$_prefix/bin"
2152 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
2153 test -z "$_mandir" && _mandir
="$_prefix/man"
2154 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
2155 test -z "$_libdir" && _libdir
="$_prefix/lib"
2156 test -z "$_mlibdir" && _mlibdir
="$MLIBHOME"
2159 # Checking assembler (_as) compatibility...
2160 # Added workaround for older as that reads from stdin by default - atmos
2161 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2162 echocheck
"assembler ($_as $as_version)"
2164 _pref_as_version
='2.9.1'
2166 if test "$_mmx" = yes ; then
2167 echo 'emms' >> $TMPS
2169 if test "$_3dnow" = yes ; then
2170 _pref_as_version
='2.10.1'
2171 echo 'femms' >> $TMPS
2173 if test "$_3dnowext" = yes ; then
2174 _pref_as_version
='2.10.1'
2175 echo 'pswapd %mm0, %mm0' >> $TMPS
2177 if test "$_mmxext" = yes ; then
2178 _pref_as_version
='2.10.1'
2179 echo 'movntq %mm0, (%eax)' >> $TMPS
2181 if test "$_sse" = yes ; then
2182 _pref_as_version
='2.10.1'
2183 echo 'xorps %xmm0, %xmm0' >> $TMPS
2185 #if test "$_sse2" = yes ; then
2186 # _pref_as_version='2.11'
2187 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2189 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2191 if test "$as_verc_fail" != yes ; then
2194 _res_comment
="Upgrade binutils to ${_pref_as_version} ..."
2196 die
"obsolete binutils version"
2200 #FIXME: This should happen before the check for CFLAGS..
2203 # check if altivec is supported by the compiler, and how to enable it
2205 _altivec_gcc_flags
=''
2207 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2208 echocheck
"GCC altivec support"
2216 FSF_flags
='-maltivec -mabi=altivec'
2217 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2219 # check for Darwin-style flags first, since
2220 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2221 # accepts but ignores FSF-style flags...
2223 if test -z "$p"; then
2224 cc_check
$Darwin_flags && p
='Darwin'
2226 if test -z "$p"; then
2227 cc_check
$FSF_flags && p
='FSF'
2231 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2232 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2236 if test -z "$p"; then
2239 p
="$p-style ($_altivec_gcc_flags)"
2245 # check if <altivec.h> should be included
2247 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2249 if test "$_altivec" = yes ; then
2250 echocheck
"altivec.h"
2252 #include <altivec.h>
2253 int main(void) { return 0; }
2256 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2257 if test "$_have_altivec_h" = yes ; then
2258 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2260 echores
"$_have_altivec_h"
2263 # disable runtime cpudetection if
2264 # - we cannot generate altivec code
2265 # - altivec is disabled by the user
2267 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2268 _runtime_cpudetection
=no
2271 # show that we are optimizing for altivec (if enabled and supported)
2273 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2274 _optimizing
="$_optimizing altivec"
2277 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2279 if test "$_altivec" = yes ; then
2280 #FIXME: _mcpu is used for CFLAGS, this needs to be set earlier
2281 #_mcpu="$_mcpu $_altivec_gcc_flags"
2282 CFLAGS
="$CFLAGS $_altivec_gcc_flags"
2285 # setup _def_altivec correctly
2287 if test "$_altivec" = yes ; then
2288 _def_altivec
='#define HAVE_ALTIVEC 1'
2290 _def_altivec
='#undef HAVE_ALTIVEC'
2294 _def_mmx
='#undef HAVE_MMX'
2295 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2296 _def_mmxext
='#undef HAVE_MMX2'
2297 test "$_mmxext" = yes && _def_mmxext
='#define HAVE_MMX2 1'
2298 _def_3dnow
='#undef HAVE_3DNOW'
2299 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2300 _def_3dnowext
='#undef HAVE_3DNOWEX'
2301 test "$_3dnowext" = yes && _def_3dnowext
='#define HAVE_3DNOWEX 1'
2302 _def_sse
='#undef HAVE_SSE'
2303 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2304 _def_sse2
='#undef HAVE_SSE2'
2305 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2307 # Checking kernel version...
2308 if x86
&& linux
; then
2310 kernel_version
=`uname -r 2>&1`
2311 echocheck
"$system_name kernel version"
2312 case "$kernel_version" in
2313 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2314 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2315 _k_verc_problem
=yes;;
2317 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2320 if test "$_k_verc_fail" ; then
2321 echores
"$kernel_version, fail"
2322 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2323 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2324 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2325 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2326 echo "2.2.x you must upgrade it to get SSE support!"
2327 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2329 echores
"$kernel_version, ok"
2333 if test "$_vidix_internal" = auto
; then
2335 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2336 x86
&& _vidix_internal
=yes
2337 x86_64
&& _vidix_internal
=yes
2338 ppc
&& linux
&& _vidix_internal
=yes
2339 alpha
&& linux
&& _vidix_internal
=yes
2340 qnx
&& _vidix_internal
=no
2341 sunos
&& _vidix_internal
=no
2342 beos
&& _vidix_internal
=no
2343 darwin
&& _vidix_internal
=no
2346 echocheck
"MPlayer binary name"
2349 _prg_mencoder
="mencoder.exe"
2352 _prg_mencoder
="mencoder"
2357 # On QNX we must link to libph - Gabucino
2359 _ld_arch
="$_ld_arch -lph"
2362 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2364 if test "$_vidix_internal" = yes ; then
2367 for _awk
in mawk gawk nawk
awk; do
2368 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2373 test "$_awk_verc_fail" = yes && _awk
=no
2375 if test "$_awk_verc_fail" = yes; then
2376 echo "VIDIX needs awk, but no working implementation was found!"
2377 echo "Try the GNU version, which can be downloaded from:"
2378 echo "ftp://ftp.gnu.org/gnu/gawk/"
2379 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2384 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
2391 ######################
2392 # MAIN TESTS GO HERE #
2393 ######################
2396 echocheck
"extra headers"
2397 if test "$_inc_extra" ; then
2398 echores
"$_inc_extra"
2404 echocheck
"extra libs"
2405 if test "$_ld_extra" ; then
2406 echores
"$_ld_extra"
2413 int main(void) { return 0; }
2415 if cc_check
-lposix ; then
2416 _ld_arch
="$_ld_arch -lposix"
2424 int main(void) { return 0; }
2426 if cc_check
-lm ; then
2435 echocheck
"langinfo"
2436 if test "$_langinfo" = auto
; then
2438 #include <langinfo.h>
2439 int main(void) { nl_langinfo(CODESET); return 0; }
2442 cc_check
&& _langinfo
=yes
2444 if test "$_langinfo" = yes ; then
2445 _def_langinfo
='#define USE_LANGINFO 1'
2447 _def_langinfo
='#undef USE_LANGINFO'
2449 echores
"$_langinfo"
2452 echocheck
"language"
2453 test -z "$_language" && _language
=$LINGUAS
2454 _language
=`echo $_language | sed 's/,/ /g'`
2455 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2456 for lang
in $_language ; do
2457 test "$lang" = all
&& lang
=en
2458 if test -f "help/help_mp-${lang}.h" ; then
2462 echo -n "$lang not found, "
2463 _language
=`echo $_language | sed "s/$lang *//"`
2466 test -z "$_language" && _language
=en
2467 _mp_help
="help/help_mp-${_language}.h"
2468 test -f $_mp_help || die
"$_mp_help not found"
2469 for lang
in $LANGUAGES ; do
2470 if test -f "DOCS/man/$lang/mplayer.1" ; then
2471 MAN_LANG
="$MAN_LANG $lang"
2474 _doc_lang
=$_language
2475 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2476 echores
"using $_language (man pages: $MAN_LANG)"
2479 echocheck
"enable sighandler"
2480 if test "$_sighandler" = yes ; then
2481 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2483 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2485 echores
"$_sighandler"
2487 echocheck
"runtime cpudetection"
2488 if test "$_runtime_cpudetection" = yes ; then
2489 _optimizing
="Runtime CPU-Detection enabled"
2490 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2492 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2494 echores
"$_runtime_cpudetection"
2497 echocheck
"restrict keyword"
2498 for restrict_keyword
in restrict __restrict __restrict__
; do
2499 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2501 _def_restrict_keyword
=$restrict_keyword
2505 if [ -n "$_def_restrict_keyword" ]; then
2506 echores
"$_def_restrict_keyword"
2510 # Avoid infinite recursion loop ("#define restrict restrict")
2511 if [ "$_def_restrict_keyword" != "restrict" ]; then
2512 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2514 _def_restrict_keyword
=""
2518 echocheck
"__builtin_expect"
2519 # GCC branch prediction hint
2522 a = __builtin_expect (a, 10);
2523 return a == 10 ? 0 : 1;
2525 int main() { return foo(10) && foo(0); }
2528 cc_check
&& _builtin_expect
=yes
2529 if test "$_builtin_expect" = yes ; then
2530 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2532 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2534 echores
"$_builtin_expect"
2540 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2543 cc_check
-lkstat && _kstat
=yes
2544 if test "$_kstat" = yes ; then
2545 _def_kstat
="#define HAVE_LIBKSTAT 1"
2546 _ld_arch
="-lkstat $_ld_arch"
2548 _def_kstat
="#undef HAVE_LIBKSTAT"
2554 # required for nanosleep on some systems
2557 int main(void) { (void) nanosleep(0, 0); return 0; }
2560 cc_check
-lposix4 && _posix4
=yes
2561 if test "$_posix4" = yes ; then
2562 _ld_arch
="-lposix4 $_ld_arch"
2569 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2572 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2573 if test "$_lrintf" = yes ; then
2574 _def_lrintf
="#define HAVE_LRINTF 1"
2576 _def_lrintf
="#undef HAVE_LRINTF"
2583 int main(void) { (void) round(0.0); return 0; }
2586 cc_check
$_ld_lm && _round
=yes
2587 if test "$_round" = yes ; then
2588 _def_round
="#define HAVE_ROUND 1"
2590 _def_round
="#undef HAVE_ROUND"
2594 echocheck
"nanosleep"
2595 # also check for nanosleep
2598 int main(void) { (void) nanosleep(0, 0); return 0; }
2601 cc_check
$_ld_arch && _nanosleep
=yes
2602 if test "$_nanosleep" = yes ; then
2603 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2605 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2607 echores
"$_nanosleep"
2611 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2612 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2615 #include <sys/socket.h>
2616 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2618 for _ld_tmp
in "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2619 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && break
2621 if test $_winsock2 = auto
&& not cygwin
; then
2624 #include <winsock2.h>
2625 int main(void) { (void) gethostbyname(0); return 0; }
2627 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2629 if test "$_ld_sock" ; then
2630 _res_comment
="using $_ld_sock"
2637 if test $_winsock2 = yes ; then
2639 _def_winsock2
='#define HAVE_WINSOCK2 1'
2641 _def_winsock2
='#undef HAVE_WINSOCK2'
2646 echocheck
"inet_pton()"
2648 #include <sys/types.h>
2649 #include <sys/socket.h>
2650 #include <arpa/inet.h>
2651 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2653 if test "$_winsock2" = yes ; then
2654 _res_comment
="using winsock2 functions instead"
2656 elif cc_check
$_ld_sock ; then
2657 # NOTE: Linux has libresolv but does not need it
2659 _res_comment
="using $_ld_sock"
2661 elif cc_check
$_ld_sock -lresolv ; then
2662 # NOTE: needed for SunOS at least
2663 _ld_sock
="$_ld_sock -lresolv"
2664 _res_comment
="using $_ld_sock"
2667 _res_comment
="trying inet_aton next"
2670 echocheck
"inet_aton()"
2672 #include <sys/types.h>
2673 #include <sys/socket.h>
2674 #include <arpa/inet.h>
2675 int main(void) { (void) inet_aton(0, 0); return 0; }
2678 if cc_check
$_ld_sock ; then
2679 # NOTE: Linux has libresolv but does not need it
2681 _res_comment
="using $_ld_sock"
2682 elif cc_check
$_ld_sock -lresolv ; then
2683 # NOTE: needed for SunOS at least
2684 _ld_sock
="$_ld_sock -lresolv"
2685 _res_comment
="using $_ld_sock"
2689 _res_comment
="network support disabled"
2691 echores
"$_use_aton"
2694 _def_use_aton
='#undef USE_ATON'
2695 if test "$_use_aton" != no
; then
2696 _def_use_aton
='#define USE_ATON 1'
2700 echocheck
"inttypes.h (required)"
2702 #include <inttypes.h>
2703 int main(void) { return 0; }
2706 cc_check
&& _inttypes
=yes
2707 echores
"$_inttypes"
2709 if test "$_inttypes" = no
; then
2710 echocheck
"bitypes.h (inttypes.h predecessor)"
2712 #include <sys/bitypes.h>
2713 int main(void) { return 0; }
2715 cc_check
&& _inttypes
=yes
2716 if test "$_inttypes" = yes ; then
2717 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."
2719 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2724 echocheck
"int_fastXY_t in inttypes.h"
2726 #include <inttypes.h>
2728 volatile int_fast16_t v= 0;
2732 cc_check
&& _fast_inttypes
=yes
2733 if test "$_fast_inttypes" = yes ; then
2737 _def_fast_inttypes
='
2738 typedef signed char int_fast8_t;
2739 typedef signed int int_fast16_t;
2740 typedef signed int int_fast32_t;
2741 typedef unsigned char uint_fast8_t;
2742 typedef unsigned int uint_fast16_t;
2743 typedef unsigned int uint_fast32_t;'
2745 echores
"$_fast_inttypes"
2748 echocheck
"word size"
2749 _mp_wordsize
="#undef MP_WORDSIZE"
2752 #include <sys/types.h>
2753 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2755 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2756 echores
"$_wordsize"
2759 echocheck
"stddef.h"
2762 int main(void) { return 0; }
2765 cc_check
&& _stddef
=yes
2766 if test "$_stddef" = yes ; then
2767 _def_stddef
='#define HAVE_STDDEF_H 1'
2769 _def_stddef
='#undef HAVE_STDDEF_H'
2774 echocheck
"malloc.h"
2777 int main(void) { (void) malloc(0); return 0; }
2780 cc_check
&& _malloc
=yes
2781 if test "$_malloc" = yes ; then
2782 _def_malloc
='#define HAVE_MALLOC_H 1'
2784 _def_malloc
='#undef HAVE_MALLOC_H'
2786 # malloc.h emits a warning in FreeBSD and OpenBSD
2787 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2791 echocheck
"memalign()"
2792 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2795 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2798 cc_check
&& _memalign
=yes
2799 if test "$_memalign" = yes ; then
2800 _def_memalign
='#define HAVE_MEMALIGN 1'
2802 _def_memalign
='#undef HAVE_MEMALIGN'
2804 echores
"$_memalign"
2807 echocheck
"alloca.h"
2810 int main(void) { (void) alloca(0); return 0; }
2813 cc_check
&& _alloca
=yes
2815 _def_alloca
='#define HAVE_ALLOCA_H 1'
2817 _def_alloca
='#undef HAVE_ALLOCA_H'
2824 #include <sys/types.h>
2825 #include <sys/mman.h>
2826 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2829 cc_check
&& _mman
=yes
2830 if test "$_mman" = yes ; then
2831 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2833 _def_mman
='#undef HAVE_SYS_MMAN_H'
2838 #include <sys/types.h>
2839 #include <sys/mman.h>
2840 int main(void) { void *p = MAP_FAILED; return 0; }
2842 _mman_has_map_failed
=no
2843 cc_check
&& _mman_has_map_failed
=yes
2844 if test "$_mman_has_map_failed" = yes ; then
2845 _def_mman_has_map_failed
=''
2847 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2850 echocheck
"dynamic loader"
2853 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2856 for _ld_tmp
in "" "-ldl" ; do
2857 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
2859 if test "$_dl" = yes ; then
2860 _def_dl
='#define HAVE_LIBDL 1'
2862 _def_dl
='#undef HAVE_LIBDL'
2867 echocheck
"dynamic a/v plugins support"
2868 if test "$_dl" = no
; then
2871 if test "$_dynamic_plugins" = yes ; then
2872 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
2874 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
2876 echores
"$_dynamic_plugins"
2879 #echocheck "dynamic linking"
2880 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2881 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
2883 #int main(void) { return 0; }
2885 #if cc_check -rdynamic ; then
2886 # _ld_dl_dynamic='-rdynamic'
2887 #elif cc_check -Bdynamic ; then
2888 # _ld_dl_dynamic='-Bdynamic'
2889 #elif cc_check ; then
2892 #echores "using $_ld_dl_dynamic"
2894 _def_threads
='#undef HAVE_THREADS'
2897 if test "$_pthreads" != no
; then
2899 #include <pthread.h>
2900 void* func(void *arg) { return arg; }
2901 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2905 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
2906 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2907 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
2911 if test "$_pthreads" = yes ; then
2912 _res_comment
="using $_ld_pthread"
2913 _def_pthreads
='#define HAVE_PTHREADS 1'
2914 _def_threads
='#define HAVE_THREADS 1'
2916 _res_comment
="v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled"
2917 _def_pthreads
='#undef HAVE_PTHREADS'
2918 _nas
=no
; _tv_v4l
=no
; _macosx
=no
2919 if not mingw32
; then
2923 echores
"$_pthreads"
2927 if test "$_iconv" = auto
; then
2928 _iconv_tmp
='#include <iconv.h>'
2934 #define INBUFSIZE 1024
2935 #define OUTBUFSIZE 4096
2937 char inbuffer[INBUFSIZE];
2938 char outbuffer[OUTBUFSIZE];
2943 char *tocode="UTF-8";
2944 char *fromcode="cp1250";
2945 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
2946 while ((numread = read (0, inbuffer, INBUFSIZE))) {
2947 char *iptr=inbuffer;
2948 char *optr=outbuffer;
2949 size_t inleft=numread;
2950 size_t outleft=OUTBUFSIZE;
2951 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
2953 write (1, outbuffer, OUTBUFSIZE - outleft);
2956 if (iconv_close(icdsc) == -1)
2962 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
2963 cc_check
$_ld_lm $_ld_tmp && _ld_iconv
="$_ld_tmp" && _iconv
=yes && break
2966 if test "$_iconv" = yes ; then
2967 _def_iconv
='#define USE_ICONV 1'
2969 _def_iconv
='#undef USE_ICONV'
2974 echocheck
"sys/soundcard.h"
2976 #include <sys/soundcard.h>
2977 int main(void) { return 0; }
2980 cc_check
&& _sys_soundcard
=yes
2981 if test "$_sys_soundcard" = yes ; then
2982 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
2983 _inc_soundcard
='#include <sys/soundcard.h>'
2985 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
2987 echores
"$_sys_soundcard"
2989 if test "$_sys_soundcard" != yes ; then
2990 echocheck
"soundcard.h"
2992 #include <soundcard.h>
2993 int main(void) { return 0; }
2996 cc_check
&& _soundcard
=yes
2997 if linux ||
test "$_ossaudio" != no
; then
2998 # use soundcard.h on Linux, or when OSS support is enabled
2999 echores
"$_soundcard"
3001 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
3002 _res_comment
= "but ignored!"
3003 echores
"$_soundcard"
3006 if test "$_soundcard" = yes ; then
3007 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
3008 _inc_soundcard
='#include <soundcard.h>'
3010 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3013 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
3017 echocheck
"sys/dvdio.h"
3020 #include <sys/dvdio.h>
3021 int main(void) { return 0; }
3024 cc_check
&& _dvdio
=yes
3025 if test "$_dvdio" = yes ; then
3026 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
3028 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
3033 echocheck
"sys/cdio.h"
3036 #include <sys/cdio.h>
3037 int main(void) { return 0; }
3040 cc_check
&& _cdio
=yes
3041 if test "$_cdio" = yes ; then
3042 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
3044 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
3049 echocheck
"linux/cdrom.h"
3051 #include <sys/types.h>
3052 #include <linux/cdrom.h>
3053 int main(void) { return 0; }
3056 cc_check
&& _cdrom
=yes
3057 if test "$_cdrom" = yes ; then
3058 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
3060 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
3068 int main(void) { return 0; }
3071 cc_check
&& _dvd
=yes
3072 if test "$_dvd" = yes ; then
3073 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
3075 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
3080 echocheck
"BSDI dvd.h"
3083 int main(void) { return 0; }
3086 cc_check
&& _bsdi_dvd
=yes
3087 if test "$_bsdi_dvd" = yes ; then
3088 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
3090 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
3092 echores
"$_bsdi_dvd"
3095 # also used by AIX, but AIX does not support VCD and/or libdvdread
3096 echocheck
"HP-UX SCSI header"
3098 #include <sys/scsi.h>
3099 int main(void) { return 0; }
3102 cc_check
&& _hpux_scsi_h
=yes
3103 if test "$_hpux_scsi_h" = yes ; then
3104 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3106 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3108 echores
"$_hpux_scsi_h"
3111 echocheck
"userspace SCSI headers (Solaris)"
3113 # include <unistd.h>
3114 # include <stropts.h>
3115 # include <sys/scsi/scsi_types.h>
3116 # include <sys/scsi/impl/uscsi.h>
3117 int main(void) { return 0; }
3120 cc_check
&& _sol_scsi_h
=yes
3121 if test "$_sol_scsi_h" = yes ; then
3122 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3124 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3126 echores
"$_sol_scsi_h"
3130 if test "$_termcap" = auto
; then
3132 int main(void) { tgetent(); return 0; }
3135 for _ld_tmp
in "-lncurses" "-ltinfo" "-ltermcap"; do
3136 cc_check
$_ld_tmp && _ld_termcap
="$_ld_tmp" && _termcap
=yes && break
3139 if test "$_termcap" = yes ; then
3140 _def_termcap
='#define USE_TERMCAP 1'
3141 _res_comment
="using $_ld_termcap"
3143 _def_termcap
='#undef USE_TERMCAP'
3149 if test "$_termios" = auto
; then
3151 #include <sys/termios.h>
3152 int main(void) { return 0; }
3155 cc_check
&& _termios
=yes
3156 _def_termios_h_name
='sys/termios.h'
3159 if test "$_termios" = auto
; then
3161 #include <termios.h>
3162 int main(void) { return 0; }
3165 cc_check
&& _termios
=yes
3166 _def_termios_h_name
='termios.h'
3169 if test "$_termios" = yes ; then
3170 _def_termios
='#define HAVE_TERMIOS 1'
3171 _def_termios_h
='#undef HAVE_TERMIOS_H'
3172 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3174 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3175 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3176 elif test "$_def_termios_h_name" = 'termios.h' ; then
3177 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3179 _res_comment
="using $_def_termios_h_name"
3181 _def_termios
='#undef HAVE_TERMIOS'
3182 _def_termios_h_name
=''
3189 if test "$_shm" = auto
; then
3191 #include <sys/types.h>
3192 #include <sys/shm.h>
3193 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3196 cc_check
&& _shm
=yes
3198 if test "$_shm" = yes ; then
3199 _def_shm
='#define HAVE_SHM 1'
3201 _def_shm
='#undef HAVE_SHM'
3206 # XXX: FIXME, add runtime checking
3207 echocheck
"linux devfs"
3208 echores
"$_linux_devfs"
3211 echocheck
"scandir()"
3213 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3216 cc_check
&& _scandir
=yes
3217 if test "$_scandir" = yes ; then
3218 _def_scandir
='#define HAVE_SCANDIR 1'
3220 _def_scandir
='#undef HAVE_SCANDIR'
3225 echocheck
"strsep()"
3228 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3231 cc_check
&& _strsep
=yes
3232 if test "$_strsep" = yes ; then
3233 _def_strsep
='#define HAVE_STRSEP 1'
3235 _def_strsep
='#undef HAVE_STRSEP'
3239 echocheck
"strlcpy()"
3242 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3245 cc_check
&& _strlcpy
=yes
3246 if test "$_strlcpy" = yes ; then
3247 _def_strlcpy
='#define HAVE_STRLCPY 1'
3249 _def_strlcpy
='#undef HAVE_STRLCPY'
3253 echocheck
"strlcat()"
3256 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3259 cc_check
&& _strlcat
=yes
3260 if test "$_strlcat" = yes ; then
3261 _def_strlcat
='#define HAVE_STRLCAT 1'
3263 _def_strlcat
='#undef HAVE_STRLCAT'
3267 echocheck
"fseeko()"
3270 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3273 cc_check
&& _fseeko
=yes
3274 if test "$_fseeko" = yes ; then
3275 _def_fseeko
='#define HAVE_FSEEKO 1'
3277 _def_fseeko
='#undef HAVE_FSEEKO'
3281 echocheck
"localtime_r()"
3284 int main( void ) { localtime_r(NULL, NULL); }
3287 cc_check
&& _localtime_r
=yes
3288 if test "$_localtime_r" = yes ; then
3289 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3291 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3293 echores
"$_localtime_r"
3295 echocheck
"vsscanf()"
3298 int main(void) { vsscanf(0, 0, 0); return 0; }
3301 cc_check
&& _vsscanf
=yes
3302 if test "$_vsscanf" = yes ; then
3303 _def_vsscanf
='#define HAVE_VSSCANF 1'
3305 _def_vsscanf
='#undef HAVE_VSSCANF'
3313 int main(void) { swab(0, 0, 0); return 0; }
3316 cc_check
&& _swab
=yes
3317 if test "$_swab" = yes ; then
3318 _def_swab
='#define HAVE_SWAB 1'
3320 _def_swab
='#undef HAVE_SWAB'
3324 echocheck
"POSIX select()"
3328 #include <sys/types.h>
3330 #include <sys/time.h>
3332 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3335 cc_check
&& _posix_select
=yes
3336 if test "$_posix_select" = no
; then
3337 _def_no_posix_select
='#define HAVE_NO_POSIX_SELECT 1'
3339 _def_no_posix_select
='#undef HAVE_NO_POSIX_SELECT'
3341 echores
"$_posix_select"
3344 echocheck
"gettimeofday()"
3347 #include <sys/time.h>
3348 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3351 cc_check
&& _gettimeofday
=yes
3352 if test "$_gettimeofday" = yes ; then
3353 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3355 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3357 echores
"$_gettimeofday"
3364 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3367 cc_check
&& _glob
=yes
3368 if test "$_glob" = yes ; then
3369 _def_glob
='#define HAVE_GLOB 1'
3371 _def_glob
='#undef HAVE_GLOB'
3376 echocheck
"setenv()"
3379 int main (void){ setenv("","",0); return 0; }
3382 cc_check
&& _setenv
=yes
3383 if test "$_setenv" = yes ; then
3384 _def_setenv
='#define HAVE_SETENV 1'
3386 _def_setenv
='#undef HAVE_SETENV'
3392 echocheck
"sysi86()"
3394 #include <sys/sysi86.h>
3395 int main (void) { sysi86(0); return 0; }
3398 cc_check
&& _sysi86
=yes
3399 if test "$_sysi86" = yes ; then
3400 _def_sysi86
='#define HAVE_SYSI86 1'
3402 _def_sysi86
='#undef HAVE_SYSI86'
3408 echocheck
"sys/sysinfo.h"
3410 #include <sys/sysinfo.h>
3412 struct sysinfo s_info;
3418 cc_check
&& _sys_sysinfo
=yes
3419 if test "$_sys_sysinfo" = yes ; then
3420 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3421 _inc_sysinfo
='#include <sys/sysinfo.h>'
3423 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3425 echores
"$_sys_sysinfo"
3428 echocheck
"Mac OS X APIs"
3429 if test "$_macosx" = auto
&& darwin
; then
3430 productName
=`/usr/bin/sw_vers -productName`
3431 if test "$productName" = "Mac OS X" ; then
3435 _def_macosx
='#undef MACOSX'
3436 _noaomodules
="macosx $_noaomodules"
3437 _novomodules
="quartz $_novomodules"
3440 if test "$_macosx" = yes ; then
3442 #include <Carbon/Carbon.h>
3443 #include <QuickTime/QuickTime.h>
3444 #include <CoreAudio/CoreAudio.h>
3448 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3451 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3453 _macosx_frameworks
="-framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3454 _def_macosx
='#define MACOSX 1'
3455 _aosrc
="$_aosrc ao_macosx.c"
3456 _aomodules
="macosx $_aomodules"
3457 _vosrc
="$_vosrc vo_quartz.c"
3458 _vomodules
="quartz $_vomodules"
3461 _def_macosx
='#undef MACOSX'
3462 _noaomodules
="macosx $_noaomodules"
3463 _novomodules
="quartz $_novomodules"
3466 #include <Carbon/Carbon.h>
3467 #include <QuartzCore/CoreVideo.h>
3470 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3471 _vosrc
="$_vosrc vo_macosx.m"
3472 _vomodules
="macosx $_vomodules"
3473 _macosx_frameworks
="$_macosx_frameworks -framework Cocoa -framework QuartzCore -framework OpenGL"
3474 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3475 _macosx_corevideo
=yes
3477 _novomodules
="macosx $_novomodules"
3478 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3479 _macosx_corevideo
=no
3484 echocheck
"Mac OS X Finder Support"
3485 if test "$_macosx_finder_support" = auto
; then
3486 _macosx_finder_support
=$_macosx
3488 if test "$_macosx_finder_support" = yes; then
3489 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3490 _macosx_finder_support
=yes
3492 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3493 _macosx_finder_support
=no
3495 echores
"$_macosx_finder_support"
3497 echocheck
"Mac OS X Bundle file locations"
3498 if test "$_macosx_bundle" = auto
; then
3499 _macosx_bundle
=$_macosx_finder_support
3501 if test "$_macosx_bundle" = yes; then
3502 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3504 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3507 echores
"$_macosx_bundle"
3509 echocheck
"Samba support (libsmbclient)"
3510 if test "$_smbsupport" = yes; then
3511 _ld_smb
="-lsmbclient"
3513 if test "$_smbsupport" = auto
; then
3516 #include <libsmbclient.h>
3517 int main(void) { smbc_opendir("smb://"); return 0; }
3519 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3520 cc_check
$_ld_tmp && _ld_smb
="$_ld_tmp" && _smbsupport
=yes && break
3524 if test "$_smbsupport" = yes; then
3525 _def_smbsupport
="#define LIBSMBCLIENT"
3526 _inputmodules
="smb $_inputmodules"
3528 _def_smbsupport
="#undef LIBSMBCLIENT"
3529 _noinputmodules
="smb $_noinputmodules"
3531 echores
"$_smbsupport"
3540 if test "$_3dfx" = yes ; then
3541 _def_3dfx
='#define HAVE_3DFX 1'
3542 _vosrc
="$_vosrc vo_3dfx.c"
3543 _vomodules
="3dfx $_vomodules"
3545 _def_3dfx
='#undef HAVE_3DFX'
3546 _novomodules
="3dfx $_novomodules"
3552 if test "$_tdfxfb" = yes ; then
3553 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3554 _vosrc
="$_vosrc vo_tdfxfb.c"
3555 _vomodules
="tdfxfb $_vomodules"
3557 _def_tdfxfb
='#undef HAVE_TDFXFB'
3558 _novomodules
="tdfxfb $_novomodules"
3563 if test "$_tdfxvid" = yes ; then
3564 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3565 _vosrc
="$_vosrc vo_tdfx_vid.c"
3566 _vomodules
="tdfx_vid $_vomodules"
3568 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3569 _novomodules
="tdfx_vid $_novomodules"
3574 if test "$_tga" = yes ; then
3575 _def_tga
='#define HAVE_TGA 1'
3576 _vosrc
="$_vosrc vo_tga.c"
3577 _vomodules
="tga $_vomodules"
3579 _def_tga
='#undef HAVE_TGA'
3580 _novomodules
="tga $_novomodules"
3584 echocheck
"DirectFB headers presence"
3585 if test -z "$_inc_directfb" ; then
3586 for I
in /usr
/include
/usr
/local
/include
`echo $_inc_extra | sed s/-I//g`; do
3587 if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
3588 _inc_directfb
="-I$I/directfb"
3589 _res_comment
="using $_inc_directfb"
3593 if test -d "$I" && test -f "$I/directfb.h" ; then
3594 _inc_directfb
="-I$I"
3595 _res_comment
="using $_inc_directfb"
3600 if test -z "$_inc_directfb" ; then
3605 _res_comment
="using $_inc_directfb"
3608 if test "$_inc_directfb" = "-I/usr/include" ; then
3612 echocheck
"DirectFB"
3613 if test "$_directfb" = auto
; then
3616 #include <directfb.h>
3617 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3619 linux
&& test -c /dev
/fb0
&& cc_check
$_inc_directfb -ldirectfb && _directfb
=yes
3622 if test "$_directfb" = yes; then
3624 #include <directfb_version.h>
3626 dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MICRO_VERSION
3629 if $_cc -E $TMPC $_inc_directfb > "$TMPO"; then
3630 _directfb_version
=`sed -n 's/^dfb_ver[^1-9]*\(.*\)/\1/p' "$TMPO" | tr -d '() '`
3631 _def_directfb_version
="#define DIRECTFBVERSION $_directfb_version"
3632 if test "$_directfb_version" -ge 913; then
3633 _res_comment
="$_directfb_version"
3635 _def_directfb_version
='#undef DIRECTFBVERSION'
3637 _res_comment
="version >=0.9.13 required"
3641 _res_comment
="failed to get version"
3644 echores
"$_directfb"
3646 if test "$_directfb" = yes ; then
3647 _def_directfb
='#define HAVE_DIRECTFB 1'
3648 if test "$_directfb_version" -ge 913; then
3649 _vosrc
="$_vosrc vo_directfb2.c"
3650 _vomodules
="directfb $_vomodules"
3651 _ld_directfb
='-ldirectfb'
3654 if test "$_directfb_version" -ge 915; then
3655 _vosrc
="$_vosrc vo_dfbmga.c"
3656 _vomodules
="dfbmga $_vomodules"
3659 _def_directfb
='#undef HAVE_DIRECTFB'
3660 _novomodules
="directfb $_novomodules"
3665 echocheck
"X11 headers presence"
3666 if test -z "$_inc_x11" ; then
3667 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3668 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
3671 _res_comment
="using $I"
3675 if test -z "$_inc_x11" ; then
3678 _res_comment
="check if the dev(el) packages are installed"
3682 _res_comment
="using $_inc_x11"
3684 if test "$_inc_x11" = "-I/usr/include" ; then
3687 echores
"$_x11_headers"
3691 if test "$_x11" != no
; then
3693 #include <X11/Xlib.h>
3694 #include <X11/Xutil.h>
3695 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3697 if test -z "$_x11_paths" ; then
3698 _x11_paths
="/usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib"
3700 for I
in $_x11_paths ; do
3701 _ld_x11
="-L$I -lXext -lX11 $_ld_sock $_ld_pthread"
3703 _ld_x11
="$_ld_x11 -Wl,-R$I"
3705 if test -d "$I" && cc_check
$_inc_x11 $_ld_x11 ; then
3711 if test "$_x11" = yes ; then
3712 _def_x11
='#define HAVE_X11 1'
3713 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3714 _vomodules
="x11 xover $_vomodules"
3715 _res_comment
="using $I"
3718 _def_x11
='#undef HAVE_X11'
3721 _novomodules
="x11 $_novomodules"
3722 _res_comment
="check if the dev(el) packages are installed"
3730 if test "$_x11" = yes ; then
3732 #include <X11/Xmd.h>
3733 #include <X11/Xlib.h>
3734 #include <X11/Xutil.h>
3735 #include <X11/Xatom.h>
3736 #include <X11/extensions/dpms.h>
3738 (void) DPMSQueryExtension(0, 0, 0);
3741 cc_check
$_inc_x11 -lXdpms $_ld_x11 && _xdpms3
=yes
3743 #include <X11/Xlib.h>
3744 #include <X11/extensions/dpms.h>
3746 (void) DPMSQueryExtension(0, 0, 0);
3749 cc_check
$_inc_x11 $_ld_x11 && _xdpms4
=yes
3751 if test "$_xdpms4" = yes ; then
3752 _def_xdpms
='#define HAVE_XDPMS 1'
3753 _res_comment
="using Xdpms 4"
3755 elif test "$_xdpms3" = yes ; then
3756 _def_xdpms
='#define HAVE_XDPMS 1'
3757 _ld_x11
="-lXdpms $_ld_x11"
3758 _res_comment
="using Xdpms 3"
3761 _def_xdpms
='#undef HAVE_XDPMS'
3767 if test "$_x11" = yes && test "$_xv" != no
; then
3769 #include <X11/Xlib.h>
3770 #include <X11/extensions/Xvlib.h>
3772 (void) XvGetPortAttribute(0, 0, 0, 0);
3773 (void) XvQueryPortAttributes(0, 0, 0);
3777 cc_check
$_inc_x11 -lXv $_ld_x11 && _xv
=yes
3781 if test "$_xv" = yes ; then
3782 _def_xv
='#define HAVE_XV 1'
3784 _vosrc
="$_vosrc vo_xv.c"
3785 _vomodules
="xv $_vomodules"
3787 _def_xv
='#undef HAVE_XV'
3788 _novomodules
="xv $_novomodules"
3794 if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no
; then
3797 #include <X11/Xlib.h>
3798 #include <X11/extensions/Xvlib.h>
3799 #include <X11/extensions/XvMClib.h>
3801 (void) XvMCQueryExtension(0,0,0);
3802 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3805 for _ld_tmp
in $_xvmclib XvMCNVIDIA XvMCW I810XvMC
; do
3806 cc_check
$_inc_x11 -lXvMC -l$_ld_tmp $_ld_xv $_ld_x11 && _xvmc
=yes && _xvmclib
="$_ld_tmp" && break
3809 if test "$_xvmc" = yes ; then
3810 _def_xvmc
='#define HAVE_XVMC 1'
3811 _ld_xvmc
="-lXvMC -l$_xvmclib"
3812 _vosrc
="$_vosrc vo_xvmc.c"
3813 _vomodules
="xvmc $_vomodules"
3814 _res_comment
="using $_xvmclib"
3816 _def_xvmc
='#undef HAVE_XVMC'
3817 _novomodules
="xvmc $_novomodules"
3822 echocheck
"Xinerama"
3823 if test "$_x11" = yes && test "$_xinerama" != no
; then
3825 #include <X11/Xlib.h>
3826 #include <X11/extensions/Xinerama.h>
3827 int main(void) { (void) XineramaIsActive(0); return 0; }
3830 cc_check
$_inc_x11 -lXinerama $_ld_x11 && _xinerama
=yes
3834 if test "$_xinerama" = yes ; then
3835 _def_xinerama
='#define HAVE_XINERAMA 1'
3836 _ld_xinerama
='-lXinerama'
3838 _def_xinerama
='#undef HAVE_XINERAMA'
3840 echores
"$_xinerama"
3843 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3844 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3845 # named 'X extensions' or something similar.
3846 # This check may be useful for future mplayer versions (to change resolution)
3847 # If you run into problems, remove '-lXxf86vm'.
3849 if test "$_x11" = yes && test "$_vm" = auto
; then
3851 #include <X11/Xlib.h>
3852 #include <X11/extensions/xf86vmode.h>
3853 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3856 cc_check
$_inc_x11 -lXxf86vm $_ld_x11 && _vm
=yes
3858 if test "$_vm" = yes ; then
3859 _def_vm
='#define HAVE_XF86VM 1'
3862 _def_vm
='#undef HAVE_XF86VM'
3866 # Check for the presence of special keycodes, like audio control buttons
3867 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3868 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3869 # have these new keycodes.
3870 echocheck
"XF86keysym"
3871 if test "$_xf86keysym" = auto
; then
3873 if test "$_x11" = yes ; then
3875 #include <X11/Xlib.h>
3876 #include <X11/XF86keysym.h>
3877 int main(void) { return XF86XK_AudioPause; }
3879 cc_check
$_inc_x11 $_ld_x11 && _xf86keysym
=yes
3882 if test "$_xf86keysym" = yes ; then
3883 _def_xf86keysym
='#define HAVE_XF86XK 1'
3885 _def_xf86keysym
='#undef HAVE_XF86XK'
3887 echores
"$_xf86keysym"
3890 if test "$_x11" = no
; then
3893 # Version 2 is preferred to version 1 if available
3894 if test "$_dga" = auto
; then
3896 #include <X11/Xlib.h>
3897 #include <X11/extensions/xf86dga.h>
3898 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
3901 cc_check
$_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga
=1
3904 #include <X11/Xlib.h>
3905 #include <X11/extensions/xf86dga.h>
3906 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
3908 cc_check
$_inc_x11 -lXxf86dga $_ld_x11 && _dga
=2
3911 _def_dga
='#undef HAVE_DGA'
3912 _def_dga2
='#undef HAVE_DGA2'
3913 if test "$_dga" = 1 ; then
3914 _def_dga
='#define HAVE_DGA 1'
3915 _ld_dga
='-lXxf86dga'
3916 _vosrc
="$_vosrc vo_dga.c"
3917 _vomodules
="dga $_vomodules"
3918 _res_comment
="using DGA 1.0"
3919 elif test "$_dga" = 2 ; then
3920 _def_dga
='#define HAVE_DGA 1'
3921 _def_dga2
='#define HAVE_DGA2 1'
3922 _ld_dga
='-lXxf86dga'
3923 _vosrc
="$_vosrc vo_dga.c"
3924 _vomodules
="dga $_vomodules"
3925 _res_comment
="using DGA 2.0"
3926 elif test "$_dga" = no
; then
3927 _novomodules
="dga $_novomodules"
3929 die
"DGA version must be 1 or 2"
3935 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
3936 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
3939 int main(void) { return 0; }
3942 if cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3944 _ld_gl
="-lGL $_ld_dl"
3945 elif cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3947 _ld_gl
="-lGL $_ld_pthread $_ld_dl"
3948 elif cc_check
-lopengl32 ; then
3951 _ld_gl
="-lopengl32 -lgdi32"
3956 if test "$_gl" = yes ; then
3957 _def_gl
='#define HAVE_GL 1'
3958 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
3959 if test "$_gl_win32" = yes ; then
3960 _def_gl_win32
='#define GL_WIN32 1'
3961 _vosrc
="$_vosrc w32_common.c"
3962 _res_comment
="win32 version"
3964 _vomodules
="opengl $_vomodules"
3966 _def_gl
='#undef HAVE_GL'
3967 _def_gl_win32
='#undef GL_WIN32'
3968 _novomodules
="opengl $_novomodules"
3973 echocheck
"/dev/mga_vid"
3974 if test "$_mga" = auto
; then
3976 test -c /dev
/mga_vid
&& _mga
=yes
3978 if test "$_mga" = yes ; then
3979 _def_mga
='#define HAVE_MGA 1'
3980 _vosrc
="$_vosrc vo_mga.c"
3981 _vomodules
="mga $_vomodules"
3983 _def_mga
='#undef HAVE_MGA'
3984 _novomodules
="mga $_novomodules"
3989 # echocheck "syncfb"
3991 # test "$_mga" = yes && _syncfb=yes
3992 # if test "$_syncfb" = yes ; then
3993 # _def_syncfb='#define HAVE_SYNCFB 1'
3994 # _vosrc="$_vosrc vo_syncfb.c"
3996 # _def_syncfb='#undef HAVE_SYNCFB'
3998 # echores "$_syncfb"
4002 if test "$_xmga" = auto
; then
4004 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
4006 if test "$_xmga" = yes ; then
4007 _def_xmga
='#define HAVE_XMGA 1'
4008 _vosrc
="$_vosrc vo_xmga.c"
4009 _vomodules
="xmga $_vomodules"
4011 _def_xmga
='#undef HAVE_XMGA'
4012 _novomodules
="xmga $_novomodules"
4018 if test "$_ggi" = auto
; then
4020 #include <ggi/ggi.h>
4021 int main(void) { return 0; }
4024 cc_check
-lggi && _ggi
=yes
4026 if test "$_ggi" = yes ; then
4027 _def_ggi
='#define HAVE_GGI 1'
4029 _vosrc
="$_vosrc vo_ggi.c"
4030 _vomodules
="ggi $_vomodules"
4032 _def_ggi
='#undef HAVE_GGI'
4033 _novomodules
="ggi $_novomodules"
4037 echocheck
"GGI extension: libggiwmh"
4038 if test "$_ggiwmh" = auto
; then
4041 #include <ggi/ggi.h>
4042 #include <ggi/wmh.h>
4043 int main(void) { return 0; }
4045 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
4047 # needed to get right output on obscure combination
4048 # like --disable-ggi --enable-ggiwmh
4049 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
4050 _def_ggiwmh
='#define HAVE_GGIWMH 1'
4051 _ld_ggi
="$_ld_ggi -lggiwmh"
4054 _def_ggiwmh
='#undef HAVE_GGIWMH'
4060 if test "$_aa" = auto
; then
4063 extern struct aa_hardware_params aa_defparams;
4064 extern struct aa_renderparams aa_defrenderparams;
4068 (void) aa_init(0, 0, 0);
4069 c = aa_autoinit(&aa_defparams);
4070 p = aa_getrenderparams();
4071 aa_autoinitkbd(c,0);
4075 for _ld_tmp
in "-laa" "$_ld_x11 -laa" ; do
4076 cc_check
$_ld_tmp && _ld_aa
=$_ld_tmp && _aa
=yes && break
4079 if test "$_aa" = yes ; then
4080 _def_aa
='#define HAVE_AA 1'
4082 _ld_aa
=`aalib-config --libs | cut -d " " -f 2,5,6`
4084 _vosrc
="$_vosrc vo_aa.c"
4085 _vomodules
="aa $_vomodules"
4087 _def_aa
='#undef HAVE_AA'
4088 _novomodules
="aa $_novomodules"
4094 if test "$_caca" = auto
; then
4096 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
4099 int main(void) { (void) caca_init(); return 0; }
4101 cc_check
`caca-config --libs` && _caca
=yes
4104 if test "$_caca" = yes ; then
4105 _def_caca
='#define HAVE_CACA 1'
4106 _inc_caca
=`caca-config --cflags`
4107 _ld_caca
=`caca-config --libs`
4108 _vosrc
="$_vosrc vo_caca.c"
4109 _vomodules
="caca $_vomodules"
4111 _def_caca
='#undef HAVE_CACA'
4112 _novomodules
="caca $_novomodules"
4118 if test "$_svga" = auto
; then
4121 int main(void) { return 0; }
4124 cc_check
-lvga $_ld_lm && _svga
=yes
4126 if test "$_svga" = yes ; then
4127 _def_svga
='#define HAVE_SVGALIB 1'
4129 _vosrc
="$_vosrc vo_svga.c"
4130 _vomodules
="svga $_vomodules"
4132 _def_svga
='#undef HAVE_SVGALIB'
4133 _novomodules
="svga $_novomodules"
4139 if test "$_fbdev" = auto
; then
4141 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
4143 if test "$_fbdev" = yes ; then
4144 _def_fbdev
='#define HAVE_FBDEV 1'
4145 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4146 _vomodules
="fbdev $_vomodules"
4148 _def_fbdev
='#undef HAVE_FBDEV'
4149 _novomodules
="fbdev $_novomodules"
4156 if test "$_dvb" != no
; then
4159 #include <sys/poll.h>
4160 #include <sys/ioctl.h>
4165 #include <ost/dmx.h>
4166 #include <ost/frontend.h>
4167 #include <ost/sec.h>
4168 #include <ost/video.h>
4169 #include <ost/audio.h>
4170 int main(void) {return 0;}
4175 for I
in "$_inc_dvb" "-I/usr/src/DVB/ost/include" ; do
4176 if cc_check
"$I" ; then
4179 _res_comment
="using $_inc_dvb"
4183 test "$_dvb" = no
&& _res_comment
="specify path to DVB/ost/include with --with-dvbincdir=DIR"
4187 if test "$_dvb" = yes ; then
4188 _def_dvb
='#define HAVE_DVB 1'
4189 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4190 _aomodules
="mpegpes(dvb) $_aomodules"
4191 _vomodules
="mpegpes(dvb) $_vomodules"
4193 if test "$_dvbhead" != no
; then
4194 echocheck
"DVB HEAD"
4195 if test "$_dvbhead" != no
; then
4199 #include <sys/poll.h>
4200 #include <sys/ioctl.h>
4205 #include <linux/dvb/dmx.h>
4206 #include <linux/dvb/frontend.h>
4207 #include <linux/dvb/video.h>
4208 #include <linux/dvb/audio.h>
4209 int main(void) {return 0;}
4214 for I
in "$_inc_dvb" "-I/usr/src/DVB/include" ; do
4215 if cc_check
"$I" ; then
4218 _res_comment
="using $_inc_dvb"
4222 test "$_dvbhead" = no
&& _res_comment
="specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR"
4226 if test "$_dvbhead" = yes ; then
4227 _def_dvb
='#define HAVE_DVB_HEAD 1'
4228 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4229 _aomodules
="mpegpes(dvb) $_aomodules"
4230 _vomodules
="mpegpes(dvb) $_vomodules"
4233 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4234 _def_dvb
='#undef HAVE_DVB'
4235 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4236 _aomodules
="mpegpes(file) $_aomodules"
4237 _vomodules
="mpegpes(file) $_vomodules"
4240 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4242 _inputmodules
="dvb $_inputmodules"
4245 _noinputmodules
="dvb $_noinputmodules"
4248 echocheck
"PNG support"
4249 if test "$_png" = auto
; then
4252 # Don't check for -lpng on irix since it has its own libpng
4253 # incompatible with the GNU libpng
4254 _res_comment
="disabled on irix (not GNU libpng)"
4260 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4261 printf("libpng: %s\n", png_libpng_ver);
4262 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4265 if cc_check
-lpng -lz $_ld_lm ; then
4269 _res_comment
="mismatch of library and header versions"
4275 if test "$_png" = yes ; then
4276 _def_png
='#define HAVE_PNG 1'
4278 _vosrc
="$_vosrc vo_png.c"
4279 _vomodules
="png $_vomodules"
4282 _def_png
='#undef HAVE_PNG'
4283 _novomodules
="png $_novomodules"
4287 echocheck
"JPEG support"
4288 if test "$_jpg" = auto
; then
4295 #include <jpeglib.h>
4300 if cc_check
-ljpeg $_ld_lm ; then
4308 if test "$_jpg" = yes ; then
4309 _def_jpg
='#define HAVE_JPEG 1'
4310 _vosrc
="$_vosrc vo_jpeg.c"
4311 _vomodules
="jpeg $_vomodules"
4315 _def_jpg
='#undef HAVE_JPEG'
4316 _novomodules
="jpeg $_novomodules"
4322 echocheck
"PNM support"
4323 if test "$_pnm" = yes; then
4324 _def_pnm
="#define HAVE_PNM"
4325 _vosrc
="$_vosrc vo_pnm.c"
4326 _vomodules
="pnm $_vomodules"
4328 _def_pnm
="#undef HAVE_PNM"
4329 _novomodules
="pnm $_novomodules"
4335 echocheck
"md5sum support"
4336 if test "$_md5sum" = yes; then
4337 _def_md5sum
="#define HAVE_MD5SUM"
4338 _vosrc
="$_vosrc vo_md5sum.c md5sum.c"
4339 _vomodules
="md5sum $_vomodules"
4341 _def_md5sum
="#undef HAVE_MD5SUM"
4342 _novomodules
="md5sum $_novomodules"
4348 echocheck
"GIF support"
4349 # This is to appease people who want to force gif support.
4350 # If it is forced to yes, then we still do checks to determine
4351 # which gif library to use.
4352 if test "$_gif" = yes ; then
4357 if test "$_gif" = auto
; then
4360 #include <gif_lib.h>
4365 for _ld_tmp
in "-lungif" "-lungif $_ld_x11" "-lgif" "-lgif $_ld_x11" ; do
4366 cc_check
$_ld_tmp && tmp_run
&& _ld_gif
="$_ld_tmp" && _gif
=yes && break
4370 # If no library was found, and the user wants support forced,
4371 # then we force it on with libgif, as this is the safest
4372 # assumption IMHO. (libungif & libregif both create symbolic
4373 # links to libgif. We also assume that no x11 support is needed,
4374 # because if you are forcing this, then you _should_ know what
4375 # you are doing. [ Besides, package maintainers should never
4376 # have compiled x11 deps into libungif in the first place. ] )
4379 if test "$_force_gif" = yes && test "$_gif" = no
; then
4384 if test "$_gif" = yes ; then
4385 _def_gif
='#define HAVE_GIF 1'
4386 _vosrc
="$_vosrc vo_gif89a.c"
4387 _codecmodules
="gif $_codecmodules"
4388 _vomodules
="gif89a $_vomodules"
4390 _res_comment
="old version, some encoding functions disabled"
4391 _def_gif_4
='#undef HAVE_GIF_4'
4395 #include <gif_lib.h>
4396 void catch() { exit(1); }
4398 signal(SIGSEGV, catch); // catch segfault
4399 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4400 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4404 if cc_check
"$_ld_gif" && tmp_run
; then
4405 _def_gif_4
='#define HAVE_GIF_4 1'
4409 _def_gif
='#undef HAVE_GIF'
4410 _def_gif_4
='#undef HAVE_GIF_4'
4411 _novomodules
="gif89a $_novomodules"
4412 _nocodecmodules
="gif $_nocodecmodules"
4418 case "$_gif" in yes*)
4419 echocheck
"broken giflib workaround"
4420 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4423 #include <gif_lib.h>
4426 printf("UserData is at address %p\n", gif.UserData);
4430 if cc_check
"$_ld_gif" && tmp_run
; then
4431 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4440 echocheck
"VESA support"
4441 if test "$_vesa" = auto
; then
4444 int main(void) { vbeVersion(); return 0; }
4447 cc_check
-lvbe -llrmi && _vesa
=yes
4449 if test "$_vesa" = yes ; then
4450 _def_vesa
='#define HAVE_VESA 1'
4451 _ld_vesa
="-lvbe -llrmi"
4452 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4453 _vomodules
="vesa $_vomodules"
4455 _def_vesa
='#undef HAVE_VESA'
4456 _novomodules
="vesa $_novomodules"
4466 if test -z "$_sdlconfig" ; then
4467 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4468 _sdlconfig
="sdl-config"
4469 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4470 _sdlconfig
="sdl11-config"
4475 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4478 int main(int argc, char *argv[]) { return 0; }
4481 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4482 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4483 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4484 if test "$_sdlversion" -gt 116 ; then
4485 if test "$_sdlversion" -lt 121 ; then
4486 _def_sdlbuggy
='#define BUGGY_SDL'
4488 _def_sdlbuggy
='#undef BUGGY_SDL'
4492 _res_comment
="outdated"
4497 if test "$_sdl" = yes ; then
4498 _def_sdl
='#define HAVE_SDL 1'
4500 _ld_sdl
=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
4501 _inc_sdl
=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
4503 _ld_sdl
=`$_sdlconfig --libs | sed s/-mwindows//`
4504 _inc_sdl
=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
4506 _ld_sdl
=`$_sdlconfig --libs`
4507 _inc_sdl
=`$_sdlconfig --cflags`
4509 _vosrc
="$_vosrc vo_sdl.c"
4510 _vomodules
="sdl $_vomodules"
4511 _aosrc
="$_aosrc ao_sdl.c"
4512 _aomodules
="sdl $_aomodules"
4513 _res_comment
="using $_sdlconfig"
4515 _def_sdl
='#undef HAVE_SDL'
4516 _novomodules
="sdl $_novomodules"
4517 _noaomodules
="sdl $_noaomodules"
4521 echocheck
"Windows waveout"
4522 if test "$_win32waveout" = auto
; then
4524 #include <windows.h>
4525 #include <mmsystem.h>
4526 int main(void) { return 0; }
4529 cc_check
-lwinmm && _win32waveout
=yes
4531 if test "$_win32waveout" = yes ; then
4532 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4533 _ld_win32libs
="-lwinmm $_ld_win32libs"
4534 _aosrc
="$_aosrc ao_win32.c"
4535 _aomodules
="win32 $_aomodules"
4537 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4538 _noaomodules
="win32 $_noaomodules"
4540 echores
"$_win32waveout"
4543 if test "$_directx" = auto
; then
4545 #include <windows.h>
4548 int main(void) { return 0; }
4551 cc_check
-lgdi32 && _directx
=yes
4553 if test "$_directx" = yes ; then
4554 _def_directx
='#define HAVE_DIRECTX 1'
4555 _ld_win32libs
="-lgdi32 $_ld_win32libs"
4556 _vosrc
="$_vosrc vo_directx.c"
4557 _vomodules
="directx $_vomodules"
4558 _aosrc
="$_aosrc ao_dsound.c"
4559 _aomodules
="dsound $_aomodules"
4561 _def_directx
='#undef HAVE_DIRECTX'
4562 _novomodules
="directx $_novomodules"
4563 _noaomodules
="dsound $_noaomodules"
4568 if test "$_nas" = auto
; then
4570 #include <audio/audiolib.h>
4571 int main(void) { return 0; }
4574 cc_check
-laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas
=yes
4576 if test "$_nas" = yes ; then
4577 _def_nas
='#define HAVE_NAS 1'
4578 _ld_nas
="-laudio -lXt $_ld_x11"
4579 _aosrc
="$_aosrc ao_nas.c"
4580 _aomodules
="nas $_aomodules"
4582 _noaomodules
="nas $_noaomodules"
4583 _def_nas
='#undef HAVE_NAS'
4588 if test "$_dxr2" = auto
; then
4591 #include <dxr2ioctl.h>
4592 int main(void) { return 0; }
4594 for _inc_dxr2
in "$_inc_dxr2" \
4595 "-I/usr/local/include/dxr2" \
4596 "-I/usr/include/dxr2"; do
4597 cc_check
$_inc_dxr2 && _dxr2
=yes && break
4600 if test "$_dxr2" = yes; then
4601 _def_dxr2
='#define HAVE_DXR2 1'
4602 _vosrc
="$_vosrc vo_dxr2.c"
4603 _aosrc
="$_aosrc ao_dxr2.c"
4604 _aomodules
="dxr2 $_aomodules"
4605 _vomodules
="dxr2 $_vomodules"
4606 _res_comment
="using $_inc_dxr2"
4608 _def_dxr2
='#undef HAVE_DXR2'
4609 _noaomodules
="dxr2 $_noaomodules"
4610 _novomodules
="dxr2 $_novomodules"
4616 if test "$_dxr3" = auto
; then
4618 #include <linux/em8300.h>
4619 int main(void) { return 0; }
4622 cc_check
&& _dxr3
=yes
4624 if test "$_dxr3" = yes ; then
4625 _def_dxr3
='#define HAVE_DXR3 1'
4626 _vosrc
="$_vosrc vo_dxr3.c"
4627 _vomodules
="dxr3 $_vomodules"
4629 _def_dxr3
='#undef HAVE_DXR3'
4630 _novomodules
="dxr3 $_novomodules"
4631 if test "$_mp1e" = auto
; then
4632 # we don't need mp1e
4639 if test "$_mmx" = no
; then
4640 # mp1e REQUIRES mmx!
4643 if test "$_mp1e" != no
; then
4645 _def_mp1e
='#define USE_MP1E'
4646 _ld_mp1e
='libmp1e/libmp1e.a'
4647 _dep_mp1e
='libmp1e/libmp1e.a'
4650 _def_mp1e
='#undef USE_MP1E'
4658 if test "$_fame" = auto
; then
4660 test "$_dxr2" = yes && _fame
=auto
4661 test "$_dxr3" = yes && _fame
=auto
4662 test "$_dvb" = yes && _fame
=auto
4664 if test "$_fame" = auto
; then
4666 if test -d libfame
&& test -f libfame
/fame.h
; then
4667 # disable fame on cygwin as no sense to port - atmos
4670 _res_comment
="no fame dir"
4675 _def_fame
='#undef USE_LIBFAME'
4676 if test "$_fame" = yes ; then
4677 _def_fame
='#define USE_LIBFAME 1'
4678 _ld_fame
='libfame/libfame.a'
4687 echocheck
"OSS Audio"
4688 if test "$_ossaudio" = auto
; then
4690 #include <sys/ioctl.h>
4692 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4695 cc_check
&& _ossaudio
=yes
4697 if test "$_ossaudio" = yes ; then
4698 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4699 _aosrc
="$_aosrc ao_oss.c"
4700 _aomodules
="oss $_aomodules"
4701 if test "$_linux_devfs" = yes; then
4702 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4703 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4706 #include <sys/ioctl.h>
4708 #ifdef OPEN_SOUND_SYSTEM
4709 int main(void) { return 0; }
4711 #error Not the real thing
4715 cc_check
&& _real_ossaudio
=yes
4716 if test "$_real_ossaudio" = yes; then
4717 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4718 elif netbsd || openbsd
; then
4719 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4720 _ld_arch
="$_ld_arch -lossaudio"
4722 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4724 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4727 _def_ossaudio
='#undef USE_OSS_AUDIO'
4728 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4729 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4730 _noaomodules
="oss $_noaomodules"
4732 echores
"$_ossaudio"
4736 if test "$_arts" = auto
; then
4738 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4742 int main(void) { return 0; }
4744 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4749 if test "$_arts" = yes ; then
4750 _def_arts
='#define USE_ARTS 1'
4751 _aosrc
="$_aosrc ao_arts.c"
4752 _aomodules
="arts $_aomodules"
4753 _ld_arts
=`artsc-config --libs`
4754 _inc_arts
=`artsc-config --cflags`
4756 _noaomodules
="arts $_noaomodules"
4762 if test "$_esd" = auto
; then
4764 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4768 int main(void) { return 0; }
4770 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
4776 if test "$_esd" = yes ; then
4777 _def_esd
='#define USE_ESD 1'
4778 _aosrc
="$_aosrc ao_esd.c"
4779 _aomodules
="esd $_aomodules"
4780 _ld_esd
=`esd-config --libs`
4781 _inc_esd
=`esd-config --cflags`
4783 echocheck
"esd_get_latency()"
4786 int main(void) { return esd_get_latency(0); }
4788 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4789 echores
"$_esd_latency"
4791 _def_esd
='#undef USE_ESD'
4792 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4793 _noaomodules
="esd $_noaomodules"
4797 if test "$_polyp" = auto
; then
4799 if pkg-config
--exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
4802 #include <polyp/polyplib.h>
4803 #include <polyp/mainloop.h>
4804 #include <polyp/polyplib-error.h>
4805 int main(void) { return 0; }
4807 cc_check
`pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
4813 if test "$_polyp" = yes ; then
4814 _def_polyp
='#define USE_POLYP 1'
4815 _aosrc
="$_aosrc ao_polyp.c"
4816 _aomodules
="polyp $_aomodules"
4817 _ld_polyp
=`pkg-config --libs polyplib polyplib-error polyplib-mainloop`
4818 _inc_polyp
=`pkg-config --cflags polyplib polyplib-error polyplib-mainloop`
4820 _def_polyp
='#undef USE_POLYP'
4821 _noaomodules
="polyp $_noaomodules"
4826 if test "$_jack" = auto
; then
4830 #include <jack/jack.h>
4831 int main(void) { jack_client_new("test"); return 0; }
4833 if cc_check
-ljack ; then
4835 elif cc_check
`pkg-config --libs --cflags --silence-errors jack` ; then
4836 _ld_jack
="`pkg-config --libs jack`"
4837 _inc_jack
="`pkg-config --cflags jack`"
4843 if test "$_jack" = yes ; then
4844 _def_jack
='#define USE_JACK 1'
4845 _aosrc
="$_aosrc ao_jack.c"
4846 _aomodules
="jack $_aomodules"
4848 _noaomodules
="jack $_noaomodules"
4853 if test "$_openal" = auto
; then
4858 alSourceQueueBuffers(0, 0, 0);
4859 // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
4863 if cc_check
-lopenal ; then
4864 _ld_openal
="-lopenal"
4868 if test "$_openal" = yes ; then
4869 _def_openal
='#define USE_OPENAL 1'
4870 _aosrc
="$_aosrc ao_openal.c"
4871 _aomodules
="openal $_aomodules"
4873 _noaomodules
="openal $_noaomodules"
4877 echocheck
"ALSA audio"
4878 if test "$_alsa" != no
; then
4881 #include <sys/asoundlib.h>
4882 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
4883 #error "alsa version != 0.5.x"
4885 int main(void) { return 0; }
4887 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
4890 #include <sys/asoundlib.h>
4891 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
4892 #error "alsa version != 0.9.x"
4894 int main(void) { return 0; }
4896 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
4898 #include <alsa/asoundlib.h>
4899 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
4900 #error "alsa version != 0.9.x"
4902 int main(void) { return 0; }
4904 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
4907 #include <sys/asoundlib.h>
4908 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
4909 #error "alsa version != 1.0.x"
4911 int main(void) { return 0; }
4913 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
4915 #include <alsa/asoundlib.h>
4916 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
4917 #error "alsa version != 1.0.x"
4919 int main(void) { return 0; }
4921 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
4923 _def_alsa5
='#undef HAVE_ALSA5'
4924 _def_alsa9
='#undef HAVE_ALSA9'
4925 _def_alsa1x
='#undef HAVE_ALSA1X'
4926 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
4927 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
4928 if test "$_alsaver" ; then
4930 if test "$_alsaver" = '0.5.x' ; then
4931 _aosrc
="$_aosrc ao_alsa5.c"
4932 _aomodules
="alsa5 $_aomodules"
4933 _def_alsa5
='#define HAVE_ALSA5 1'
4934 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4935 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
4936 elif test "$_alsaver" = '0.9.x-sys' ; then
4937 _aosrc
="$_aosrc ao_alsa.c"
4938 _aomodules
="alsa $_aomodules"
4939 _def_alsa9
='#define HAVE_ALSA9 1'
4940 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4941 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
4942 elif test "$_alsaver" = '0.9.x-alsa' ; then
4943 _aosrc
="$_aosrc ao_alsa.c"
4944 _aomodules
="alsa $_aomodules"
4945 _def_alsa9
='#define HAVE_ALSA9 1'
4946 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4947 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
4948 elif test "$_alsaver" = '1.0.x-sys' ; then
4949 _aosrc
="$_aosrc ao_alsa.c"
4950 _aomodules
="alsa $_aomodules"
4951 _def_alsa1x
="#define HAVE_ALSA1X 1"
4952 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4953 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
4954 elif test "$_alsaver" = '1.0.x-alsa' ; then
4955 _aosrc
="$_aosrc ao_alsa.c"
4956 _aomodules
="alsa $_aomodules"
4957 _def_alsa1x
="#define HAVE_ALSA1X 1"
4958 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4959 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
4962 _res_comment
="unknown version"
4964 _ld_alsa
="-lasound $_ld_dl $_ld_pthread"
4966 _noaomodules
="alsa $_noaomodules"
4971 echocheck
"Sun audio"
4972 if test "$_sunaudio" = auto
; then
4974 #include <sys/types.h>
4975 #include <sys/audioio.h>
4976 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4979 cc_check
&& _sunaudio
=yes
4981 if test "$_sunaudio" = yes ; then
4982 _def_sunaudio
='#define USE_SUN_AUDIO 1'
4983 _aosrc
="$_aosrc ao_sun.c"
4984 _aomodules
="sun $_aomodules"
4986 _def_sunaudio
='#undef USE_SUN_AUDIO'
4987 _noaomodules
="sun $_noaomodules"
4989 echores
"$_sunaudio"
4992 echocheck
"Sun mediaLib"
4993 if test "$_mlib" = auto
; then
4995 test -z "$_mlibdir" && _mlibdir
=/opt
/SUNWmlib
4998 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
5000 cc_check
-I${_mlibdir}/include
-L${_mlibdir}/lib
-lmlib && _mlib
=yes
5002 if test "$_mlib" = yes ; then
5003 _def_mlib
='#define HAVE_MLIB 1'
5004 _inc_mlib
=" -I${_mlibdir}/include "
5005 _ld_mlib
=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
5007 _def_mlib
='#undef HAVE_MLIB'
5012 echocheck
"SGI audio"
5013 if test "$_sgiaudio" = auto
; then
5014 # check for SGI audio
5016 #include <dmedia/audio.h>
5017 int main(void) { return 0; }
5020 cc_check
&& _sgiaudio
=yes
5022 if test "$_sgiaudio" = "yes" ; then
5023 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
5024 _ld_sgiaudio
='-laudio'
5025 _aosrc
="$_aosrc ao_sgi.c"
5026 _aomodules
="sgi $_aomodules"
5028 _def_sgiaudio
='#undef USE_SGI_AUDIO'
5029 _noaomodules
="sgi $_noaomodules"
5031 echores
"$_sgiaudio"
5034 echocheck
"VCD support"
5035 if linux || bsdos || freebsd || netbsd || sunos || darwin
; then
5036 _inputmodules
="vcd $_inputmodules"
5037 _def_vcd
='#define HAVE_VCD 1'
5040 _def_vcd
='#undef HAVE_VCD'
5041 _noinputmodules
="vcd $_noinputmodules"
5042 _res_comment
="not supported on this OS"
5048 echocheck
"DVD support (libmpdvdkit2)"
5049 if test "$_dvdkit" = auto
; then
5051 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
; then
5052 test -f "./libmpdvdkit2/Makefile" && _dvdkit
=yes
5055 if test "$_dvdkit" = yes ; then
5056 if test "$_dvd" = yes ||
test "$_cdrom" = yes ||
test "$_cdio" = yes ||
test "$_dvdio" = yes ||
test "$_bsdi_dvd" = yes ||
test "$_hpux_scsi_h" = yes || darwin || win32
; then
5057 _inputmodules
="mpdvdkit2 $_inputmodules"
5058 _dvdread
=libmpdvdkit2
5060 _noinputmodules
="mpdvdkit2 $_noinputmodules"
5062 _def_dvd_linux
='#undef HAVE_LINUX_DVD_STRUCT'
5063 _def_dvd_bsd
='#undef HAVE_BSD_DVD_STRUCT'
5064 _dev_dvd_openbsd
='#undef HAVE_OPENBSD_DVD_STRUCT'
5065 _def_dvd_darwin
='#undef DARWIN_DVD_IOCTL'
5066 if linux || netbsd || openbsd || bsdos
; then
5067 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
5069 _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
5073 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
5076 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
5081 _noinputmodules
="mpdvdkit2 $_noinputmodules"
5085 echocheck
"DVD support (libdvdread)"
5086 if test "$_dvdread" = auto
; then
5088 #include <inttypes.h>
5089 #include <dvdread/dvd_reader.h>
5090 #include <dvdread/ifo_types.h>
5091 #include <dvdread/ifo_read.h>
5092 #include <dvdread/nav_read.h>
5093 int main(void) { return 0; }
5096 if test "$_dl" = yes; then
5098 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
5102 _def_mpdvdkit
="#undef USE_MPDVDKIT"
5106 _def_dvdread
='#define USE_DVDREAD 1'
5107 _ld_dvdread
='-ldvdread'
5108 _inputmodules
="dvdread $_inputmodules"
5112 _def_dvdread
='#undef USE_DVDREAD'
5113 _noinputmodules
="dvdread $_noinputmodules"
5117 _def_dvdread
='#define USE_DVDREAD 1'
5118 _ld_dvdread
='-Llibmpdvdkit2 -lmpdvdkit'
5119 _noinputmodules
="dvdread $_noinputmodules"
5120 _def_mpdvdkit
="#define USE_MPDVDKIT 2"
5123 _res_comment
="disabled by libmpdvdkit2"
5128 if test "$_have_dvd" = yes ; then
5129 _def_have_dvd
='#define HAVE_DVD 1'
5131 _def_have_dvd
='#undef HAVE_DVD'
5134 # dvdnav disabled, it does not work
5135 # echocheck "DVD support (libdvdnav)"
5136 # if test "$_dvdnav" = yes ; then
5138 # #include <dvdnav.h>
5139 # int main(void) { dvdnav_t *dvd=0; return 0; }
5142 # test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
5143 # if test -z "$_dvdnavconfig" ; then
5144 # if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
5145 # _dvdnavconfig="dvdnav-config"
5148 # test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
5150 # test "$_dvdkit" = no && _used_css=$_ld_css
5151 # cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
5153 # if test "$_dvdnav" = yes ; then
5155 # _def_dvdnav='#define USE_DVDNAV 1'
5156 # if test -n "$_legal_dvdnavdir" ; then
5157 # _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
5158 # elif test -n "$_dvdnavconfig" ; then
5159 # _ld_css="$_ld_css `$_dvdnavconfig --libs`"
5161 # _ld_css="$_ld_css -ldvdnav"
5163 # if test -n "$_dvdnavconfig" ; then
5164 # _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
5165 # _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
5167 # if test -n "$_dvdnavdir" ; then
5168 # _inc_extra="$_inc_extra -I$_dvdnavdir"
5170 # _inputmodules="dvdnav $_inputmodules"
5172 # _def_dvdnav='#undef USE_DVDNAV'
5173 # _noinputmodules="dvdnav $_noinputmodules"
5175 # echores "$_dvdnav"
5177 echocheck
"cdparanoia"
5178 if test "$_cdparanoia" = auto
; then
5180 #include <cdda_interface.h>
5181 #include <cdda_paranoia.h>
5182 // This need a better test. How ?
5183 int main(void) { return 1; }
5186 for _inc_tmp
in "$_inc_cdparanoia" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5187 cc_check
$_inc_tmp $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm && _inc_cdparanoia
="$_inc_tmp" && _cdparanoia
=yes && break
5190 if test "$_cdparanoia" = yes ; then
5191 _def_cdparanoia
='#define HAVE_CDDA'
5192 _inputmodules
="cdda $_inputmodules"
5193 _ld_cdparanoia
="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
5194 openbsd
&& _ld_cdparanoia
="$_ld_cdparanoia -lutil"
5196 _def_cdparanoia
='#undef HAVE_CDDA'
5197 _noinputmodules
="cdda $_noinputmodules"
5199 echores
"$_cdparanoia"
5203 if test "$_libcdio" = auto
&& test "$_cdparanoia" = no
; then
5204 if pkg-config
--exists libcdio
; then
5207 #include <cdio/version.h>
5208 #include <cdio/cdda.h>
5209 #include <cdio/paranoia.h>
5212 printf("%s\n", CDIO_VERSION);
5218 for _inc_tmp
in "$_inc_libcdio" "-I/usr/include/cdio" "-I/usr/local/include/cdio" ; do
5219 cc_check
`pkg-config --cflags --libs libcdio_paranoia` $_inc_tmp $_ld_lm \
5220 && _inc_libcdio
="$_inc_tmp" && ( $TMPO >> "$TMPLOG" ) \
5221 && _libcdio
=yes && break
5227 if test "$_libcdio" = yes && test "$_cdparanoia" = no
; then
5228 _def_libcdio
='#define HAVE_LIBCDIO'
5229 _def_cdparanoia
='#define HAVE_CDDA'
5230 _def_havelibcdio
='yes'
5231 _inputmodules
="cdda $_inputmodules"
5232 _inc_libcdio
=`pkg-config --cflags libcdio`
5233 _ld_libcdio
=`pkg-config --libs libcdio_paranoia`
5235 if test "$_cdparanoia" = yes ; then
5236 _res_comment
="using cdparanoia"
5238 _def_libcdio
='#undef HAVE_LIBCDIO'
5239 _def_havelibcdio
='no'
5244 echocheck
"freetype >= 2.0.9"
5246 # freetype depends on iconv
5247 if test "$_iconv" = no
; then
5249 _res_comment
="iconv support needed"
5252 if test "$_freetype" = auto
; then
5253 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5256 #include <ft2build.h>
5257 #include FT_FREETYPE_H
5258 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5259 #error "Need FreeType 2.0.9 or newer"
5264 FT_Int major=-1,minor=-1,patch=-1;
5265 int err=FT_Init_FreeType(&library);
5267 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5270 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5271 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5272 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5273 (int)major,(int)minor,(int)patch );
5274 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5275 printf("Library and header version mismatch! Fix it in your distribution!\n");
5282 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5287 if test "$_freetype" = yes ; then
5288 _def_freetype
='#define HAVE_FREETYPE'
5289 _inc_freetype
=`$_freetypeconfig --cflags`
5290 _ld_freetype
=`$_freetypeconfig --libs`
5292 _def_freetype
='#undef HAVE_FREETYPE'
5294 echores
"$_freetype"
5296 if test "$_freetype" = no
; then
5298 _res_comment
="freetype support needed"
5300 echocheck
"fontconfig"
5301 if test "$_fontconfig" = auto
; then
5304 #include <fontconfig/fontconfig.h>
5309 printf("Couldn't initialize fontconfig lib\n");
5317 if cc_check
-lfontconfig ; then
5318 _ld_fontconfig
="-lfontconfig"
5319 elif cc_check
`pkg-config --silence-errors --cflags --libs fontconfig` ; then
5320 _inc_fontconfig
=`pkg-config --cflags fontconfig`
5321 _ld_fontconfig
=`pkg-config --libs fontconfig`
5326 if test "$_fontconfig" = yes ; then
5327 _def_fontconfig
='#define HAVE_FONTCONFIG'
5329 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5331 echores
"$_fontconfig"
5333 echocheck
"fribidi with charsets"
5334 if test "$_fribidi" = auto
; then
5335 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5338 /* workaround for fribidi 0.10.4 and below */
5339 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5340 #include <fribidi/fribidi.h>
5343 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5344 printf("Fribidi headers are not consistents with the library!\n");
5351 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5356 if test "$_fribidi" = yes ; then
5357 _def_fribidi
='#define USE_FRIBIDI'
5358 _inc_fribidi
=`$_fribidiconfig --cflags`
5359 _ld_fribidi
=`$_fribidiconfig --libs`
5361 _def_fribidi
='#undef USE_FRIBIDI'
5367 if test "$_enca" = auto
; then
5374 langs = enca_get_languages(&langcnt);
5379 cc_check
-lenca $_ld_lm && _enca
=yes
5381 if test "$_enca" = yes ; then
5382 _def_enca
='#define HAVE_ENCA 1'
5385 _def_enca
='#undef HAVE_ENCA'
5393 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5396 cc_check
-lz && _zlib
=yes
5397 if test "$_zlib" = yes ; then
5398 _def_zlib
='#define HAVE_ZLIB 1'
5401 _def_zlib
='#undef HAVE_ZLIB'
5407 if test "$_rtc" = auto
; then
5409 #include <sys/ioctl.h>
5411 #include <linux/rtc.h>
5414 #define RTC_PIE_ON RTCIO_PIE_ON
5416 int main(void) { return RTC_PIE_ON; }
5419 cc_check
&& _rtc
=yes
5422 if test "$_rtc" = yes ; then
5423 _def_rtc
='#define HAVE_RTC 1'
5425 _def_rtc
='#undef HAVE_RTC'
5430 echocheck
"external liblzo support"
5431 if test "$_liblzo" = auto
; then
5435 int main(void) { lzo_init();return 0; }
5437 cc_check
-llzo && _liblzo
=yes
5439 if test "$_liblzo" = yes ; then
5440 _def_liblzo
='#define USE_LIBLZO 1'
5442 _codecmodules
="liblzo $_codecmodules"
5444 _def_liblzo
='#undef USE_LIBLZO'
5445 _nocodecmodules
="liblzo $_nocodecmodules"
5450 echocheck
"mad support"
5451 if test "$_mad" = auto
; then
5455 int main(void) { return 0; }
5457 cc_check
$_madlibdir -lmad && _mad
=yes
5459 if test "$_mad" = yes ; then
5460 _def_mad
='#define USE_LIBMAD 1'
5462 _codecmodules
="libmad $_codecmodules"
5464 _def_mad
='#undef USE_LIBMAD'
5465 _nocodecmodules
="libmad $_nocodecmodules"
5470 if test "$_toolame" = auto
; then
5472 #include <toolame.h>
5473 int main(void) { toolame_init(); return 0; }
5476 _toolame_extraflags
=""
5477 _toolame_lib
="-ltoolame"
5478 if test -n "$_toolamedir"; then
5479 _toolame_extraflags
="-I$_toolamedir -L$_toolamedir"
5481 cc_check
$_toolame_extraflags $_toolame_lib $_ld_lm && _toolame
=yes
5483 if test "$_toolame" = yes ; then
5484 _def_toolame
='#define HAVE_TOOLAME 1'
5485 _codecmodules
="$_codecmodules toolame"
5487 _def_toolame
='#undef HAVE_TOOLAME'
5489 _nocodecmodules
="toolame $_nocodecmodules"
5491 if test "$_toolamedir" ; then
5492 _res_comment
="using $_toolamedir"
5497 if test "$_twolame" = auto
; then
5499 #include <twolame.h>
5500 int main(void) { twolame_init(); return 0; }
5503 _twolame_lib
="-ltwolame"
5504 cc_check
$_twolame_lib $_ld_lm && _twolame
=yes
5506 if test "$_twolame" = yes ; then
5507 _def_twolame
='#define HAVE_TWOLAME 1'
5508 _codecmodules
="$_codecmodules twolame"
5510 _def_twolame
='#undef HAVE_TWOLAME'
5512 _nocodecmodules
="twolame $_nocodecmodules"
5516 echocheck
"OggVorbis support"
5517 if test "$_tremor_internal" = yes; then
5519 elif test "$_vorbis" = auto
; then
5522 #include <vorbis/codec.h>
5523 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5525 cc_check
-lvorbis -logg $_ld_lm && _vorbis
=yes
5527 if test "$_vorbis" = yes ; then
5528 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5529 if test "$_tremor_internal" = yes ; then
5530 # do not set _ld_vorbis as it is resolved separately
5531 # mp3lame support for vorbis is deprecated so don't care
5532 _def_tremor
='#define TREMOR 1'
5533 if test "$_tremor_low" = yes ; then
5534 _tremor_flags
='-D_LOW_ACCURACY_'
5538 _codecmodules
="tremor(internal) $_codecmodules"
5539 elif test "$_tremor" = yes ; then
5540 _def_tremor
='#define TREMOR 1'
5541 _ld_vorbis
='-lvorbisidec'
5542 _codecmodules
="tremor $_codecmodules"
5544 _def_tremor
='#undef TREMOR'
5545 _ld_vorbis
='-lvorbis -logg'
5546 _codecmodules
="libvorbis $_codecmodules"
5549 _def_vorbis
='#undef HAVE_OGGVORBIS'
5550 _def_tremor
='#undef TREMOR'
5551 _nocodecmodules
="libvorbis $_nocodecmodules"
5553 if test "$_vorbis" = yes -a "$_tremor_internal" = yes -a "$_tremor_low" = yes ; then
5554 _res_comment
="internal low accuracy Tremor"
5555 elif test "$_vorbis" = yes -a "$_tremor_internal" = yes ; then
5556 _res_comment
="internal Tremor"
5557 elif test "$_vorbis" = yes -a "$_tremor" = yes ; then
5558 _res_comment
="Tremor"
5562 echocheck
"libspeex (version >= 1.1 required)"
5563 if test "$_speex" = auto
; then
5566 #include <speex/speex.h>
5570 speex_decode_int(dec, &bits, dec);
5573 cc_check
-lspeex $_ld_lm && _speex
=yes
5575 if test "$_speex" = yes ; then
5576 _def_speex
='#define HAVE_SPEEX 1'
5578 _codecmodules
="speex $_codecmodules"
5580 _def_speex
='#undef HAVE_SPEEX'
5581 _nocodecmodules
="speex $_nocodecmodules"
5585 echocheck
"OggTheora support"
5586 if test "$_theora" = auto
; then
5589 #include <theora/theora.h>
5593 /* theora is in flux, make sure that all interface routines and
5594 * datatypes exist and work the way we expect it, so we don't break
5604 theora_info_init (&inf);
5605 theora_comment_init (&tc);
5609 /* we don't want to execute this kind of nonsense; just for making sure
5610 * that compilation works... */
5611 memset(&op, 0, sizeof(op));
5612 r = theora_decode_header (&inf, &tc, &op);
5613 r = theora_decode_init (&st, &inf);
5614 t = theora_granule_time (&st, op.granulepos);
5615 r = theora_decode_packetin (&st, &op);
5616 r = theora_decode_YUVout (&st, &yuv);
5622 for _ld_theora
in "`pkg-config --silence-errors --libs --cflags theora`" "-ltheora"; do
5623 cc_check
$_ld_theora && _theora
=yes && break
5625 if test "$_theora" = no
&& test "$_tremor_internal" = yes; then
5626 for _ld_theora
in "`pkg-config --silence-errors --libs --cflags theora`" "-ltheora"; do
5627 cc_check
-I. tremor
/bitwise.c
$_ld_theora && _theora
=yes && break
5631 if test "$_theora" = yes ; then
5632 _def_theora
='#define HAVE_OGGTHEORA 1'
5633 _codecmodules
="libtheora $_codecmodules"
5634 # when --enable-theora is forced, we'd better provide a probably sane
5635 # $_ld_theora than nothing
5636 test -z "$_ld_theora" && _ld_theora
="-ltheora -logg"
5638 _def_theora
='#undef HAVE_OGGTHEORA'
5639 _nocodecmodules
="libtheora $_nocodecmodules"
5644 echocheck
"mp3lib support"
5645 if test "$_mp3lib" = yes ; then
5646 _def_mp3lib
='#define USE_MP3LIB 1'
5647 _codecmodules
="mp3lib $_codecmodules"
5649 _def_mp3lib
='#undef USE_MP3LIB'
5650 _nocodecmodules
="mp3lib $_nocodecmodules"
5654 echocheck
"liba52 support"
5655 if test "$_liba52" = yes ; then
5656 _def_liba52
='#define USE_LIBA52 1'
5657 _codecmodules
="liba52 $_codecmodules"
5659 _def_liba52
='#undef USE_LIBA52'
5660 _nocodecmodules
="liba52 $_nocodecmodules"
5664 echocheck
"libdts support"
5665 if test "$_libdts" = auto
; then
5668 #include <inttypes.h>
5670 int main(void) { dts_init (0); return 0; }
5672 cc_check
$_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts
=yes
5674 if test "$_libdts" = yes ; then
5675 _def_libdts
='#define CONFIG_DTS 1'
5676 _ld_libdts
="$_ld_libdts -ldts"
5677 _codecmodules
="libdts $_codecmodules"
5679 _def_libdts
='#undef CONFIG_DTS'
5680 _nocodecmodules
="libdts $_nocodecmodules"
5684 echocheck
"libmpeg2 support"
5685 if test "$_libmpeg2" = yes ; then
5686 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5687 _codecmodules
="libmpeg2 $_codecmodules"
5689 _def_libmpeg2
='#undef USE_LIBMPEG2'
5690 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5692 echores
"$_libmpeg2"
5694 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5695 if test "$_musepack" = auto
; then
5698 #include <mpcdec/mpcdec.h>
5700 mpc_streaminfo info;
5701 mpc_decoder decoder;
5702 mpc_decoder_set_streaminfo(&decoder, &info);
5703 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5706 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5708 if test "$_musepack" = yes ; then
5709 _def_musepack
='#define HAVE_MUSEPACK 1'
5710 _ld_musepack
='-lmpcdec'
5711 _codecmodules
="musepack $_codecmodules"
5713 _def_musepack
='#undef HAVE_MUSEPACK'
5714 _nocodecmodules
="musepack $_nocodecmodules"
5716 echores
"$_musepack"
5719 echocheck
"FAAC (AAC encoder) support"
5720 if test "$_faac" = auto
; then
5722 #include <inttypes.h>
5724 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5727 for _ld_tmp
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5728 cc_check
-c -O4 $_ld_tmp $_ld_lm && _ld_faac
="$_ld_tmp" && _faac
=yes && break
5731 if test "$_faac" = yes ; then
5732 _def_faac
="#define HAVE_FAAC 1"
5733 _def_lavc_faac
="#define CONFIG_FAAC 1"
5734 _codecmodules
="faac $_codecmodules"
5736 _def_faac
="#undef HAVE_FAAC"
5737 _nocodecmodules
="faac $_nocodecmodules"
5741 echocheck
"internal FAAD2 (AAC) support"
5742 if test "$_faad_internal" = auto
; then
5743 if x86
&& test cc_vendor
=gnu
; then
5745 3.1*|
3.2) # ICE/insn with these versions
5747 _res_comment
="broken gcc"
5757 if test "$_faad_internal" = yes ; then
5758 _def_faad_internal
="#define USE_INTERNAL_FAAD 1"
5761 _def_faad_internal
="#undef USE_INTERNAL_FAAD"
5764 echores
"$_faad_internal"
5767 echocheck
"external FAAD2 (AAC) support"
5768 if test "$_faad_external" != no
; then
5770 _inc_faad
="$_inc_extra"
5771 # external faad: check if it's really faad2 :)
5772 if test "$_faad_external" = auto
; then
5776 #ifndef FAAD_MIN_STREAMSIZE
5777 #error Too old version
5779 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5781 cc_check
$_inc_faad $_ld_faad $_ld_lm && _faad_external
=yes
5784 echores
"$_faad_external"
5786 if test "$_faad_external" = yes; then
5787 _def_faad
='#define HAVE_FAAD 1'
5788 _codecmodules
="faad2(external) $_codecmodules"
5789 elif test "$_faad_internal" = yes; then
5790 _def_faad
='#define HAVE_FAAD 1'
5791 _codecmodules
="faad2(internal) $_codecmodules"
5793 _def_faad
='#undef HAVE_FAAD'
5794 _nocodecmodules
="faad2 $_nocodecmodules"
5799 echocheck
"LADSPA plugin support"
5800 if test "$_ladspa" = auto
; then
5805 const LADSPA_Descriptor *ld = NULL;
5810 cc_check
&& _ladspa
=yes
5812 if test "$_ladspa" = yes; then
5813 _def_ladspa
="#define HAVE_LADSPA"
5814 _afsrc
="$_afsrc af_ladspa.c"
5815 _afmodules
="ladspa $_afmodules"
5817 _def_ladspa
="#undef HAVE_LADSPA"
5818 _noafmodules
="ladspa $_noafmodules"
5823 if test "$_win32" = auto
; then
5827 _win32
=no
# x86 arch only
5831 if test "$_win32" != no
; then
5832 if test -z "$_win32libdir" ; then
5833 for I
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs
/usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5834 if test -d "$I" ; then
5839 # Fall back on a subfolder of the current dir on Windows
5840 mingw32
&& _win32libdir
="codecs"
5844 echocheck
"Win32 codec DLL support"
5845 if test "$_win32" = auto
; then
5847 test -n "$_win32libdir" && _win32
=yes
5849 if test "$_win32" = yes ; then
5850 _def_win32
='#define USE_WIN32DLL 1'
5851 _res_comment
="using $_win32libdir"
5853 _def_win32
='#undef USE_WIN32DLL'
5854 _nocodecmodules
="win32 $_nocodecmodules"
5859 if test "$_win32" != no
; then
5860 _def_win32_loader
='#undef WIN32_LOADER'
5861 echocheck
"Win32 loader support"
5862 _ld_win32
='loader/libloader.a'
5863 _dep_win32
='loader/libloader.a'
5864 _codecmodules
="win32 $_codecmodules"
5866 x86
&& _ld_win32
="$_ld_win32 -li386"
5869 _def_win32_loader
='#define WIN32_LOADER 1'
5871 _ld_win32libs
="$_ld_win32libs -ladvapi32 -lole32"
5872 _res_comment
="using native windows"
5878 echocheck
"DirectShow"
5881 if test "$_dshow" != no
; then
5883 # check if compiler supports C++ and C++-libs are installed correctly
5884 cat > "$TMPCPP" << EOF
5888 public: int myreturn(void);
5890 int myclass::myreturn(void) { ret = 0; return ret ; }
5891 int main(void) { myclass myobject; return myobject.myreturn(); }
5893 if cxx_check
&& tmp_run
; then
5895 echores
"yes (C++ is ok)"
5900 Your C++ runtime environment is broken.
5902 Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
5903 Are the C++ libraries correctly installed?
5904 Check for libstdc++ and in (/etc/)ld.so.conf.
5906 If you do not need DirectShow support, you can also use:
5907 ./configure --disable-dshow <your-normal-configure-options>
5908 to disable building the C++ based DirectShow code.
5911 die
"$_cc's C++ is broken"
5919 if test "$_dshow" = yes ; then
5920 _def_dshow
='#define USE_DIRECTSHOW 1'
5921 _ld_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5922 _dep_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5923 _codecmodules
="dshow/dmo $_codecmodules"
5925 _def_dshow
='#undef USE_DIRECTSHOW'
5926 _nocodecmodules
="dshow/dmo $_nocodecmodules"
5930 echocheck
"XAnim DLL"
5931 if test "$_xanim" = auto
; then
5933 _res_comment
="dynamic loader support needed"
5934 if test "$_dl" = yes ; then
5935 _res_comment
="no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html"
5936 if test -z "$_xanimlibdir" ; then
5937 for I
in "$_libdir/codecs" /usr
/local
/lib
/xanim
/mods
/usr
/lib
/xanim
/mods
/usr
/lib
/xanim
$XANIM_MOD_DIR ; do
5938 if test -d "$I" ; then
5944 test "$_xanimlibdir" && _xanim
=yes
5947 if test "$_xanim" = yes ; then
5948 _def_xanim
='#define USE_XANIM 1'
5949 _def_xanim_path
="#define XACODEC_PATH \"$_xanimlibdir\""
5950 _codecmodules
="xanim $_codecmodules"
5951 _res_comment
="using $_xanimlibdir"
5953 _def_xanim
='#undef USE_XANIM'
5954 _def_xanim_path
='#undef XACODEC_PATH'
5955 _nocodecmodules
="xanim $_nocodecmodules"
5959 echocheck
"RealPlayer DLL"
5960 if test "$_real" = auto
; then
5962 _res_comment
="dynamic loader support needed"
5963 if test "$_dl" = yes ||
test "$_win32" = yes ; then
5964 # if test "$_dl" = yes ; then
5965 _res_comment
="tested only on Linux/FreeBSD/NetBSD/Cygwin/MinGW/Darwin"
5966 if linux || freebsd || netbsd || win32 || darwin
; then
5967 _res_comment
="no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html"
5968 if test -z "$_reallibdir" ; then
5969 for I
in "$_libdir/codecs" "$_libdir/real" /usr
/lib
/real \
5970 /usr
/lib
/RealPlayer
{9,8,}/Codecs
/usr
/local
/RealPlayer
{9,8,}/Codecs \
5971 /usr
/local
/lib
/RealPlayer
{9,8,}/Codecs
/opt
/RealPlayer
{9,8,}/{Real
/,}Codecs \
5972 {~
,}/Applications
/RealOne\ Player.app
/Contents
/MacOS
/Library
/Codecs \
5974 if test -d "$I" ; then
5978 # Fall back on a subfolder of the current dir on Windows
5979 mingw32
&& _reallibdir
="codecs"
5982 test "$_reallibdir" && _real
=yes
5986 if test "$_real" = yes ; then
5987 _def_real
='#define USE_REALCODECS 1'
5988 _def_real_path
="#define REALCODEC_PATH \"$_reallibdir\""
5989 _codecmodules
="real $_codecmodules"
5990 _res_comment
="using $_reallibdir"
5992 _def_real
='#undef USE_REALCODECS'
5993 _def_real_path
="#undef REALCODEC_PATH"
5994 _nocodecmodules
="real $_nocodecmodules"
5999 echocheck
"LIVE555 Streaming Media libraries"
6000 if test "$_live" = auto
&& test "$_network" = yes ; then
6001 cat > $TMPCPP << EOF
6002 #include <liveMedia.hh>
6003 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1090195200)
6004 #error Please upgrade to version 2004.07.19 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
6010 for I
in "$_livelibdir" "$_libdir/live" "/usr/lib/live" "/usr/local/live" "/usr/local/lib/live" ; do
6011 cxx_check
-I$I/liveMedia
/include
-I$I/UsageEnvironment
/include
-I$I/groupsock
/include
&& _livelibdir
=$I && _live
=yes && break
6013 if test "$_live" != yes ; then
6014 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
6019 if test "$_live" = yes && test "$_network" = yes ; then
6020 _res_comment
="using $_livelibdir"
6021 _def_live
='#define STREAMING_LIVE555 1'
6022 _live_libs_def
="# LIVE555 Streaming Media libraries:
6023 LIVE_LIB_DIR = $_livelibdir
6024 LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
6025 LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
6026 LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
6027 LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
6028 LIVE_LIBS += -lstdc++
6029 LIVE_INCLUDES = -I\$(LIVE_LIB_DIR)/liveMedia/include
6030 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/UsageEnvironment/include
6031 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/BasicUsageEnvironment/include
6032 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/groupsock/include"
6033 _ld_live
='$(LIVE_LIBS)'
6034 _inputmodules
="live555 $_inputmodules"
6035 elif test "$_live_dist" = yes && test "$_network" = yes ; then
6036 _res_comment
="using distribution version"
6038 _def_live
='#define STREAMING_LIVE555 1'
6039 _live_libs_def
="# LIVE555 Streaming Media libraries:
6040 LIVE_LIB_DIR = $_livelibdir
6041 LIVE_LIBS = -lliveMedia
6042 LIVE_LIBS += -lgroupsock
6043 LIVE_LIBS += -lUsageEnvironment
6044 LIVE_LIBS += -lBasicUsageEnvironment
6045 LIVE_LIBS += -lstdc++
6046 LIVE_INCLUDES = -I/usr/include/liveMedia
6047 LIVE_INCLUDES += -I/usr/include/UsageEnvironment
6048 LIVE_INCLUDES += -I/usr/include/BasicUsageEnvironment
6049 LIVE_INCLUDES += -I/usr/include/groupsock"
6050 _ld_live
='$(LIVE_LIBS)'
6051 _inputmodules
="live555 $_inputmodules"
6053 _def_live
='#undef STREAMING_LIVE555'
6054 _noinputmodules
="live555 $_noinputmodules"
6059 echocheck
"FFmpeg libavutil (static)"
6060 if test "$_libavutil" = auto
; then
6061 if test -d libavutil
; then
6067 echores
"$_libavutil"
6069 echocheck
"FFmpeg libavcodec (static)"
6070 if test "$_libavcodec" = auto
; then
6071 # Note: static linking is preferred to dynamic linking
6073 _res_comment
="see DOCS/HTML/$_doc_lang/codecs.html"
6074 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
6075 _res_comment
="old ffmpeg version, use CVS !"
6076 if grep avcodec_find_encoder_by_name libavcodec
/utils.c
> /dev
/null
2>&1 ; then
6077 # check if libavutil is a required
6079 #include "libavcodec/avcodec.h"
6080 #if LIBAVCODEC_BUILD >= 3211265
6081 #error We need libavutil!
6083 int main(void) { return 0; }
6086 if cc_check
-I.
-I.
/libavutil
; then
6087 _libavutil_required
="no"
6089 _libavutil_required
="yes"
6091 _res_comment
="libavutil availability does not fit libavcodec version"
6092 if test "$_libavutil_required" = "$_libavutil"; then
6099 echores
"$_libavcodec"
6101 echocheck
"FFmpeg libavformat (static)"
6102 if test "$_libavformat" = auto
; then
6103 # Note: static linking is preferred to dynamic linking
6105 if test -d libavformat
&& test -f libavformat
/utils.c
; then
6109 echores
"$_libavformat"
6111 echocheck
"FFmpeg libpostproc (static)"
6112 if test "$_libpostproc" = auto
; then
6114 if test -d libavcodec
&& test -f libavcodec
/libpostproc
/postprocess.h
; then
6118 echores
"$_libpostproc"
6121 if test "$_libavutil" != yes ; then
6122 echocheck
"FFmpeg libavutil (dynamic)"
6123 if test "$_libavutil_so" = auto
; then
6126 #include <ffmpeg/common.h>
6127 int main(void) { ff_gcd(1,1); return 0; }
6129 if pkg-config
--exists libavutil
; then
6130 _inc_libavutil
=`pkg-config --cflags libavutil`
6131 _ld_libavutil
=`pkg-config --libs libavutil`
6132 cc_check
$_inc_libavutil $_ld_libavutil && _libavutil_so
=yes
6133 elif cc_check
-lavutil $_ld_lm ; then
6136 if test "$_libavutil_so" == yes ; then
6137 _res_comment
="using libavutil.so, but static libavutil is recommended"
6140 echores
"$_libavutil_so"
6143 if test "$_libavcodec" != yes ; then
6144 echocheck
"FFmpeg libavcodec (dynamic)"
6145 if test "$_libavcodec_so" = auto
; then
6147 _res_comment
="libavcodec.so is broken/obsolete"
6148 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
6150 #include <ffmpeg/avcodec.h>
6152 avcodec_find_encoder_by_name("");
6156 if pkg-config
--exists libavcodec
; then
6157 _inc_libavcodec
=`pkg-config --cflags libavcodec`
6158 _ld_libavcodec
=`pkg-config --libs libavcodec`
6159 cc_check
$_inc_libavcodec $_ld_libavcodec && _libavcodec_so
=yes
6160 elif cc_check
-lavcodec $_ld_lm ; then
6163 if test "$_libavcodec_so" == yes ; then
6164 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
6167 echores
"$_libavcodec_so"
6170 if test "$_libavformat" != yes ; then
6171 echocheck
"FFmpeg libavformat (dynamic)"
6172 if test "$_libavformat_so" = auto
; then
6175 #include <ffmpeg/avformat.h>
6176 int main(void) { av_alloc_format_context(); return 0; }
6178 if pkg-config
--exists libavformat
; then
6179 _inc_libavformat
=`pkg-config --cflags libavformat`
6180 _ld_libavformat
=`pkg-config --libs libavformat`
6181 cc_check
$_inc_libavformat $_ld_libavformat && _libavformat_so
=yes
6182 elif cc_check
$_ld_lm -lavformat ; then
6185 if test "$_libavformat_so" == yes ; then
6186 _res_comment
="using libavformat.so, but static libavformat is recommended"
6189 echores
"$_libavformat_so"
6192 if test "$_libpostproc" != yes ; then
6193 echocheck
"FFmpeg libpostproc (dynamic)"
6194 if test "$_libpostproc_so" = auto
; then
6197 #define USE_LIBPOSTPROC 1
6198 #include <inttypes.h>
6199 #include <postproc/postprocess.h>
6201 pp_get_mode_by_name_and_quality("de", 0);
6204 if cc_check
-lpostproc $_ld_lm ; then
6206 _res_comment
="using libpostproc.so, but static libpostproc is recommended"
6209 echores
"$_libpostproc_so"
6212 _def_libavcodec
='#undef USE_LIBAVCODEC'
6213 _def_libavcodec_so
='#undef USE_LIBAVCODEC_SO'
6214 _def_lavc_dsputil
='#undef USE_LIBAVCODEC_DSPUTIL'
6215 if test "$_libavcodec" = yes ; then
6216 _def_libavcodec
='#define USE_LIBAVCODEC 1'
6217 _def_lavc_dsputil
='#define USE_LIBAVCODEC_DSPUTIL'
6218 _ld_libavcodec
='libavcodec/libavcodec.a'
6219 _dep_libavcodec
='libavcodec/libavcodec.a'
6220 _codecmodules
="libavcodec $_codecmodules"
6221 if test "$_libavutil" = yes; then
6222 _ld_libavutil
='libavutil/libavutil.a'
6223 _dep_libavutil
='libavutil/libavutil.a'
6225 elif test "$_libavcodec_so" = yes ; then
6226 _def_libavcodec
='#define USE_LIBAVCODEC 1'
6227 _def_libavcodec_so
='#define USE_LIBAVCODEC_SO 1'
6228 test "$_ld_libavcodec" || _ld_libavcodec
='-lavcodec'
6229 _codecmodules
="libavcodec.so $_codecmodules"
6231 _nocodecmodules
="libavcodec $_nocodecmodules"
6234 _def_libavformat
='#undef USE_LIBAVFORMAT'
6235 _def_libavformat_so
='#undef USE_LIBAVFORMAT_SO'
6236 _def_libavformat_win32
='#undef CONFIG_WIN32'
6237 if test "$_libavformat" = yes ; then
6238 _def_libavformat
='#define USE_LIBAVFORMAT 1'
6239 _ld_libavformat
='libavformat/libavformat.a'
6240 _dep_libavformat
='libavformat/libavformat.a'
6242 _def_libavformat_win32
='#define CONFIG_WIN32 1'
6245 if test "$_libavformat_so" = yes ; then
6246 _def_libavformat_so
='#define USE_LIBAVFORMAT_SO 1'
6247 test "$_ld_libavformat" || _ld_libavformat
='-lavformat'
6249 _def_libavformat_win32
='#define CONFIG_WIN32 1'
6254 _def_libpostproc
='#undef USE_LIBPOSTPROC'
6255 _def_libpostproc_so
='#undef USE_LIBPOSTPROC_SO'
6256 if test "$_libpostproc" = yes ; then
6257 _def_libpostproc
='#define USE_LIBPOSTPROC 1'
6258 _ld_libpostproc
='libavcodec/libpostproc/libpostproc.a'
6259 _dep_libpostproc
='libavcodec/libpostproc/libpostproc.a'
6261 if test "$_libpostproc_so" = yes ; then
6262 _def_libpostproc_so
='#define USE_LIBPOSTPROC_SO 1'
6263 _ld_libpostproc
='-lpostproc'
6267 echocheck
"AMR narrowband"
6268 if test "$_amr_nb" = auto
; then
6270 if test -f libavcodec
/amr_float
/sp_dec.c
; then
6271 if test "$_libavcodec" = yes ; then
6274 _res_comment
="libavcodec (static) is required by amr_nb, sorry"
6278 if test "$_amr_nb" = yes ; then
6280 _def_amr
='#define AMR 1'
6281 _def_amr_nb
='#define AMR_NB 1'
6283 _def_amr_nb
='#undef AMR_NB'
6287 echocheck
"AMR narrowband, fixed point"
6288 if test "$_amr_nb_fixed" = auto
; then
6290 if test -f libavcodec
/amr
/dtx_dec.c
; then
6291 if test "$_libavcodec" = yes ; then
6292 if test "$_amr_nb" = no
; then
6295 _res_comment
="disabled by amr_nb"
6298 _res_comment
="libavcodec (static) is required by amr_nb-fixed, sorry"
6302 if test "$_amr_nb_fixed" = yes ; then
6304 _def_amr
='#define AMR 1'
6305 _def_amr_nb_fixed
='#define AMR_NB_FIXED 1'
6307 _def_amr_nb_fixed
='#undef AMR_NB_FIXED'
6309 echores
"$_amr_nb_fixed"
6311 if test "$_amr_nb" = yes ; then
6312 _codecmodules
="amr_nb $_codecmodules"
6314 _nocodecmodules
="amr_nb $_nocodecmodules"
6317 echocheck
"AMR wideband"
6318 if test "$_amr_wb" = auto
; then
6320 if test -f libavcodec
/amrwb_float
/dec_dtx.c
; then
6321 if test "$_libavcodec" = yes ; then
6324 _res_comment
="libavcodec (static) is required by amr_wb, sorry"
6328 if test "$_amr_wb" = yes ; then
6330 _def_amr
='#define AMR 1'
6331 _def_amr_wb
='#define AMR_WB 1'
6332 _codecmodules
="amr_wb $_codecmodules"
6334 _def_amr_wb
='#undef AMR_WB'
6335 _nocodecmodules
="amr_wb $_nocodecmodules"
6339 echocheck
"libdv-0.9.5+"
6340 if test "$_libdv" = auto
; then
6343 #include <libdv/dv.h>
6344 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6346 cc_check
-ldv $_ld_lm && _libdv
=yes
6348 if test "$_libdv" = yes ; then
6349 _def_libdv
='#define HAVE_LIBDV095 1'
6351 _codecmodules
="libdv $_codecmodules"
6353 _def_libdv
='#undef HAVE_LIBDV095'
6354 _nocodecmodules
="libdv $_nocodecmodules"
6359 if test "$_zr" = auto
; then
6360 #36067's seem to identify themselves as 36057PQC's, so the line
6361 #below should work for 36067's and 36057's.
6362 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
6368 if test "$_zr" = yes ; then
6369 if test "$_libavcodec" = yes ; then
6370 _def_zr
='#define HAVE_ZR 1'
6371 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6372 _vomodules
="zr zr2 $_vomodules"
6374 _res_comment
="libavcodec (static) is required by zr, sorry"
6375 _novomodules
="zr $_novomodules"
6376 _def_zr
='#undef HAVE_ZR'
6379 _def_zr
='#undef HAVE_ZR'
6380 _novomodules
="zr zr2 $_novomodules"
6385 if test "$_bl" = yes ; then
6386 _def_bl
='#define HAVE_BL 1'
6387 _vosrc
="$_vosrc vo_bl.c"
6388 _vomodules
="bl $_vomodules"
6390 _def_bl
='#undef HAVE_BL'
6391 _novomodules
="bl $_novomodules"
6398 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
6400 _ld_xvid
="$_ld_xvid -lxvidcore"
6402 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid $_ld_lm ; then
6404 _def_xvid3
='#define HAVE_XVID3 1'
6405 _def_xvid4
='#undef HAVE_XVID4'
6406 _codecmodules
="xvid $_codecmodules"
6410 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6412 if test "$_xvid" != no
;then
6413 if cc_check
$_inc_xvid $_ld_xvid $_ld_lm ; then
6415 elif cc_check
$_inc_xvid $_ld_xvid $_ld_lm $_ld_pthread ; then
6417 _ld_xvid
="$_ld_xvid $_ld_pthread"
6421 if test "$_xvid4" = yes ; then
6424 _def_xvid3
='#undef HAVE_XVID3'
6425 _def_xvid4
='#define HAVE_XVID4 1'
6426 _codecmodules
="xvid $_codecmodules"
6430 _def_xvid3
='#undef HAVE_XVID3'
6431 _def_xvid4
='#undef HAVE_XVID4'
6432 _nocodecmodules
="xvid $_nocodecmodules"
6437 if test "$_xvid4" = yes ; then
6438 echocheck
"XviD two pass plugin"
6441 int main(void) { xvid_plugin_2pass2_t s; s.vbv_size=0; return 0; }
6443 if cc_check
$_inc_xvid $_ld_xvid $_ld_lb ; then
6445 _def_lavc_xvid
='#define CONFIG_XVID 1'
6448 _def_lavc_xvid
='#undef CONFIG_XVID'
6450 echores
"$_lavc_xvid"
6454 _def_decore_xvid
='#undef DECORE_XVID'
6455 _def_encore_xvid
='#undef ENCORE_XVID'
6456 if test "$_xvid" = yes ; then
6457 echocheck
"DivX4 compatibility in XviD"
6460 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
6462 cc_check
$_ld_lm "$_ld_xvid" && _xvidcompat
=yes
6463 echores
"$_xvidcompat"
6468 #include <inttypes.h>
6471 #error We do not support old versions of x264. Get the latest from SVN.
6473 int main(void) { x264_encoder_open((void*)0); return 0; }
6475 _ld_x264
="$_ld_x264 -lx264 $_ld_pthread"
6476 if test "$_x264" != no
; then
6478 if cc_check
$_inc_x264 $_ld_x264 $_ld_lm ; then
6480 elif test "$_x11" = yes && cc_check
$_inc_x264 $_inc_x11 $_ld_x264 $_ld_x11 $_ld_lm ; then
6482 _ld_x264
="$_ld_x264 $_ld_x11"
6486 if test "$_x264" = yes ; then
6488 _def_x264
='#define HAVE_X264 1'
6489 _codecmodules
="x264 $_codecmodules"
6493 _def_x264
='#undef HAVE_X264'
6494 _nocodecmodules
="x264 $_nocodecmodules"
6498 echocheck
"DivX4linux/DivX5linux/OpenDivX decore"
6499 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
6502 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
6504 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
6507 _ld_decore
='-ldivxdecore'
6508 _def_decore
='#define NEW_DECORE 1'
6509 _def_divx
='#define USE_DIVX'
6510 _def_divx5
='#undef DECORE_DIVX5'
6511 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6512 _codecmodules
="divx4linux $_codecmodules"
6513 _res_comment
="DivX4linux - with libdivxdecore.so"
6515 # if test "$_divx4linux" != no ; then
6517 # OdivxPP disabled because of:
6518 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
6521 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
6523 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
6526 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
6527 _ld_decore
='-ldivxdecore'
6528 _def_decore
='#define NEW_DECORE 1'
6529 _def_divx
='#define USE_DIVX'
6530 _def_divx5
='#define DECORE_DIVX5 1'
6531 # _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
6532 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6533 _codecmodules
="divx5linux $_codecmodules"
6534 _nocodecmodules
="divx4linux $_nocodecmodules"
6535 _res_comment
="DivX5linux - with libdivxdecore.so"
6536 elif test "$_opendivx" != no
; then
6539 _ld_decore
='opendivx/libdecore.a'
6540 _def_decore
='#undef NEW_DECORE'
6541 _def_divx
='#define USE_DIVX'
6542 _def_divx5
='#undef DECORE_DIVX5'
6543 _def_odivx_postprocess
='#define HAVE_ODIVX_POSTPROCESS 1'
6544 _codecmodules
="opendivx $_codecmodules"
6545 _nocodecmodules
="divx5linux $_nocodecmodules"
6546 _res_comment
="OpenDivX"
6547 elif test "$_xvidcompat" = yes ; then
6551 _def_decore
='#define NEW_DECORE 1'
6552 _def_divx
='#define USE_DIVX 1'
6553 _def_divx5
='#undef DECORE_DIVX5'
6554 _def_decore_xvid
='#define DECORE_XVID 1'
6555 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6556 _nocodecmodules
="opendivx divx5linux divx4linux $_nocodecmodules"
6557 _res_comment
="XviD compat."
6562 _def_decore
='#undef NEW_DECORE'
6563 _def_divx
='#undef USE_DIVX'
6564 _def_divx5
='#undef DECORE_DIVX5'
6565 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6566 _nocodecmodules
="opendivx $_nocodecmodules"
6572 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
6573 if test "$_mencoder" != no
; then
6575 echocheck
"libmp3lame (for mencoder)"
6577 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6578 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6580 #include <lame/lame.h>
6581 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; }
6583 # Note: libmp3lame usually depends on vorbis
6584 cc_check
-lmp3lame $_ld_vorbis $_ld_lm && tmp_run
&& _mp3lame
=yes
6585 if test "$_mp3lame" = yes ; then
6586 _def_mp3lame
="#define HAVE_MP3LAME"
6587 _def_lavc_mp3lame
="#define CONFIG_MP3LAME 1"
6588 _ld_mp3lame
="-lmp3lame $_ld_vorbis"
6590 #include <lame/lame.h>
6591 int main(void) { int p = STANDARD_FAST; return 0; }
6593 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6595 #include <lame/lame.h>
6596 int main(void) { int p = MEDIUM_FAST; return 0; }
6598 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6600 _def_mp3lame
='#undef HAVE_MP3LAME'
6605 echocheck
"DivX4linux encore (for mencoder)"
6607 #include <encore2.h>
6608 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
6610 if test "$_divx4linux" != no
&& cc_check
-ldivxencore $_ld_lm ; then
6612 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6613 _ld_encore
='-ldivxencore'
6614 _res_comment
="DivX4linux - with libdivxencore.so"
6615 elif test "$_xvidcompat" = yes ; then
6617 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6619 _def_encore_xvid
='#define ENCORE_XVID 1'
6620 _res_comment
="XviD compatibility"
6623 _def_encore
='#undef HAVE_DIVX4ENCORE'
6625 echores
"$_divx_encore"
6629 echocheck
"mencoder"
6630 _mencoder_flag
='#undef HAVE_MENCODER'
6631 if test "$_mencoder" = yes ; then
6632 _mencoder_flag
='#define HAVE_MENCODER'
6634 echores
"$_mencoder"
6636 echocheck
"fastmemcpy"
6637 # fastmemcpy check is done earlier with tests of CPU & binutils features
6638 if test "$_fastmemcpy" = yes ; then
6639 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6641 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6643 echores
"$_fastmemcpy"
6645 echocheck
"UniquE RAR File Library"
6646 if test "$_unrarlib" = yes ; then
6647 _def_unrarlib
='#define USE_UNRARLIB 1'
6649 _def_unrarlib
='#undef USE_UNRARLIB'
6651 echores
"$_unrarlib"
6653 echocheck
"TV interface"
6654 if test "$_tv" = yes ; then
6655 _def_tv
='#define USE_TV 1'
6656 _inputmodules
="tv $_inputmodules"
6658 _noinputmodules
="tv $_noinputmodules"
6659 _def_tv
='#undef USE_TV'
6663 echocheck
"*BSD BrookTree 848 TV interface"
6664 if test "$_tv_bsdbt848" = auto
; then
6666 if test "$_tv" = yes ; then
6668 #include <sys/types.h>
6669 #if defined(__NetBSD__)
6670 #include <dev/ic/bt8xx.h>
6672 #include <machine/ioctl_bt848.h>
6674 int main(void) { return 0; }
6676 cc_check
&& _tv_bsdbt848
=yes
6679 if test "$_tv_bsdbt848" = yes ; then
6680 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6681 _inputmodules
="tv-bsdbt848 $_inputmodules"
6683 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6684 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6686 echores
"$_tv_bsdbt848"
6688 echocheck
"Video 4 Linux TV interface"
6689 if test "$_tv_v4l" = auto
; then
6691 if test "$_tv" = yes && linux
; then
6694 #include <linux/videodev.h>
6695 int main(void) { return 0; }
6697 cc_check
&& _tv_v4l
=yes
6700 if test "$_tv_v4l" = yes ; then
6701 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6702 _inputmodules
="tv-v4l $_inputmodules"
6704 _noinputmodules
="tv-v4l $_noinputmodules"
6705 _def_tv_v4l
='#undef HAVE_TV_V4L'
6710 echocheck
"Video 4 Linux 2 TV interface"
6711 if test "$_tv_v4l2" = auto
; then
6713 if test "$_tv" = yes && linux
; then
6716 #include <linux/types.h>
6717 #include <linux/videodev2.h>
6718 int main(void) { return 0; }
6720 cc_check
&& _tv_v4l2
=yes
6723 if test "$_tv_v4l2" = yes ; then
6724 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6725 _inputmodules
="tv-v4l2 $_inputmodules"
6727 _noinputmodules
="tv-v4l2 $_noinputmodules"
6728 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6733 echocheck
"audio select()"
6734 if test "$_select" = no
; then
6735 _def_select
='#undef HAVE_AUDIO_SELECT'
6736 elif test "$_select" = yes ; then
6737 _def_select
='#define HAVE_AUDIO_SELECT 1'
6743 # FIXME network check
6744 if test "$_network" != no
; then
6745 _def_network
='#define MPLAYER_NETWORK 1'
6746 _ld_network
="$_ld_sock"
6747 _inputmodules
="network $_inputmodules"
6749 _noinputmodules
="network $_noinputmodules"
6750 _def_network
='#undef MPLAYER_NETWORK'
6756 if not beos
&& test "$_ftp" != no
; then
6757 _def_ftp
='#define HAVE_FTP 1'
6758 _inputmodules
="ftp $_inputmodules"
6760 _noinputmodules
="ftp $_noinputmodules"
6761 _def_ftp
='#undef HAVE_FTP'
6765 echocheck
"vstream client"
6766 if test "$_vstream" = auto
; then
6769 #include <vstream-client.h>
6770 void vstream_error(const char *format, ... ) {}
6771 int main(void) { vstream_start(); return 0; }
6773 cc_check
-lvstream-client && _vstream
=yes
6775 if test "$_vstream" = yes ; then
6776 _def_vstream
='#define HAVE_VSTREAM 1'
6777 _inputmodules
="vstream $_inputmodules"
6778 _ld_vstream
='-lvstream-client'
6780 _noinputmodules
="vstream $_noinputmodules"
6781 _def_vstream
='#undef HAVE_VSTREAM'
6786 echocheck
"byte order"
6787 if test "$_big_endian" = auto
; then
6789 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6790 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6792 return (int)ascii_name;
6796 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6802 echo -n "failed to autodetect byte order, defaulting to "
6805 if test "$_big_endian" = yes ; then
6806 _byte_order
='big-endian'
6807 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6809 _byte_order
='little-endian'
6810 _def_words_endian
='#undef WORDS_BIGENDIAN'
6812 echores
"$_byte_order"
6814 echocheck
"OSD menu"
6815 if test "$_menu" = yes ; then
6816 _def_menu
='#define HAVE_MENU 1'
6818 _def_menu
='#undef HAVE_MENU'
6822 # Check to see if they want QTX codecs enabled
6823 echocheck
"QTX codecs"
6824 if test "$_qtx" = auto
; then
6827 if test "$_qtx" = yes ; then
6828 _def_qtx
='#define USE_QTX_CODECS 1'
6829 _codecmodules
="qtx $_codecmodules"
6831 _def_qtx
='#undef USE_QTX_CODECS'
6832 _nocodecmodules
="qtx $_nocodecmodules"
6837 echocheck
"Subtitles sorting"
6838 if test "$_sortsub" = yes ; then
6839 _def_sortsub
='#define USE_SORTSUB 1'
6841 _def_sortsub
='#undef USE_SORTSUB'
6846 echocheck
"XMMS inputplugin support"
6847 if test "$_xmms" = yes ; then
6849 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6850 if test -z "$_xmmsplugindir" ; then
6851 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6853 if test -z "$_xmmslibdir" ; then
6854 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6857 if test -z "$_xmmsplugindir" ; then
6858 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6860 if test -z "$_xmmslibdir" ; then
6861 _xmmslibdir
=/usr
/lib
6865 _def_xmms
='#define HAVE_XMMS 1'
6867 _xmms_lib
="${_xmmslibdir}/libxmms.dylib"
6869 _xmms_lib
="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6872 _def_xmms
='#undef HAVE_XMMS'
6877 if test "$_inet6" = auto
; then
6879 #include <sys/types.h>
6880 #include <sys/socket.h>
6881 int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6888 if test "$_inet6" = yes ; then
6889 _def_inet6
='#define HAVE_AF_INET6 1'
6891 _def_inet6
='#undef HAVE_AF_INET6'
6896 echocheck
"gethostbyname2"
6897 if test "$_gethostbyname2" = auto
; then
6899 #include <sys/types.h>
6900 #include <sys/socket.h>
6902 int main(void) { gethostbyname2("", AF_INET); }
6910 if test "$_gethostbyname2" = yes ; then
6911 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6913 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6915 echores
"$_gethostbyname2"
6917 # --------------- GUI specific tests begin -------------------
6920 if test "$_gui" = yes ; then
6922 # Required libraries
6923 test "$_png" != yes && die
"PNG support required for GUI compilation, please install libpng and libpng-dev packages."
6924 test "$_x11" != yes && die
"X11 support required for GUI compilation"
6926 echocheck
"XShape extension"
6928 if test "$_x11" = yes ; then
6930 #include <X11/Xlib.h>
6931 #include <X11/Xproto.h>
6932 #include <X11/Xutil.h>
6933 #include <X11/extensions/shape.h>
6936 char *name = ":0.0";
6939 int eventbase, errorbase;
6940 if (getenv("DISPLAY"))
6941 name=getenv("DISPLAY");
6942 wsDisplay=XOpenDisplay(name);
6943 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6945 XCloseDisplay(wsDisplay);
6949 cc_check
$_inc_x11 $_ld_x11 && _xshape
=yes
6951 if test "$_xshape" = yes ; then
6952 _def_xshape
='#define HAVE_XSHAPE 1'
6954 die
"The GUI requires the X11 extension XShape (which was not found)."
6959 if test "$_gtk1" = no
; then
6961 echocheck
"GTK+ version"
6963 if pkg-config gtk
+-2.0
--exists ; then
6964 _gtk
=`pkg-config gtk+-2.0 --modversion 2>/dev/null`
6965 _inc_gtk
=`pkg-config gtk+-2.0 --cflags 2>/dev/null`
6966 _ld_gtk
=`pkg-config gtk+-2.0 --libs 2>/dev/null`
6970 if pkg-config glib-2.0
--exists ; then
6971 echocheck
"glib version"
6972 _glib
=`pkg-config glib-2.0 --modversion 2>/dev/null`
6973 _inc_glib
=`pkg-config glib-2.0 --cflags 2>/dev/null`
6974 _ld_glib
=`pkg-config glib-2.0 --libs 2>/dev/null`
6977 _def_gui
='#define HAVE_NEW_GUI 1'
6978 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
6979 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6982 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
6985 echo "GTK-2 devel packages were not found, trying GTK 1.2"
6990 if test "$_gtk1" = yes ; then
6991 # Check for old GTK (1.2.x)
6992 echocheck
"GTK version"
6993 if test -z "$_gtkconfig" ; then
6994 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
6995 _gtkconfig
="gtk-config"
6996 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
6997 _gtkconfig
="gtk12-config"
6999 die
"The GUI requires GTK devel packages (which were not found)."
7002 _gtk
=`$_gtkconfig --version 2>&1`
7003 _inc_gtk
=`$_gtkconfig --cflags 2>&1`
7004 _ld_gtk
=`$_gtkconfig --libs 2>&1`
7005 echores
"$_gtk (using $_gtkconfig)"
7008 echocheck
"glib version"
7009 if test -z "$_glibconfig" ; then
7010 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
7011 _glibconfig
="glib-config"
7012 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
7013 _glibconfig
="glib12-config"
7015 die
"The GUI requires GLib devel packages (which were not found)"
7018 _glib
=`$_glibconfig --version 2>&1`
7019 _inc_glib
=`$_glibconfig --cflags 2>&1`
7020 _ld_glib
=`$_glibconfig --libs 2>&1`
7021 echores
"$_glib (using $_glibconfig)"
7023 _def_gui
='#define HAVE_NEW_GUI 1'
7024 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7025 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
7028 echo "Creating Gui/config.mak"
7029 cat > Gui
/config.mak
<< EOF
7030 # -------- Generated by configure -----------
7034 GLIBINC = $_inc_glib
7035 GLIBLIBS = $_ld_glib
7040 _def_gui
='#undef HAVE_NEW_GUI'
7041 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
7043 # --------------- GUI specific tests end -------------------
7045 if test "$_charset" = "noconv" ; then
7047 elif test -z "$_charset" ; then
7048 if test "$_gtk1" = yes ; then
7049 _charset
=`cat ${_mp_help}.charset`
7054 if test "$_charset" ; then
7055 _def_charset
="#define MSG_CHARSET \"$_charset\""
7057 _def_charset
="#undef MSG_CHARSET"
7061 #############################################################################
7063 echocheck
"automatic gdb attach"
7064 if test "$_crash_debug" = yes ; then
7065 _def_crash_debug
='#define CRASH_DEBUG 1'
7067 _def_crash_debug
='#undef CRASH_DEBUG'
7070 echores
"$_crash_debug"
7073 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN -DCONFIG_DARWIN"
7075 CFLAGS
="$CFLAGS -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
7077 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
7078 CFLAGS
="$CFLAGS -no-cpp-precomp"
7081 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
7082 test "$_altivec" = yes && CFLAGS
="$CFLAGS -DCONFIG_DARWIN"
7085 # use flag for HPUX missing setenv()
7086 CFLAGS
="$CFLAGS -DHPUX"
7090 CFLAGS
="$CFLAGS -D_REENTRANT"
7092 # FIXME bsd needs this so maybe other OS'es
7093 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
7095 # 64 bit file offsets?
7096 if test "$_largefiles" = yes || freebsd
; then
7097 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
7098 if test "$_dvdread" = yes ; then
7099 # dvdread support requires this (for off64_t)
7100 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
7104 echocheck
"compiler support for -fno-PIC"
7107 int main(void) { return 0; }
7109 if cc_check
-fno-PIC ; then
7110 CFLAGS
="-fno-PIC $CFLAGS"
7116 echores
"only used for x86"
7119 echocheck
"compiler support for noexecstack"
7121 int main(void) { return 0; }
7123 if cc_check
-Wl,-z,noexecstack
; then
7124 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
7130 echocheck
"ftello()"
7131 # if we don't have ftello use the osdep/ compatibility module
7134 #include <sys/types.h>
7135 int main (void) { ftello(stdin); return 0; }
7138 cc_check
&& _ftello
=yes
7139 if test "$_ftello" = yes ; then
7140 _def_ftello
='#define HAVE_FTELLO 1'
7142 _def_ftello
='#undef HAVE_FTELLO'
7146 # Determine OS dependent libs
7148 _def_confwin32
='#define WIN32'
7149 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
7150 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
7151 CFLAGS
="$CFLAGS -D__CYGWIN__"
7155 _confwin32
='TARGET_WIN32 = yes'
7157 _confwin32
='TARGET_WIN32 = no'
7160 # Dynamic linking flags
7161 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
7163 bsd
&& _ld_dl_dynamic
='-rdynamic'
7164 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
&& not darwin
; then
7165 _ld_dl_dynamic
='-rdynamic'
7168 _ld_arch
="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
7169 bsdos
&& _ld_arch
="$_ld_arch -ldvd"
7171 x86
&& _ld_arch
="$_ld_arch -li386"
7174 _def_debug
='#undef MP_DEBUG'
7175 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
7177 _def_linux
='#undef TARGET_LINUX'
7178 linux
&& _def_linux
='#define TARGET_LINUX 1'
7180 # TODO cleanup the VIDIX stuff here
7181 echocheck
"VIDIX (internal)"
7182 echores
"$_vidix_internal"
7184 echocheck
"VIDIX (external)"
7185 if test "$_vidix_external" = auto
; then
7188 #include <vidix/vidix.h>
7189 int main(void) { return 0; }
7191 cc_check
-lvidix && _vidix_external
=yes
7193 echores
"$_vidix_external"
7195 if test "$_vidix_internal" = yes ||
test "$_vidix_external" = yes ; then
7197 _def_vidix
='#define CONFIG_VIDIX 1'
7200 _def_vidix
='#undef CONFIG_VIDIX'
7203 if test "$_vidix_internal" = yes ; then
7204 _def_vidix_pfx
="#define MP_VIDIX_PFX \"$_libdir\" \"/mplayer/vidix/\" "
7205 elif test "$_vidix_external" = yes ; then
7206 _ld_vidix_external
="-lvidix"
7207 _def_vidix_pfx
='#define MP_VIDIX_PFX "" '
7210 if test "$_vidix" = yes; then
7211 _vosrc
="$_vosrc vo_cvidix.c"
7212 _vomodules
="cvidix $_vomodules"
7214 _novomodules
="cvidix $_novomodules"
7216 if test "$_vidix" = yes && win32
; then
7217 _vosrc
="$_vosrc vo_winvidix.c"
7218 _vomodules
="winvidix $_vomodules"
7219 _ld_win32libs
="-lgdi32 $_ld_win32libs"
7221 _novomodules
="winvidix $_novomodules"
7223 if test "$_vidix" = yes && test "$_x11" = yes; then
7224 _vosrc
="$_vosrc vo_xvidix.c"
7225 _vomodules
="xvidix $_vomodules"
7227 _novomodules
="xvidix $_novomodules"
7230 echocheck
"joystick"
7231 _def_joystick
='#undef HAVE_JOYSTICK'
7232 if test "$_joystick" = yes ; then
7234 # TODO add some check
7235 _def_joystick
='#define HAVE_JOYSTICK 1'
7237 _joystick
="no (unsupported under $system_name)"
7240 echores
"$_joystick"
7243 if test "$_lirc" = auto
; then
7245 if test -c /dev
/lirc
-o -c /dev
/lirc
/0 ; then
7247 #include <lirc/lirc_client.h>
7248 int main(void) { return 0; }
7250 cc_check
-llirc_client && _lirc
=yes
7253 if test "$_lirc" = yes ; then
7254 _def_lirc
='#define HAVE_LIRC 1'
7255 _ld_lirc
='-llirc_client'
7257 _def_lirc
='#undef HAVE_LIRC'
7262 if test "$_lircc" = auto
; then
7265 #include <lirc/lircc.h>
7266 int main(void) { return 0; }
7268 cc_check
-llircc && _lircc
=yes
7270 if test "$_lircc" = yes ; then
7271 _def_lircc
='#define HAVE_LIRCC 1'
7274 _def_lircc
='#undef HAVE_LIRCC'
7278 #############################################################################
7279 echo "Creating config.mak"
7280 cat > config.mak
<< EOF
7281 # -------- Generated by configure -----------
7284 MAN_LANG = $MAN_LANG
7285 TARGET_OS = $system_name
7287 prefix = \$(DESTDIR)$_prefix
7288 BINDIR = \$(DESTDIR)$_bindir
7289 DATADIR = \$(DESTDIR)$_datadir
7290 MANDIR = \$(DESTDIR)$_mandir
7291 CONFDIR = \$(DESTDIR)$_confdir
7292 LIBDIR = \$(DESTDIR)$_libdir
7293 # FFmpeg uses libdir instead of LIBDIR
7301 EXTRA_INC = $_inc_extra
7302 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
7303 STRIPBINARIES = $_stripbinaries
7305 HELP_FILE = $_mp_help
7308 PRG_MENCODER = $_prg_mencoder
7312 MPLAYER_NETWORK = $_network
7313 STREAMING_LIVE555 = $_live
7314 MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network
7316 VIDIX = $_vidix_internal
7317 EXTERNAL_VIDIX = $_vidix_external
7318 EXTERNAL_VIDIX_LIB = $_ld_vidix_external
7320 CONFIG_MP3LAME = $_mp3lame
7323 OPENDIVX = $_opendivx
7327 LIBMPEG2 = $_libmpeg2
7328 TREMOR = $_tremor_internal
7329 TREMOR_FLAGS = $_tremor_flags
7332 MUSEPACK = $_musepack
7334 UNRARLIB = $_unrarlib
7339 EXTRA_LIB = $_ld_extra
7340 Z_LIB = $_ld_static $_ld_zlib
7342 WIN32_LIB = $_ld_win32libs
7343 STATIC_LIB = $_ld_static
7344 ENCA_LIB = $_ld_enca
7345 HAVE_PTHREADS = $_pthreads
7347 LIBC_LIB = $_ld_libC
7352 HAVE_XVMC_ACCEL = $_xvmc
7358 LIB=\$(LIBPREF)\$(NAME)\$(LIBSUF)
7361 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
7363 MLIB_LIB = $_ld_mlib
7364 MLIB_INC = $_inc_mlib
7365 DXR2_INC = $_inc_dxr2
7371 SVGA_LIB = $_ld_svga
7372 VESA_LIB = $_ld_vesa
7374 CACA_INC = $_inc_caca
7375 CACA_LIB = $_ld_caca
7378 ALSA_LIB = $_ld_alsa
7380 ARTS_LIB = $_ld_arts
7381 ARTS_INC = $_inc_arts
7384 POLYP_LIB = $_ld_polyp
7385 POLYP_INC = $_inc_polyp
7386 JACK_LIB = $_ld_jack
7387 JACK_INC = $_inc_jack
7388 OPENAL_LIB = $_ld_openal
7389 OPENAL_INC = $_inc_openal
7390 SGIAUDIO_LIB = $_ld_sgiaudio
7392 # input/demuxer/codecs
7393 TERMCAP_LIB = $_ld_termcap
7394 LIRC_LIB = $_ld_lirc
7395 LIRCC_LIB = $_ld_lircc
7396 HAVE_DVD = $_have_dvd
7398 DVDREAD_LIB = $_ld_dvdread
7401 W32_DEP = $_dep_win32
7402 W32_LIB = $_ld_win32
7403 DS_DEP = $_dep_dshow
7405 AV_DEP = $_dep_libavcodec $_dep_libavformat $_dep_libavutil $_dep_libpostproc
7406 AV_LIB = $_ld_libavcodec $_ld_libavformat $_ld_libavutil $_ld_libpostproc
7407 CONFIG_LIBAVUTIL = $_libavutil
7408 CONFIG_LIBAVUTIL_SO = $_libavutil_so
7409 CONFIG_LIBAVCODEC = $_libavcodec
7410 CONFIG_LIBAVCODEC_SO = $_libavcodec_so
7411 CONFIG_LIBAVFORMAT = $_libavformat
7412 CONFIG_LIBAVFORMAT_SO = $_libavformat_so
7413 CONFIG_LIBPOSTPROC = $_libpostproc
7414 CONFIG_LIBPOSTPROC_SO = $_libpostproc_so
7417 FAME_LIB = $_ld_fame
7418 MP1E_DEP = $_dep_mp1e
7419 MP1E_LIB = $_ld_mp1e
7420 ARCH_LIB = $_ld_arch $_ld_iconv
7422 XVID_INC = $_inc_xvid
7423 XVID_LIB = $_ld_xvid
7425 X264_INC = $_inc_x264
7426 X264_LIB = $_ld_x264
7427 CONFIG_DTS = $_libdts
7428 DTS_INC = $_inc_libdts
7429 DTS_LIB = $_ld_libdts
7430 DECORE_LIB = $_ld_decore $_ld_mp3lame
7431 MENCODER = $_mencoder
7432 ENCORE_LIB = $_ld_encore $_ld_mp3lame
7433 DIRECTFB_INC = $_inc_directfb
7434 DIRECTFB_LIB = $_ld_directfb
7435 CDPARANOIA_INC = $_inc_cdparanoia
7436 CDPARANOIA_LIB = $_ld_cdparanoia
7437 FREETYPE_INC = $_inc_freetype
7438 FREETYPE_LIB = $_ld_freetype
7439 FONTCONFIG_INC = $_inc_fontconfig
7440 FONTCONFIG_LIB = $_ld_fontconfig
7441 FRIBIDI_INC = $_inc_fribidi
7442 FRIBIDI_LIB = $_ld_fribidi
7443 LIBCDIO_INC = $_inc_libcdio
7444 LIBCDIO_LIB = $_ld_libcdio
7445 LIBLZO_LIB= $_ld_liblzo
7447 VORBIS_LIB = $_ld_vorbis $_ld_libdv
7448 SPEEX_LIB = $_ld_speex
7449 THEORA_LIB = $_ld_theora
7450 FAAD_LIB = $_ld_faad
7451 INTERNAL_FAAD = $_faad_internal
7452 SMBSUPPORT_LIB = $_ld_smb
7453 XMMS_PLUGINS = $_xmms
7454 XMMS_LIB = $_xmms_lib
7456 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7457 MACOSX_BUNDLE = $_macosx_bundle
7458 MACOSX_FRAMEWORKS = $_macosx_frameworks
7459 MACOSX_COREVIDEO = $_macosx_corevideo
7461 TOOLAME_EXTRAFLAGS=$_toolame_extraflags
7462 TOOLAME_LIB=$_toolame_lib
7464 TWOLAME_LIB=$_twolame_lib
7465 MUSEPACK_LIB = $_ld_musepack
7470 AMR_NB_FIXED=$_amr_nb_fixed
7472 `echo $_libavcodecs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7474 CONFIG_XVID=$_lavc_xvid
7478 # --- Some stuff for autoconfigure ----
7483 TARGET_MMX2 = $_mmxext
7484 TARGET_3DNOW = $_3dnow
7485 TARGET_3DNOWEX = $_3dnowext
7487 TARGET_ALTIVEC = $_altivec
7492 GTKLIB = $_ld_static $_ld_gtk
7493 GLIBLIB = $_ld_static $_ld_glib
7494 GTK_LIBS = $_ld_static $_ld_gui
7500 #############################################################################
7501 echo "Creating config.h"
7502 cat > config.h
<< EOF
7503 /* -------- This file has been automatically generated by configure ---------
7504 Note: Any changes in it will be lost when you run configure again. */
7506 /* Protect against multiple inclusion */
7507 #ifndef MPLAYER_CONFIG_H
7508 #define MPLAYER_CONFIG_H 1
7510 /* use GNU internationalization */
7513 /* name of messages charset */
7516 /* Runtime CPU detection */
7517 $_def_runtime_cpudetection
7519 /* Dynamic a/v plugins */
7520 $_def_dynamic_plugins
7522 /* "restrict" keyword */
7523 $_def_restrict_keyword
7525 /* __builtin_expect branch prediction hint */
7526 $_def_builtin_expect
7527 #ifdef HAVE_BUILTIN_EXPECT
7528 #define likely(x) __builtin_expect ((x) != 0, 1)
7529 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7531 #define likely(x) (x)
7532 #define unlikely(x) (x)
7535 /* attribute(used) as needed by some compilers */
7536 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7537 # define attribute_used __attribute__((used))
7539 # define attribute_used
7542 #define PREFIX "$_prefix"
7547 /* enable/disable SIGHANDLER */
7550 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7553 /* Toggles debugging informations */
7556 /* Toggles colorized output */
7557 //#define MSG_USE_COLORS 1
7559 /* Indicates that libcdio is available for VCD and CD-DA playback */
7562 /* Indicates that Ogle's libdvdread is available for DVD playback */
7565 /* Indicates that dvdread is from libmpdvdkit */
7568 /* Additional options for libmpdvdkit*/
7583 /* Common data directory (for fonts, etc) */
7584 #define MPLAYER_DATADIR "$_datadir"
7585 #define MPLAYER_CONFDIR "$_confdir"
7586 #define MPLAYER_LIBDIR "$_libdir"
7588 /* Define this to compile stream-caching support, it can be enabled via
7589 -cache <kilobytes> */
7590 #define USE_STREAM_CACHE 1
7592 /* Define to include support for XviD/Divx4Linux/OpenDivx */
7595 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
7596 /* You have to change DECORE_LIBS in config.mak, too! */
7599 /* Define if you are using DivX5Linux Decore library */
7602 /* Define if you are using XviD library */
7608 /* Define if you are using the X.264 library */
7611 /* Define to include support for libdv-0.9.5 */
7614 /* If build mencoder */
7617 /* Indicates if XviD/Divx4linux encore is available
7618 Note: for mencoder */
7621 /* Indicates if libmp3lame is available
7622 Note: for mencoder */
7624 $_def_mp3lame_preset
7625 $_def_mp3lame_preset_medium
7627 /* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
7630 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7631 (use -bps or -nobps commandline option for run-time method selection)
7632 -bps gives better sync for vbr mp3 audio, it is now default */
7633 #define AVI_SYNC_BPS 1
7635 /* Undefine this if you do not want to select mono audio (left or right)
7636 with a stereo MPEG layer 2/3 audio stream. The command line option
7637 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7638 right-only), with 0 being the default.
7640 #define USE_FAKE_MONO 1
7642 /* Undefine this if your sound card driver has no working select().
7643 If you have kernel Oops, player hangups, or just no audio, you should
7644 try to recompile MPlayer with this option disabled! */
7647 /* define this to use iconv(3) function to codepage conversions */
7650 /* define this to use nl_langinfo function */
7653 /* define this to use RTC (/dev/rtc) for video timers */
7656 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7657 #define MAX_OUTBURST 65536
7659 /* set up audio OUTBURST. Do not change this! */
7660 #define OUTBURST 512
7662 /* Define this if your system has the header file for the OSS sound interface */
7665 /* Define this if your system has the header file for the OSS sound interface
7666 * in /usr/include */
7669 /* Define this if your system has the sysinfo header */
7672 /* Define this if your system has ftello() */
7676 /* Need these for FILE and off_t an config.h is usually before other includes*/
7678 #include <sys/types.h>
7679 off_t ftello(FILE *);
7682 /* Define this if your system has the "malloc.h" header file */
7685 /* memalign is mapped to malloc if unsupported */
7687 #ifndef HAVE_MEMALIGN
7688 # define memalign(a,b) malloc(b)
7689 #define MEMALIGN_HACK 1
7692 /* Define this if your system has the "alloca.h" header file */
7695 /* Define this if your system has the "sys/mman.h" header file */
7697 $_def_mman_has_map_failed
7699 /* Define this if you have the elf dynamic linker -ldl library */
7702 /* Define this if you have the kstat kernel statistics library */
7705 /* Define this if you have zlib */
7708 #define CONFIG_ZLIB 1
7711 /* Define this if you have shm support */
7714 /* Define this if your system has scandir & alphasort */
7717 /* Define this if your system has strsep */
7720 /* Define this if your system has strlcpy */
7722 #ifndef HAVE_STRLCPY
7723 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7726 /* Define this if your system has strlcat */
7728 #ifndef HAVE_STRLCAT
7729 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7732 /* Define this if your system has fseeko */
7735 /* Need these for FILE and off_t an config.h is usually before other includes*/
7737 #include <sys/types.h>
7738 int fseeko(FILE *, off_t, int);
7743 /* Define this if your system has vsscanf */
7746 /* Define this if your system has swab */
7749 /* Define this if your system has no posix select */
7750 $_def_no_posix_select
7752 /* Define this if your system has gettimeofday */
7755 /* Define this if your system has glob */
7758 /* Define this if your system has setenv */
7761 int setenv(const char *name, const char *val, int overwrite);
7764 /* Define this if your system has sysi86 */
7767 /* Define this if your system has pthreads */
7770 /* Define this if you enabled thread support for libavcodec */
7773 /* LIRC (remote control, see www.lirc.org) support: */
7777 * LIRCCD (LIRC client daemon)
7778 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7782 /* DVD navigation support using libdvdnav */
7784 $_def_dvdnav_version
7786 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7787 #define MPEG12_POSTPROC 1
7789 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7791 $_def_libpostproc_so
7793 /* Define to include support for OpenDivx postprocessing */
7794 $_def_odivx_postprocess
7796 /* Win32 DLL support */
7798 #define WIN32_PATH "$_win32libdir"
7800 /* DirectShow support */
7803 /* Mac OS X specific features */
7805 $_def_macosx_finder_support
7807 $_def_macosx_corevideo
7809 /* Build our Win32-loader */
7812 /* ffmpeg's libavcodec support (requires libavcodec source) */
7817 /* ffmpeg's libavformat support (requires libavformat source) */
7819 $_def_libavformat_so
7820 $_def_libavformat_win32
7822 /* Use libavcodec's decoders */
7823 #define CONFIG_DECODERS 1
7824 /* Use libavcodec's encoders */
7825 #define CONFIG_ENCODERS 1
7827 /* Use libavformat's demuxers */
7828 #define CONFIG_DEMUXERS 1
7829 /* Use libavformat's muxers */
7830 #define CONFIG_MUXERS 1
7832 #define CONFIG_MPEGAUDIO_HP 1
7834 #define CONFIG_GPL 1
7836 /* Use amr codecs from libavcodec (requires amr sources) */
7842 /* Use specific codecs from libavcodec */
7843 `echo $_libavcodecs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
7848 /* Use codec libs included in mplayer CVS / source dist: */
7854 /* Use libfame encoder filter */
7857 /* XAnim DLL support */
7859 /* Default search path */
7862 /* RealPlayer DLL support */
7864 /* Default search path */
7867 /* LIVE555 Streaming Media library support */
7870 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
7873 /* Use unrarlib for Vobsubs */
7876 /* gui support, please do not edit this option */
7880 /* Audio output drivers */
7882 $_def_ossaudio_devdsp
7883 $_def_ossaudio_devmixer
7893 $_def_sys_asoundlib_h
7894 $_def_alsa_asoundlib_h
7900 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7902 #undef FAST_OSD_TABLE
7904 /* Enable TV Interface support */
7907 /* Enable Video 4 Linux TV interface support */
7910 /* Enable Video 4 Linux 2 TV interface support */
7913 /* Enable *BSD BrookTree TV interface support */
7916 /* Define if your processor stores words with the most significant
7917 byte first (like Motorola and SPARC, unlike Intel and VAX). */
7922 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
7923 have the instruction. */
7926 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
7927 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
7933 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
7938 /* only gcc3 can compile mvi instructions */
7939 $_def_gcc_mvi_support
7941 /* Define this for Cygwin build for win32 */
7944 /* Define this to any prefered value from 386 up to infinity with step 100 */
7945 #define __CPU__ $iproc
7954 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
7955 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7957 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7958 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7959 #elif defined(WIN32)
7960 #define DEFAULT_CDROM_DEVICE "D:"
7961 #define DEFAULT_DVD_DEVICE "D:"
7962 #elif defined(SYS_DARWIN)
7963 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
7964 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
7965 #elif defined(__OpenBSD__)
7966 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
7967 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7968 #elif defined(__FreeBSD__)
7969 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
7970 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7972 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7973 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7977 /*----------------------------------------------------------------------------
7979 ** NOTE: Instead of modifying these definitions here, use the
7980 ** --enable/--disable options of the ./configure script!
7981 ** See ./configure --help for details.
7983 *---------------------------------------------------------------------------*/
7985 /* C99 lrintf function available */
7988 /* round function is available */
7991 /* yes, we have inttypes.h */
7992 #define HAVE_INTTYPES_H 1
7994 /* int_fastXY_t emulation */
7997 /* nanosleep support */
8003 /* termcap flag for getch2.c */
8006 /* termios flag for getch2.c */
8011 /* enable PNG support */
8014 /* enable JPEG support */
8017 /* enable PNM support */
8020 /* enable md5sum support */
8023 /* enable GIF support */
8028 /* enable FreeType support */
8031 /* enable Fontconfig support */
8034 /* enable FriBiDi usage */
8037 /* enable ENCA usage */
8040 /* liblzo support */
8043 #define CONFIG_LZO 1
8046 /* libmad support */
8049 /* enable OggVorbis support */
8052 /* enable Tremor as vorbis decoder */
8055 /* enable Speex support */
8058 /* enable musepack support */
8061 /* enable OggTheora support */
8064 /* enable FAAD (AAC) support */
8068 /* enable FAAC (AAC encoder) support */
8071 /* enable LADSPA plugin support */
8074 /* enable network */
8077 /* enable ftp support */
8080 /* enable vstream support */
8083 /* enable winsock2 instead of Unix functions*/
8086 /* define this to use inet_aton() instead of inet_pton() */
8089 /* enables / disables cdparanoia support */
8092 /* enables / disables VIDIX usage */
8096 /* enables / disables new input joystick support */
8099 /* enables / disables QTX codecs */
8102 /* enables / disables osd menu */
8105 /* enables / disables subtitles sorting */
8108 /* XMMS input plugin support */
8110 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
8112 /* enables inet6 support */
8115 /* do we have gethostbyname2? */
8116 $_def_gethostbyname2
8118 /* Extension defines */
8119 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
8120 $_def_3dnowext // only define if you have 3DNOWEXT (AMD Athlon, etc.)
8121 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
8122 $_def_mmxext // only define if you have MMX2 (Athlon/PIII/4/CelII)
8123 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
8124 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
8125 $_def_altivec // only define if you have Altivec (G4)
8127 $_def_altivec_h // enables usage of altivec.h
8130 $_def_mlib // Sun mediaLib, available only on solaris
8131 $_def_vis // only define if you have VIS ( ultrasparc )
8133 /* libmpeg2 uses a different feature test macro for mediaLib */
8135 #define LIBMPEG2_MLIB 1
8139 #define SCREEN_SIZE_X 1
8140 #define SCREEN_SIZE_Y 1
8152 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
8161 $_def_directfb_version
8184 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
8185 #define X11_FULLSCREEN 1
8188 #endif /* MPLAYER_CONFIG_H */
8191 #############################################################################
8193 echo "Creating libvo/config.mak"
8194 _voobj
=`echo $_vosrc | sed -e 's/\.c/\.o/g;s/\.m/\.o/g'`
8195 cat > libvo
/config.mak
<< EOF
8196 include ../config.mak
8197 OPTIONAL_SRCS = $_vosrc
8198 OPTIONAL_OBJS = $_voobj
8201 #############################################################################
8203 echo "Creating libao2/config.mak"
8204 _aoobj
=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
8205 cat > libao
2/config.mak
<< EOF
8206 include ../config.mak
8207 OPTIONAL_SRCS = $_aosrc
8208 OPTIONAL_OBJS = $_aoobj
8211 #############################################################################
8213 echo "Creating libaf/config.mak"
8214 _afobj
=`echo $_afsrc | sed -e 's/\.c/\.o/g'`
8215 cat > libaf
/config.mak
<< EOF
8216 include ../config.mak
8217 OPTIONAL_SRCS = $_afsrc
8218 OPTIONAL_OBJS = $_afobj
8221 #############################################################################
8225 Config files successfully generated by ./configure !
8227 Install prefix: $_prefix
8228 Data directory: $_datadir
8229 Config direct.: $_confdir
8231 Byte order: $_byte_order
8232 Optimizing for: $_optimizing
8235 Messages/GUI: $_language
8238 echo -n " Manual pages: $MAN_LANG"
8239 test "$LANGUAGES" = en
&& echo -n " (no localization selected, use --language=all)"
8244 Enabled optional drivers:
8245 Input: $_inputmodules
8246 Codecs: $_codecmodules
8247 Audio output: $_aomodules
8248 Video output: $_vomodules
8249 Audio filters: $_afmodules
8250 Disabled optional drivers:
8251 Input: $_noinputmodules
8252 Codecs: $_nocodecmodules
8253 Audio output: $_noaomodules
8254 Video output: $_novomodules
8255 Audio filters: $_noafmodules
8257 'config.h' and 'config.mak' contain your configuration options.
8258 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
8259 compile *** DO NOT REPORT BUGS if you tweak these files ***
8261 'make' will now compile MPlayer and 'make install' will install it.
8262 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
8267 if test "$_mtrr" = yes ; then
8268 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
8272 if test "$_sdl" = "outdated" ; then
8274 You have an outdated version of libSDL installed (older than v1.1.7) and SDL
8275 support has therefore been disabled.
8277 Please upgrade to a more recent version (version 1.1.8 and above are known to
8278 work). You may get this library from: http://www.libsdl.org
8280 You need to rerun ./configure and recompile after updating SDL. If you are
8281 only interested in the libSDL audio drivers, then an older version might work.
8283 Use --enable-sdl to force usage of libSDL.
8289 if test "$_win32" = no
; then
8290 if test "$_win32libdir" ; then
8291 echo "Failed to find a Win32 codecs dir at $_win32libdir!"
8293 echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
8296 Create it and copy the DLL files there! You can download the codecs from our
8297 homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
8303 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
8304 operating system ($system_name). You may encounter a few files that cannot
8305 be played due to missing open source video/audio codec support.
8313 Check $TMPLOG if you wonder why an autodetection failed (check whether
8314 the development headers/packages are installed).
8315 Do not report compilation errors if you used any of the --enable-* options
8316 (except --enable-gui and maybe --enable-debug).
8318 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
8322 if test "$_vidix" = no
; then
8324 You've disabled VIDIX. Although it would be better to PORT it instead.
8325 Have a look at the documentation for supported cards!
8330 if test "$_warn_CFLAGS" = yes; then
8333 MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS set by you, but:
8335 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
8337 It is strongly recommended to let MPlayer choose the correct CFLAGS!
8338 To do so, execute 'CFLAGS= ./configure <options>'
8344 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"