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
12 # If the option is named 'opt':
13 # _opt : should have a value in yes/no/auto
14 # _def_opt : '#define ... 1' or '#undef ...' that is: some C code
15 # _ld_opt : ' -L/path/dir -lopt ' that is: some GCC option
16 # _inc_opt : ' -I/path/dir/include '
18 # In this file, a tab is 8 chars and indentation shift is 2 characters
21 # - config files are currently:
22 # config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak
25 #############################################################################
27 # Prevent locale nonsense from breaking basic text processing utils
31 # Prefer these macros to full length text !
32 # These macros only return an error code - NO display is done
35 cat "$TMPC" >> "$TMPLOG"
37 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
39 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" >> "$TMPLOG" 2>&1
42 echo "ldd $TMPO" >> "$TMPLOG"
43 $_ldd "$TMPO" >> "$TMPLOG" 2>&1
48 # Display error message, flushes tempfile, exit
53 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
54 echo "Check \"$TMPLOG\" if you do not understand why it failed."
58 # OS test booleans functions
60 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
62 linux
() { issystem
"Linux" ; return "$?" ; }
63 sunos
() { issystem
"SunOS" ; return "$?" ; }
64 hpux
() { issystem
"HP-UX" ; return "$?" ; }
65 irix
() { issystem
"IRIX" ; return "$?" ; }
66 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
67 freebsd
() { issystem
"FreeBSD" ; return "$?" ; }
68 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
69 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
70 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
71 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
72 qnx
() { issystem
"QNX" ; return "$?" ; }
73 darwin
() { issystem
"Darwin" ; return "$?" ; }
74 gnu
() { issystem
"GNU" ; return "$?" ; }
75 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
76 morphos
() { issystem
"MorphOS" ; return "$?" ; }
77 win32
() { cygwin || mingw32
; return "$?" ; }
78 beos
() { issystem
"BEOS" ; return "$?" ; }
80 # arch test boolean functions
81 # x86/x86pc is used by QNX
84 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
91 x86_64|amd64
) return 0 ;;
110 # not boolean test: implement the posix shell "!" operator for a
112 # usage: not {command}
113 # returns exit status "success" when the execution of "command"
120 # Use this before starting a check
122 echo "============ Checking for $@ ============" >> "$TMPLOG"
123 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
126 # Use this to echo the results of a check
128 if test "$_res_comment" ; then
129 _res_comment
="($_res_comment)"
131 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
132 echo "##########################################" >> "$TMPLOG"
134 echo "$@ $_res_comment"
137 #############################################################################
139 # Check how echo works in this /bin/sh
141 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
142 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
145 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"`
147 for parm
in "$@" ; do
148 if test "$parm" = "--help" ||
test "$parm" = "-help" ||
test "$parm" = "-h" ; then
151 Usage: $0 [OPTIONS]...
154 -h, --help display this help and exit
156 Installation directories:
157 --prefix=DIR use this prefix for installing mplayer [/usr/local]
158 --bindir=DIR use this prefix for installing mplayer binary
160 --datadir=DIR use this prefix for installing machine independent
161 data files (fonts, skins) [PREFIX/share/mplayer]
162 --mandir=DIR use this prefix for installing manpages [PREFIX/man]
163 --confdir=DIR use this prefix for installing configuration files
165 --libdir=DIR use this prefix for object code libraries [PREFIX/lib]
168 --disable-mencoder disable mencoder (a/v encoder) compilation [enable]
169 --enable-gui enable gmplayer compilation (GTK+ GUI) [disable]
170 --enable-old-gtk force using GTK 1.2 for GUI [disable]
171 --enable-largefiles enable support for files > 2 GBytes [disable]
172 --enable-linux-devfs set default devices to devfs ones [disable]
173 --enable-termcap use termcap database for key codes [autodetect]
174 --enable-termios use termios database for key codes [autodetect]
175 --disable-iconv do not use iconv(3) function [autodetect]
176 --disable-setlocale disable setlocale using in mplayer [autodetect]
177 --disable-langinfo do not use langinfo [autodetect]
178 --enable-lirc enable LIRC (remote control) support [autodetect]
179 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
180 --enable-joystick enable joystick support [disable]
181 --disable-vm disable support X video mode extensions [autodetect]
182 --disable-xf86keysym disable support for 'multimedia' keys [autodetect]
183 --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
184 --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
185 --disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
186 --disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
187 --disable-edl disable EDL (edit decision list) support [enable]
188 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
189 --disable-network disable network support (for: http/mms/rtp) [enable]
190 --enable-winsock2 enable winsock2 usage [autodetect]
191 --enable-smb enable Samba (SMB) input support [autodetect]
192 --enable-live enable LIVE555 Streaming Media support [autodetect]
193 --disable-dvdread Disable libdvdread support [autodetect]
194 --disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
195 --disable-cdparanoia Disable cdparanoia support [autodetect]
196 --disable-freetype Disable freetype2 font rendering support [autodetect]
197 --disable-fontconfig Disable fontconfig font lookup support [autodetect]
198 --disable-unrarlib Disable Unique RAR File Library [enabled]
199 --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
200 --disable-sortsub Disable subtitles sorting [enabled]
201 --enable-fribidi Enable using the FriBiDi libs [disabled]
202 --disable-enca Disable using ENCA charset oracle library [autodetect]
203 --disable-macosx Disable Mac OS X specific features [autodetect]
204 --enable-macosx-finder-support Enable Mac OS X Finder invocation parameter parsing [disabled]
205 --enable-macosx-bundle Enable Mac OS X bundle file locations [autodetect]
206 --disable-inet6 Disable IPv6 support [autodetect]
207 --disable-gethostbyname2 gethostbyname() function is not provided by the C
209 --disable-ftp Disable ftp support [enabled]
210 --disable-vstream Disable tivo vstream client support [autodetect]
211 --disable-pthreads Disable Posix threads support [autodetect]
214 --enable-gif enable gif support [autodetect]
215 --enable-png enable png input/output support [autodetect]
216 --enable-jpeg enable jpeg input/output support [autodetect]
217 --enable-liblzo enable external liblzo support [autodetect]
218 --disable-win32 disable Win32 DLL support [autodetect]
219 --disable-dshow disable Win32/DirectShow support [autodetect]
220 --disable-qtx disable Quicktime codecs [autodetect]
221 --disable-xanim disable XAnim DLL support [autodetect]
222 --disable-real disable RealPlayer DLL support [autodetect]
223 --disable-xvid disable XviD codec [autodetect]
224 --disable-x264 disable H.264 encoder [autodetect]
225 --disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
226 --enable-opendivx enable _old_ OpenDivx codec [disable]
227 --disable-libavcodec disable libavcodec [autodetect]
228 --disable-libavformat disable libavformat [autodetect]
229 --enable-libfame enable libfame realtime encoder [autodetect]
230 --disable-internal-tremor do not build internal OggVorbis support [enabled]
231 --enable-tremor-low build with lower accuracy internal tremor [disabled]
232 --enable-external-tremor build with external tremor [disabled]
233 --disable-vorbis disable OggVorbis support entirely [autodetect]
234 --enable-theora build with OggTheora support [autodetect]
235 --disable-internal-matroska disable internal Matroska support [enabled]
236 --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
237 --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
238 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
239 --disable-ladspa disable LADSPA plugin support [autodetect]
240 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
241 --disable-mad disable libmad (MPEG audio) support [autodetect]
242 --disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
243 --disable-twolame disable Twolame (MPEG layer 2 audio) support in mencoder [autodetect]
244 --enable-xmms build with XMMS inputplugin support [disabled]
245 --disable-mp3lib disable builtin mp3lib [enabled]
246 --disable-liba52 disable builtin liba52 [enabled]
247 --enable-libdts enable libdts support [autodetect]
248 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
249 --disable-musepack disable musepack support [autodetect]
250 --disable-amr_nb disable amr narrowband, floating point [autodetect]
251 --disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect]
252 --disable-amr_wb disable amr wideband, floating point [autodetect]
253 --disable-codec=CODEC disable specified codec
254 --enable-codec=CODEC dnable specified codec
257 --disable-vidix disable VIDIX [enable on x86 *nix]
258 --enable-gl build with OpenGL render support [autodetect]
259 --enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
260 --enable-vesa build with VESA support [autodetect]
261 --enable-svga build with SVGAlib support [autodetect]
262 --enable-sdl build with SDL render support [autodetect]
263 --enable-aa build with AAlib render support [autodetect]
264 --enable-caca build with CACA render support [autodetect]
265 --enable-ggi build with GGI render support [autodetect]
266 --enable-ggiwmh build with GGI libggiwmh extension [autodetect]
267 --enable-directx build with DirectX support [autodetect]
268 --enable-dxr2 build with DXR2 render support [autodetect]
269 --enable-dxr3 build with DXR3/H+ render support [autodetect]
270 --enable-dvb build with support for output via DVB-Card [autodetect]
271 --enable-dvbhead build with DVB support (HEAD version) [autodetect]
272 --enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
273 (check for /dev/mga_vid) [autodetect]
274 --enable-xmga build with mga_vid X Window support
275 (check for X & /dev/mga_vid) [autodetect]
276 --enable-xv build with Xv render support for X 4.x [autodetect]
277 --enable-xvmc build with XvMC acceleration for X 4.x [disable]
278 --enable-vm build with XF86VidMode support for X11 [autodetect]
279 --enable-xinerama build with Xinerama support for X11 [autodetect]
280 --enable-x11 build with X11 render support [autodetect]
281 --enable-fbdev build with FBDev render support [autodetect]
282 --enable-mlib build with MLIB support (Solaris only) [autodetect]
283 --enable-3dfx build with obsolete /dev/3dfx support [disable]
284 --enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
285 --enable-directfb build with DirectFB support [autodetect]
286 --enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
287 --enable-bl build with Blinkenlights support [disable]
288 --enable-tdfxvid build with tdfx_vid support [disable]
289 --disable-tga disable targa output support [enable]
290 --disable-pnm disable pnm output support [enable]
291 --disable-md5sum disable md5sum output support [enable]
294 --disable-alsa disable ALSA sound support [autodetect]
295 --disable-ossaudio disable OSS sound support [autodetect]
296 --disable-arts disable aRts sound support [autodetect]
297 --disable-esd disable esd sound support [autodetect]
298 --disable-polyp disable Polypaudio sound support [autodetect]
299 --disable-jack disable JACK sound support [autodetect]
300 --disable-nas disable NAS sound support [autodetect]
301 --disable-sgiaudio disable SGI sound support [autodetect]
302 --disable-sunaudio disable Sun sound support [autodetect]
303 --disable-win32waveout disable Windows waveout sound support [autodetect]
304 --disable-select disable using select() on audio device [enable]
306 Miscellaneous options:
307 --enable-runtime-cpudetection Enable runtime CPU detection [disable]
308 --cc=COMPILER use this C compiler to build MPlayer [gcc]
309 --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
310 --as=ASSEMBLER use this assembler to build MPlayer [as]
311 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
312 --enable-static build a statically linked binary. Set further linking
313 options with --enable-static="-lslang -lncurses"
314 --charset convert the help messages to this charset
315 --language=list a white space or comma separated list of languages
316 for translated man pages, the first language is the
317 primary and therefore used for translated messages
318 and GUI (also the environment variable \$LINGUAS is
320 (Available: $LANGUAGES all)
321 --with-install=PATH use a custom install program (useful if your OS uses
322 a GNU-incompatible install utility by default and
323 you want to use GNU version)
324 --install-path=PATH the path to a custom install program
325 this option is obsolete and will be removed soon,
326 use --with-install instead.
329 --enable-mmx build with MMX support [autodetect]
330 --enable-mmx2 build with MMX2 support (PIII, Athlon) [autodetect]
331 --enable-3dnow build with 3DNow! support [autodetect]
332 --enable-3dnowex build with extended 3DNow! support [autodetect]
333 --enable-sse build with SSE support [autodetect]
334 --enable-sse2 build with SSE2 support [autodetect]
335 --enable-shm build with shm support [autodetect]
336 --enable-altivec build with Altivec support (PowerPC) [autodetect]
337 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
338 --enable-big-endian Force byte order to big-endian [autodetect]
339 --enable-debug[=1-3] compile debugging information into mplayer [disable]
340 --enable-profile compile profiling information into mplayer [disable]
341 --disable-sighandler disable sighandler for crashes [enable]
342 --enable-crash-debug enable automatic gdb attach on crash [disable]
343 --enable-i18n _experimental_ gnu gettext() support [autodetect]
344 --enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
346 Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
347 --disable-gcc-checking disable gcc version checking [enable]
349 Use these options if autodetection fails (Options marked with (*) accept
350 multiple paths separated by ':'):
351 --with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
352 --with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
353 --with-x11incdir=DIR X headers in DIR (*)
354 --with-x11libdir=DIR X library files in DIR (*)
355 --with-dxr2incdir=DIR DXR2 headers in DIR (*)
356 --with-dvbincdir=DIR DVB headers in DIR (*)
357 --with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
358 --with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
359 --with-codecsdir=DIR Binary codec files in DIR
360 --with-win32libdir=DIR W*ndows DLL files in DIR
361 --with-xanimlibdir=DIR XAnim DLL files in DIR
362 --with-reallibdir=DIR RealPlayer DLL files in DIR
363 --with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
364 --with-xvidincdir=DIR XviD header in DIR (*)
365 --with-x264libdir=DIR libx264 in DIR
366 --with-x264incdir=DIR x264 header in DIR
367 --with-dtslibdir=DIR libdts library in DIR (*)
368 --with-dtsincdir=DIR libdts header in DIR (*)
369 --with-livelibdir=DIR LIVE555 Streaming Media libraries in DIR
370 --with-toolamedir=DIR path to Toolame library and include file
371 --with-xmmsplugindir=DIR XMMS plugins in DIR
372 --with-xmmslibdir=DIR libxmms.so.1 in DIR
373 --with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
374 --with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
375 --with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
376 --with-termcaplib=NAME name of library with termcap functionality
377 name should be given without leading "lib"
378 checks for "termcap" and "tinfo"
380 --with-freetype-config=PATH path to freetype-config
381 (e.g. /opt/bin/freetype-config)
382 --with-fribidi-config=PATH path to fribidi-config
383 (e.g. /opt/bin/fribidi-config)
384 --with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
385 --with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
386 --with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
388 This configure script is NOT autoconf-based, even though its output is similar.
389 It will try to autodetect all configuration options. If you --enable an option
390 it will be forcefully turned on, skipping autodetection. This can break
391 compilation, so you need to know what you are doing.
395 done # for parm in ...
398 # 1st pass checking for vital options
402 test "$CC" && _cc
="$CC"
404 _runtime_cpudetection
=no
408 _target
=`echo $ac_option | cut -d '=' -f 2`
411 _cc
=`echo $ac_option | cut -d '=' -f 2`
414 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
417 _as
=`echo $ac_option | cut -d '=' -f 2`
419 --enable-gcc-checking)
422 --disable-gcc-checking)
432 _ld_static
="-static `echo $ac_option | cut -d '=' -f 2`"
434 --with-extraincdir=*)
435 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
437 --with-extralibdir=*)
438 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
440 --enable-runtime-cpudetection)
441 _runtime_cpudetection
=yes
443 --disable-runtime-cpudetection)
444 _runtime_cpudetection
=no
447 _install
=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
450 _install
=`echo $ac_option | cut -d '=' -f 2 `
455 # Determine our OS name and CPU architecture
456 if test -z "$_target" ; then
458 system_name
=`uname -s 2>&1`
459 case "$system_name" in
460 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS
)
468 [cC
][yY
][gG
][wW
][iI
][nN
]*)
478 system_name
="$system_name-UNKNOWN"
483 # host's CPU/instruction set
484 host_arch
=`uname -p 2>&1`
486 i386|sparc|ppc|alpha|arm|mips|vax
)
488 powerpc
) # Darwin returns 'powerpc'
491 *) # uname -p on Linux returns 'unknown' for the processor type,
492 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
494 # Maybe uname -m (machine hardware name) returns something we
497 # x86/x86pc is used by QNX
498 case "`uname -m 2>&1`" in
499 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
;;
500 ia64
) host_arch
=ia64
;;
502 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
503 -z "`echo $CFLAGS | grep -- -m32`" ]; then
509 macppc|ppc|ppc64
) host_arch
=ppc
;;
510 alpha
) host_arch
=alpha
;;
511 sparc
) host_arch
=sparc
;;
512 sparc64
) host_arch
=sparc64
;;
513 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
514 arm
*) host_arch
=arm
;;
515 s390
) host_arch
=s390
;;
516 s390x
) host_arch
=s390x
;;
517 mips
) host_arch
=mips
;;
518 vax
) host_arch
=vax
;;
519 *) host_arch
=UNKNOWN
;;
524 system_name
=`echo $_target | cut -d '-' -f 2`
525 case "`echo $system_name | tr A-Z a-z`" in
526 linux
) system_name
=Linux
;;
527 freebsd
) system_name
=FreeBSD
;;
528 netbsd
) system_name
=NetBSD
;;
529 bsd
/os
) system_name
=BSD
/OS
;;
530 openbsd
) system_name
=OpenBSD
;;
531 sunos
) system_name
=SunOS
;;
532 qnx
) system_name
=QNX
;;
533 morphos
) system_name
=MorphOS
;;
534 mingw32msvc
) system_name
=MINGW32
;;
536 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
537 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
540 echo "Detected operating system: $system_name"
541 echo "Detected host architecture: $host_arch"
543 # LGB: temporary files
544 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
548 TMPLOG
="configure.log"
550 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
551 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
552 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
553 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
557 # FIXME: A lot of stuff is installed under /usr/local
558 # NK: But we should never use this stuff implicitly since we call compiler
559 # from /usr we should be sure that there no effects from other compilers
560 # (libraries) which might be installed into /usr/local. Let users use this
561 # stuff explicitly as command line argument. In other words: It would be
562 # resonable to have only /usr/include or only /usr/local/include.
565 _ld_extra
="$_ld_extra -L/usr/local/lib"
566 _inc_extra
="$_inc_extra -I/usr/local/include"
570 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
571 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
581 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
582 # if used as 'head -1' instead of 'head -n 1', but older versions don't
584 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
585 _head
() { head -$1 2>/dev
/null
; }
587 _head
() { head -n $1 2>/dev
/null
; }
589 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
590 _tail
() { tail -$1 2>/dev
/null
; }
592 _tail
() { tail -n $1 2>/dev
/null
; }
595 # Checking CC version...
596 if test "$_skip_cc_check" != yes ; then
597 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
598 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
599 echocheck
"$_cc version"
601 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
602 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
603 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
604 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
605 # TODO verify older icc/ecc compatibility
608 cc_version
="v. ?.??, bad"
612 cc_version
="$cc_version, ok"
616 cc_version
="$cc_version, bad"
620 echores
"$cc_version"
622 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
623 echocheck
"$_cc version"
625 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
626 cc_version
=`$_cc -dumpversion 2>&1`
627 if test "$?" -gt 0; then
628 cc_version
="not found"
632 cc_version
="v. ?.??, bad"
635 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
636 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
637 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
638 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
639 cc_version
="$cc_version, ok"
646 cc_version
="$cc_version, bad"
650 echores
"$cc_version"
651 test "$cc_verc_fail" = "no" && break
654 if test "$cc_verc_fail" = yes ; then
657 *** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
659 You are not using a supported compiler. We do not have the time to make sure
660 everything works with compilers other than the ones we use. Use either the
661 same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
662 unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
664 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
665 mplayer and lame (which is used for mencoder). If you get compile errors,
666 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
667 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
670 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
672 *** For details please read DOCS/HTML/en/users-vs-dev.html ***
675 die
"Bad gcc version"
680 ******************************************************************************
682 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
683 Ok. You know. Do it. Did you read DOCS/HTML/en/users-vs-dev.html???
685 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
686 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
687 Lame which is used by mencoder produces weird errors, too.
689 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
690 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
692 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
694 ******************************************************************************
702 test "$_host_cc" || _host_cc
=$_cc
708 # now that we know what compiler should be used for compilation, try to find
709 # out which assembler is used by the $_cc compiler
710 if test "$_as" = auto
; then
711 _as
=`$_cc -print-prog-name=as`
712 test -z "$_as" && _as
=as
715 # XXX: this should be ok..
717 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
718 # FIXME: Remove the cygwin check once AMD CPUs are supported
719 if test -r /proc
/cpuinfo
&& not cygwin
; then
720 # Linux with /proc mounted, extract CPU information from it
721 _cpuinfo
="cat /proc/cpuinfo"
722 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86
; then
723 # FreeBSD with Linux emulation /proc mounted,
724 # extract CPU information from it
725 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
727 # use hostinfo on Darwin
730 # all other OSes try to extract CPU information from a small helper
731 # program TOOLS/cpuinfo instead
732 $_cc -o TOOLS
/cpuinfo TOOLS
/cpuinfo.c
733 _cpuinfo
="TOOLS/cpuinfo"
738 pparam
=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | _head 1`
739 if test -z "$pparam" ; then
740 pparam
=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | _head 1`
751 for i
in $pparam ; do
754 3dnowext
) _3dnow
=yes _3dnowex
=yes ;;
757 mtrr|k6_mtrr|cyrix_arr
) _mtrr
=yes ;;
758 xmm|sse|kni
) _sse
=yes _mmx2
=yes ;;
765 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
766 _def_arch
="#define ARCH_X86 1"
767 _target_arch
="TARGET_ARCH_X86 = yes"
769 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
770 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
771 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
772 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
773 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
777 echocheck
"CPU vendor"
778 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
786 3) proc
=i386 iproc
=386 ;;
787 4) proc
=i486 iproc
=486 ;;
788 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
789 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
790 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
792 elif test "$pmodel" -ge 8; then
794 elif test "$pmodel" -ge 6; then
802 if test "$pmodel" -ge 7; then
804 elif test "$pmodel" -ge 6; then
805 # only Athlon XP supports ssem MP, Duron etc not
806 # but most of them are CPUID 666, so check if sse detected
807 # btw. there is also athlon-mp opt, but we need extended
808 # CPUID to detect if CPU is SMP capable -> athlon-mp ::atmos
809 if test "$_sse" = yes && test "$pstepping" -ge 2; then
814 elif test "$pmodel" -ge 4; then
817 proc
=athlon
# TODO: should the Duron Spitfire be considered a Thunderbird instead?
821 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
822 # caught and remedied in the optimization tests below.
826 *) proc
=athlon-xp iproc
=686 ;;
831 3) proc
=i386 iproc
=386 ;;
832 4) proc
=i486 iproc
=486 ;;
834 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
835 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
841 if test "$pmodel" -ge 7; then
843 elif test "$pmodel" -ge 3; then
849 15) proc
=pentium4 iproc
=686 ;;
850 *) proc
=pentium4 iproc
=686 ;;
856 if test "$pmodel" -ge 8; then
858 elif test "$pmodel" -ge 4; then
865 # VIA C3 has SSE, but doesn't have MMX2
866 # workaround for SSE => MMX2 implication above
868 if test "$pmodel" -ge 9; then
874 *) proc
=i686 iproc
=i686
;;
879 3) proc
=i386 iproc
=386 ;;
880 4) proc
=i486 iproc
=486 ;;
881 *) proc
=i586 iproc
=586 ;;
885 proc
=i586 iproc
=586 ;;
888 # check that gcc supports our CPU, if not, fall back to earlier ones
889 # LGB: check -mcpu and -march swithing step by step with enabling
890 # to fall back till 386.
892 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
894 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
900 echocheck
"GCC & CPU optimization abilities"
902 int main(void) { return 0; }
904 if test "$_runtime_cpudetection" = no
; then
905 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
906 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
908 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ||
test "$proc" = "athlon-tbird"; then
909 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
911 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
912 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
914 if test "$proc" = "k6"; then
915 if not cc_check
-march=$proc $cpuopt=$proc; then
916 if cc_check
-march=i586
$cpuopt=i686
; then
923 if test "$proc" = "pentium4" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon" ||
test "$proc" = "c3-2"; then
924 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
926 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
927 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
929 if test "$proc" = "i586" ||
test "$proc" = "c3" ; then
930 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
932 if test "$proc" = "i486" ; then
933 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
935 if test "$proc" = "i386" ; then
936 cc_check
-march=$proc $cpuopt=$proc || proc
=error
938 if test "$proc" = "error" ; then
939 echores
"Your $_cc does not even support \"i386\" for '-march' and '$cpuopt'."
943 elif test "$proc" = "i586-i686"; then
948 _march
="-march=$proc"
949 _mcpu
="$cpuopt=$proc"
953 # i686 is probably the most common CPU - optimize for it
955 # at least i486 required, for bswap instruction
957 cc_check
$_mcpu || _mcpu
=""
958 cc_check
$_march $_mcpu || _march
=""
961 ## Gabucino : --target takes effect here (hopefully...) by overwriting
962 ## autodetected mcpu/march parameters
963 if test "$_target" ; then
964 # TODO: it may be a good idea to check GCC and fall back in all cases
965 if test "$host_arch" = "i586-i686"; then
969 _march
="-march=$host_arch"
970 _mcpu
="$cpuopt=$host_arch"
978 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
979 i686|athlon
*|pentium
*) iproc
=686 ;;
988 _def_arch
='#define ARCH_IA64 1'
989 _target_arch
='TARGET_ARCH_IA64 = yes'
998 _def_arch
='#define ARCH_X86_64 1'
999 _target_arch
='TARGET_ARCH_X86_64 = yes'
1002 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1003 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1008 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1009 # caught and remedied in the optimization tests below.
1012 echocheck
"GCC & CPU optimization abilities"
1014 int main(void) { return 0; }
1016 # This is a stripped-down version of the i386 fallback.
1017 if test "$_runtime_cpudetection" = no
; then
1018 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
1019 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1021 # This will fail if gcc version < 3.3, which is ok because earlier
1022 # versions don't really support 64-bit on amd64.
1023 # Is this a valid assumption? -Corey
1024 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ; then
1025 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1027 _march
="-march=$proc"
1028 _mcpu
="$cpuopt=$proc"
1029 if test "$proc" = "error" ; then
1030 echores
"Your $_cc does not even support \"athlon-xp\" for '-march' and '$cpuopt'."
1047 _def_arch
='#define ARCH_SPARC 1'
1048 _target_arch
='TARGET_ARCH_SPARC = yes'
1051 echocheck
"CPU type"
1053 case "`echo $karch`" in
1058 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1071 _def_arch
='#define ARCH_SPARC 1'
1072 _target_arch
='TARGET_ARCH_SPARC = yes'
1074 _def_vis
='#define HAVE_VIS = yes'
1082 arm|armv4l|armv5tel
)
1083 _def_arch
='#define ARCH_ARMV4L 1'
1084 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1093 _def_arch
='#define ARCH_POWERPC 1'
1094 _def_dcbzl
='#define NO_DCBZL 1'
1095 _target_arch
='TARGET_ARCH_POWERPC = yes'
1103 echocheck
"CPU type"
1104 if linux
&& test -n "$_cpuinfo"; then
1105 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1106 if test -n "`$_cpuinfo | grep altivec`"; then
1111 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1112 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
1114 elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
1118 # only gcc 3.4 works reliably with altivec code under netbsd
1121 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1124 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1130 if test "$_altivec" = yes; then
1131 echores
"$proc altivec"
1136 echocheck
"GCC & CPU optimization abilities"
1138 if test -n "$proc"; then
1140 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1141 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1142 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1143 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1144 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1145 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1148 # gcc 3.1(.1) and up supports 7400 and 7450
1149 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
1151 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1152 7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1156 # gcc 3.2 and up supports 970
1157 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1159 970*) _march
='-mcpu=970' _mcpu
='-mtune=970'
1160 _def_dcbzl
='#undef NO_DCBZL' ;;
1166 if test -n "$_mcpu"; then
1167 _optimizing
=`echo $_mcpu | cut -c 8-`
1168 echores
"$_optimizing"
1176 _def_arch
='#define ARCH_ALPHA 1'
1177 _target_arch
='TARGET_ARCH_ALPHA = yes'
1181 echocheck
"CPU type"
1184 unsigned long ver, mask;
1185 asm ("implver %0" : "=r" (ver));
1186 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1187 printf("%ld-%x\n", ver, ~mask);
1191 $_cc -o "$TMPO" "$TMPC"
1194 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
1195 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
1196 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
1197 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
1198 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
1199 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
1200 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
1204 echocheck
"GCC & CPU optimization abilities"
1205 if test "$proc" = "ev68" ; then
1206 cc_check
-mcpu=$proc || proc
=ev67
1208 if test "$proc" = "ev67" ; then
1209 cc_check
-mcpu=$proc || proc
=ev6
1216 echocheck
"MVI instruction support in GCC"
1217 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1218 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
1221 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
1222 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1227 _def_arch
='#define ARCH_SGI_MIPS 1'
1228 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
1236 echocheck
"CPU type"
1237 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
1238 case "`echo $proc`" in
1239 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
1240 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
1241 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
1242 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
1243 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
1244 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
1252 _def_arch
='#define ARCH_PA_RISC 1'
1253 _target_arch
='TARGET_ARCH_PA_RISC = yes'
1262 _def_arch
='#define ARCH_S390 1'
1263 _target_arch
='TARGET_ARCH_S390 = yes'
1272 _def_arch
='#define ARCH_S390X 1'
1273 _target_arch
='TARGET_ARCH_S390X = yes'
1282 _def_arch
='#define ARCH_VAX 1'
1283 _target_arch
='TARGET_ARCH_VAX = yes'
1292 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
1293 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
1294 die
"unsupported architecture $host_arch"
1298 if test "$_runtime_cpudetection" = yes ; then
1313 if x86
&& test "$_runtime_cpudetection" = no
; then
1315 if test "$1" = yes ; then
1316 echocheck
"kernel support of $2"
1319 void catch() { exit(1); }
1321 signal(SIGILL, catch);
1322 __asm__ __volatile__ ("$3":::"memory");return(0);
1326 if ( cc_check
&& $TMPO ) > /dev
/null
2>&1 ; then
1328 _optimizing
="$_optimizing $2"
1332 echo "It seems that your kernel does not correctly support $2."
1333 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1340 extcheck
$_mmx "mmx" "emms" || _mmx
=no
1341 extcheck
$_mmx2 "mmx2" "sfence" || _mmx2
=no
1342 extcheck
$_3dnow "3dnow" "femms" || _3dnow
=no
1343 extcheck
$_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex
=no
1344 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _sse
=no _gcc3_ext
="$_gcc3_ext -mno-sse"
1345 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2
=no _gcc3_ext
="$_gcc3_ext -mno-sse2"
1346 echocheck
"mtrr support"
1349 if test "$_mtrr" = yes ; then
1350 _optimizing
="$_optimizing mtrr"
1353 if test "$_gcc3_ext" != ""; then
1354 # if we had to disable sse/sse2 because the active kernel does not
1355 # support this instruction set extension, we also have to tell
1356 # gcc3 to not generate sse/sse2 instructions for normal C code
1358 int main(void) { return 0; }
1360 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1365 echocheck
"assembler support of -pipe option"
1367 int main(void) { return 0; }
1369 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
1371 _prefix
="/usr/local"
1372 _xvmclib
="XvMCNVIDIA"
1374 # GOTCHA: the variables below defines the default behavior for autodetection
1375 # and have - unless stated otherwise - at least 2 states : yes no
1376 # If autodetection is available then the third state is: auto
1381 _libavcodecs
=`grep 'register_avcodec(&[a-z]' libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
1388 _dga
=auto
# 1 2 no auto
1390 _xvmc
=no
#auto when complete
1424 _tremor_internal
=yes
1432 _matroska_internal
=yes
1439 # dvdnav disabled, it does not work
1504 _macosx_finder_support
=no
1507 _freetypeconfig
='freetype-config'
1509 _fribidiconfig
='fribidi-config'
1512 _gethostbyname2
=auto
1518 case "$ac_option" in
1524 --enable-gcc-checking) ;;
1525 --disable-gcc-checking) ;;
1526 --enable-static*) ;;
1527 --disable-static*) ;;
1528 --with-extraincdir=*) ;;
1529 --with-extralibdir=*) ;;
1530 --enable-runtime-cpudetection) ;;
1531 --disable-runtime-cpudetection) ;;
1532 --install-path=*) ;;
1533 --with-install=*) ;;
1536 --enable-mencoder) _mencoder
=yes ;;
1537 --disable-mencoder) _mencoder
=no
;;
1538 --enable-i18n) _i18n
=yes ;;
1539 --disable-i18n) _i18n
=no
;;
1540 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
1541 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
1542 --enable-x11) _x11
=yes ;;
1543 --disable-x11) _x11
=no
;;
1544 --enable-xv) _xv
=yes ;;
1545 --disable-xv) _xv
=no
;;
1546 --enable-xvmc) _xvmc
=yes ;;
1547 --disable-xvmc) _xvmc
=no
;;
1548 --enable-sdl) _sdl
=yes ;;
1549 --disable-sdl) _sdl
=no
;;
1550 --enable-directx) _directx
=yes ;;
1551 --disable-directx) _directx
=no
;;
1552 --enable-win32waveout) _win32waveout
=yes ;;
1553 --disable-win32waveout) _win32waveout
=no
;;
1554 --enable-nas) _nas
=yes ;;
1555 --disable-nas) _nas
=no
;;
1556 --enable-png) _png
=yes ;;
1557 --disable-png) _png
=no
;;
1558 --enable-jpeg) _jpg
=yes ;;
1559 --disable-jpeg) _jpg
=no
;;
1560 --enable-pnm) _pnm
=yes ;;
1561 --disable-pnm) _pnm
=no
;;
1562 --enable-md5sum) _md5sum
=yes ;;
1563 --disable-md5sum) _md5sum
=no
;;
1564 --enable-gif) _gif
=yes ;;
1565 --disable-gif) _gif
=no
;;
1566 --enable-gl) _gl
=yes ;;
1567 --disable-gl) _gl
=no
;;
1568 --enable-ggi) _ggi
=yes ;;
1569 --disable-ggi) _ggi
=no
;;
1570 --enable-ggiwmh) _ggiwmh
=yes ;;
1571 --disable-ggiwmh) _ggiwmh
=no
;;
1572 --enable-aa) _aa
=yes ;;
1573 --disable-aa) _aa
=no
;;
1574 --enable-caca) _caca
=yes ;;
1575 --disable-caca) _caca
=no
;;
1576 --enable-svga) _svga
=yes ;;
1577 --disable-svga) _svga
=no
;;
1578 --enable-vesa) _vesa
=yes ;;
1579 --disable-vesa) _vesa
=no
;;
1580 --enable-fbdev) _fbdev
=yes ;;
1581 --disable-fbdev) _fbdev
=no
;;
1582 --enable-dvb) _dvb
=yes ;;
1583 --disable-dvb) _dvb
=no
;;
1584 --enable-dvbhead) _dvbhead
=yes ;;
1585 --disable-dvbhead) _dvbhead
=no
;;
1586 --enable-dxr2) _dxr2
=yes ;;
1587 --disable-dxr2) _dxr2
=no
;;
1588 --enable-dxr3) _dxr3
=yes ;;
1589 --disable-dxr3) _dxr3
=no
;;
1590 --enable-iconv) _iconv
=yes ;;
1591 --disable-iconv) _iconv
=no
;;
1592 --enable-langinfo) _langinfo
=yes ;;
1593 --disable-langinfo) _langinfo
=no
;;
1594 --enable-rtc) _rtc
=yes ;;
1595 --disable-rtc) _rtc
=no
;;
1596 --enable-mp1e) _mp1e
=yes ;;
1597 --disable-mp1e) _mp1e
=no
;;
1598 --enable-libdv) _libdv
=yes ;;
1599 --disable-libdv) _libdv
=no
;;
1600 --enable-ossaudio) _ossaudio
=yes ;;
1601 --disable-ossaudio) _ossaudio
=no
;;
1602 --enable-arts) _arts
=yes ;;
1603 --disable-arts) _arts
=no
;;
1604 --enable-esd) _esd
=yes ;;
1605 --disable-esd) _esd
=no
;;
1606 --enable-polyp) _polyp
=yes ;;
1607 --disable-polyp) _polyp
=no
;;
1608 --enable-jack) _jack
=yes ;;
1609 --disable-jack) _jack
=no
;;
1610 --enable-mad) _mad
=yes ;;
1611 --disable-mad) _mad
=no
;;
1612 --disable-toolame) _toolame
=no
;;
1613 --disable-twolame) _twolame
=no
;;
1614 --enable-liblzo) _liblzo
=yes ;;
1615 --disable-liblzo) _liblzo
=no
;;
1616 --enable-vorbis) _vorbis
=yes ;;
1617 --disable-vorbis) _vorbis
=no
;;
1618 --enable-internal-tremor) _tremor_internal
=yes ;;
1619 --disable-internal-tremor) _tremor_internal
=no
;;
1620 --enable-tremor-low) _tremor_low
=yes ;;
1621 --disable-tremor-low) _tremor_low
=no
;;
1622 --enable-external-tremor) _tremor
=yes ;;
1623 --disable-external-tremor) _tremor
=no
;;
1624 --enable-theora) _theora
=yes ;;
1625 --disable-theora) _theora
=no
;;
1626 --enable-mp3lib) _mp3lib
=yes ;;
1627 --disable-mp3lib) _mp3lib
=no
;;
1628 --enable-liba52) _liba52
=yes ;;
1629 --disable-liba52) _liba52
=no
;;
1630 --enable-libdts) _libdts
=yes ;;
1631 --disable-libdts) _libdts
=no
;;
1632 --enable-libmpeg2) _libmpeg2
=yes ;;
1633 --disable-libmpeg2) _libmpeg2
=no
;;
1634 --enable-musepack) _musepack
=yes ;;
1635 --disable-musepack) _musepack
=no
;;
1636 --enable-internal-matroska) _matroska_internal
=yes ;;
1637 --disable-internal-matroska) _matroska_internal
=no
;;
1638 --enable-internal-faad) _faad_internal
=yes _faad_external
=no
;;
1639 --disable-internal-faad) _faad_internal
=no
;;
1640 --enable-external-faad) _faad_external
=yes _faad_internal
=no
;;
1641 --disable-external-faad) _faad_external
=no
;;
1642 --enable-faac) _faac
=yes ;;
1643 --disable-faac) _faac
=no
;;
1644 --enable-ladspa) _ladspa
=yes ;;
1645 --disable-ladspa) _ladspa
=no
;;
1646 --enable-xmms) _xmms
=yes ;;
1647 --disable-xmms) _xmms
=no
;;
1648 --enable-dvdread) _dvdread
=yes ;;
1649 --disable-dvdread) _dvdread
=no
;;
1650 --enable-mpdvdkit) _dvdkit
=yes ;;
1651 --disable-mpdvdkit) _dvdkit
=no
;;
1652 # dvdnav disabled, it does not work
1653 # --enable-dvdnav) _dvdnav=yes ;;
1654 # --disable-dvdnav) _dvdnav=no ;;
1655 --enable-xanim) _xanim
=yes ;;
1656 --disable-xanim) _xanim
=no
;;
1657 --enable-real) _real
=yes ;;
1658 --disable-real) _real
=no
;;
1659 --enable-live) _live
=yes ;;
1660 --disable-live) _live
=no
;;
1661 --enable-xinerama) _xinerama
=yes ;;
1662 --disable-xinerama) _xinerama
=no
;;
1663 --enable-mga) _mga
=yes ;;
1664 --disable-mga) _mga
=no
;;
1665 --enable-xmga) _xmga
=yes ;;
1666 --disable-xmga) _xmga
=no
;;
1667 --enable-vm) _vm
=yes ;;
1668 --disable-vm) _vm
=no
;;
1669 --enable-xf86keysym) _xf86keysym
=yes ;;
1670 --disable-xf86keysym) _xf86keysym
=no
;;
1671 --enable-mlib) _mlib
=yes ;;
1672 --disable-mlib) _mlib
=no
;;
1673 --enable-sunaudio) _sunaudio
=yes ;;
1674 --disable-sunaudio) _sunaudio
=no
;;
1675 --enable-sgiaudio) _sgiaudio
=yes ;;
1676 --disable-sgiaudio) _sgiaudio
=no
;;
1677 --enable-alsa) _alsa
=yes ;;
1678 --disable-alsa) _alsa
=no
;;
1679 --enable-tv) _tv
=yes ;;
1680 --disable-tv) _tv
=no
;;
1681 --enable-edl) _edl
=yes ;;
1682 --disable-edl) _edl
=no
;;
1683 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1684 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1685 --enable-tv-v4l) _tv_v4l
=yes ;;
1686 --disable-tv-v4l) _tv_v4l
=no
;;
1687 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1688 --disable-tv-v4l2) _tv_v4l2
=no
;;
1689 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1690 --disable-fastmemcpy) _fastmemcpy
=no
;;
1691 --enable-network) _network
=yes ;;
1692 --disable-network) _network
=no
;;
1693 --enable-winsock2) _winsock2
=yes ;;
1694 --disable-winsock2) _winsock2
=no
;;
1695 --enable-smb) _smbsupport
=yes ;;
1696 --disable-smb) _smbsupport
=no
;;
1697 --enable-vidix) _vidix
=yes ;;
1698 --disable-vidix) _vidix
=no
;;
1699 --enable-joystick) _joystick
=yes ;;
1700 --disable-joystick) _joystick
=no
;;
1701 --enable-xvid) _xvid
=yes ;;
1702 --disable-xvid) _xvid
=no
;;
1703 --enable-x264) _x264
=yes ;;
1704 --disable-x264) _x264
=no
;;
1705 --enable-divx4linux) _divx4linux
=yes ;;
1706 --disable-divx4linux) _divx4linux
=no
;;
1707 --enable-opendivx) _opendivx
=yes ;;
1708 --disable-opendivx) _opendivx
=no
;;
1709 --enable-libavcodec) _libavcodec
=yes ;;
1710 --disable-libavcodec) _libavcodec
=no
;;
1711 --enable-amr_nb) _amr_nb
=yes ;;
1712 --disable-amr_nb) _amr_nb
=no
;;
1713 --enable-amr_nb-fixed) _amr_nb_fixed
=yes ;;
1714 --disable-amr_nb-fixed) _amr_nb_fixed
=no
;;
1715 --enable-amr_wb) _amr_wb
=yes ;;
1716 --disable-amr_wb) _amr_wb
=no
;;
1717 --enable-codec=*) _libavcodecs
="$_libavcodecs `echo $ac_option | cut -d '=' -f 2`" ;;
1718 --disable-codec=*) _libavcodecs
=`echo $_libavcodecs | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1719 --enable-libavformat) _libavformat
=yes;;
1720 --disable-libavformat) _libavformat
=no
;;
1721 --enable-libfame) _fame
=yes ;;
1722 --disable-libfame) _fame
=no
;;
1723 --enable-lirc) _lirc
=yes ;;
1724 --disable-lirc) _lirc
=no
;;
1725 --enable-lircc) _lircc
=yes ;;
1726 --disable-lircc) _lircc
=no
;;
1727 --enable-gui) _gui
=yes ;;
1728 --disable-gui) _gui
=no
;;
1729 --enable-old-gtk) _gtk1
=yes ;;
1730 --enable-termcap) _termcap
=yes ;;
1731 --disable-termcap) _termcap
=no
;;
1732 --enable-termios) _termios
=yes ;;
1733 --disable-termios) _termios
=no
;;
1734 --enable-3dfx) _3dfx
=yes ;;
1735 --disable-3dfx) _3dfx
=no
;;
1736 --enable-tdfxfb) _tdfxfb
=yes ;;
1737 --disable-tdfxvid) _tdfxvid
=no
;;
1738 --enable-tdfxvid) _tdfxvid
=yes ;;
1739 --disable-tga) _tga
=no
;;
1740 --enable-tga) _tga
=yes ;;
1741 --disable-tdfxfb) _tdfxfb
=no
;;
1742 --enable-directfb) _directfb
=yes ;;
1743 --disable-directfb) _directfb
=no
;;
1744 --enable-zr) _zr
=yes ;;
1745 --disable-zr) _zr
=no
;;
1746 --enable-bl) _bl
=yes ;;
1747 --disable-bl) _bl
=no
;;
1748 --enable-mtrr) _mtrr
=yes ;;
1749 --disable-mtrr) _mtrr
=no
;;
1750 --enable-largefiles) _largefiles
=yes ;;
1751 --disable-largefiles) _largefiles
=no
;;
1752 --enable-shm) _shm
=yes ;;
1753 --disable-shm) _shm
=no
;;
1754 --enable-select) _select
=yes ;;
1755 --disable-select) _select
=no
;;
1756 --enable-linux-devfs) _linux_devfs
=yes ;;
1757 --disable-linux-devfs) _linux_devfs
=no
;;
1758 --enable-cdparanoia) _cdparanoia
=yes ;;
1759 --disable-cdparanoia) _cdparanoia
=no
;;
1760 --enable-big-endian) _big_endian
=yes ;;
1761 --disable-big-endian) _big_endian
=no
;;
1762 --enable-freetype) _freetype
=yes ;;
1763 --disable-freetype) _freetype
=no
;;
1764 --enable-fontconfig) _fontconfig
=yes ;;
1765 --disable-fontconfig) _fontconfig
=no
;;
1766 --enable-unrarlib) _unrarlib
=yes ;;
1767 --disable-unrarlib) _unrarlib
=no
;;
1768 --enable-ftp) _ftp
=yes ;;
1769 --disable-ftp) _ftp
=no
;;
1770 --enable-vstream) _vstream
=yes ;;
1771 --disable-vstream) _vstream
=no
;;
1772 --enable-pthreads) _pthreads
=yes ;;
1773 --disable-pthreads) _pthreads
=no
;;
1775 --enable-fribidi) _fribidi
=yes ;;
1776 --disable-fribidi) _fribidi
=no
;;
1778 --enable-enca) _enca
=yes ;;
1779 --disable-enca) _enca
=no
;;
1781 --enable-inet6) _inet6
=yes ;;
1782 --disable-inet6) _inet6
=no
;;
1784 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1785 --disable-gethostbyname2) _gethostbyname2
=no
;;
1787 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1788 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1789 --disable-dga) _dga
=no
;;
1791 --enable-menu) _menu
=yes ;;
1792 --disable-menu) _menu
=no
;;
1794 --enable-qtx) _qtx
=yes ;;
1795 --disable-qtx) _qtx
=no
;;
1797 --enable-macosx) _macosx
=yes ;;
1798 --disable-macosx) _macosx
=no
;;
1799 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1800 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1801 --enable-macosx-bundle) _macosx_bundle
=yes;;
1802 --disable-macosx-bundle) _macosx_bundle
=no
;;
1804 --enable-sortsub) _sortsub
=yes ;;
1805 --disable-sortsub) _sortsub
=no
;;
1808 _charset
=`echo $ac_option | cut -d '=' -f 2`
1811 _language
=`echo $ac_option | cut -d '=' -f 2`
1813 # dvdnav disabled, it does not work
1814 # --with-libdvdnav=*)
1815 # _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
1820 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1821 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1822 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1824 --with-win32libdir=*)
1825 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1828 --with-xanimlibdir=*)
1829 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1832 --with-reallibdir=*)
1833 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1836 --with-livelibdir=*)
1837 _livelibdir
=`echo $ac_option | cut -d '=' -f 2`
1839 --with-toolamedir=*)
1840 _toolamedir
=`echo $ac_option | cut -d '=' -f 2`
1843 _mlibdir
=`echo $ac_option | cut -d '=' -f 2`
1847 --with-xmmslibdir=*)
1848 _xmmslibdir
=`echo $ac_option | cut -d '=' -f 2`
1851 --with-xmmsplugindir=*)
1852 _xmmsplugindir
=`echo $ac_option | cut -d '=' -f 2`
1865 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
1870 --enable-crash-debug)
1873 --disable-crash-debug)
1876 --enable-sighandler)
1879 --disable-sighandler)
1883 --enable-sse) _sse
=yes ;;
1884 --disable-sse) _sse
=no
;;
1885 --enable-sse2) _sse2
=yes ;;
1886 --disable-sse2) _sse2
=no
;;
1887 --enable-mmx2) _mmx2
=yes ;;
1888 --disable-mmx2) _mmx2
=no
;;
1889 --enable-3dnow) _3dnow
=yes ;;
1890 --disable-3dnow) _3dnow
=no _3dnowex
=no
;;
1891 --enable-3dnowex) _3dnow
=yes _3dnowex
=yes ;;
1892 --disable-3dnowex) _3dnowex
=no
;;
1893 --enable-altivec) _altivec
=yes ;;
1894 --disable-altivec) _altivec
=no
;;
1895 --enable-mmx) _mmx
=yes ;;
1896 --disable-mmx) # 3Dnow! and MMX2 require MMX
1897 _3dnow
=no _3dnowex
=no _mmx
=no _mmx2
=no
;;
1899 --enable-win32) _win32
=yes ;;
1900 --disable-win32) _win32
=no _dshow
=no
;;
1901 --enable-dshow) _win32
=yes _dshow
=yes ;;
1902 --disable-dshow) _dshow
=no
;;
1905 _inc_x11
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1908 _x11_paths
=`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1910 --with-dxr2incdir=*)
1911 _inc_dxr2
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1914 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
1917 _inc_dvb
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1919 --with-xvidlibdir=*)
1920 _ld_xvid
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1922 --with-xvidincdir=*)
1923 _inc_xvid
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1926 _ld_libdts
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1929 _inc_libdts
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1931 --with-x264libdir=*)
1932 _ld_x264
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1934 --with-x264incdir=*)
1935 _inc_x264
=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
1937 --with-sdl-config=*)
1938 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
1940 --with-freetype-config=*)
1941 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
1943 --with-fribidi-config=*)
1944 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
1946 --with-gtk-config=*)
1947 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
1949 --with-glib-config=*)
1950 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
1952 # dvdnav disabled, it does not work
1953 # --with-dvdnav-config=*)
1954 # _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
1957 _ld_mad
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1959 --with-cdparanoiaincdir=*)
1960 _inc_cdparanoia
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1962 --with-cdparanoialibdir=*)
1963 _ld_cdparanoia
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1965 --with-termcaplib=*)
1966 _ld_termcap
=-l`echo $ac_option | cut -d '=' -f 2`
1970 _prefix
=`echo $ac_option | cut -d '=' -f 2`
1973 _bindir
=`echo $ac_option | cut -d '=' -f 2`
1976 _datadir
=`echo $ac_option | cut -d '=' -f 2`
1979 _mandir
=`echo $ac_option | cut -d '=' -f 2`
1982 _confdir
=`echo $ac_option | cut -d '=' -f 2`
1985 _libdir
=`echo $ac_option | cut -d '=' -f 2`
1989 echo "Unknown parameter: $ac_option"
1996 # Atmos: moved this here, to be correct, if --prefix is specified
1997 test -z "$_bindir" && _bindir
="$_prefix/bin"
1998 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1999 test -z "$_mandir" && _mandir
="$_prefix/man"
2000 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
2001 test -z "$_libdir" && _libdir
="$_prefix/lib"
2002 test -z "$_mlibdir" && _mlibdir
="$MLIBHOME"
2005 # Checking assembler (_as) compatibility...
2006 # Added workaround for older as that reads from stdin by default - atmos
2007 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2008 echocheck
"assembler ($_as $as_version)"
2010 _pref_as_version
='2.9.1'
2012 if test "$_mmx" = yes ; then
2013 echo 'emms' >> $TMPS
2015 if test "$_3dnow" = yes ; then
2016 _pref_as_version
='2.10.1'
2017 echo 'femms' >> $TMPS
2019 if test "$_3dnowex" = yes ; then
2020 _pref_as_version
='2.10.1'
2021 echo 'pswapd %mm0, %mm0' >> $TMPS
2023 if test "$_mmx2" = yes ; then
2024 _pref_as_version
='2.10.1'
2025 echo 'movntq %mm0, (%eax)' >> $TMPS
2027 if test "$_sse" = yes ; then
2028 _pref_as_version
='2.10.1'
2029 echo 'xorps %xmm0, %xmm0' >> $TMPS
2031 #if test "$_sse2" = yes ; then
2032 # _pref_as_version='2.11'
2033 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2035 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2037 if test "$as_verc_fail" != yes ; then
2041 echo "Upgrade binutils to ${_pref_as_version} ..."
2042 die
"obsolete binutils version"
2048 # check if altivec is supported by the compiler, and how to enable it
2050 _altivec_gcc_flags
=''
2052 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2053 echocheck
"GCC altivec support"
2061 FSF_flags
='-maltivec -mabi=altivec'
2062 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2064 # check for Darwin-style flags first, since
2065 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2066 # accepts but ignores FSF-style flags...
2068 if test -z "$p"; then
2069 cc_check
$Darwin_flags && p
='Darwin'
2071 if test -z "$p"; then
2072 cc_check
$FSF_flags && p
='FSF'
2076 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2077 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2081 if test -z "$p"; then
2084 p
="$p-style ($_altivec_gcc_flags)"
2090 # check if <altivec.h> should be included
2092 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2094 if test "$_altivec" = yes ; then
2095 echocheck
"altivec.h"
2097 #include <altivec.h>
2098 int main(void) { return 0; }
2101 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2102 if test "$_have_altivec_h" = yes ; then
2103 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2105 echores
"$_have_altivec_h"
2108 # disable runtime cpudetection if
2109 # - we cannot generate altivec code
2110 # - altivec is disabled by the user
2112 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2113 _runtime_cpudetection
=no
2116 # show that we are optimizing for altivec (if enabled and supported)
2118 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2119 _optimizing
="$_optimizing altivec"
2122 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2124 if test "$_altivec" = yes ; then
2125 _mcpu
="$_mcpu $_altivec_gcc_flags"
2128 # setup _def_altivec correctly
2130 if test "$_altivec" = yes ; then
2131 _def_altivec
='#define HAVE_ALTIVEC 1'
2133 _def_altivec
='#undef HAVE_ALTIVEC'
2137 _def_mmx
='#undef HAVE_MMX'
2138 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2139 _def_mmx2
='#undef HAVE_MMX2'
2140 test "$_mmx2" = yes && _def_mmx2
='#define HAVE_MMX2 1'
2141 _def_3dnow
='#undef HAVE_3DNOW'
2142 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2143 _def_3dnowex
='#undef HAVE_3DNOWEX'
2144 test "$_3dnowex" = yes && _def_3dnowex
='#define HAVE_3DNOWEX 1'
2145 _def_sse
='#undef HAVE_SSE'
2146 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2147 _def_sse2
='#undef HAVE_SSE2'
2148 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2150 # Checking kernel version...
2151 if x86
&& linux
; then
2153 kernel_version
=`uname -r 2>&1`
2154 echocheck
"$system_name kernel version"
2155 case "$kernel_version" in
2156 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2157 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2158 _k_verc_problem
=yes;;
2160 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2163 if test "$_k_verc_fail" ; then
2164 echores
"$kernel_version, fail"
2165 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2166 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2167 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2168 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2169 echo "2.2.x you must upgrade it to get SSE support!"
2170 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2172 echores
"$kernel_version, ok"
2176 if test "$_vidix" = auto
; then
2178 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2180 x86_64
&& _vidix
=yes
2181 ppc
&& linux
&& _vidix
=yes
2182 alpha
&& linux
&& _vidix
=yes
2188 echocheck
"mplayer binary name"
2191 _prg_mencoder
="mencoder.exe"
2194 _prg_mencoder
="mencoder"
2199 # On QNX we must link to libph - Gabucino
2201 _ld_arch
="$_ld_arch -lph"
2204 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2206 if test "$_vidix" = yes ; then
2209 for _awk
in mawk gawk nawk
awk; do
2210 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2215 test "$_awk_verc_fail" = yes && _awk
=no
2217 if test "$_awk_verc_fail" = yes; then
2218 echo "VIDIX needs awk, but no working implementation was found!"
2219 echo "Try the GNU version, which can be downloaded from:"
2220 echo "ftp://ftp.gnu.org/gnu/gawk/"
2221 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2226 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
2233 ######################
2234 # MAIN TESTS GO HERE #
2235 ######################
2238 echocheck
"extra headers"
2239 if test "$_inc_extra" ; then
2240 echores
"$_inc_extra"
2246 echocheck
"extra libs"
2247 if test "$_ld_extra" ; then
2248 echores
"$_ld_extra"
2255 int main(void) { return 0; }
2257 if cc_check
-lposix ; then
2258 _ld_arch
="$_ld_arch -lposix"
2266 int main(void) { return 0; }
2268 if cc_check
-lm ; then
2276 # Checking for localization ...
2277 # CSAK EGY MARADHAT - A HEGYLAKO
2279 if test "$_i18n" != no
; then
2281 #include <libintl.h>
2282 int main(void) { gettext("test"); return 0; }
2286 if test "$_i18n" = auto
; then
2287 cc_check
&& _i18n
=yes
2289 for i18n_lib
in "" "-lintl"; do
2290 cc_check
$i18n_lib && _i18n
=yes && _i18n_libs
=$i18n_lib && break
2294 if test "$_i18n" = yes ; then
2295 _def_i18n
='#define USE_I18N 1'
2297 _def_i18n
='#undef USE_I18N'
2299 if test "$_i18n_libs" ; then
2300 _res_comment
="using $_i18n_libs"
2305 echocheck
"langinfo"
2306 if test "$_langinfo" = auto
; then
2308 #include <langinfo.h>
2309 int main(void) { nl_langinfo(CODESET); return 0; }
2312 cc_check
&& _langinfo
=yes
2314 if test "$_langinfo" = yes ; then
2315 _def_langinfo
='#define USE_LANGINFO 1'
2317 _def_langinfo
='#undef USE_LANGINFO'
2319 echores
"$_langinfo"
2322 echocheck
"language"
2323 test -z "$_language" && _language
=$LINGUAS
2324 _language
=`echo $_language | sed 's/,/ /g'`
2325 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2326 for lang
in $_language ; do
2327 test "$lang" = all
&& lang
=en
2328 if test -f "help/help_mp-${lang}.h" ; then
2332 echo -n "$lang not found, "
2333 _language
=`echo $_language | sed "s/$lang *//"`
2336 test -z "$_language" && _language
=en
2337 _mp_help
="help/help_mp-${_language}.h"
2338 test -f $_mp_help || die
"$_mp_help not found"
2339 for lang
in $LANGUAGES ; do
2340 if test -f "DOCS/man/$lang/mplayer.1" ; then
2341 MAN_LANG
="$MAN_LANG $lang"
2344 _doc_lang
=$_language
2345 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2346 echores
"using $_language (man pages: $MAN_LANG)"
2349 echocheck
"enable sighandler"
2350 if test "$_sighandler" = yes ; then
2351 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2353 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2355 echores
"$_sighandler"
2357 echocheck
"runtime cpudetection"
2358 if test "$_runtime_cpudetection" = yes ; then
2359 _optimizing
="Runtime CPU-Detection enabled"
2360 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2362 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2364 echores
"$_runtime_cpudetection"
2367 echocheck
"restrict keyword"
2368 for restrict_keyword
in restrict __restrict __restrict__
; do
2369 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2371 _def_restrict_keyword
=$restrict_keyword
2375 if [ -n "$_def_restrict_keyword" ]; then
2376 echores
"$_def_restrict_keyword"
2380 # Avoid infinite recursion loop ("#define restrict restrict")
2381 if [ "$_def_restrict_keyword" != "restrict" ]; then
2382 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2384 _def_restrict_keyword
=""
2388 echocheck
"__builtin_expect"
2389 # GCC branch prediction hint
2392 a = __builtin_expect (a, 10);
2393 return a == 10 ? 0 : 1;
2395 int main() { return foo(10) && foo(0); }
2398 cc_check
&& _builtin_expect
=yes
2399 if test "$_builtin_expect" = yes ; then
2400 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2402 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2404 echores
"$_builtin_expect"
2410 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2413 cc_check
-lkstat && _kstat
=yes
2414 if test "$_kstat" = yes ; then
2415 _def_kstat
="#define HAVE_LIBKSTAT 1"
2416 _ld_arch
="-lkstat $_ld_arch"
2418 _def_kstat
="#undef HAVE_LIBKSTAT"
2424 # required for nanosleep on some systems
2427 int main(void) { (void) nanosleep(0, 0); return 0; }
2430 cc_check
-lposix4 && _posix4
=yes
2431 if test "$_posix4" = yes ; then
2432 _ld_arch
="-lposix4 $_ld_arch"
2439 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2442 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2443 if test "$_lrintf" = yes ; then
2444 _def_lrintf
="#define HAVE_LRINTF 1"
2446 _def_lrintf
="#undef HAVE_LRINTF"
2453 int main(void) { (void) round(0.0); return 0; }
2456 cc_check
$_ld_lm && _round
=yes
2457 if test "$_round" = yes ; then
2458 _def_round
="#define HAVE_ROUND 1"
2460 _def_round
="#undef HAVE_ROUND"
2464 echocheck
"nanosleep"
2465 # also check for nanosleep
2468 int main(void) { (void) nanosleep(0, 0); return 0; }
2471 cc_check
$_ld_arch && _nanosleep
=yes
2472 if test "$_nanosleep" = yes ; then
2473 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2475 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2477 echores
"$_nanosleep"
2481 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2482 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2485 int main(void) { (void) gethostbyname(0); return 0; }
2487 for _ld_tmp
in "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2488 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && break
2490 if test $_winsock2 = auto
&& not cygwin
; then
2493 #include <winsock2.h>
2494 int main(void) { (void) gethostbyname(0); return 0; }
2496 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2498 if test "$_ld_sock" ; then
2499 echores
"yes (using $_ld_sock)"
2505 if test $_winsock2 = yes ; then
2507 _def_winsock2
='#define HAVE_WINSOCK2 1'
2509 _def_winsock2
='#undef HAVE_WINSOCK2'
2514 echocheck
"inet_pton()"
2516 #include <sys/types.h>
2517 #include <sys/socket.h>
2518 #include <arpa/inet.h>
2519 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2521 if test "$_winsock2" = yes ; then
2522 echores
"not needed (using winsock2 functions)"
2523 elif cc_check
$_ld_sock ; then
2524 # NOTE: Linux has libresolv but does not need it
2526 echores
"yes (using $_ld_sock)"
2527 elif cc_check
$_ld_sock -lresolv ; then
2528 # NOTE: needed for SunOS at least
2529 _ld_sock
="$_ld_sock -lresolv"
2530 echores
"yes (using $_ld_sock)"
2532 echores
"no (=> i'll try inet_aton next)"
2534 echocheck
"inet_aton()"
2536 #include <sys/types.h>
2537 #include <sys/socket.h>
2538 #include <arpa/inet.h>
2539 int main(void) { (void) inet_aton(0, 0); return 0; }
2542 if cc_check
$_ld_sock ; then
2543 # NOTE: Linux has libresolv but does not need it
2545 echores
"yes (using $_ld_sock)"
2546 elif cc_check
$_ld_sock -lresolv ; then
2547 # NOTE: needed for SunOS at least
2548 _ld_sock
="$_ld_sock -lresolv"
2549 echores
"yes (using $_ld_sock)"
2553 echores
"no (=> network support disabled)"
2557 _def_use_aton
='#undef USE_ATON'
2558 if test "$_use_aton" != no
; then
2559 _def_use_aton
='#define USE_ATON 1'
2563 echocheck
"inttypes.h (required)"
2565 #include <inttypes.h>
2566 int main(void) { return 0; }
2569 cc_check
&& _inttypes
=yes
2570 if test "$_inttypes" = yes ; then
2575 echocheck
"bitypes.h (inttypes.h predecessor)"
2577 #include <sys/bitypes.h>
2578 int main(void) { return 0; }
2581 cc_check
&& _inttypes
=yes
2582 if test "$_inttypes" = yes ; then
2583 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."
2585 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2588 echores
"$_inttypes"
2591 echocheck
"int_fastXY_t in inttypes.h"
2593 #include <inttypes.h>
2595 volatile int_fast16_t v= 0;
2599 cc_check
&& _fast_inttypes
=yes
2600 if test "$_fast_inttypes" = yes ; then
2604 _def_fast_inttypes
='
2605 typedef signed char int_fast8_t;
2606 typedef signed int int_fast16_t;
2607 typedef signed int int_fast32_t;
2608 typedef unsigned char uint_fast8_t;
2609 typedef unsigned int uint_fast16_t;
2610 typedef unsigned int uint_fast32_t;'
2612 echores
"$_fast_inttypes"
2615 echocheck
"word size"
2616 _mp_wordsize
="#undef MP_WORDSIZE"
2619 #include <sys/types.h>
2620 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2622 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2623 echores
"$_wordsize"
2626 echocheck
"stddef.h"
2629 int main(void) { return 0; }
2632 cc_check
&& _stddef
=yes
2633 if test "$_stddef" = yes ; then
2634 _def_stddef
='#define HAVE_STDDEF_H 1'
2636 _def_stddef
='#undef HAVE_STDDEF_H'
2641 echocheck
"malloc.h"
2644 int main(void) { (void) malloc(0); return 0; }
2647 cc_check
&& _malloc
=yes
2648 if test "$_malloc" = yes ; then
2649 _def_malloc
='#define HAVE_MALLOC_H 1'
2651 _def_malloc
='#undef HAVE_MALLOC_H'
2653 # malloc.h emits a warning in FreeBSD and OpenBSD
2654 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2658 echocheck
"memalign()"
2659 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2662 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2665 cc_check
&& _memalign
=yes
2666 if test "$_memalign" = yes ; then
2667 _def_memalign
='#define HAVE_MEMALIGN 1'
2669 _def_memalign
='#undef HAVE_MEMALIGN'
2671 echores
"$_memalign"
2674 echocheck
"alloca.h"
2677 int main(void) { (void) alloca(0); return 0; }
2680 cc_check
&& _alloca
=yes
2682 _def_alloca
='#define HAVE_ALLOCA_H 1'
2684 _def_alloca
='#undef HAVE_ALLOCA_H'
2691 #include <sys/types.h>
2692 #include <sys/mman.h>
2693 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2696 cc_check
&& _mman
=yes
2697 if test "$_mman" = yes ; then
2698 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2700 _def_mman
='#undef HAVE_SYS_MMAN_H'
2705 #include <sys/types.h>
2706 #include <sys/mman.h>
2707 int main(void) { void *p = MAP_FAILED; return 0; }
2709 _mman_has_map_failed
=no
2710 cc_check
&& _mman_has_map_failed
=yes
2711 if test "$_mman_has_map_failed" = yes ; then
2712 _def_mman_has_map_failed
=''
2714 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2717 echocheck
"dynamic loader"
2720 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2723 for _ld_tmp
in "" "-ldl" ; do
2724 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
2726 if test "$_dl" = yes ; then
2727 _def_dl
='#define HAVE_LIBDL 1'
2729 _def_dl
='#undef HAVE_LIBDL'
2734 echocheck
"dynamic a/v plugins support"
2735 if test "$_dl" = no
; then
2738 if test "$_dynamic_plugins" = yes ; then
2739 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
2741 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
2743 echores
"$_dynamic_plugins"
2746 #echocheck "dynamic linking"
2747 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2748 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
2750 #int main(void) { return 0; }
2752 #if cc_check -rdynamic ; then
2753 # _ld_dl_dynamic='-rdynamic'
2754 #elif cc_check -Bdynamic ; then
2755 # _ld_dl_dynamic='-Bdynamic'
2756 #elif cc_check ; then
2759 #echores "using $_ld_dl_dynamic"
2761 _def_threads
='#undef HAVE_THREADS'
2764 if test "$_pthreads" != no
; then
2766 #include <pthread.h>
2767 void* func(void *arg) { return arg; }
2768 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2772 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
2773 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2774 cc_check
$_ld_tmp && ($TMPO ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
2778 if test "$_pthreads" = yes ; then
2779 echores
"yes (using $_ld_pthread)"
2781 _def_pthreads
='#define HAVE_PTHREADS 1'
2782 _def_threads
='#define HAVE_THREADS 1'
2784 echores
"no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled)"
2786 _def_pthreads
='#undef HAVE_PTHREADS'
2787 _nas
=no
; _tv_v4l
=no
; _macosx
=no
2788 if not mingw32
; then
2795 if test "$_iconv" = auto
; then
2796 _iconv_tmp
='#include <iconv.h>'
2802 #define INBUFSIZE 1024
2803 #define OUTBUFSIZE 4096
2805 char inbuffer[INBUFSIZE];
2806 char outbuffer[OUTBUFSIZE];
2811 char *tocode="UTF-8";
2812 char *fromcode="cp1250";
2813 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
2814 while ((numread = read (0, inbuffer, INBUFSIZE))) {
2815 char *iptr=inbuffer;
2816 char *optr=outbuffer;
2817 size_t inleft=numread;
2818 size_t outleft=OUTBUFSIZE;
2819 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
2821 write (1, outbuffer, OUTBUFSIZE - outleft);
2824 if (iconv_close(icdsc) == -1)
2830 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
2831 cc_check
$_ld_lm $_ld_tmp && _ld_iconv
="$_ld_tmp" && _iconv
=yes && break
2834 if test "$_iconv" = yes ; then
2835 _def_iconv
='#define USE_ICONV 1'
2837 _def_iconv
='#undef USE_ICONV'
2842 echocheck
"sys/soundcard.h"
2844 #include <sys/soundcard.h>
2845 int main(void) { return 0; }
2848 cc_check
&& _sys_soundcard
=yes
2849 if test "$_sys_soundcard" = yes ; then
2850 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
2851 _inc_soundcard
='#include <sys/soundcard.h>'
2853 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
2855 echores
"$_sys_soundcard"
2857 if test "$_sys_soundcard" != yes ; then
2858 echocheck
"soundcard.h"
2860 #include <soundcard.h>
2861 int main(void) { return 0; }
2864 cc_check
&& _soundcard
=yes
2865 if linux ||
test "$_ossaudio" != no
; then
2866 # use soundcard.h on Linux, or when OSS support is enabled
2867 echores
"$_soundcard"
2869 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
2870 echores
"$_soundcard, but ignored!"
2873 if test "$_soundcard" = yes ; then
2874 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
2875 _inc_soundcard
='#include <soundcard.h>'
2877 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2880 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2884 echocheck
"sys/dvdio.h"
2887 #include <sys/dvdio.h>
2888 int main(void) { return 0; }
2891 cc_check
&& _dvdio
=yes
2892 if test "$_dvdio" = yes ; then
2893 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
2895 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
2900 echocheck
"sys/cdio.h"
2903 #include <sys/cdio.h>
2904 int main(void) { return 0; }
2907 cc_check
&& _cdio
=yes
2908 if test "$_cdio" = yes ; then
2909 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
2911 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
2916 echocheck
"linux/cdrom.h"
2918 #include <sys/types.h>
2919 #include <linux/cdrom.h>
2920 int main(void) { return 0; }
2923 cc_check
&& _cdrom
=yes
2924 if test "$_cdrom" = yes ; then
2925 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
2927 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
2935 int main(void) { return 0; }
2938 cc_check
&& _dvd
=yes
2939 if test "$_dvd" = yes ; then
2940 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
2942 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
2947 echocheck
"BSDI dvd.h"
2950 int main(void) { return 0; }
2953 cc_check
&& _bsdi_dvd
=yes
2954 if test "$_bsdi_dvd" = yes ; then
2955 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
2957 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
2959 echores
"$_bsdi_dvd"
2962 echocheck
"HPUX SCSI header"
2964 #include <sys/scsi.h>
2965 int main(void) { return 0; }
2968 cc_check
&& _hpux_scsi_h
=yes
2969 if test "$_hpux_scsi_h" = yes ; then
2970 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
2972 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
2974 echores
"$_hpux_scsi_h"
2977 echocheck
"userspace SCSI headers (Solaris)"
2979 # include <unistd.h>
2980 # include <stropts.h>
2981 # include <sys/scsi/scsi_types.h>
2982 # include <sys/scsi/impl/uscsi.h>
2983 int main(void) { return 0; }
2986 cc_check
&& _sol_scsi_h
=yes
2987 if test "$_sol_scsi_h" = yes ; then
2988 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
2990 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
2992 echores
"$_sol_scsi_h"
2996 if test "$_termcap" = auto
; then
2998 int main(void) { return 0; }
3001 for _ld_tmp
in "-ltermcap" "-ltinfo" ; do
3002 cc_check
$_ld_tmp && _ld_termcap
="$_ld_tmp" && _termcap
=yes && break
3005 if test "$_termcap" = yes ; then
3006 _def_termcap
='#define USE_TERMCAP 1'
3007 _res_comment
="using $_ld_termcap"
3009 _def_termcap
='#undef USE_TERMCAP'
3015 if test "$_termios" = auto
; then
3017 #include <sys/termios.h>
3018 int main(void) { return 0; }
3021 cc_check
&& _termios
=yes
3022 _def_termios_h_name
='sys/termios.h'
3025 if test "$_termios" = auto
; then
3027 #include <termios.h>
3028 int main(void) { return 0; }
3031 cc_check
&& _termios
=yes
3032 _def_termios_h_name
='termios.h'
3035 if test "$_termios" = yes ; then
3036 _def_termios
='#define HAVE_TERMIOS 1'
3037 _def_termios_h
='#undef HAVE_TERMIOS_H'
3038 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3040 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3041 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3042 elif test "$_def_termios_h_name" = 'termios.h' ; then
3043 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3045 _res_comment
="using $_def_termios_h_name"
3047 _def_termios
='#undef HAVE_TERMIOS'
3048 _def_termios_h_name
=''
3055 if test "$_shm" = auto
; then
3057 #include <sys/types.h>
3058 #include <sys/shm.h>
3059 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3062 cc_check
&& _shm
=yes
3064 if test "$_shm" = yes ; then
3065 _def_shm
='#define HAVE_SHM 1'
3067 _def_shm
='#undef HAVE_SHM'
3072 # XXX: FIXME, add runtime checking
3073 echocheck
"linux devfs"
3074 echores
"$_linux_devfs"
3077 echocheck
"scandir()"
3079 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3082 cc_check
&& _scandir
=yes
3083 if test "$_scandir" = yes ; then
3084 _def_scandir
='#define HAVE_SCANDIR 1'
3086 _def_scandir
='#undef HAVE_SCANDIR'
3091 echocheck
"strsep()"
3094 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3097 cc_check
&& _strsep
=yes
3098 if test "$_strsep" = yes ; then
3099 _def_strsep
='#define HAVE_STRSEP 1'
3101 _def_strsep
='#undef HAVE_STRSEP'
3105 echocheck
"strlcpy()"
3108 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3111 cc_check
&& _strlcpy
=yes
3112 if test "$_strlcpy" = yes ; then
3113 _def_strlcpy
='#define HAVE_STRLCPY 1'
3115 _def_strlcpy
='#undef HAVE_STRLCPY'
3119 echocheck
"strlcat()"
3122 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3125 cc_check
&& _strlcat
=yes
3126 if test "$_strlcat" = yes ; then
3127 _def_strlcat
='#define HAVE_STRLCAT 1'
3129 _def_strlcat
='#undef HAVE_STRLCAT'
3133 echocheck
"fseeko()"
3136 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3139 cc_check
&& _fseeko
=yes
3140 if test "$_fseeko" = yes ; then
3141 _def_fseeko
='#define HAVE_FSEEKO 1'
3143 _def_fseeko
='#undef HAVE_FSEEKO'
3147 echocheck
"localtime_r()"
3150 int main( void ) { localtime_r(NULL, NULL); }
3153 cc_check
&& _localtime_r
=yes
3154 if test "$_localtime_r" = yes ; then
3155 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3157 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3159 echores
"$_localtime_r"
3161 echocheck
"vsscanf()"
3164 int main(void) { vsscanf(0, 0, 0); return 0; }
3167 cc_check
&& _vsscanf
=yes
3168 if test "$_vsscanf" = yes ; then
3169 _def_vsscanf
='#define HAVE_VSSCANF 1'
3171 _def_vsscanf
='#undef HAVE_VSSCANF'
3179 int main(void) { swab(0, 0, 0); return 0; }
3182 cc_check
&& _swab
=yes
3183 if test "$_swab" = yes ; then
3184 _def_swab
='#define HAVE_SWAB 1'
3186 _def_swab
='#undef HAVE_SWAB'
3190 echocheck
"posix select()"
3194 #include <sys/types.h>
3196 #include <sys/time.h>
3198 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3201 cc_check
&& _posix_select
=yes
3202 if test "$_posix_select" = no
; then
3203 _def_no_posix_select
='#define HAVE_NO_POSIX_SELECT 1'
3205 _def_no_posix_select
='#undef HAVE_NO_POSIX_SELECT'
3207 echores
"$_posix_select"
3210 echocheck
"gettimeofday()"
3213 #include <sys/time.h>
3214 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3217 cc_check
&& _gettimeofday
=yes
3218 if test "$_gettimeofday" = yes ; then
3219 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3221 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3223 echores
"$_gettimeofday"
3230 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3233 cc_check
&& _glob
=yes
3234 if test "$_glob" = yes ; then
3235 _def_glob
='#define HAVE_GLOB 1'
3237 _def_glob
='#undef HAVE_GLOB'
3242 echocheck
"sys/sysinfo.h"
3244 #include <sys/sysinfo.h>
3246 struct sysinfo s_info;
3252 cc_check
&& _sys_sysinfo
=yes
3253 if test "$_sys_sysinfo" = yes ; then
3254 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3255 _inc_sysinfo
='#include <sys/sysinfo.h>'
3257 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3259 echores
"$_sys_sysinfo"
3262 echocheck
"Mac OS X APIs"
3263 if test "$_macosx" = auto
&& darwin
; then
3264 productName
=`/usr/bin/sw_vers -productName`
3265 if test "$productName" = "Mac OS X" ; then
3269 _def_macosx
='#undef MACOSX'
3270 _noaomodules
="macosx $_noaomodules"
3271 _novomodules
="quartz $_novomodules"
3274 if test "$_macosx" = yes ; then
3276 #include <Carbon/Carbon.h>
3277 #include <QuickTime/QuickTime.h>
3278 #include <CoreAudio/CoreAudio.h>
3282 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3285 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3287 _macosx_frameworks
="-framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3288 _def_macosx
='#define MACOSX 1'
3289 _aosrc
="$_aosrc ao_macosx.c"
3290 _aomodules
="macosx $_aomodules"
3291 _vosrc
="$_vosrc vo_quartz.c"
3292 _vomodules
="quartz $_vomodules"
3295 _def_macosx
='#undef MACOSX'
3296 _noaomodules
="macosx $_noaomodules"
3297 _novomodules
="quartz $_novomodules"
3300 #include <Carbon/Carbon.h>
3301 #include <QuartzCore/CoreVideo.h>
3304 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3305 _vosrc
="$_vosrc vo_macosx.m"
3306 _vomodules
="macosx $_vomodules"
3307 _macosx_frameworks
="$_macosx_frameworks -framework Cocoa -framework QuartzCore -framework OpenGL"
3308 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3309 _macosx_corevideo
=yes
3311 _novomodules
="macosx $_novomodules"
3312 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3313 _macosx_corevideo
=no
3318 echocheck
"Mac OS X Finder Support"
3319 if test "$_macosx_finder_support" = auto
; then
3320 _macosx_finder_support
=$_macosx
3322 if test "$_macosx_finder_support" = yes; then
3323 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3324 _macosx_finder_support
=yes
3326 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3327 _macosx_finder_support
=no
3329 echores
"$_macosx_finder_support"
3331 echocheck
"Mac OS X Bundle file locations"
3332 if test "$_macosx_bundle" = auto
; then
3333 _macosx_bundle
=$_macosx_finder_support
3335 if test "$_macosx_bundle" = yes; then
3336 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3338 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3341 echores
"$_macosx_bundle"
3343 echocheck
"Samba support (libsmbclient)"
3344 if test "$_smbsupport" = yes; then
3345 _ld_smb
="-lsmbclient"
3347 if test "$_smbsupport" = auto
; then
3350 #include <libsmbclient.h>
3351 int main(void) { smbc_opendir("smb://"); return 0; }
3353 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3354 cc_check
$_ld_tmp && _ld_smb
="$_ld_tmp" && _smbsupport
=yes && break
3358 if test "$_smbsupport" = yes; then
3359 _def_smbsupport
="#define LIBSMBCLIENT"
3360 _inputmodules
="smb $_inputmodules"
3362 _def_smbsupport
="#undef LIBSMBCLIENT"
3363 _noinputmodules
="smb $_noinputmodules"
3365 echores
"$_smbsupport"
3374 if test "$_3dfx" = yes ; then
3375 _def_3dfx
='#define HAVE_3DFX 1'
3376 _vosrc
="$_vosrc vo_3dfx.c"
3377 _vomodules
="3dfx $_vomodules"
3379 _def_3dfx
='#undef HAVE_3DFX'
3380 _novomodules
="3dfx $_novomodules"
3386 if test "$_tdfxfb" = yes ; then
3387 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3388 _vosrc
="$_vosrc vo_tdfxfb.c"
3389 _vomodules
="tdfxfb $_vomodules"
3391 _def_tdfxfb
='#undef HAVE_TDFXFB'
3392 _novomodules
="tdfxfb $_novomodules"
3397 if test "$_tdfxvid" = yes ; then
3398 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3399 _vosrc
="$_vosrc vo_tdfx_vid.c"
3400 _vomodules
="tdfx_vid $_vomodules"
3402 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3403 _novomodules
="tdfx_vid $_novomodules"
3408 if test "$_tga" = yes ; then
3409 _def_tga
='#define HAVE_TGA 1'
3410 _vosrc
="$_vosrc vo_tga.c"
3411 _vomodules
="tga $_vomodules"
3413 _def_tga
='#undef HAVE_TGA'
3414 _novomodules
="tga $_novomodules"
3418 echocheck
"DirectFB headers presence"
3419 if test -z "$_inc_directfb" ; then
3420 for I
in /usr
/include
/usr
/local
/include
$_inc_extra; do
3421 if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
3422 _inc_directfb
="-I$I/directfb"
3423 echores
"yes (using $_inc_directfb)"
3426 if test -d "$I" && test -f "$I/directfb.h" ; then
3427 _inc_directfb
="-I$I"
3428 echores
"yes (using $_inc_directfb)"
3432 if test -z "$_inc_directfb" ; then
3437 echores
"yes (using $_inc_directfb)"
3439 if test "$_inc_directfb" = "-I/usr/include" ; then
3443 echocheck
"DirectFB"
3444 if test "$_directfb" = auto
; then
3447 #include <directfb.h>
3448 int main(void) { IDirectFB *foo; return 0; }
3450 linux
&& test -c /dev
/fb0
&& cc_check
$_inc_directfb -ldirectfb && _directfb
=yes
3453 if test "$_directfb" = yes; then
3455 #include <directfb.h>
3457 printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version);
3461 if cc_check
$_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then
3462 _directfb_version
=`"$TMPO"`
3463 _def_directfb_version
="#define DIRECTFBVERSION $_directfb_version"
3464 if test "$_directfb_version" -ge 913; then
3465 _res_comment
="$_directfb_version"
3467 _def_directfb_version
='#undef DIRECTFBVERSION'
3469 _res_comment
="version >=0.9.13 required"
3473 _res_comment
="failed to get version"
3476 echores
"$_directfb"
3478 if test "$_directfb" = yes ; then
3479 _def_directfb
='#define HAVE_DIRECTFB 1'
3480 if test "$_directfb_version" -ge 913; then
3481 _vosrc
="$_vosrc vo_directfb2.c"
3482 _vomodules
="directfb $_vomodules"
3483 _ld_directfb
='-ldirectfb'
3486 if test "$_directfb_version" -ge 915; then
3487 _vosrc
="$_vosrc vo_dfbmga.c"
3488 _vomodules
="dfbmga $_vomodules"
3491 _def_directfb
='#undef HAVE_DIRECTFB'
3492 _novomodules
="directfb $_novomodules"
3497 echocheck
"X11 headers presence"
3498 if test -z "$_inc_x11" ; then
3499 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3500 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
3502 echores
"yes (using $I)"
3506 if test -z "$_inc_x11" ; then
3508 echores
"not found (check if the dev(el) packages are installed)"
3511 echores
"yes (using $_inc_x11)"
3513 if test "$_inc_x11" = "-I/usr/include" ; then
3519 if test "$_x11" != no
; then
3521 #include <X11/Xlib.h>
3522 #include <X11/Xutil.h>
3523 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3525 if test -z "$_x11_paths" ; then
3526 _x11_paths
="/usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib"
3528 for I
in $_x11_paths ; do
3529 _ld_x11
="-L$I -lXext -lX11 $_ld_sock $_ld_pthread"
3531 _ld_x11
="$_ld_x11 -Wl,-R$I"
3533 if test -d "$I" && cc_check
$_inc_x11 $_ld_x11 ; then
3539 if test "$_x11" = yes ; then
3540 _def_x11
='#define HAVE_X11 1'
3541 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3542 _vomodules
="x11 xover $_vomodules"
3543 _res_comment
="using $I"
3546 _def_x11
='#undef HAVE_X11'
3549 _novomodules
="x11 $_novomodules"
3550 _res_comment
="check if the dev(el) packages are installed"
3558 if test "$_x11" = yes ; then
3560 #include <X11/Xmd.h>
3561 #include <X11/Xlib.h>
3562 #include <X11/Xutil.h>
3563 #include <X11/Xatom.h>
3564 #include <X11/extensions/dpms.h>
3566 (void) DPMSQueryExtension(0, 0, 0);
3569 cc_check
$_inc_x11 -lXdpms $_ld_x11 && _xdpms3
=yes
3571 #include <X11/Xlib.h>
3572 #include <X11/extensions/dpms.h>
3574 (void) DPMSQueryExtension(0, 0, 0);
3577 cc_check
$_inc_x11 $_ld_x11 && _xdpms4
=yes
3579 if test "$_xdpms4" = yes ; then
3580 _def_xdpms
='#define HAVE_XDPMS 1'
3581 echores
"yes (using Xdpms 4)"
3582 elif test "$_xdpms3" = yes ; then
3583 _def_xdpms
='#define HAVE_XDPMS 1'
3584 _ld_x11
="-lXdpms $_ld_x11"
3585 echores
"yes (using Xdpms 3)"
3587 _def_xdpms
='#undef HAVE_XDPMS'
3593 if test "$_x11" = yes && test "$_xv" != no
; then
3595 #include <X11/Xlib.h>
3596 #include <X11/extensions/Xvlib.h>
3598 (void) XvGetPortAttribute(0, 0, 0, 0);
3599 (void) XvQueryPortAttributes(0, 0, 0);
3603 cc_check
$_inc_x11 -lXv $_ld_x11 && _xv
=yes
3607 if test "$_xv" = yes ; then
3608 _def_xv
='#define HAVE_XV 1'
3610 _vosrc
="$_vosrc vo_xv.c"
3611 _vomodules
="xv $_vomodules"
3613 _def_xv
='#undef HAVE_XV'
3614 _novomodules
="xv $_novomodules"
3620 if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no
; then
3623 #include <X11/Xlib.h>
3624 #include <X11/extensions/Xvlib.h>
3625 #include <X11/extensions/XvMClib.h>
3627 (void) XvMCQueryExtension(0,0,0);
3628 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3631 cc_check
$_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _xvmc
=yes
3633 if test "$_xvmc" = yes ; then
3634 _def_xvmc
='#define HAVE_XVMC 1'
3635 _ld_xvmc
="-lXvMC -l$_xvmclib"
3636 _vosrc
="$_vosrc vo_xvmc.c"
3637 _vomodules
="xvmc $_vomodules"
3639 _def_xvmc
='#undef HAVE_XVMC'
3640 _novomodules
="xvmc $_novomodules"
3645 echocheck
"Xinerama"
3646 if test "$_x11" = yes && test "$_xinerama" != no
; then
3648 #include <X11/Xlib.h>
3649 #include <X11/extensions/Xinerama.h>
3650 int main(void) { (void) XineramaIsActive(0); return 0; }
3653 cc_check
$_inc_x11 -lXinerama $_ld_x11 && _xinerama
=yes
3657 if test "$_xinerama" = yes ; then
3658 _def_xinerama
='#define HAVE_XINERAMA 1'
3659 _ld_xinerama
='-lXinerama'
3661 _def_xinerama
='#undef HAVE_XINERAMA'
3663 echores
"$_xinerama"
3666 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3667 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3668 # named 'X extensions' or something similar.
3669 # This check may be useful for future mplayer versions (to change resolution)
3670 # If you run into problems, remove '-lXxf86vm'.
3672 if test "$_x11" = yes && test "$_vm" = auto
; then
3674 #include <X11/Xlib.h>
3675 #include <X11/extensions/xf86vmode.h>
3676 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3679 cc_check
$_inc_x11 -lXxf86vm $_ld_x11 && _vm
=yes
3681 if test "$_vm" = yes ; then
3682 _def_vm
='#define HAVE_XF86VM 1'
3685 _def_vm
='#undef HAVE_XF86VM'
3689 # Check for the presence of special keycodes, like audio control buttons
3690 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3691 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3692 # have these new keycodes.
3693 echocheck
"XF86keysym"
3694 if test "$_xf86keysym" = auto
; then
3696 if test "$_x11" = yes ; then
3698 #include <X11/Xlib.h>
3699 #include <X11/XF86keysym.h>
3700 int main(void) { return XF86XK_AudioPause; }
3702 cc_check
$_inc_x11 $_ld_x11 && _xf86keysym
=yes
3705 if test "$_xf86keysym" = yes ; then
3706 _def_xf86keysym
='#define HAVE_XF86XK 1'
3708 _def_xf86keysym
='#undef HAVE_XF86XK'
3710 echores
"$_xf86keysym"
3713 if test "$_x11" = no
; then
3716 # Version 2 is preferred to version 1 if available
3717 if test "$_dga" = auto
; then
3719 #include <X11/Xlib.h>
3720 #include <X11/extensions/xf86dga.h>
3721 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
3724 cc_check
$_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga
=1
3727 #include <X11/Xlib.h>
3728 #include <X11/extensions/xf86dga.h>
3729 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
3731 cc_check
$_inc_x11 -lXxf86dga $_ld_x11 && _dga
=2
3734 _def_dga
='#undef HAVE_DGA'
3735 _def_dga2
='#undef HAVE_DGA2'
3736 if test "$_dga" = 1 ; then
3737 _def_dga
='#define HAVE_DGA 1'
3738 _ld_dga
='-lXxf86dga'
3739 _vosrc
="$_vosrc vo_dga.c"
3740 _vomodules
="dga $_vomodules"
3741 echores
"yes (using DGA 1.0)"
3742 elif test "$_dga" = 2 ; then
3743 _def_dga
='#define HAVE_DGA 1'
3744 _def_dga2
='#define HAVE_DGA2 1'
3745 _ld_dga
='-lXxf86dga'
3746 _vosrc
="$_vosrc vo_dga.c"
3747 _vomodules
="dga $_vomodules"
3748 echores
"yes (using DGA 2.0)"
3749 elif test "$_dga" = no
; then
3751 _novomodules
="dga $_novomodules"
3753 die
"DGA version must be 1 or 2"
3758 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
3759 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
3762 int main(void) { return 0; }
3765 if cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3767 _ld_gl
="-lGL $_ld_dl"
3768 elif cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3770 _ld_gl
="-lGL $_ld_pthread $_ld_dl"
3771 elif cc_check
-lopengl32 ; then
3774 _ld_gl
="-lopengl32 -lgdi32"
3779 if test "$_gl" = yes ; then
3780 _def_gl
='#define HAVE_GL 1'
3781 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
3782 if test "$_gl_win32" = yes ; then
3783 _def_gl_win32
='#define GL_WIN32 1'
3784 _vosrc
="$_vosrc w32_common.c"
3785 _res_comment
="win32 version"
3787 _vomodules
="opengl $_vomodules"
3789 _def_gl
='#undef HAVE_GL'
3790 _def_gl_win32
='#undef GL_WIN32'
3791 _novomodules
="opengl $_novomodules"
3796 echocheck
"/dev/mga_vid"
3797 if test "$_mga" = auto
; then
3799 test -c /dev
/mga_vid
&& _mga
=yes
3801 if test "$_mga" = yes ; then
3802 _def_mga
='#define HAVE_MGA 1'
3803 _vosrc
="$_vosrc vo_mga.c"
3804 _vomodules
="mga $_vomodules"
3806 _def_mga
='#undef HAVE_MGA'
3807 _novomodules
="mga $_novomodules"
3812 # echocheck "syncfb"
3814 # test "$_mga" = yes && _syncfb=yes
3815 # if test "$_syncfb" = yes ; then
3816 # _def_syncfb='#define HAVE_SYNCFB 1'
3817 # _vosrc="$_vosrc vo_syncfb.c"
3819 # _def_syncfb='#undef HAVE_SYNCFB'
3821 # echores "$_syncfb"
3825 if test "$_xmga" = auto
; then
3827 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
3829 if test "$_xmga" = yes ; then
3830 _def_xmga
='#define HAVE_XMGA 1'
3831 _vosrc
="$_vosrc vo_xmga.c"
3832 _vomodules
="xmga $_vomodules"
3834 _def_xmga
='#undef HAVE_XMGA'
3835 _novomodules
="xmga $_novomodules"
3841 if test "$_ggi" = auto
; then
3843 #include <ggi/ggi.h>
3844 int main(void) { return 0; }
3847 cc_check
-lggi && _ggi
=yes
3849 if test "$_ggi" = yes ; then
3850 _def_ggi
='#define HAVE_GGI 1'
3852 _vosrc
="$_vosrc vo_ggi.c"
3853 _vomodules
="ggi $_vomodules"
3855 _def_ggi
='#undef HAVE_GGI'
3856 _novomodules
="ggi $_novomodules"
3860 echocheck
"GGI extension: libggiwmh"
3861 if test "$_ggiwmh" = auto
; then
3864 #include <ggi/ggi.h>
3865 #include <ggi/wmh.h>
3866 int main(void) { return 0; }
3868 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
3870 # needed to get right output on obscure combination
3871 # like --disable-ggi --enable-ggiwmh
3872 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
3873 _def_ggiwmh
='#define HAVE_GGIWMH 1'
3874 _ld_ggi
="$_ld_ggi -lggiwmh"
3877 _def_ggiwmh
='#undef HAVE_GGIWMH'
3883 if test "$_aa" = auto
; then
3886 extern struct aa_hardware_params aa_defparams;
3887 extern struct aa_renderparams aa_defrenderparams;
3891 (void) aa_init(0, 0, 0);
3892 c = aa_autoinit(&aa_defparams);
3893 p = aa_getrenderparams();
3894 aa_autoinitkbd(c,0);
3898 for _ld_tmp
in "-laa" "$_ld_x11 -laa" ; do
3899 cc_check
$_ld_tmp && _ld_aa
=$_ld_tmp && _aa
=yes && break
3902 if test "$_aa" = yes ; then
3903 _def_aa
='#define HAVE_AA 1'
3905 _ld_aa
=`aalib-config --libs | cut -d " " -f 2,5,6`
3907 _vosrc
="$_vosrc vo_aa.c"
3908 _vomodules
="aa $_vomodules"
3910 _def_aa
='#undef HAVE_AA'
3911 _novomodules
="aa $_novomodules"
3917 if test "$_caca" = auto
; then
3919 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
3922 int main(void) { (void) caca_init(); return 0; }
3924 cc_check
`caca-config --libs` && _caca
=yes
3927 if test "$_caca" = yes ; then
3928 _def_caca
='#define HAVE_CACA 1'
3929 _inc_caca
=`caca-config --cflags`
3930 _ld_caca
=`caca-config --libs`
3931 _vosrc
="$_vosrc vo_caca.c"
3932 _vomodules
="caca $_vomodules"
3934 _def_caca
='#undef HAVE_CACA'
3935 _novomodules
="caca $_novomodules"
3941 if test "$_svga" = auto
; then
3944 int main(void) { return 0; }
3947 cc_check
-lvga $_ld_lm && _svga
=yes
3949 if test "$_svga" = yes ; then
3950 _def_svga
='#define HAVE_SVGALIB 1'
3952 _vosrc
="$_vosrc vo_svga.c"
3953 _vomodules
="svga $_vomodules"
3955 _def_svga
='#undef HAVE_SVGALIB'
3956 _novomodules
="svga $_novomodules"
3962 if test "$_fbdev" = auto
; then
3964 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
3966 if test "$_fbdev" = yes ; then
3967 _def_fbdev
='#define HAVE_FBDEV 1'
3968 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
3969 _vomodules
="fbdev $_vomodules"
3971 _def_fbdev
='#undef HAVE_FBDEV'
3972 _novomodules
="fbdev $_novomodules"
3979 if test "$_dvb" != no
; then
3982 #include <sys/poll.h>
3983 #include <sys/ioctl.h>
3988 #include <ost/dmx.h>
3989 #include <ost/frontend.h>
3990 #include <ost/sec.h>
3991 #include <ost/video.h>
3992 #include <ost/audio.h>
3993 int main(void) {return 0;}
3998 for I
in "$_inc_dvb" "-I/usr/src/DVB/ost/include" ; do
3999 if cc_check
"$I" ; then
4002 _res_comment
="using $_inc_dvb"
4006 test "$_dvb" = no
&& _res_comment
="specify path to DVB/ost/include with --with-dvbincdir=DIR"
4010 if test "$_dvb" = yes ; then
4011 _def_dvb
='#define HAVE_DVB 1'
4012 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4013 _aomodules
="mpegpes(dvb) $_aomodules"
4014 _vomodules
="mpegpes(dvb) $_vomodules"
4016 if test "$_dvbhead" != no
; then
4017 echocheck
"DVB HEAD"
4018 if test "$_dvbhead" != no
; then
4022 #include <sys/poll.h>
4023 #include <sys/ioctl.h>
4028 #include <linux/dvb/dmx.h>
4029 #include <linux/dvb/frontend.h>
4030 #include <linux/dvb/video.h>
4031 #include <linux/dvb/audio.h>
4032 int main(void) {return 0;}
4037 for I
in "$_inc_dvb" "-I/usr/src/DVB/include" ; do
4038 if cc_check
"$I" ; then
4041 _res_comment
="using $_inc_dvb"
4045 test "$_dvbhead" = no
&& _res_comment
="specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR"
4049 if test "$_dvbhead" = yes ; then
4050 _def_dvb
='#define HAVE_DVB_HEAD 1'
4051 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4052 _aomodules
="mpegpes(dvb) $_aomodules"
4053 _vomodules
="mpegpes(dvb) $_vomodules"
4056 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4057 _def_dvb
='#undef HAVE_DVB'
4058 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4059 _aomodules
="mpegpes(file) $_aomodules"
4060 _vomodules
="mpegpes(file) $_vomodules"
4063 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4065 _inputmodules
="dvb $_inputmodules"
4068 _noinputmodules
="dvb $_noinputmodules"
4071 echocheck
"PNG support"
4072 if test "$_png" = auto
; then
4075 # Don't check for -lpng on irix since it has its own libpng
4076 # incompatible with the GNU libpng
4077 _res_comment
="disabled on irix (not GNU libpng)"
4083 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4084 printf("libpng: %s\n", png_libpng_ver);
4085 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4088 if cc_check
-lpng -lz $_ld_lm ; then
4089 if "$TMPO" >> "$TMPLOG" ; then
4092 _res_comment
="mismatch of library and header versions"
4098 if test "$_png" = yes ; then
4099 _def_png
='#define HAVE_PNG 1'
4101 _vosrc
="$_vosrc vo_png.c"
4102 _vomodules
="png $_vomodules"
4105 _def_png
='#undef HAVE_PNG'
4106 _novomodules
="png $_novomodules"
4110 echocheck
"JPEG support"
4111 if test "$_jpg" = auto
; then
4118 #include <jpeglib.h>
4123 if cc_check
-ljpeg $_ld_lm ; then
4124 if "$TMPO" >> "$TMPLOG" ; then
4131 if test "$_jpg" = yes ; then
4132 _def_jpg
='#define HAVE_JPEG 1'
4133 _vosrc
="$_vosrc vo_jpeg.c"
4134 _vomodules
="jpeg $_vomodules"
4138 _def_jpg
='#undef HAVE_JPEG'
4139 _novomodules
="jpeg $_novomodules"
4145 echocheck
"PNM support"
4146 if test "$_pnm" = yes; then
4147 _def_pnm
="#define HAVE_PNM"
4148 _vosrc
="$_vosrc vo_pnm.c"
4149 _vomodules
="pnm $_vomodules"
4151 _def_pnm
="#undef HAVE_PNM"
4152 _novomodules
="pnm $_novomodules"
4158 echocheck
"md5sum support"
4159 if test "$_md5sum" = yes; then
4160 _def_md5sum
="#define HAVE_MD5SUM"
4161 _vosrc
="$_vosrc vo_md5sum.c md5sum.c"
4162 _vomodules
="md5sum $_vomodules"
4164 _def_md5sum
="#undef HAVE_MD5SUM"
4165 _novomodules
="md5sum $_novomodules"
4171 echocheck
"GIF support"
4172 # This is to appease people who want to force gif support.
4173 # If it is forced to yes, then we still do checks to determine
4174 # which gif library to use.
4175 if test "$_gif" = yes ; then
4180 if test "$_gif" = auto
; then
4183 #include <gif_lib.h>
4188 for _ld_tmp
in "-lungif" "-lungif $_ld_x11" "-lgif" "-lgif $_ld_x11" ; do
4189 cc_check
$_ld_tmp && "$TMPO" >> "$TMPLOG" && _ld_gif
="$_ld_tmp" && _gif
=yes && break
4193 # If no library was found, and the user wants support forced,
4194 # then we force it on with libgif, as this is the safest
4195 # assumption IMHO. (libungif & libregif both create symbolic
4196 # links to libgif. We also assume that no x11 support is needed,
4197 # because if you are forcing this, then you _should_ know what
4198 # you are doing. [ Besides, package maintainers should never
4199 # have compiled x11 deps into libungif in the first place. ] )
4202 if test "$_force_gif" = yes && test "$_gif" = no
; then
4207 if test "$_gif" = yes ; then
4208 _def_gif
='#define HAVE_GIF 1'
4209 _vosrc
="$_vosrc vo_gif89a.c"
4210 _codecmodules
="gif $_codecmodules"
4211 _vomodules
="gif89a $_vomodules"
4213 _gif
="yes (old version, some encoding functions disabled)"
4214 _def_gif_4
='#undef HAVE_GIF_4'
4218 #include <gif_lib.h>
4219 void catch() { exit(1); }
4221 signal(SIGSEGV, catch); // catch segfault
4222 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4223 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4227 if cc_check
"$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
4228 _def_gif_4
='#define HAVE_GIF_4 1'
4232 _def_gif
='#undef HAVE_GIF'
4233 _def_gif_4
='#undef HAVE_GIF_4'
4234 _novomodules
="gif89a $_novomodules"
4235 _nocodecmodules
="gif $_nocodecmodules"
4241 case "$_gif" in yes*)
4242 echocheck
"broken giflib workaround"
4243 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4246 #include <gif_lib.h>
4249 printf("UserData is at address %p\n", gif.UserData);
4253 if cc_check
"$_ld_gif" && "$TMPO" >>"$TMPLOG" 2>&1 ; then
4254 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4263 echocheck
"VESA support"
4264 if test "$_vesa" = auto
; then
4267 int main(void) { vbeVersion(); return 0; }
4270 cc_check
-lvbe -llrmi && _vesa
=yes
4272 if test "$_vesa" = yes ; then
4273 _def_vesa
='#define HAVE_VESA 1'
4274 _ld_vesa
="-lvbe -llrmi"
4275 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4276 _vomodules
="vesa $_vomodules"
4278 _def_vesa
='#undef HAVE_VESA'
4279 _novomodules
="vesa $_novomodules"
4289 if test -z "$_sdlconfig" ; then
4290 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4291 _sdlconfig
="sdl-config"
4292 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4293 _sdlconfig
="sdl11-config"
4298 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4301 int main(int argc, char *argv[]) { return 0; }
4304 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4305 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4306 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4307 if test "$_sdlversion" -gt 116 ; then
4308 if test "$_sdlversion" -lt 121 ; then
4309 _def_sdlbuggy
='#define BUGGY_SDL'
4311 _def_sdlbuggy
='#undef BUGGY_SDL'
4315 _res_comment
=outdated
4320 if test "$_sdl" = yes ; then
4321 _def_sdl
='#define HAVE_SDL 1'
4323 _ld_sdl
=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
4324 _inc_sdl
=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
4326 _ld_sdl
=`$_sdlconfig --libs | sed s/-mwindows//`
4327 _inc_sdl
=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
4329 _ld_sdl
=`$_sdlconfig --libs`
4330 _inc_sdl
=`$_sdlconfig --cflags`
4332 _vosrc
="$_vosrc vo_sdl.c"
4333 _vomodules
="sdl $_vomodules"
4334 _aosrc
="$_aosrc ao_sdl.c"
4335 _aomodules
="sdl $_aomodules"
4336 _res_comment
="using $_sdlconfig"
4338 _def_sdl
='#undef HAVE_SDL'
4339 _novomodules
="sdl $_novomodules"
4340 _noaomodules
="sdl $_noaomodules"
4344 echocheck
"Windows waveout"
4345 if test "$_win32waveout" = auto
; then
4347 #include <windows.h>
4348 #include <mmsystem.h>
4349 int main(void) { return 0; }
4352 cc_check
-lwinmm && _win32waveout
=yes
4354 if test "$_win32waveout" = yes ; then
4355 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4356 _ld_win32libs
="-lwinmm $_ld_win32libs"
4357 _aosrc
="$_aosrc ao_win32.c"
4358 _aomodules
="win32 $_aomodules"
4360 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4361 _noaomodules
="win32 $_noaomodules"
4363 echores
"$_win32waveout"
4366 if test "$_directx" = auto
; then
4368 #include <windows.h>
4371 int main(void) { return 0; }
4374 cc_check
-lgdi32 && _directx
=yes
4376 if test "$_directx" = yes ; then
4377 _def_directx
='#define HAVE_DIRECTX 1'
4378 _ld_win32libs
="-lgdi32 $_ld_win32libs"
4379 _vosrc
="$_vosrc vo_directx.c"
4380 _vomodules
="directx $_vomodules"
4381 _aosrc
="$_aosrc ao_dsound.c"
4382 _aomodules
="dsound $_aomodules"
4384 _def_directx
='#undef HAVE_DIRECTX'
4385 _novomodules
="directx $_novomodules"
4386 _noaomodules
="dsound $_noaomodules"
4391 if test "$_nas" = auto
; then
4393 #include <audio/audiolib.h>
4394 int main(void) { return 0; }
4397 cc_check
-laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas
=yes
4399 if test "$_nas" = yes ; then
4400 _def_nas
='#define HAVE_NAS 1'
4401 _ld_nas
="-laudio -lXt $_ld_x11"
4402 _aosrc
="$_aosrc ao_nas.c"
4403 _aomodules
="nas $_aomodules"
4405 _noaomodules
="nas $_noaomodules"
4406 _def_nas
='#undef HAVE_NAS'
4411 if test "$_dxr2" = auto
; then
4414 #include <dxr2ioctl.h>
4415 int main(void) { return 0; }
4417 for _inc_dxr2
in "$_inc_dxr2" \
4418 "-I/usr/local/include/dxr2" \
4419 "-I/usr/include/dxr2"; do
4420 cc_check
$_inc_dxr2 && _dxr2
=yes && break
4423 if test "$_dxr2" = yes; then
4424 _def_dxr2
='#define HAVE_DXR2 1'
4425 _vosrc
="$_vosrc vo_dxr2.c"
4426 _aosrc
="$_aosrc ao_dxr2.c"
4427 _aomodules
="dxr2 $_aomodules"
4428 _vomodules
="dxr2 $_vomodules"
4429 _res_comment
="using $_inc_dxr2"
4431 _def_dxr2
='#undef HAVE_DXR2'
4432 _noaomodules
="dxr2 $_noaomodules"
4433 _novomodules
="dxr2 $_novomodules"
4439 if test "$_dxr3" = auto
; then
4441 #include <linux/em8300.h>
4442 int main(void) { return 0; }
4445 cc_check
&& _dxr3
=yes
4447 if test "$_dxr3" = yes ; then
4448 _def_dxr3
='#define HAVE_DXR3 1'
4449 _vosrc
="$_vosrc vo_dxr3.c"
4450 _vomodules
="dxr3 $_vomodules"
4452 _def_dxr3
='#undef HAVE_DXR3'
4453 _novomodules
="dxr3 $_novomodules"
4454 if test "$_mp1e" = auto
; then
4455 # we don't need mp1e
4462 if test "$_mmx" = no
; then
4463 # mp1e REQUIRES mmx!
4466 if test "$_mp1e" != no
; then
4468 _def_mp1e
='#define USE_MP1E'
4469 _ld_mp1e
='libmp1e/libmp1e.a'
4470 _dep_mp1e
='libmp1e/libmp1e.a'
4473 _def_mp1e
='#undef USE_MP1E'
4481 if test "$_fame" = auto
; then
4483 test "$_dxr2" = yes && _fame
=auto
4484 test "$_dxr3" = yes && _fame
=auto
4485 test "$_dvb" = yes && _fame
=auto
4487 if test "$_fame" = auto
; then
4489 if test -d libfame
&& test -f libfame
/fame.h
; then
4490 # disable fame on cygwin as no sense to port - atmos
4493 _res_comment
="no fame dir"
4498 _def_fame
='#undef USE_LIBFAME'
4499 if test "$_fame" = yes ; then
4500 _def_fame
='#define USE_LIBFAME 1'
4501 _ld_fame
='libfame/libfame.a'
4510 echocheck
"OSS Audio"
4511 if test "$_ossaudio" = auto
; then
4513 #include <sys/ioctl.h>
4515 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4518 cc_check
&& _ossaudio
=yes
4520 if test "$_ossaudio" = yes ; then
4521 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4522 _aosrc
="$_aosrc ao_oss.c"
4523 _aomodules
="oss $_aomodules"
4524 if test "$_linux_devfs" = yes; then
4525 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4526 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4529 #include <sys/ioctl.h>
4531 #ifdef OPEN_SOUND_SYSTEM
4532 int main(void) { return 0; }
4534 #error Not the real thing
4538 cc_check
&& _real_ossaudio
=yes
4539 if test "$_real_ossaudio" = yes; then
4540 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4541 elif netbsd || openbsd
; then
4542 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4543 _ld_arch
="$_ld_arch -lossaudio"
4545 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4547 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4550 _def_ossaudio
='#undef USE_OSS_AUDIO'
4551 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4552 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4553 _noaomodules
="oss $_noaomodules"
4555 echores
"$_ossaudio"
4559 if test "$_arts" = auto
; then
4561 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4565 int main(void) { return 0; }
4567 cc_check
`artsc-config --libs` `artsc-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _arts
=yes
4572 if test "$_arts" = yes ; then
4573 _def_arts
='#define USE_ARTS 1'
4574 _aosrc
="$_aosrc ao_arts.c"
4575 _aomodules
="arts $_aomodules"
4576 _ld_arts
=`artsc-config --libs`
4577 _inc_arts
=`artsc-config --cflags`
4579 _noaomodules
="arts $_noaomodules"
4585 if test "$_esd" = auto
; then
4587 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4591 int main(void) { return 0; }
4593 cc_check
`esd-config --libs` `esd-config --cflags` && "$TMPO" >> "$TMPLOG" 2>&1 && _esd
=yes
4599 if test "$_esd" = yes ; then
4600 _def_esd
='#define USE_ESD 1'
4601 _aosrc
="$_aosrc ao_esd.c"
4602 _aomodules
="esd $_aomodules"
4603 _ld_esd
=`esd-config --libs`
4604 _inc_esd
=`esd-config --cflags`
4606 echocheck
"esd_get_latency()"
4609 int main(void) { return esd_get_latency(0); }
4611 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4612 echores
"$_esd_latency"
4614 _def_esd
='#undef USE_ESD'
4615 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4616 _noaomodules
="esd $_noaomodules"
4620 if test "$_polyp" = auto
; then
4622 if ( pkg-config
--exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ) >> "$TMPLOG" 2>&1 ; then
4625 #include <polyp/polyplib.h>
4626 #include <polyp/mainloop.h>
4627 #include <polyp/polyplib-error.h>
4628 int main(void) { return 0; }
4630 cc_check
`pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && "$TMPO" >> "$TMPLOG" 2>&1 && _polyp
=yes
4636 if test "$_polyp" = yes ; then
4637 _def_polyp
='#define USE_POLYP 1'
4638 _aosrc
="$_aosrc ao_polyp.c"
4639 _aomodules
="polyp $_aomodules"
4640 _ld_polyp
=`pkg-config --libs polyplib polyplib-error polyplib-mainloop`
4641 _inc_polyp
=`pkg-config --cflags polyplib polyplib-error polyplib-mainloop`
4643 _def_polyp
='#undef USE_POLYP'
4644 _noaomodules
="polyp $_noaomodules"
4649 if test "$_jack" = auto
; then
4653 #include <jack/jack.h>
4654 int main(void) { jack_client_new("test"); return 0; }
4656 if cc_check
-ljack ; then
4658 elif cc_check
`pkg-config --libs --cflags --silence-errors jack` ; then
4659 _ld_jack
="`pkg-config --libs jack`"
4660 _inc_jack
="`pkg-config --cflags jack`"
4666 if test "$_jack" = yes ; then
4667 _def_jack
='#define USE_JACK 1'
4668 _aosrc
="$_aosrc ao_jack.c"
4669 _aomodules
="jack $_aomodules"
4671 _noaomodules
="jack $_noaomodules"
4676 echocheck
"ALSA audio"
4677 if test "$_alsa" != no
; then
4680 #include <sys/asoundlib.h>
4681 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==5)); }
4683 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.5.x'
4686 #include <sys/asoundlib.h>
4687 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4689 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.9.x-sys'
4691 #include <alsa/asoundlib.h>
4692 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4694 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.9.x-alsa'
4697 #include <sys/asoundlib.h>
4698 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4700 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='1.0.x-sys'
4702 #include <alsa/asoundlib.h>
4703 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4705 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='1.0.x-alsa'
4707 _def_alsa5
='#undef HAVE_ALSA5'
4708 _def_alsa9
='#undef HAVE_ALSA9'
4709 _def_alsa1x
='#undef HAVE_ALSA1X'
4710 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
4711 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
4712 if test "$_alsaver" ; then
4714 if test "$_alsaver" = '0.5.x' ; then
4715 _aosrc
="$_aosrc ao_alsa5.c"
4716 _aomodules
="alsa5 $_aomodules"
4717 _def_alsa5
='#define HAVE_ALSA5 1'
4718 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4719 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
4720 elif test "$_alsaver" = '0.9.x-sys' ; then
4721 _aosrc
="$_aosrc ao_alsa.c"
4722 _aomodules
="alsa $_aomodules"
4723 _def_alsa9
='#define HAVE_ALSA9 1'
4724 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4725 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
4726 elif test "$_alsaver" = '0.9.x-alsa' ; then
4727 _aosrc
="$_aosrc ao_alsa.c"
4728 _aomodules
="alsa $_aomodules"
4729 _def_alsa9
='#define HAVE_ALSA9 1'
4730 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4731 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
4732 elif test "$_alsaver" = '1.0.x-sys' ; then
4733 _aosrc
="$_aosrc ao_alsa.c"
4734 _aomodules
="alsa $_aomodules"
4735 _def_alsa1x
="#define HAVE_ALSA1X 1"
4736 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4737 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
4738 elif test "$_alsaver" = '1.0.x-alsa' ; then
4739 _aosrc
="$_aosrc ao_alsa.c"
4740 _aomodules
="alsa $_aomodules"
4741 _def_alsa1x
="#define HAVE_ALSA1X 1"
4742 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4743 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
4746 _res_comment
="unknown version"
4748 _ld_alsa
="-lasound $_ld_dl $_ld_pthread"
4750 _noaomodules
="alsa $_noaomodules"
4755 echocheck
"Sun audio"
4756 if test "$_sunaudio" = auto
; then
4758 #include <sys/types.h>
4759 #include <sys/audioio.h>
4760 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4763 cc_check
&& _sunaudio
=yes
4765 if test "$_sunaudio" = yes ; then
4766 _def_sunaudio
='#define USE_SUN_AUDIO 1'
4767 _aosrc
="$_aosrc ao_sun.c"
4768 _aomodules
="sun $_aomodules"
4770 _def_sunaudio
='#undef USE_SUN_AUDIO'
4771 _noaomodules
="sun $_noaomodules"
4773 echores
"$_sunaudio"
4776 echocheck
"Sun mediaLib"
4777 if test "$_mlib" = auto
; then
4779 test -z "$_mlibdir" && _mlibdir
=/opt
/SUNWmlib
4782 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
4784 cc_check
-I${_mlibdir}/include
-L${_mlibdir}/lib
-lmlib && _mlib
=yes
4786 if test "$_mlib" = yes ; then
4787 _def_mlib
='#define HAVE_MLIB 1'
4788 _inc_mlib
=" -I${_mlibdir}/include "
4789 _ld_mlib
=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
4791 _def_mlib
='#undef HAVE_MLIB'
4796 echocheck
"SGI audio"
4797 if test "$_sgiaudio" = auto
; then
4798 # check for SGI audio
4800 #include <dmedia/audio.h>
4801 int main(void) { return 0; }
4804 cc_check
&& _sgiaudio
=yes
4806 if test "$_sgiaudio" = "yes" ; then
4807 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
4808 _ld_sgiaudio
='-laudio'
4809 _aosrc
="$_aosrc ao_sgi.c"
4810 _aomodules
="sgi $_aomodules"
4812 _def_sgiaudio
='#undef USE_SGI_AUDIO'
4813 _noaomodules
="sgi $_noaomodules"
4815 echores
"$_sgiaudio"
4818 echocheck
"VCD support"
4819 if linux || bsdos || freebsd || netbsd || sunos || darwin
; then
4820 _inputmodules
="vcd $_inputmodules"
4821 _def_vcd
='#define HAVE_VCD 1'
4824 _def_vcd
='#undef HAVE_VCD'
4825 _noinputmodules
="vcd $_noinputmodules"
4826 echores
"not supported on this OS"
4829 echocheck
"DVD support (libmpdvdkit)"
4830 if test "$_dvdkit" = auto
; then
4832 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
; then
4833 test -f "./libmpdvdkit2/Makefile" && _dvdkit
=yes
4834 test -f "./libmpdvdkit/Makefile" && _dvdkit
=yes
4837 if test "$_dvdkit" = yes ; then
4838 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
4839 if test -f "./libmpdvdkit2/Makefile" ; then
4840 _inputmodules
="mpdvdkit2 $_inputmodules"
4841 _dvdread
=libmpdvdkit2
4845 _inputmodules
="mpdvdkit $_inputmodules"
4846 _dvdread
=libmpdvdkit
4849 _noinputmodules
="mpdvdkit $_noinputmodules"
4851 _def_dvd_linux
='#undef HAVE_LINUX_DVD_STRUCT'
4852 _def_dvd_bsd
='#undef HAVE_BSD_DVD_STRUCT'
4853 _dev_dvd_openbsd
='#undef HAVE_OPENBSD_DVD_STRUCT'
4854 _def_dvd_darwin
='#undef DARWIN_DVD_IOCTL'
4855 if linux || netbsd || openbsd || bsdos
; then
4856 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
4858 _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
4862 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
4865 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
4870 _noinputmodules
="mpdvdkit $_noinputmodules"
4872 if test "$_dvdkit" = yes ||
test "$_dvdkit2" = yes; then
4878 echocheck
"DVD support (libdvdread)"
4879 if test "$_dvdread" = auto
; then
4881 #include <inttypes.h>
4882 #include <dvdread/dvd_reader.h>
4883 #include <dvdread/ifo_types.h>
4884 #include <dvdread/ifo_read.h>
4885 #include <dvdread/nav_read.h>
4886 int main(void) { return 0; }
4889 if test "$_dl" = yes; then
4891 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
4895 _def_mpdvdkit
="#undef USE_MPDVDKIT"
4899 _def_dvdread
='#define USE_DVDREAD 1'
4900 _ld_dvdread
='-ldvdread'
4901 _inputmodules
="dvdread $_inputmodules"
4905 _def_dvdread
='#undef USE_DVDREAD'
4906 _noinputmodules
="dvdread $_noinputmodules"
4911 _def_dvdread
='#define USE_DVDREAD 1'
4912 _ld_dvdread
='-Llibmpdvdkit -lmpdvdkit'
4913 _noinputmodules
="dvdread $_noinputmodules"
4914 _def_mpdvdkit
="#define USE_MPDVDKIT 1"
4915 echores
"disabled by libmpdvdkit"
4919 _def_dvdread
='#define USE_DVDREAD 1'
4920 _ld_dvdread
='-Llibmpdvdkit2 -lmpdvdkit'
4921 _noinputmodules
="dvdread $_noinputmodules"
4922 _def_mpdvdkit
="#define USE_MPDVDKIT 2"
4923 echores
"disabled by libmpdvdkit2"
4927 # dvdnav disabled, it does not work
4928 # echocheck "DVD support (libdvdnav)"
4929 # if test "$_dvdnav" = yes ; then
4931 # #include <dvdnav.h>
4932 # int main(void) { dvdnav_t *dvd=0; return 0; }
4935 # test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
4936 # if test -z "$_dvdnavconfig" ; then
4937 # if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
4938 # _dvdnavconfig="dvdnav-config"
4941 # test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
4943 # test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
4944 # cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
4946 # if test "$_dvdnav" = yes ; then
4948 # _def_dvdnav='#define USE_DVDNAV 1'
4949 # if test -n "$_legal_dvdnavdir" ; then
4950 # _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
4951 # elif test -n "$_dvdnavconfig" ; then
4952 # _ld_css="$_ld_css `$_dvdnavconfig --libs`"
4954 # _ld_css="$_ld_css -ldvdnav"
4956 # if test -n "$_dvdnavconfig" ; then
4957 # _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
4958 # _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
4960 # if test -n "$_dvdnavdir" ; then
4961 # _inc_extra="$_inc_extra -I$_dvdnavdir"
4963 # _inputmodules="dvdnav $_inputmodules"
4966 # _def_dvdnav='#undef USE_DVDNAV'
4967 # _noinputmodules="dvdnav $_noinputmodules"
4971 echocheck
"cdparanoia"
4972 if test "$_cdparanoia" = auto
; then
4974 #include <cdda_interface.h>
4975 #include <cdda_paranoia.h>
4976 // This need a better test. How ?
4977 int main(void) { return 1; }
4980 for _inc_tmp
in "$_inc_cdparanoia" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
4981 cc_check
$_inc_tmp $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm && _inc_cdparanoia
="$_inc_tmp" && _cdparanoia
=yes && break
4984 if test "$_cdparanoia" = yes ; then
4985 _def_cdparanoia
='#define HAVE_CDDA'
4986 _inputmodules
="cdda $_inputmodules"
4987 _ld_cdparanoia
="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
4988 openbsd
&& _ld_cdparanoia
="$_ld_cdparanoia -lutil"
4990 _def_cdparanoia
='#undef HAVE_CDDA'
4991 _noinputmodules
="cdda $_noinputmodules"
4993 echores
"$_cdparanoia"
4996 echocheck
"freetype >= 2.0.9"
4998 # freetype depends on iconv
4999 if test "$_iconv" = no
; then
5001 _res_comment
="iconv support needed"
5004 if test "$_freetype" = auto
; then
5005 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5008 #include <ft2build.h>
5009 #include FT_FREETYPE_H
5010 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5011 #error "Need FreeType 2.0.9 or newer"
5016 FT_Int major=-1,minor=-1,patch=-1;
5017 int err=FT_Init_FreeType(&library);
5019 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5022 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5023 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5024 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5025 (int)major,(int)minor,(int)patch );
5026 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5027 printf("Library and header version mismatch! Fix it in your distribution!\n");
5034 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && $TMPO >> "$TMPLOG" && _freetype
=yes
5039 if test "$_freetype" = yes ; then
5040 _def_freetype
='#define HAVE_FREETYPE'
5041 _inc_freetype
=`$_freetypeconfig --cflags`
5042 _ld_freetype
=`$_freetypeconfig --libs`
5044 _def_freetype
='#undef HAVE_FREETYPE'
5046 echores
"$_freetype"
5048 if test "$_freetype" = no
; then
5050 _res_comment
="freetype support needed"
5052 echocheck
"fontconfig"
5053 if test "$_fontconfig" = auto
; then
5056 #include <fontconfig/fontconfig.h>
5061 printf("Couldn't initialize fontconfig lib\n");
5069 if cc_check
-lfontconfig ; then
5070 _ld_fontconfig
="-lfontconfig"
5071 elif cc_check
`pkg-config --cflags --libs fontconfig` ; then
5072 _inc_fontconfig
=`pkg-config --cflags fontconfig`
5073 _ld_fontconfig
=`pkg-config --libs fontconfig`
5078 if test "$_fontconfig" = yes ; then
5079 _def_fontconfig
='#define HAVE_FONTCONFIG'
5081 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5083 echores
"$_fontconfig"
5085 echocheck
"fribidi with charsets"
5086 if test "$_fribidi" = yes ; then
5087 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5090 /* workaround for fribidi 0.10.4 and below */
5091 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5092 #include <fribidi/fribidi.h>
5095 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5096 printf("Fribidi headers are not consistents with the library!\n");
5103 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && $TMPO >> "$TMPLOG" && _fribidi
=yes
5108 if test "$_fribidi" = yes ; then
5109 _def_fribidi
='#define USE_FRIBIDI'
5110 _inc_fribidi
=`$_fribidiconfig --cflags`
5111 _ld_fribidi
=`$_fribidiconfig --libs`
5113 _def_fribidi
='#undef USE_FRIBIDI'
5119 if test "$_enca" = auto
; then
5126 langs = enca_get_languages(&langcnt);
5131 cc_check
-lenca $_ld_lm && _enca
=yes
5133 if test "$_enca" = yes ; then
5134 _def_enca
='#define HAVE_ENCA 1'
5137 _def_enca
='#undef HAVE_ENCA'
5145 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5148 cc_check
-lz && _zlib
=yes
5149 if test "$_zlib" = yes ; then
5150 _def_zlib
='#define HAVE_ZLIB 1'
5153 _def_zlib
='#undef HAVE_ZLIB'
5159 if test "$_rtc" = auto
; then
5161 #include <sys/ioctl.h>
5163 #include <linux/rtc.h>
5166 #define RTC_PIE_ON RTCIO_PIE_ON
5168 int main(void) { return RTC_PIE_ON; }
5171 cc_check
&& _rtc
=yes
5173 if test "$_rtc" = yes ; then
5174 _def_rtc
='#define HAVE_RTC 1'
5176 _def_rtc
='#undef HAVE_RTC'
5181 echocheck
"external liblzo support"
5182 if test "$_liblzo" = auto
; then
5186 int main(void) { lzo_init();return 0; }
5188 cc_check
-llzo && _liblzo
=yes
5190 if test "$_liblzo" = yes ; then
5191 _def_liblzo
='#define USE_LIBLZO 1'
5193 _codecmodules
="liblzo $_codecmodules"
5195 _def_liblzo
='#undef USE_LIBLZO'
5196 _nocodecmodules
="liblzo $_nocodecmodules"
5201 echocheck
"mad support"
5202 if test "$_mad" = auto
; then
5206 int main(void) { return 0; }
5208 cc_check
$_madlibdir -lmad && _mad
=yes
5210 if test "$_mad" = yes ; then
5211 _def_mad
='#define USE_LIBMAD 1'
5213 _codecmodules
="libmad $_codecmodules"
5215 _def_mad
='#undef USE_LIBMAD'
5216 _nocodecmodules
="libmad $_nocodecmodules"
5221 if test "$_toolame" = auto
; then
5223 #include <toolame.h>
5224 int main(void) { toolame_init(); return 0; }
5227 _toolame_extraflags
=""
5228 _toolame_lib
="-ltoolame"
5229 if test -n "$_toolamedir"; then
5230 _toolame_extraflags
="-I$_toolamedir -L$_toolamedir"
5232 cc_check
$_toolame_extraflags $_toolame_lib $_ld_lm && _toolame
=yes
5234 if test "$_toolame" = yes ; then
5235 _def_toolame
='#define HAVE_TOOLAME 1'
5236 _codecmodules
="$_codecmodules toolame"
5238 _def_toolame
='#undef HAVE_TOOLAME'
5240 _nocodecmodules
="toolame $_nocodecmodules"
5242 if test "$_toolamedir" ; then
5243 _res_comment
="using $_toolamedir"
5248 if test "$_twolame" = auto
; then
5250 #include <twolame.h>
5251 int main(void) { twolame_init(); return 0; }
5254 _twolame_lib
="-ltwolame"
5255 cc_check
$_twolame_lib $_ld_lm && _twolame
=yes
5257 if test "$_twolame" = yes ; then
5258 _def_twolame
='#define HAVE_TWOLAME 1'
5259 _codecmodules
="$_codecmodules twolame"
5261 _def_twolame
='#undef HAVE_TWOLAME'
5263 _nocodecmodules
="twolame $_nocodecmodules"
5267 echocheck
"OggVorbis support"
5268 if test "$_tremor_internal" = yes; then
5270 elif test "$_vorbis" = auto
; then
5273 #include <vorbis/codec.h>
5274 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5276 cc_check
-lvorbis -logg $_ld_lm && _vorbis
=yes
5278 if test "$_vorbis" = yes ; then
5279 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5280 if test "$_tremor_internal" = yes ; then
5281 # do not set _ld_vorbis as it is resolved separately
5282 # mp3lame support for vorbis is deprecated so don't care
5283 _def_tremor
='#define TREMOR 1'
5284 if test "$_tremor_low" = yes ; then
5285 _tremor_flags
='-D_LOW_ACCURACY_'
5289 _codecmodules
="tremor(internal) $_codecmodules"
5290 elif test "$_tremor" = yes ; then
5291 _def_tremor
='#define TREMOR 1'
5292 _ld_vorbis
='-lvorbisidec'
5293 _codecmodules
="tremor $_codecmodules"
5295 _def_tremor
='#undef TREMOR'
5296 _ld_vorbis
='-lvorbis -logg'
5297 _codecmodules
="libvorbis $_codecmodules"
5300 _def_vorbis
='#undef HAVE_OGGVORBIS'
5301 _def_tremor
='#undef TREMOR'
5302 _nocodecmodules
="libvorbis $_nocodecmodules"
5304 if test "$_vorbis" = yes -a "$_tremor_internal" = yes -a "$_tremor_low" = yes ; then
5305 _res_comment
="internal low accuracy Tremor"
5306 elif test "$_vorbis" = yes -a "$_tremor_internal" = yes ; then
5307 _res_comment
="internal Tremor"
5308 elif test "$_vorbis" = yes -a "$_tremor" = yes ; then
5309 _res_comment
="Tremor"
5313 echocheck
"OggTheora support"
5314 if test "$_theora" = auto
; then
5316 if ( pkg-config
--exists 'theora' ) >> "$TMPLOG" 2>&1 ; then
5318 #include <theora/theora.h>
5322 /* theora is in flux, make sure that all interface routines and
5323 * datatypes exist and work the way we expect it, so we don't break
5333 theora_info_init (&inf);
5334 theora_comment_init (&tc);
5338 /* we don't want to execute this kind of nonsense; just for making sure
5339 * that compilation works... */
5340 memset(&op, 0, sizeof(op));
5341 r = theora_decode_header (&inf, &tc, &op);
5342 r = theora_decode_init (&st, &inf);
5343 t = theora_granule_time (&st, op.granulepos);
5344 r = theora_decode_packetin (&st, &op);
5345 r = theora_decode_YUVout (&st, &yuv);
5351 cc_check
`pkg-config --libs --cflags theora` && _theora
=yes
5354 if test "$_theora" = yes ; then
5355 _def_theora
='#define HAVE_OGGTHEORA 1'
5356 _codecmodules
="libtheora $_codecmodules"
5357 _ld_theora
=`pkg-config --libs --cflags theora`
5359 _def_theora
='#undef HAVE_OGGTHEORA'
5360 _nocodecmodules
="libtheora $_nocodecmodules"
5364 echocheck
"mp3lib support"
5365 if test "$_mp3lib" = yes ; then
5366 _def_mp3lib
='#define USE_MP3LIB 1'
5367 _codecmodules
="mp3lib $_codecmodules"
5369 _def_mp3lib
='#undef USE_MP3LIB'
5370 _nocodecmodules
="mp3lib $_nocodecmodules"
5374 echocheck
"liba52 support"
5375 if test "$_liba52" = yes ; then
5376 _def_liba52
='#define USE_LIBA52 1'
5377 _codecmodules
="liba52 $_codecmodules"
5379 _def_liba52
='#undef USE_LIBA52'
5380 _nocodecmodules
="liba52 $_nocodecmodules"
5384 echocheck
"libdts support"
5385 if test "$_libdts" = auto
; then
5388 #include <inttypes.h>
5390 int main(void) { dts_init (0); return 0; }
5392 cc_check
$_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts
=yes
5394 if test "$_libdts" = yes ; then
5395 _def_libdts
='#define CONFIG_DTS 1'
5396 _ld_libdts
="$_ld_libdts -ldts"
5397 _codecmodules
="libdts $_codecmodules"
5399 _def_libdts
='#undef CONFIG_DTS'
5400 _nocodecmodules
="libdts $_nocodecmodules"
5404 echocheck
"libmpeg2 support"
5405 if test "$_libmpeg2" = yes ; then
5406 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5407 _codecmodules
="libmpeg2 $_codecmodules"
5409 _def_libmpeg2
='#undef USE_LIBMPEG2'
5410 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5412 echores
"$_libmpeg2"
5414 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5415 if test "$_musepack" = auto
; then
5418 #include <mpcdec/mpcdec.h>
5420 mpc_streaminfo info;
5421 mpc_decoder decoder;
5422 mpc_decoder_set_streaminfo(&decoder, &info);
5423 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5426 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5428 if test "$_musepack" = yes ; then
5429 _def_musepack
='#define HAVE_MUSEPACK 1'
5430 _ld_musepack
='-lmpcdec'
5431 _codecmodules
="musepack $_codecmodules"
5433 _def_musepack
='#undef HAVE_MUSEPACK'
5434 _nocodecmodules
="musepack $_nocodecmodules"
5436 echores
"$_musepack"
5439 echocheck
"Matroska support"
5440 if test "$_matroska_internal" = yes ; then
5441 _inputmodules
="matroska $_inputmodules"
5442 _def_matroska
='#define HAVE_MATROSKA 1'
5444 _noinputmodules
="matroska $_noinputmodules"
5445 _def_matroska
='#undef HAVE_MATROSKA'
5447 echores
"$_matroska_internal"
5449 echocheck
"FAAC (AAC encoder) support"
5450 if test "$_faac" = auto
; then
5452 #include <inttypes.h>
5454 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5457 for _ld_tmp
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5458 cc_check
-c -O4 $_ld_tmp $_ld_lm && _ld_faac
="$_ld_tmp" && _faac
=yes && break
5461 if test "$_faac" = yes ; then
5462 _def_faac
="#define HAVE_FAAC 1"
5463 _codecmodules
="faac $_codecmodules"
5465 _def_faac
="#undef HAVE_FAAC"
5466 _nocodecmodules
="faac $_nocodecmodules"
5470 echocheck
"internal FAAD2 (AAC) support"
5471 _inc_faad
="-I`pwd`/libfaad2"
5472 if test "$_faad_internal" = auto
; then
5473 # the faad check needs a config.h file
5474 if not
test -f "config.h" ; then
5475 cat > config.h
<< EOF
5476 /* C99 lrintf function available */
5480 # internal faad: check if our dear gcc is able to compile it...
5481 cp "`pwd`/libfaad2/cfft.c" $TMPC
5482 if ( cc_check
-c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer -D_GNU_SOURCE $_inc_faad ); then
5485 _faad_internal
="no (broken gcc)"
5488 if test "$_faad_internal" = yes ; then
5489 _def_faad_internal
="#define USE_INTERNAL_FAAD 1"
5492 _def_faad_internal
="#undef USE_INTERNAL_FAAD"
5495 echores
"$_faad_internal"
5498 echocheck
"external FAAD2 (AAC) support"
5499 if test "$_faad_external" != no
; then
5501 _inc_faad
="$_inc_extra"
5502 # external faad: check if it's really faad2 :)
5503 if test "$_faad_external" = auto
; then
5507 #ifndef FAAD_MIN_STREAMSIZE
5508 #error Too old version
5510 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5512 cc_check
$_inc_faad $_ld_faad $_ld_lm && _faad_external
=yes
5515 echores
"$_faad_external"
5517 if test "$_faad_external" = yes; then
5518 _def_faad
='#define HAVE_FAAD 1'
5519 _codecmodules
="faad2(external) $_codecmodules"
5520 elif test "$_faad_internal" = yes; then
5521 _def_faad
='#define HAVE_FAAD 1'
5522 _codecmodules
="faad2(internal) $_codecmodules"
5524 _def_faad
='#undef HAVE_FAAD'
5525 _nocodecmodules
="faad2 $_nocodecmodules"
5530 echocheck
"LADSPA plugin support"
5531 if test "$_ladspa" = auto
; then
5536 const LADSPA_Descriptor *ld = NULL;
5541 cc_check
&& _ladspa
=yes
5543 if test "$_ladspa" = yes; then
5544 _def_ladspa
="#define HAVE_LADSPA"
5545 _afsrc
="$_afsrc af_ladspa.c"
5546 _afmodules
="ladspa $_afmodules"
5548 _def_ladspa
="#undef HAVE_LADSPA"
5549 _noafmodules
="ladspa $_noafmodules"
5554 if test "$_win32" = auto
; then
5558 _win32
=no
# x86 arch only
5562 if test "$_win32" != no
; then
5563 if test -z "$_win32libdir" ; then
5564 for I
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs
/usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5565 if test -d "$I" ; then
5573 echocheck
"Win32 codec DLL support"
5574 if test "$_win32" = auto
; then
5576 test -n "$_win32libdir" && _win32
=yes
5578 if test "$_win32" = yes ; then
5579 _def_win32
='#define USE_WIN32DLL 1'
5580 _res_comment
="using $_win32libdir"
5582 _def_win32
='#undef USE_WIN32DLL'
5583 _nocodecmodules
="win32 $_nocodecmodules"
5588 if test "$_win32" != no
; then
5589 _def_win32_loader
='#undef WIN32_LOADER'
5590 echocheck
"Win32 loader support"
5591 _ld_win32
='loader/libloader.a'
5592 _dep_win32
='loader/libloader.a'
5593 _codecmodules
="win32 $_codecmodules"
5595 x86
&& _ld_win32
="$_ld_win32 -li386"
5598 _def_win32_loader
='#define WIN32_LOADER 1'
5601 _ld_win32libs
="$_ld_win32libs -ladvapi32 -lole32"
5602 echores
"no (using native windows)"
5606 echocheck
"DirectShow"
5609 if test "$_dshow" != no
; then
5611 # check if compiler supports C++ and C++-libs are installed correctly
5612 cat > "$TMPCPP" << EOF
5616 public: int myreturn(void);
5618 int myclass::myreturn(void) { ret = 0; return ret ; }
5619 int main(void) { myclass myobject; return myobject.myreturn(); }
5621 echo "------------------------------------------------" >> "$TMPLOG"
5622 cat "$TMPCPP" >> "$TMPLOG"
5623 if ( $_cc "$TMPCPP" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; then
5625 echores
"yes (C++ is ok)"
5630 Your C++ runtime environment is broken.
5632 Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
5633 Are the C++ libraries correctly installed?
5634 Check for libstdc++ and in (/etc/)ld.so.conf.
5636 If you do not need DirectShow support, you can also use:
5637 ./configure --disable-dshow <your-normal-configure-options>
5638 to disable building the C++ based DirectShow code.
5641 die
"$_cc's C++ is broken"
5649 if test "$_dshow" = yes ; then
5650 _def_dshow
='#define USE_DIRECTSHOW 1'
5651 _ld_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5652 _dep_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5653 _codecmodules
="dshow/dmo $_codecmodules"
5655 _def_dshow
='#undef USE_DIRECTSHOW'
5656 _nocodecmodules
="dshow/dmo $_nocodecmodules"
5660 echocheck
"XAnim DLL"
5661 if test "$_xanim" = auto
; then
5663 _res_comment
="dynamic loader support needed"
5664 if test "$_dl" = yes ; then
5665 _res_comment
="no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html"
5666 if test -z "$_xanimlibdir" ; then
5667 for I
in "$_libdir/codecs" /usr
/local
/lib
/xanim
/mods
/usr
/lib
/xanim
/mods
/usr
/lib
/xanim
$XANIM_MOD_DIR ; do
5668 if test -d "$I" ; then
5674 test "$_xanimlibdir" && _xanim
=yes
5677 if test "$_xanim" = yes ; then
5678 _def_xanim
='#define USE_XANIM 1'
5679 _def_xanim_path
="#define XACODEC_PATH \"$_xanimlibdir\""
5680 _codecmodules
="xanim $_codecmodules"
5681 _res_comment
="using $_xanimlibdir"
5683 _def_xanim
='#undef USE_XANIM'
5684 _def_xanim_path
='#undef XACODEC_PATH'
5685 _nocodecmodules
="xanim $_nocodecmodules"
5689 echocheck
"RealPlayer DLL"
5690 if test "$_real" = auto
; then
5692 _res_comment
="dynamic loader support needed"
5693 if test "$_dl" = yes ||
test "$_win32" = yes ; then
5694 # if test "$_dl" = yes ; then
5695 _res_comment
="tested only on Linux/FreeBSD/NetBSD/Cygwin/MinGW/Darwin"
5696 if linux || freebsd || netbsd || win32 || darwin
; then
5697 _res_comment
="no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html"
5698 if test -z "$_reallibdir" ; then
5699 for I
in "$_libdir/codecs" "$_libdir/real" /usr
/lib
/real \
5700 /usr
/lib
/RealPlayer
{9,8,}/Codecs
/usr
/local
/RealPlayer
{9,8,}/Codecs \
5701 /usr
/local
/lib
/RealPlayer
{9,8,}/Codecs
/opt
/RealPlayer
{9,8,}/{Real
/,}Codecs \
5702 {~
,}/Applications
/RealOne\ Player.app
/Contents
/MacOS
/Library
/Codecs \
5704 if test -d "$I" ; then
5710 test "$_reallibdir" && _real
=yes
5714 if test "$_real" = yes ; then
5715 _def_real
='#define USE_REALCODECS 1'
5716 _def_real_path
="#define REALCODEC_PATH \"$_reallibdir\""
5717 _codecmodules
="real $_codecmodules"
5718 _res_comment
="using $_reallibdir"
5720 _def_real
='#undef USE_REALCODECS'
5721 _def_real_path
="#undef REALCODEC_PATH"
5722 _nocodecmodules
="real $_nocodecmodules"
5727 echocheck
"LIVE555 Streaming Media libraries"
5728 if test "$_live" = auto
&& test "$_network" = yes ; then
5732 #include <liveMedia.hh>
5733 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1090195200)
5734 #error Please upgrade to version 2004.07.19 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
5740 for I
in "$_livelibdir" "$_libdir/live" "/usr/lib/live" "/usr/local/live" "/usr/local/lib/live" ; do
5741 cc_check
-I$I/liveMedia
/include
-I$I/UsageEnvironment
/include
-I$I/groupsock
/include
&& _livelibdir
=$I && _live
=yes && break
5743 if test "$_live" != yes ; then
5744 if cc_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
5751 if test "$_live" = yes && test "$_network" = yes ; then
5752 echores
"yes (using $_livelibdir)"
5753 _def_live
='#define STREAMING_LIVE555 1'
5754 _live_libs_def
="# LIVE555 Streaming Media libraries:
5755 LIVE_LIB_DIR = $_livelibdir
5756 LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
5757 LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
5758 LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
5759 LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
5760 LIVE_LIBS += -lstdc++
5761 LIVE_INCLUDES = -I\$(LIVE_LIB_DIR)/liveMedia/include
5762 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/UsageEnvironment/include
5763 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/BasicUsageEnvironment/include
5764 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/groupsock/include"
5765 _ld_live
='$(LIVE_LIBS)'
5766 _inputmodules
="live555 $_inputmodules"
5767 elif test "$_live_dist" = yes && test "$_network" = yes ; then
5768 echores
"yes (using distribution version)"
5770 _def_live
='#define STREAMING_LIVE555 1'
5771 _live_libs_def
="# LIVE555 Streaming Media libraries:
5772 LIVE_LIB_DIR = $_livelibdir
5773 LIVE_LIBS = -lliveMedia
5774 LIVE_LIBS += -lgroupsock
5775 LIVE_LIBS += -lUsageEnvironment
5776 LIVE_LIBS += -lBasicUsageEnvironment
5777 LIVE_LIBS += -lstdc++
5778 LIVE_INCLUDES = -I/usr/include/liveMedia
5779 LIVE_INCLUDES += -I/usr/include/UsageEnvironment
5780 LIVE_INCLUDES += -I/usr/include/BasicUsageEnvironment
5781 LIVE_INCLUDES += -I/usr/include/groupsock"
5782 _ld_live
='$(LIVE_LIBS)'
5783 _inputmodules
="live555 $_inputmodules"
5786 _def_live
='#undef STREAMING_LIVE555'
5787 _noinputmodules
="live555 $_noinputmodules"
5790 echocheck
"FFmpeg libavutil (static)"
5791 if test -d libavutil
; then
5796 echores
"$_libavutil"
5798 echocheck
"FFmpeg libavcodec (static)"
5799 if test "$_libavcodec" = auto
; then
5800 # Note: static linking is preferred to dynamic linking
5802 _res_comment
="see DOCS/HTML/$_doc_lang/codecs.html"
5803 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
5804 _res_comment
="old ffmpeg version, use CVS !"
5805 if grep avcodec_find_encoder_by_name libavcodec
/utils.c
> /dev
/null
2>&1 ; then
5806 # check if libavutil is a required
5808 #include "libavcodec/avcodec.h"
5809 #if LIBAVCODEC_BUILD >= 3211265
5810 #error We need libavutil!
5812 int main(void) { return 0; }
5815 if cc_check
-I.
-I.
/libavutil
; then
5816 _libavutil_required
="no"
5818 _libavutil_required
="yes"
5820 _res_comment
="libavutil availability does not fit libavcodec version"
5821 if test "$_libavutil_required" = "$_libavutil"; then
5828 echores
"$_libavcodec"
5830 echocheck
"FFmpeg libavformat (static)"
5831 if test "$_libavformat" = auto
; then
5832 # Note: static linking is preferred to dynamic linking
5834 if test -d libavformat
&& test -f libavformat
/utils.c
; then
5838 echores
"$_libavformat"
5840 _def_haveffpostprocess
='no'
5841 if test -d libavcodec
&& test -f libavcodec
/libpostproc
/postprocess.h
; then
5842 _def_haveffpostprocess
='yes'
5845 if test "$_libavcodec" != yes ; then
5846 echocheck
"FFmpeg libavcodec (dynamic)"
5847 if test "$_libavcodecso" = auto
; then
5849 _res_comment
="libavcodec.so is broken/obsolete"
5850 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
5852 #define FF_POSTPROCESS 1
5853 #include <ffmpeg/avcodec.h>
5855 avcodec_find_encoder_by_name("");
5859 if cc_check
-lavcodec $_ld_lm ; then
5861 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
5864 echores
"$_libavcodecso"
5867 _def_libavcodec
='#undef USE_LIBAVCODEC'
5868 _def_libavcodecso
='#undef USE_LIBAVCODEC_SO'
5869 _def_ffpostprocess
='#undef FF_POSTPROCESS'
5870 if test "$_libavcodec" = yes ; then
5871 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5872 _ld_libavcodec
='libavcodec/libavcodec.a'
5873 _dep_libavcodec
='libavcodec/libavcodec.a'
5874 _def_ffpostprocess
='#define FF_POSTPROCESS 1'
5875 _codecmodules
="libavcodec $_codecmodules"
5876 if test "$_libavutil" = yes; then
5877 _ld_libavutil
='libavutil/libavutil.a'
5878 _dep_libavutil
='libavutil/libavutil.a'
5880 elif test "$_libavcodecso" = yes ; then
5881 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5882 _def_libavcodecso
='#define USE_LIBAVCODEC_SO 1'
5883 _ld_libavcodec
='-lavcodec'
5884 _codecmodules
="libavcodec.so $_codecmodules"
5886 _nocodecmodules
="libavcodec $_nocodecmodules"
5889 _def_libavformat
='#undef USE_LIBAVFORMAT'
5890 _def_libavformat_win32
='#undef CONFIG_WIN32'
5891 if test "$_libavformat" = yes ; then
5892 _def_libavformat
='#define USE_LIBAVFORMAT 1'
5893 _ld_libavformat
='libavformat/libavformat.a'
5894 _dep_libavformat
='libavformat/libavformat.a'
5896 _def_libavformat_win32
='#define CONFIG_WIN32 1'
5900 echocheck
"amr narrowband"
5901 if test "$_amr_nb" = auto
; then
5903 if test -f libavcodec
/amr_float
/sp_dec.c
; then
5904 if test "$_libavcodec" = yes ; then
5907 _res_comment
="libavcodec (static) is required by amr_nb, sorry"
5911 if test "$_amr_nb" = yes ; then
5912 _def_amr_nb
='#define AMR_NB 1'
5914 _def_amr_nb
='#undef AMR_NB'
5916 echores
"$_amr_nb $_echomsg"
5918 echocheck
"amr narrowband, fixed point"
5919 if test "$_amr_nb_fixed" = auto
; then
5921 if test -f libavcodec
/amr
/dtx_dec.c
; then
5922 if test "$_libavcodec" = yes ; then
5923 if test "$_amr_nb" = no
; then
5926 _res_comment
="disabled by amr_nb"
5929 _res_comment
="libavcodec (static) is required by amr_nb-fixed, sorry"
5933 if test "$_amr_nb_fixed" = yes ; then
5934 _def_amr_nb
='#define AMR_NB 1'
5935 _def_amr_nb_fixed
='#define AMR_NB_FIXED 1'
5938 _def_amr_nb_fixed
='#undef AMR_NB_FIXED'
5940 echores
"$_amr_nb_fixed"
5942 if test "$_amr_nb" = yes ; then
5943 _codecmodules
="amr_nb $_codecmodules"
5945 _nocodecmodules
="amr_nb $_nocodecmodules"
5948 echocheck
"amr wideband"
5949 if test "$_amr_wb" = auto
; then
5951 if test -f libavcodec
/amrwb_float
/dec_dtx.c
; then
5952 if test "$_libavcodec" = yes ; then
5955 _res_comment
="libavcodec (static) is required by amr_wb, sorry"
5959 if test "$_amr_wb" = yes ; then
5960 _def_amr_wb
='#define AMR_WB 1'
5961 _codecmodules
="amr_wb $_codecmodules"
5963 _def_amr_wb
='#undef AMR_WB'
5964 _nocodecmodules
="amr_wb $_nocodecmodules"
5968 echocheck
"libdv-0.9.5+"
5969 if test "$_libdv" = auto
; then
5972 #include <libdv/dv.h>
5973 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
5975 cc_check
-ldv $_ld_lm && _libdv
=yes
5977 if test "$_libdv" = yes ; then
5978 _def_libdv
='#define HAVE_LIBDV095 1'
5980 _codecmodules
="libdv $_codecmodules"
5982 _def_libdv
='#undef HAVE_LIBDV095'
5983 _nocodecmodules
="libdv $_nocodecmodules"
5988 if test "$_zr" = auto
; then
5989 #36067's seem to identify themselves as 36057PQC's, so the line
5990 #below should work for 36067's and 36057's.
5991 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
5997 if test "$_zr" = yes ; then
5998 if test "$_libavcodec" = yes ; then
5999 _def_zr
='#define HAVE_ZR 1'
6000 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6001 _vomodules
="zr zr2 $_vomodules"
6003 _res_comment
="libavcodec (static) is required by zr, sorry"
6004 _novomodules
="zr $_novomodules"
6005 _def_zr
='#undef HAVE_ZR'
6008 _def_zr
='#undef HAVE_ZR'
6009 _novomodules
="zr zr2 $_novomodules"
6014 if test "$_bl" = yes ; then
6015 _def_bl
='#define HAVE_BL 1'
6016 _vosrc
="$_vosrc vo_bl.c"
6017 _vomodules
="bl $_vomodules"
6019 _def_bl
='#undef HAVE_BL'
6020 _novomodules
="bl $_novomodules"
6027 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
6029 _ld_xvid
="$_ld_xvid -lxvidcore"
6030 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid $_ld_lm ; then
6032 _def_xvid3
='#define HAVE_XVID3 1'
6033 _def_xvid4
='#undef HAVE_XVID4'
6034 _codecmodules
="xvid $_codecmodules"
6038 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6040 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid $_ld_lm ; then
6042 _def_xvid3
='#undef HAVE_XVID3'
6043 _def_xvid4
='#define HAVE_XVID4 1'
6044 _codecmodules
="xvid $_codecmodules"
6048 _def_xvid3
='#undef HAVE_XVID3'
6049 _def_xvid4
='#undef HAVE_XVID4'
6050 _nocodecmodules
="xvid $_nocodecmodules"
6056 _def_decore_xvid
='#undef DECORE_XVID'
6057 _def_encore_xvid
='#undef ENCORE_XVID'
6058 if test "$_xvid" = yes ; then
6059 echocheck
"DivX4 compatibility in XviD"
6062 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
6064 cc_check
$_ld_lm "$_ld_xvid" && _xvidcompat
=yes
6065 echores
"$_xvidcompat"
6070 #include <inttypes.h>
6073 #error We do not support old versions of x264. Get the latest from SVN.
6075 int main(void) { x264_encoder_open((void*)0); return 0; }
6077 _ld_x264
="$_ld_x264 -lx264 $_ld_pthread"
6078 if test "$_x264" != no
&& \
6079 ( cc_check
$_inc_x264 $_ld_x264 $_ld_lm || \
6080 ( test "$_x11" = yes && cc_check
$_inc_x264 $_inc_x11 $_ld_x264 $_ld_x11 $_ld_lm )) ; \
6083 _def_x264
='#define HAVE_X264 1'
6084 _codecmodules
="x264 $_codecmodules"
6088 _def_x264
='#undef HAVE_X264'
6089 _nocodecmodules
="x264 $_nocodecmodules"
6093 echocheck
"DivX4linux/DivX5linux/OpenDivX decore"
6094 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
6097 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
6099 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
6101 _ld_decore
='-ldivxdecore'
6102 _def_decore
='#define NEW_DECORE 1'
6103 _def_divx
='#define USE_DIVX'
6104 _def_divx5
='#undef DECORE_DIVX5'
6105 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6106 _codecmodules
="divx4linux $_codecmodules"
6107 echores
"DivX4linux (with libdivxdecore.so)"
6109 # if test "$_divx4linux" != no ; then
6111 # OdivxPP disabled because of:
6112 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
6115 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
6117 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
6119 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
6120 _ld_decore
='-ldivxdecore'
6121 _def_decore
='#define NEW_DECORE 1'
6122 _def_divx
='#define USE_DIVX'
6123 _def_divx5
='#define DECORE_DIVX5 1'
6124 # _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
6125 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6126 _codecmodules
="divx5linux $_codecmodules"
6127 _nocodecmodules
="divx4linux $_nocodecmodules"
6128 echores
"DivX5linux (with libdivxdecore.so)"
6129 elif test "$_opendivx" != no
; then
6131 _ld_decore
='opendivx/libdecore.a'
6132 _def_decore
='#undef NEW_DECORE'
6133 _def_divx
='#define USE_DIVX'
6134 _def_divx5
='#undef DECORE_DIVX5'
6135 _def_odivx_postprocess
='#define HAVE_ODIVX_POSTPROCESS 1'
6136 _codecmodules
="opendivx $_codecmodules"
6137 _nocodecmodules
="divx5linux $_nocodecmodules"
6139 elif test "$_xvidcompat" = yes ; then
6142 _def_decore
='#define NEW_DECORE 1'
6143 _def_divx
='#define USE_DIVX 1'
6144 _def_divx5
='#undef DECORE_DIVX5'
6145 _def_decore_xvid
='#define DECORE_XVID 1'
6146 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6147 _nocodecmodules
="opendivx divx5linux divx4linux $_nocodecmodules"
6148 echores
"XviD compat."
6152 _def_decore
='#undef NEW_DECORE'
6153 _def_divx
='#undef USE_DIVX'
6154 _def_divx5
='#undef DECORE_DIVX5'
6155 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6156 _nocodecmodules
="opendivx $_nocodecmodules"
6162 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
6163 if test "$_mencoder" != no
; then
6165 echocheck
"libmp3lame (for mencoder)"
6168 #include <lame/lame.h>
6169 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; }
6171 # Note: libmp3lame usually depends on vorbis
6172 cc_check
-lmp3lame $_ld_vorbis $_ld_lm && "$TMPO" >> "$TMPLOG" 2>&1 && _mp3lame
=yes
6173 if test "$_mp3lame" = yes ; then
6174 _def_mp3lame
="#define HAVE_MP3LAME `$TMPO`"
6175 _def_cfg_mp3lame
="#define CONFIG_MP3LAME `$TMPO`"
6176 _ld_mp3lame
="-lmp3lame $_ld_vorbis"
6178 _def_mp3lame
='#undef HAVE_MP3LAME'
6179 _def_cfg_mp3lame
='#undef CONFIG_MP3LAME'
6184 echocheck
"DivX4linux encore (for mencoder)"
6186 #include <encore2.h>
6187 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
6189 if test "$_divx4linux" != no
&& cc_check
-ldivxencore $_ld_lm ; then
6190 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6191 _ld_encore
='-ldivxencore'
6192 echores
"DivX4linux (with libdivxencore.so)"
6193 elif test "$_xvidcompat" = yes ; then
6194 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6196 _def_encore_xvid
='#define ENCORE_XVID 1'
6197 echores
"XviD compat."
6199 _def_encore
='#undef HAVE_DIVX4ENCORE'
6205 echocheck
"mencoder"
6206 _mencoder_flag
='#undef HAVE_MENCODER'
6207 if test "$_mencoder" = yes ; then
6208 _mencoder_flag
='#define HAVE_MENCODER'
6210 echores
"$_mencoder"
6212 echocheck
"fastmemcpy"
6213 # fastmemcpy check is done earlier with tests of CPU & binutils features
6214 if test "$_fastmemcpy" = yes ; then
6215 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6217 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6219 echores
"$_fastmemcpy"
6221 echocheck
"UniquE RAR File Library"
6222 if test "$_unrarlib" = yes ; then
6223 _def_unrarlib
='#define USE_UNRARLIB 1'
6225 _def_unrarlib
='#undef USE_UNRARLIB'
6227 echores
"$_unrarlib"
6229 echocheck
"TV interface"
6230 if test "$_tv" = yes ; then
6231 _def_tv
='#define USE_TV 1'
6232 _inputmodules
="tv $_inputmodules"
6234 _noinputmodules
="tv $_noinputmodules"
6235 _def_tv
='#undef USE_TV'
6239 echocheck
"EDL support"
6240 if test "$_edl" = yes ; then
6241 _def_edl
='#define USE_EDL'
6242 _inputmodules
="edl $_inputmodules"
6244 _noinputmodules
="edl $_noinputmodules"
6245 _def_edl
='#undef USE_EDL'
6249 echocheck
"*BSD BrookTree 848 TV interface"
6250 if test "$_tv_bsdbt848" = auto
; then
6252 if test "$_tv" = yes ; then
6254 #include <sys/types.h>
6255 #if defined(__NetBSD__)
6256 #include <dev/ic/bt8xx.h>
6258 #include <machine/ioctl_bt848.h>
6260 int main(void) { return 0; }
6262 cc_check
&& _tv_bsdbt848
=yes
6265 if test "$_tv_bsdbt848" = yes ; then
6266 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6267 _inputmodules
="tv-bsdbt848 $_inputmodules"
6269 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6270 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6272 echores
"$_tv_bsdbt848"
6274 echocheck
"Video 4 Linux TV interface"
6275 if test "$_tv_v4l" = auto
; then
6277 if test "$_tv" = yes && linux
; then
6280 #include <linux/videodev.h>
6281 int main(void) { return 0; }
6283 cc_check
&& _tv_v4l
=yes
6287 if test "$_tv_v4l" = yes ; then
6288 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6289 _inputmodules
="tv-v4l $_inputmodules"
6291 _noinputmodules
="tv-v4l $_noinputmodules"
6292 _def_tv_v4l
='#undef HAVE_TV_V4L'
6297 echocheck
"Video 4 Linux 2 TV interface"
6298 if test "$_tv_v4l2" = auto
; then
6300 if test "$_tv" = yes && linux
; then
6303 #include <linux/types.h>
6304 #include <linux/videodev2.h>
6305 int main(void) { return 0; }
6307 cc_check
&& _tv_v4l2
=yes
6311 if test "$_tv_v4l2" = yes ; then
6312 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6313 _inputmodules
="tv-v4l2 $_inputmodules"
6315 _noinputmodules
="tv-v4l2 $_noinputmodules"
6316 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6321 echocheck
"audio select()"
6322 if test "$_select" = no
; then
6323 _def_select
='#undef HAVE_AUDIO_SELECT'
6324 elif test "$_select" = yes ; then
6325 _def_select
='#define HAVE_AUDIO_SELECT 1'
6331 # FIXME network check
6332 if test "$_network" != no
; then
6333 _def_network
='#define MPLAYER_NETWORK 1'
6334 _ld_network
="$_ld_sock"
6335 _inputmodules
="network $_inputmodules"
6337 _noinputmodules
="network $_noinputmodules"
6338 _def_network
='#undef MPLAYER_NETWORK'
6344 if not beos
&& test "$_ftp" != no
; then
6345 _def_ftp
='#define HAVE_FTP 1'
6346 _inputmodules
="ftp $_inputmodules"
6348 _noinputmodules
="ftp $_noinputmodules"
6349 _def_ftp
='#undef HAVE_FTP'
6353 echocheck
"vstream client"
6354 if test "$_vstream" = auto
; then
6357 #include <vstream-client.h>
6358 void vstream_error(const char *format, ... ) {}
6359 int main(void) { vstream_start(); return 0; }
6361 cc_check
-lvstream-client && _vstream
=yes
6363 if test "$_vstream" = yes ; then
6364 _def_vstream
='#define HAVE_VSTREAM 1'
6365 _inputmodules
="vstream $_inputmodules"
6366 _ld_vstream
='-lvstream-client'
6368 _noinputmodules
="vstream $_noinputmodules"
6369 _def_vstream
='#undef HAVE_VSTREAM'
6374 echocheck
"byte order"
6375 if test "$_big_endian" = auto
; then
6377 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6378 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6380 char* s = (char*)ascii_name;
6385 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6391 echo -n "failed to autodetect byte order, defaulting to "
6394 if test "$_big_endian" = yes ; then
6395 _byte_order
='big-endian'
6396 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6398 _byte_order
='little-endian'
6399 _def_words_endian
='#undef WORDS_BIGENDIAN'
6401 echores
"$_byte_order"
6403 echocheck
"OSD menu"
6404 if test "$_menu" = yes ; then
6405 _def_menu
='#define HAVE_MENU 1'
6407 _def_menu
='#undef HAVE_MENU'
6411 # Check to see if they want QTX codecs enabled
6412 echocheck
"QTX codecs"
6413 if test "$_qtx" = auto
; then
6416 if test "$_qtx" = yes ; then
6417 _def_qtx
='#define USE_QTX_CODECS 1'
6418 _codecmodules
="qtx $_codecmodules"
6420 _def_qtx
='#undef USE_QTX_CODECS'
6421 _nocodecmodules
="qtx $_nocodecmodules"
6426 echocheck
"Subtitles sorting"
6427 if test "$_sortsub" = yes ; then
6428 _def_sortsub
='#define USE_SORTSUB 1'
6430 _def_sortsub
='#undef USE_SORTSUB'
6435 echocheck
"XMMS inputplugin support"
6436 if test "$_xmms" = yes ; then
6438 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6439 if test -z "$_xmmsplugindir" ; then
6440 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6442 if test -z "$_xmmslibdir" ; then
6443 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6446 if test -z "$_xmmsplugindir" ; then
6447 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6449 if test -z "$_xmmslibdir" ; then
6450 _xmmslibdir
=/usr
/lib
6454 _def_xmms
='#define HAVE_XMMS 1'
6456 _xmms_lib
="${_xmmslibdir}/libxmms.dylib"
6458 _xmms_lib
="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6461 _def_xmms
='#undef HAVE_XMMS'
6466 if test "$_inet6" = auto
; then
6468 #include <sys/types.h>
6469 #include <sys/socket.h>
6470 int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6477 if test "$_inet6" = yes ; then
6478 _def_inet6
='#define HAVE_AF_INET6 1'
6480 _def_inet6
='#undef HAVE_AF_INET6'
6485 echocheck
"gethostbyname2"
6486 if test "$_gethostbyname2" = auto
; then
6488 #include <sys/types.h>
6489 #include <sys/socket.h>
6491 int main(void) { gethostbyname2("", AF_INET); }
6499 if test "$_gethostbyname2" = yes ; then
6500 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6502 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6504 echores
"$_gethostbyname2"
6506 # --------------- GUI specific tests begin -------------------
6509 if test "$_gui" = yes ; then
6511 # Required libraries
6512 test "$_png" != yes && die
"PNG support required for GUI compilation, please install libpng and libpng-dev packages."
6513 test "$_x11" != yes && die
"X11 support required for GUI compilation"
6515 echocheck
"XShape extension"
6517 if test "$_x11" = yes ; then
6519 #include <X11/Xlib.h>
6520 #include <X11/Xproto.h>
6521 #include <X11/Xutil.h>
6522 #include <X11/extensions/shape.h>
6525 char *name = ":0.0";
6528 int eventbase, errorbase;
6529 if (getenv("DISPLAY"))
6530 name=getenv("DISPLAY");
6531 wsDisplay=XOpenDisplay(name);
6532 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6534 XCloseDisplay(wsDisplay);
6538 cc_check
$_inc_x11 $_ld_x11 && _xshape
=yes
6540 if test "$_xshape" = yes ; then
6541 _def_xshape
='#define HAVE_XSHAPE 1'
6543 die
"The GUI requires the X11 extension XShape (which was not found)."
6548 if test "$_gtk1" = no
; then
6550 echocheck
"GTK+ version"
6552 if pkg-config gtk
+-2.0
--exists ; then
6553 _gtk
=`pkg-config gtk+-2.0 --modversion 2>/dev/null`
6554 _inc_gtk
=`pkg-config gtk+-2.0 --cflags 2>/dev/null`
6555 _ld_gtk
=`pkg-config gtk+-2.0 --libs 2>/dev/null`
6559 if pkg-config glib-2.0
--exists ; then
6560 echocheck
"glib version"
6561 _glib
=`pkg-config glib-2.0 --modversion 2>/dev/null`
6562 _inc_glib
=`pkg-config glib-2.0 --cflags 2>/dev/null`
6563 _ld_glib
=`pkg-config glib-2.0 --libs 2>/dev/null`
6566 _def_gui
='#define HAVE_NEW_GUI 1'
6567 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
6568 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6571 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
6574 echo "GTK-2 devel packages were not found, trying GTK 1.2"
6579 if test "$_gtk1" = yes ; then
6580 # Check for old GTK (1.2.x)
6581 echocheck
"GTK version"
6582 if test -z "$_gtkconfig" ; then
6583 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
6584 _gtkconfig
="gtk-config"
6585 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
6586 _gtkconfig
="gtk12-config"
6588 die
"The GUI requires GTK devel packages (which were not found)."
6591 _gtk
=`$_gtkconfig --version 2>&1`
6592 _inc_gtk
=`$_gtkconfig --cflags 2>&1`
6593 _ld_gtk
=`$_gtkconfig --libs 2>&1`
6594 echores
"$_gtk (using $_gtkconfig)"
6597 echocheck
"glib version"
6598 if test -z "$_glibconfig" ; then
6599 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
6600 _glibconfig
="glib-config"
6601 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
6602 _glibconfig
="glib12-config"
6604 die
"The GUI requires GLib devel packages (which were not found)"
6607 _glib
=`$_glibconfig --version 2>&1`
6608 _inc_glib
=`$_glibconfig --cflags 2>&1`
6609 _ld_glib
=`$_glibconfig --libs 2>&1`
6610 echores
"$_glib (using $_glibconfig)"
6612 _def_gui
='#define HAVE_NEW_GUI 1'
6613 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
6614 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6617 echo "Creating Gui/config.mak"
6618 cat > Gui
/config.mak
<< EOF
6619 # -------- Generated by configure -----------
6623 GLIBINC = $_inc_glib
6624 GLIBLIBS = $_ld_glib
6629 _def_gui
='#undef HAVE_NEW_GUI'
6630 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
6632 # --------------- GUI specific tests end -------------------
6636 #############################################################################
6638 # Checking for CFLAGS
6640 if test "$_profile" != "" ||
test "$_debug" != "" ; then
6641 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
6642 if test "$_cc_major" -ge "3" ; then
6643 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
6646 elif test -z "$CFLAGS" ; then
6647 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6648 # always compile with '-g' if .developer:
6649 if test -f ".developer" ; then
6651 if test "$_crash_debug" = auto
&& not mingw32
; then
6660 echocheck
"automatic gdb attach"
6661 if test "$_crash_debug" = yes ; then
6662 _def_crash_debug
='#define CRASH_DEBUG 1'
6664 _def_crash_debug
='#undef CRASH_DEBUG'
6667 echores
"$_crash_debug"
6670 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN"
6671 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
6672 CFLAGS
="$CFLAGS -no-cpp-precomp"
6675 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
6676 test "$_altivec" = yes && CFLAGS
="$CFLAGS -DCONFIG_DARWIN"
6679 # use flag for HPUX missing setenv()
6680 CFLAGS
="$CFLAGS -DHPUX"
6684 CFLAGS
="$CFLAGS -D_REENTRANT"
6686 # FIXME bsd needs this so maybe other OS'es
6687 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
6689 # 64 bit file offsets?
6690 if test "$_largefiles" = yes || freebsd
; then
6691 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
6692 if test "$_dvdread" = yes ; then
6693 # dvdread support requires this (for off64_t)
6694 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
6698 echocheck
"compiler support for -fno-PIC"
6701 int main(void) { return 0; }
6703 if cc_check
-fno-PIC ; then
6704 CFLAGS
="-fno-PIC $CFLAGS"
6710 echores
"only used for x86"
6713 echocheck
"compiler support for noexecstack"
6715 int main(void) { return 0; }
6717 if cc_check
-Wl,-z,noexecstack
; then
6718 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
6724 echocheck
"ftello()"
6725 # if we don't have ftello use the osdep/ compatibility module
6728 #include <sys/types.h>
6729 int main (void) { ftello(stdin); return 0; }
6732 cc_check
&& _ftello
=yes
6733 if test "$_ftello" = yes ; then
6734 _def_ftello
='#define HAVE_FTELLO 1'
6736 _def_ftello
='#undef HAVE_FTELLO'
6740 # Determine OS dependent libs
6742 _def_confwin32
='#define WIN32'
6743 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
6744 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
6745 CFLAGS
="$CFLAGS -D__CYGWIN__"
6749 _confwin32
='TARGET_WIN32 = yes'
6751 _confwin32
='TARGET_WIN32 = no'
6754 # Dynamic linking flags
6755 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6757 bsd
&& _ld_dl_dynamic
='-rdynamic'
6758 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
; then
6759 _ld_dl_dynamic
='-rdynamic'
6762 _ld_arch
="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6763 bsdos
&& _ld_arch
="$_ld_arch -ldvd"
6765 x86
&& _ld_arch
="$_ld_arch -li386"
6768 _def_debug
='#undef MP_DEBUG'
6769 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
6771 _def_linux
='#undef TARGET_LINUX'
6772 linux
&& _def_linux
='#define TARGET_LINUX 1'
6774 # TODO cleanup the VIDIX stuff here
6775 _def_vidix
='#define CONFIG_VIDIX 1'
6776 test "$_vidix" = no
&& _def_vidix
='#undef CONFIG_VIDIX'
6777 if test "$_vidix" = yes; then
6778 _vosrc
="$_vosrc vo_cvidix.c"
6779 _vomodules
="cvidix $_vomodules"
6781 _novomodules
="cvidix $_novomodules"
6783 if test "$_vidix" = yes && win32
; then
6784 _vosrc
="$_vosrc vo_winvidix.c"
6785 _vomodules
="winvidix $_vomodules"
6786 _ld_win32libs
="-lgdi32 $_ld_win32libs"
6788 _novomodules
="winvidix $_novomodules"
6790 if test "$_vidix" = yes && test "$_x11" = yes; then
6791 _vosrc
="$_vosrc vo_xvidix.c"
6792 _vomodules
="xvidix $_vomodules"
6794 _novomodules
="xvidix $_novomodules"
6796 echo Checking
for VIDIX ...
"$_vidix"
6798 _def_joystick
='#undef HAVE_JOYSTICK'
6799 if test "$_joystick" = yes ; then
6801 # TODO add some check
6802 _def_joystick
='#define HAVE_JOYSTICK 1'
6804 _joystick
="no (unsupported under $system_name)"
6807 echo Checking
for joystick ...
"$_joystick"
6810 if test "$_lirc" = auto
; then
6812 if test -c /dev
/lirc
-o -c /dev
/lirc
/0 ; then
6814 #include <lirc/lirc_client.h>
6815 int main(void) { return 0; }
6817 cc_check
-llirc_client && _lirc
=yes
6820 if test "$_lirc" = yes ; then
6821 _def_lirc
='#define HAVE_LIRC 1'
6822 _ld_lirc
='-llirc_client'
6824 _def_lirc
='#undef HAVE_LIRC'
6829 if test "$_lircc" = auto
; then
6832 #include <lirc/lircc.h>
6833 int main(void) { return 0; }
6835 cc_check
-llircc && _lircc
=yes
6837 if test "$_lircc" = yes ; then
6838 _def_lircc
='#define HAVE_LIRCC 1'
6841 _def_lircc
='#undef HAVE_LIRCC'
6845 #############################################################################
6846 echo "Creating config.mak"
6847 cat > config.mak
<< EOF
6848 # -------- Generated by configure -----------
6851 MAN_LANG = $MAN_LANG
6852 TARGET_OS = $system_name
6854 prefix = \$(DESTDIR)$_prefix
6855 BINDIR = \$(DESTDIR)$_bindir
6856 DATADIR = \$(DESTDIR)$_datadir
6857 MANDIR = \$(DESTDIR)$_mandir
6858 CONFDIR = \$(DESTDIR)$_confdir
6859 LIBDIR = \$(DESTDIR)$_libdir
6860 # FFmpeg uses libdir instead of LIBDIR
6868 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
6869 EXTRA_INC = $_inc_extra
6870 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
6871 STRIPBINARIES = $_stripbinaries
6873 HELP_FILE = $_mp_help
6876 PRG_MENCODER = $_prg_mencoder
6880 MPLAYER_NETWORK = $_network
6881 STREAMING_LIVE555 = $_live
6882 MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network
6886 CONFIG_MP3LAME = $_mp3lame
6888 I18NLIBS = $_i18n_libs
6889 MATROSKA = $_matroska_internal
6891 OPENDIVX = $_opendivx
6895 LIBMPEG2 = $_libmpeg2
6896 TREMOR = $_tremor_internal
6897 TREMOR_FLAGS = $_tremor_flags
6899 MUSEPACK = $_musepack
6901 UNRARLIB = $_unrarlib
6902 HAVE_FFPOSTPROCESS = $_def_haveffpostprocess
6907 EXTRA_LIB = $_ld_extra
6908 Z_LIB = $_ld_static $_ld_zlib
6910 WIN32_LIB = $_ld_win32libs
6911 STATIC_LIB = $_ld_static
6912 ENCA_LIB = $_ld_enca
6913 HAVE_PTHREADS = $_pthreads
6919 HAVE_XVMC_ACCEL = $_xvmc
6929 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
6931 MLIB_LIB = $_ld_mlib
6932 MLIB_INC = $_inc_mlib
6933 DXR2_INC = $_inc_dxr2
6939 SVGA_LIB = $_ld_svga
6940 VESA_LIB = $_ld_vesa
6942 CACA_INC = $_inc_caca
6943 CACA_LIB = $_ld_caca
6946 ALSA_LIB = $_ld_alsa
6948 ARTS_LIB = $_ld_arts
6949 ARTS_INC = $_inc_arts
6952 POLYP_LIB = $_ld_polyp
6953 POLYP_INC = $_inc_polyp
6954 JACK_LIB = $_ld_jack
6955 JACK_INC = $_inc_jack
6956 SGIAUDIO_LIB = $_ld_sgiaudio
6958 # input/demuxer/codecs
6959 TERMCAP_LIB = $_ld_termcap
6960 LIRC_LIB = $_ld_lirc
6961 LIRCC_LIB = $_ld_lircc
6962 DVDREAD_LIB = $_ld_dvdread
6967 W32_DEP = $_dep_win32
6968 W32_LIB = $_ld_win32
6969 DS_DEP = $_dep_dshow
6971 AV_DEP = $_dep_libavutil $_dep_libavcodec $_dep_libavformat
6972 AV_LIB = $_ld_libavformat $_ld_libavcodec $_ld_libavutil
6973 CONFIG_LIBAVUTIL = $_libavutil
6974 CONFIG_LIBAVCODEC = $_libavcodec
6975 CONFIG_LIBAVCODECSO = $_libavcodecso
6976 CONFIG_LIBAVFORMAT = $_libavformat
6979 FAME_LIB = $_ld_fame
6980 MP1E_DEP = $_dep_mp1e
6981 MP1E_LIB = $_ld_mp1e
6982 ARCH_LIB = $_ld_arch $_ld_iconv
6984 XVID_INC = $_inc_xvid
6985 XVID_LIB = $_ld_xvid
6987 X264_INC = $_inc_x264
6988 X264_LIB = $_ld_x264
6989 CONFIG_DTS = $_libdts
6990 DTS_INC = $_inc_libdts
6991 DTS_LIB = $_ld_libdts
6992 DECORE_LIB = $_ld_decore $_ld_mp3lame
6993 MENCODER = $_mencoder
6994 ENCORE_LIB = $_ld_encore $_ld_mp3lame
6995 DIRECTFB_INC = $_inc_directfb
6996 DIRECTFB_LIB = $_ld_directfb
6997 CDPARANOIA_INC = $_inc_cdparanoia
6998 CDPARANOIA_LIB = $_ld_cdparanoia
6999 FREETYPE_INC = $_inc_freetype
7000 FREETYPE_LIB = $_ld_freetype
7001 FONTCONFIG_INC = $_inc_fontconfig
7002 FONTCONFIG_LIB = $_ld_fontconfig
7003 FRIBIDI_INC = $_inc_fribidi
7004 FRIBIDI_LIB = $_ld_fribidi
7005 LIBLZO_LIB= $_ld_liblzo
7007 VORBIS_LIB = $_ld_vorbis $_ld_libdv
7008 THEORA_LIB = $_ld_theora
7009 FAAD_LIB = $_ld_faad
7010 INTERNAL_FAAD = $_faad_internal
7011 SMBSUPPORT_LIB = $_ld_smb
7012 XMMS_PLUGINS = $_xmms
7013 XMMS_LIB = $_xmms_lib
7015 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7016 MACOSX_BUNDLE = $_macosx_bundle
7017 MACOSX_FRAMEWORKS = $_macosx_frameworks
7018 MACOSX_COREVIDEO = $_macosx_corevideo
7020 TOOLAME_EXTRAFLAGS=$_toolame_extraflags
7021 TOOLAME_LIB=$_toolame_lib
7023 TWOLAME_LIB=$_twolame_lib
7024 MUSEPACK_LIB = $_ld_musepack
7028 AMR_NB_FIXED=$_amr_nb_fixed
7030 `echo $_libavcodecs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7033 # --- Some stuff for autoconfigure ----
7038 TARGET_MMX2 = $_mmx2
7039 TARGET_3DNOW = $_3dnow
7040 TARGET_3DNOWEX = $_3dnowex
7042 TARGET_ALTIVEC = $_altivec
7047 GTKLIB = $_ld_static $_ld_gtk
7048 GLIBLIB = $_ld_static $_ld_glib
7049 GTK_LIBS = $_ld_static $_ld_gui
7055 #############################################################################
7056 echo "Creating config.h"
7057 cat > config.h
<< EOF
7058 /* -------- This file has been automatically generated by configure ---------
7059 Note: Any changes in it will be lost when you run configure again. */
7061 /* Protect against multiple inclusion */
7062 #ifndef MPLAYER_CONFIG_H
7063 #define MPLAYER_CONFIG_H 1
7065 /* use GNU internationalization */
7068 /* Runtime CPU detection */
7069 $_def_runtime_cpudetection
7071 /* Dynamic a/v plugins */
7072 $_def_dynamic_plugins
7074 /* "restrict" keyword */
7075 $_def_restrict_keyword
7077 /* __builtin_expect branch prediction hint */
7078 $_def_builtin_expect
7079 #ifdef HAVE_BUILTIN_EXPECT
7080 #define likely(x) __builtin_expect ((x) != 0, 1)
7081 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7083 #define likely(x) (x)
7084 #define unlikely(x) (x)
7087 /* attribute(used) as needed by some compilers */
7088 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7089 # define attribute_used __attribute__((used))
7091 # define attribute_used
7094 #define PREFIX "$_prefix"
7099 /* enable/disable SIGHANDLER */
7102 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7105 /* Toggles debugging informations */
7108 /* Toggles colorized output */
7109 //#define MSG_USE_COLORS 1
7111 /* Indicates that Ogle's libdvdread is available for DVD playback */
7114 /* Indicates that dvdread is from libmpdvdkit */
7117 /* Additional options for libmpdvdkit*/
7131 /* Common data directory (for fonts, etc) */
7132 #define MPLAYER_DATADIR "$_datadir"
7133 #define MPLAYER_CONFDIR "$_confdir"
7134 #define MPLAYER_LIBDIR "$_libdir"
7136 /* Define this to compile stream-caching support, it can be enabled via
7137 -cache <kilobytes> */
7138 #define USE_STREAM_CACHE 1
7140 /* Define to include support for XviD/Divx4Linux/OpenDivx */
7143 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
7144 /* You have to change DECORE_LIBS in config.mak, too! */
7147 /* Define if you are using DivX5Linux Decore library */
7150 /* Define if you are using XviD library */
7156 /* Define if you are using the X.264 library */
7159 /* Define to include support for libdv-0.9.5 */
7162 /* If build mencoder */
7165 /* Indicates if XviD/Divx4linux encore is available
7166 Note: for mencoder */
7169 /* Indicates if libmp3lame is available
7170 Note: for mencoder */
7174 /* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
7177 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7178 (use -bps or -nobps commandline option for run-time method selection)
7179 -bps gives better sync for vbr mp3 audio, it is now default */
7180 #define AVI_SYNC_BPS 1
7182 /* Undefine this if you do not want to select mono audio (left or right)
7183 with a stereo MPEG layer 2/3 audio stream. The command line option
7184 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7185 right-only), with 0 being the default.
7187 #define USE_FAKE_MONO 1
7189 /* Undefine this if your sound card driver has no working select().
7190 If you have kernel Oops, player hangups, or just no audio, you should
7191 try to recompile MPlayer with this option disabled! */
7194 /* define this to use iconv(3) function to codepage conversions */
7197 /* define this to use nl_langinfo function */
7200 /* define this to use RTC (/dev/rtc) for video timers */
7203 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7204 #define MAX_OUTBURST 65536
7206 /* set up audio OUTBURST. Do not change this! */
7207 #define OUTBURST 512
7209 /* Define this if your system has the header file for the OSS sound interface */
7212 /* Define this if your system has the header file for the OSS sound interface
7213 * in /usr/include */
7216 /* Define this if your system has the sysinfo header */
7219 /* Define this if your system has ftello() */
7223 /* Need these for FILE and off_t an config.h is usually before other includes*/
7225 #include <sys/types.h>
7226 off_t ftello(FILE *);
7229 /* Define this if your system has the "malloc.h" header file */
7232 /* memalign is mapped to malloc if unsupported */
7234 #ifndef HAVE_MEMALIGN
7235 # define memalign(a,b) malloc(b)
7236 #define MEMALIGN_HACK 1
7239 /* Define this if your system has the "alloca.h" header file */
7242 /* Define this if your system has the "sys/mman.h" header file */
7244 $_def_mman_has_map_failed
7246 /* Define this if you have the elf dynamic linker -ldl library */
7249 /* Define this if you have the kstat kernel statistics library */
7252 /* Define this if you have zlib */
7255 #define CONFIG_ZLIB 1
7258 /* Define this if you have shm support */
7261 /* Define this if your system has scandir & alphasort */
7264 /* Define this if your system has strsep */
7267 /* Define this if your system has strlcpy */
7269 #ifndef HAVE_STRLCPY
7270 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7273 /* Define this if your system has strlcat */
7275 #ifndef HAVE_STRLCAT
7276 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7279 /* Define this if your system has fseeko */
7282 /* Need these for FILE and off_t an config.h is usually before other includes*/
7284 #include <sys/types.h>
7285 int fseeko(FILE *, off_t, int);
7290 /* Define this if your system has vsscanf */
7293 /* Define this if your system has swab */
7296 /* Define this if your system has no posix select */
7297 $_def_no_posix_select
7299 /* Define this if your system has gettimeofday */
7302 /* Define this if your system has glob */
7305 /* Define this if your system has pthreads */
7308 /* Define this if you enabled thread support for libavcodec */
7311 /* LIRC (remote control, see www.lirc.org) support: */
7315 * LIRCCD (LIRC client daemon)
7316 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7320 /* DVD navigation support using libdvdnav */
7322 $_def_dvdnav_version
7324 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7325 #define MPEG12_POSTPROC 1
7327 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7330 /* Define to include support for OpenDivx postprocessing */
7331 $_def_odivx_postprocess
7333 /* Win32 DLL support */
7335 #define WIN32_PATH "$_win32libdir"
7337 /* DirectShow support */
7340 /* Mac OS X specific features */
7342 $_def_macosx_finder_support
7344 $_def_macosx_corevideo
7346 /* Build our Win32-loader */
7349 /* ffmpeg's libavcodec support (requires libavcodec source) */
7353 /* ffmpeg's libavformat support (requires libavformat source) */
7355 $_def_libavformat_win32
7357 /* Use libavcodec's decoders */
7358 #define CONFIG_DECODERS 1
7359 /* Use libavcodec's encoders */
7360 #define CONFIG_ENCODERS 1
7362 /* Use libavformat's demuxers */
7363 #define CONFIG_DEMUXERS 1
7364 /* Use libavformat's muxers */
7365 #define CONFIG_MUXERS 1
7367 #define CONFIG_MPEGAUDIO_HP 1
7369 #define CONFIG_GPL 1
7371 /* Use amr codecs from libavcodec (requires amr sources) */
7376 /* Use specific codecs from libavcodec */
7377 `echo $_libavcodecs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
7379 /* Use codec libs included in mplayer CVS / source dist: */
7385 /* Use libfame encoder filter */
7388 /* XAnim DLL support */
7390 /* Default search path */
7393 /* RealPlayer DLL support */
7395 /* Default search path */
7398 /* LIVE555 Streaming Media library support */
7401 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
7404 /* Use unrarlib for Vobsubs */
7407 /* gui support, please do not edit this option */
7411 /* Audio output drivers */
7413 $_def_ossaudio_devdsp
7414 $_def_ossaudio_devmixer
7423 $_def_sys_asoundlib_h
7424 $_def_alsa_asoundlib_h
7430 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7432 #undef FAST_OSD_TABLE
7434 /* Enable TV Interface support */
7437 /* Enable EDL support */
7440 /* Enable Video 4 Linux TV interface support */
7443 /* Enable Video 4 Linux 2 TV interface support */
7446 /* Enable *BSD BrookTree TV interface support */
7449 /* Define if your processor stores words with the most significant
7450 byte first (like Motorola and SPARC, unlike Intel and VAX). */
7455 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
7456 have the instruction. */
7459 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
7460 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
7466 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
7471 /* only gcc3 can compile mvi instructions */
7472 $_def_gcc_mvi_support
7474 /* Define this for Cygwin build for win32 */
7477 /* Define this to any prefered value from 386 up to infinity with step 100 */
7478 #define __CPU__ $iproc
7487 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
7488 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7490 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7491 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7492 #elif defined(WIN32)
7493 #define DEFAULT_CDROM_DEVICE "D:"
7494 #define DEFAULT_DVD_DEVICE "D:"
7495 #elif defined(SYS_DARWIN)
7496 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
7497 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
7498 #elif defined(__OpenBSD__)
7499 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
7500 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7501 #elif defined(__FreeBSD__)
7502 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
7503 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7505 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7506 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7510 /*----------------------------------------------------------------------------
7512 ** NOTE: Instead of modifying these definitions here, use the
7513 ** --enable/--disable options of the ./configure script!
7514 ** See ./configure --help for details.
7516 *---------------------------------------------------------------------------*/
7518 /* C99 lrintf function available */
7521 /* round function is available */
7524 /* yes, we have inttypes.h */
7525 #define HAVE_INTTYPES_H 1
7527 /* int_fastXY_t emulation */
7530 /* nanosleep support */
7536 /* termcap flag for getch2.c */
7539 /* termios flag for getch2.c */
7544 /* enable PNG support */
7547 /* enable JPEG support */
7550 /* enable PNM support */
7553 /* enable md5sum support */
7556 /* enable GIF support */
7561 /* enable FreeType support */
7564 /* enable Fontconfig support */
7567 /* enable FriBiDi usage */
7570 /* enable ENCA usage */
7573 /* liblzo support */
7576 /* libmad support */
7579 /* enable OggVorbis support */
7582 /* enable Tremor as vorbis decoder */
7585 /* enable musepack support */
7588 /* enable OggTheora support */
7591 /* enable Matroska support */
7594 /* enable FAAD (AAC) support */
7598 /* enable FAAC (AAC encoder) support */
7601 /* enable LADSPA plugin support */
7604 /* enable network */
7607 /* enable ftp support */
7610 /* enable vstream support */
7613 /* enable winsock2 instead of Unix functions*/
7616 /* define this to use inet_aton() instead of inet_pton() */
7619 /* enables / disables cdparanoia support */
7622 /* enables / disables VIDIX usage */
7625 /* enables / disables new input joystick support */
7628 /* enables / disables QTX codecs */
7631 /* enables / disables osd menu */
7634 /* enables / disables subtitles sorting */
7637 /* XMMS input plugin support */
7639 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7641 /* enables inet6 support */
7644 /* do we have gethostbyname2? */
7645 $_def_gethostbyname2
7647 /* Extension defines */
7648 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
7649 $_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
7650 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
7651 $_def_mmx2 // only define if you have MMX2 (Athlon/PIII/4/CelII)
7652 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
7653 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
7654 $_def_altivec // only define if you have Altivec (G4)
7656 $_def_altivec_h // enables usage of altivec.h
7659 $_def_mlib // Sun mediaLib, available only on solaris
7660 $_def_vis // only define if you have VIS ( ultrasparc )
7662 /* libmpeg2 uses a different feature test macro for mediaLib */
7664 #define LIBMPEG2_MLIB 1
7668 #define SCREEN_SIZE_X 1
7669 #define SCREEN_SIZE_Y 1
7681 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
7690 $_def_directfb_version
7713 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
7714 #define X11_FULLSCREEN 1
7717 #endif /* MPLAYER_CONFIG_H */
7720 #############################################################################
7722 echo "Creating libvo/config.mak"
7723 _voobj
=`echo $_vosrc | sed -e 's/\.c/\.o/g;s/\.m/\.o/g'`
7724 cat > libvo
/config.mak
<< EOF
7725 include ../config.mak
7726 OPTIONAL_SRCS = $_vosrc
7727 OPTIONAL_OBJS = $_voobj
7730 #############################################################################
7732 echo "Creating libao2/config.mak"
7733 _aoobj
=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
7734 cat > libao
2/config.mak
<< EOF
7735 include ../config.mak
7736 OPTIONAL_SRCS = $_aosrc
7737 OPTIONAL_OBJS = $_aoobj
7740 #############################################################################
7742 echo "Creating libaf/config.mak"
7743 _afobj
=`echo $_afsrc | sed -e 's/\.c/\.o/g'`
7744 cat > libaf
/config.mak
<< EOF
7745 include ../config.mak
7746 OPTIONAL_SRCS = $_afsrc
7747 OPTIONAL_OBJS = $_afobj
7750 #############################################################################
7754 Config files successfully generated by ./configure !
7756 Install prefix: $_prefix
7757 Data directory: $_datadir
7758 Config direct.: $_confdir
7760 Byte order: $_byte_order
7761 Optimizing for: $_optimizing
7764 Messages/GUI: $_language
7767 echo -n " Manual pages: $MAN_LANG"
7768 test "$LANGUAGES" = en
&& echo -n " (no localization selected, use --language=all)"
7773 Enabled optional drivers:
7774 Input: $_inputmodules
7775 Codecs: $_codecmodules
7776 Audio output: $_aomodules
7777 Video output: $_vomodules
7778 Audio filters: $_afmodules
7779 Disabled optional drivers:
7780 Input: $_noinputmodules
7781 Codecs: $_nocodecmodules
7782 Audio output: $_noaomodules
7783 Video output: $_novomodules
7784 Audio filters: $_noafmodules
7786 'config.h' and 'config.mak' contain your configuration options.
7787 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7788 compile *** DO NOT REPORT BUGS if you tweak these files ***
7790 'make' will now compile MPlayer and 'make install' will install it.
7791 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7796 if test "$_mtrr" = yes ; then
7797 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
7801 if test "$_sdl" = "outdated" ; then
7803 You have an outdated version of libSDL installed (older than v1.1.7) and SDL
7804 support has therefore been disabled.
7806 Please upgrade to a more recent version (version 1.1.8 and above are known to
7807 work). You may get this library from: http://www.libsdl.org
7809 You need to rerun ./configure and recompile after updating SDL. If you are
7810 only interested in the libSDL audio drivers, then an older version might work.
7812 Use --enable-sdl to force usage of libSDL.
7818 if test "$_win32" = no
; then
7819 if test "$_win32libdir" ; then
7820 echo "Failed to find a Win32 codecs dir at $_win32libdir!"
7822 echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
7825 Create it and copy the DLL files there! You can download the codecs from our
7826 homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
7832 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7833 operating system ($system_name). You may encounter a few files that cannot
7834 be played due to missing open source video/audio codec support.
7842 Check $TMPLOG if you wonder why an autodetection failed (check whether
7843 the development headers/packages are installed).
7844 Do not report compilation errors if you used any of the --enable-* options
7845 (except --enable-gui and maybe --enable-debug).
7847 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
7851 if test "$_vidix" = no
; then
7853 You've disabled VIDIX. Although it would be better to PORT it instead.
7854 Have a look at the documentation for supported cards!
7859 if test "$_warn_CFLAGS" = yes; then
7862 MPlayer compilation will use the CFLAGS set by you, but:
7864 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7866 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7867 To do so, execute 'CFLAGS= ./configure <options>'
7873 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"