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
24 #############################################################################
26 # Prefer these macros to full length text !
27 # These macros only return an error code - NO display is done
30 cat "$TMPC" >> "$TMPLOG"
32 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
34 ( $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
37 echo "ldd $TMPO" >> "$TMPLOG"
38 ( $_ldd "$TMPO" ) >> "$TMPLOG" 2>&1
43 # Display error message, flushes tempfile, exit
48 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
49 echo "Check \"$TMPLOG\" if you do not understand why it failed."
53 # OS test booleans functions
55 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
57 linux
() { issystem
"Linux" ; return "$?" ; }
58 sunos
() { issystem
"SunOS" ; return "$?" ; }
59 hpux
() { issystem
"HP-UX" ; return "$?" ; }
60 irix
() { issystem
"IRIX" ; return "$?" ; }
61 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
62 freebsd
() { issystem
"FreeBSD" ; return "$?" ; }
63 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
64 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
65 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
66 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
67 qnx
() { issystem
"QNX" ; return "$?" ; }
68 darwin
() { issystem
"Darwin" ; return "$?" ; }
69 gnu
() { issystem
"GNU" ; return "$?" ; }
70 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
71 morphos
() { issystem
"MorphOS" ; return "$?" ; }
72 win32
() { cygwin || mingw32
; return "$?" ; }
73 beos
() { issystem
"BEOS" ; return "$?" ; }
75 # arch test boolean functions
76 # x86/x86pc is used by QNX
79 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
98 # not boolean test: implement the posix shell "!" operator for a
100 # usage: not {command}
101 # returns exit status "success" when the execution of "command"
108 # Use this before starting a check
110 echo "============ Checking for $@ ============" >> "$TMPLOG"
111 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
114 # Use this to echo the results of a check
116 echo "Result is: $@" >> "$TMPLOG"
117 echo "##########################################" >> "$TMPLOG"
121 #############################################################################
123 # Check how echo works in this /bin/sh
125 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
126 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
129 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"`
131 for parm
in "$@" ; do
132 if test "$parm" = "--help" ||
test "$parm" = "-help" ||
test "$parm" = "-h" ; then
135 Usage: $0 [OPTIONS]...
138 -h, --help display this help and exit
140 Installation directories:
141 --prefix=DIR use this prefix for installing mplayer [/usr/local]
142 --bindir=DIR use this prefix for installing mplayer binary
144 --datadir=DIR use this prefix for installing machine independent
145 data files (fonts, skins) [PREFIX/share/mplayer]
146 --mandir=DIR use this prefix for installing manpages [PREFIX/man]
147 --confdir=DIR use this prefix for installing configuration files
149 --libdir=DIR use this prefix for object code libraries [PREFIX/lib]
152 --disable-mencoder disable mencoder (a/v encoder) compilation [enable]
153 --enable-gui enable gmplayer compilation (GTK 1.2 GUI) [disable]
154 --enable-largefiles enable support for files > 2 GBytes [disable]
155 --enable-linux-devfs set default devices to devfs ones [disable]
156 --enable-termcap use termcap database for key codes [autodetect]
157 --enable-termios use termios database for key codes [autodetect]
158 --disable-iconv do not use iconv(3) function [autodetect]
159 --disable-setlocale disable setlocale using in mplayer [autodetect]
160 --disable-langinfo do not use langinfo [autodetect]
161 --enable-lirc enable LIRC (remote control) support [autodetect]
162 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
163 --enable-joystick enable joystick support [disable]
164 --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
165 --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
166 --disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
167 --disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
168 --disable-edl disable EDL (edit decision list) support [enable]
169 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
170 --disable-network disable network support (for: http/mms/rtp) [enable]
171 --enable-winsock2 enable winsock2 usage [autodetect]
172 --enable-smb enable Samba (SMB) input support [autodetect]
173 --enable-live enable LIVE.COM Streaming Media support [autodetect]
174 --disable-dvdread Disable libdvdread support [autodetect]
175 --disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
176 --disable-cdparanoia Disable cdparanoia support [autodetect]
177 --disable-freetype Disable freetype2 font rendering support [autodetect]
178 --disable-fontconfig Disable fontconfig font lookup support [autodetect]
179 --disable-unrarlib Disable Unique RAR File Library [enabled]
180 --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
181 --disable-sortsub Disable subtitles sorting [enabled]
182 --enable-fribidi Enable using the FriBiDi libs [disabled]
183 --disable-enca Disable using ENCA charset oracle library [autodetect]
184 --disable-macosx Disable Mac OS X specific features [autodetect]
185 --disable-inet6 Disable IPv6 support [autodetect]
186 --disable-gethostbyname2 gethostbyname() function is not provided by the C
188 --disable-ftp Disable ftp support [enabled]
191 --enable-gif enable gif support [autodetect]
192 --enable-png enable png input/output support [autodetect]
193 --enable-jpeg enable jpeg input/output support [autodetect]
194 --enable-liblzo enable external liblzo support [autodetect]
195 --disable-win32 disable Win32 DLL support [autodetect]
196 --disable-macshlb disable Mac OS X SHLB support [autodetect]
197 --disable-dshow disable Win32/DirectShow support [autodetect]
198 --disable-qtx disable Quicktime codecs [autodetect]
199 --disable-xanim disable XAnim DLL support [autodetect]
200 --disable-real disable RealPlayer DLL support [autodetect]
201 --disable-xvid disable XviD codec [autodetect]
202 --disable-x264 disable H.264 encoder [autodetect]
203 --disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
204 --enable-opendivx enable _old_ OpenDivx codec [disable]
205 --disable-libavcodec disable libavcodec [autodetect]
206 --disable-libavformat disable libavformat [autodetect]
207 --enable-libfame enable libfame realtime encoder [autodetect]
208 --enable-vorbis build with OggVorbis support [autodetect]
209 --enable-tremor build with integer-only OggVorbis support [disabled]
210 --enable-theora build with OggTheora support [autodetect]
211 --disable-internal-matroska disable internal Matroska support [enabled]
212 --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
213 --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
214 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
215 --disable-mad disable libmad (MPEG audio) support [autodetect]
216 --disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
217 --enable-xmms build with XMMS inputplugin support [disabled]
218 --disable-mp3lib disable builtin mp3lib [enabled]
219 --disable-liba52 disable builtin liba52 [enabled]
220 --enable-libdts enable libdts support [autodetect]
221 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
224 --disable-vidix disable VIDIX [enable on x86 *nix]
225 --enable-gl build with OpenGL render support [autodetect]
226 --enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
227 --enable-vesa build with VESA support [autodetect]
228 --enable-svga build with SVGAlib support [autodetect]
229 --enable-sdl build with SDL render support [autodetect]
230 --enable-aa build with AAlib render support [autodetect]
231 --enable-caca build with CACA render support [autodetect]
232 --enable-ggi build with GGI render support [autodetect]
233 --enable-directx build with DirectX support [autodetect]
234 --enable-dxr2 build with DXR2 render support [autodetect]
235 --enable-dxr3 build with DXR3/H+ render support [autodetect]
236 --enable-dvb build with support for output via DVB-Card [autodetect]
237 --enable-dvbhead build with DVB support (HEAD version) [autodetect]
238 --enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
239 (check for /dev/mga_vid) [autodetect]
240 --enable-xmga build with mga_vid X Window support
241 (check for X & /dev/mga_vid) [autodetect]
242 --enable-xv build with Xv render support for X 4.x [autodetect]
243 --enable-xvmc build with XvMC acceleration for X 4.x [autodetect]
244 --enable-vm build with XF86VidMode support for X11 [autodetect]
245 --enable-xinerama build with Xinerama support for X11 [autodetect]
246 --enable-x11 build with X11 render support [autodetect]
247 --enable-fbdev build with FBDev render support [autodetect]
248 --enable-mlib build with MLIB support (Solaris only) [autodetect]
249 --enable-3dfx build with obsolete /dev/3dfx support [disable]
250 --enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
251 --enable-directfb build with DirectFB support [autodetect]
252 --enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
253 --enable-bl build with Blinkenlights support [disable]
254 --enable-tdfxvid build with tdfx_vid support [disable]
255 --disable-tga disable targa output support [enable]
256 --disable-pnm disable pnm output support [enable]
257 --disable-md5sum disable md5sum output support [enable]
260 --disable-alsa disable ALSA sound support [autodetect]
261 --disable-ossaudio disable OSS sound support [autodetect]
262 --disable-arts disable aRts sound support [autodetect]
263 --disable-esd disable esd sound support [autodetect]
264 --disable-jack disable JACK sound support [autodetect]
265 --disable-nas disable NAS sound support [autodetect]
266 --disable-sgiaudio disable SGI sound support [autodetect]
267 --disable-sunaudio disable Sun sound support [autodetect]
268 --disable-win32waveout disable Windows waveout sound support [autodetect]
269 --disable-select disable using select() on audio device [enable]
271 Miscellaneous options:
272 --enable-runtime-cpudetection Enable runtime CPU detection [disable]
273 --cc=COMPILER use this C compiler to build MPlayer [gcc]
274 --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
275 --as=ASSEMBLER use this assembler to build MPlayer [as]
276 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
277 --enable-static build a statically linked binary. Set further linking
278 options with --enable-static="-lslang -lncurses"
279 --language=list a white space or comma separated list of languages
280 for translated man pages, the first language is the
281 primary and therefore used for translated messages
282 and GUI (also the environment variable \$LINGUAS is
284 (Available: $LANGUAGES all)
285 --enable-shared-pp install & use shared postprocessing lib
286 --with-install=PATH use a custom install program (useful if your OS uses
287 a GNU-incompatible install utility by default and
288 you want to use GNU version)
289 --install-path=PATH the path to a custom install program
290 this option is obsolete and will be removed soon,
291 use --with-install instead.
294 --enable-mmx build with MMX support [autodetect]
295 --enable-mmx2 build with MMX2 support (PIII, Athlon) [autodetect]
296 --enable-3dnow build with 3DNow! support [autodetect]
297 --enable-3dnowex build with extended 3DNow! support [autodetect]
298 --enable-sse build with SSE support [autodetect]
299 --enable-sse2 build with SSE2 support [autodetect]
300 --enable-shm build with shm support [autodetect]
301 --enable-altivec build with Altivec support (PowerPC) [autodetect]
302 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
303 --enable-big-endian Force byte order to big-endian [autodetect]
304 --enable-debug[=1-3] compile debugging information into mplayer [disable]
305 --enable-profile compile profiling information into mplayer [disable]
306 --disable-sighandler disable sighandler for crashes [enable]
307 --enable-i18n _experimental_ gnu gettext() support [autodetect]
308 --enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
310 Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
311 --disable-gcc-checking disable gcc version checking [enable]
313 Use these options if autodetection fails (Options marked with (*) accept
314 multiple paths separated by ':'):
315 --with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
316 --with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
317 --with-x11incdir=DIR X headers in DIR (*)
318 --with-x11libdir=DIR X library files in DIR (*)
319 --with-dxr2incdir=DIR DXR2 headers in DIR (*)
320 --with-dvbincdir=DIR DVB headers in DIR (*)
321 --with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
322 --with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
323 --with-codecsdir=DIR Binary codec files in DIR
324 --with-win32libdir=DIR W*ndows DLL files in DIR
325 --with-xanimlibdir=DIR XAnim DLL files in DIR
326 --with-reallibdir=DIR RealPlayer DLL files in DIR
327 --with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
328 --with-xvidincdir=DIR XviD header in DIR (*)
329 --with-x264libdir=DIR libx264 in DIR
330 --with-x264incdir=DIR x264 header in DIR
331 --with-dtslibdir=DIR libdts library in DIR (*)
332 --with-dtsincdir=DIR libdts header in DIR (*)
333 --with-livelibdir=DIR LIVE.COM Streaming Media libraries in DIR
334 --with-toolamedir=DIR path to Toolame library and include file
335 --with-xmmsplugindir=DIR XMMS plugins in DIR
336 --with-xmmslibdir=DIR libxmms.so.1 in DIR
337 --with-bio2jack=DIR libbio2jack.a in DIR
338 --with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
339 --with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
340 --with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
341 --with-termcaplib=NAME name of library with termcap functionality
342 name should be given without leading "lib"
343 checks for "termcap" and "tinfo"
345 --with-freetype-config=PATH path to freetype-config
346 (e.g. /opt/bin/freetype-config)
347 --with-fribidi-config=PATH path to fribidi-config
348 (e.g. /opt/bin/fribidi-config)
349 --with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
350 --with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
351 --with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
355 done # for parm in ...
358 # 1st pass checking for vital options
362 test "$CC" && _cc
="$CC"
364 _runtime_cpudetection
=no
368 _target
=`echo $ac_option | cut -d '=' -f 2`
371 _cc
=`echo $ac_option | cut -d '=' -f 2`
374 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
377 _as
=`echo $ac_option | cut -d '=' -f 2`
379 --enable-gcc-checking)
382 --disable-gcc-checking)
392 _ld_static
="-static `echo $ac_option | cut -d '=' -f 2`"
394 --with-extraincdir=*)
395 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
397 --with-extralibdir=*)
398 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
400 --enable-runtime-cpudetection)
401 _runtime_cpudetection
=yes
403 --disable-runtime-cpudetection)
404 _runtime_cpudetection
=no
407 _install
=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
410 _install
=`echo $ac_option | cut -d '=' -f 2 `
415 # Determine our OS name and CPU architecture
416 if test -z "$_target" ; then
418 system_name
=`( uname -s ) 2>&1`
419 case "$system_name" in
420 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS
)
428 [cC
][yY
][gG
][wW
][iI
][nN
]*)
438 system_name
="$system_name-UNKNOWN"
443 # host's CPU/instruction set
444 host_arch
=`( uname -p ) 2>&1`
446 i386|sparc|ppc|alpha|arm|mips|vax
)
448 powerpc
) # Darwin returns 'powerpc'
451 *) # uname -p on Linux returns 'unknown' for the processor type,
452 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
454 # Maybe uname -m (machine hardware name) returns something we
457 # x86/x86pc is used by QNX
458 case "`( uname -m ) 2>&1`" in
459 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
;;
460 ia64
) host_arch
=ia64
;;
462 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
463 -z "`echo $CFLAGS | grep -- -m32`" ]; then
469 macppc|ppc
) host_arch
=ppc
;;
470 alpha
) host_arch
=alpha
;;
471 sparc
) host_arch
=sparc
;;
472 sparc64
) host_arch
=sparc64
;;
473 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
474 arm
*) host_arch
=arm
;;
475 s390
) host_arch
=s390
;;
476 s390x
) host_arch
=s390x
;;
477 mips
) host_arch
=mips
;;
478 vax
) host_arch
=vax
;;
479 *) host_arch
=UNKNOWN
;;
484 system_name
=`echo $_target | cut -d '-' -f 2`
485 case "`echo $system_name | tr A-Z a-z`" in
486 linux
) system_name
=Linux
;;
487 freebsd
) system_name
=FreeBSD
;;
488 netbsd
) system_name
=NetBSD
;;
489 bsd
/os
) system_name
=BSD
/OS
;;
490 openbsd
) system_name
=OpenBSD
;;
491 sunos
) system_name
=SunOS
;;
492 qnx
) system_name
=QNX
;;
493 morphos
) system_name
=MorphOS
;;
494 mingw32msvc
) system_name
=MINGW32
;;
496 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
497 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
500 echo "Detected operating system: $system_name"
501 echo "Detected host architecture: $host_arch"
503 # LGB: temporary files
504 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
508 TMPLOG
="configure.log"
510 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
511 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
512 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
513 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
517 # FIXME: A lot of stuff is installed under /usr/local
518 # NK: But we should never use this stuff implicitly since we call compiler
519 # from /usr we should be sure that there no effects from other compilers
520 # (libraries) which might be installed into /usr/local. Let users use this
521 # stuff explicitly as command line argument. In other words: It would be
522 # resonable to have only /usr/include or only /usr/local/include.
525 _ld_extra
="$_ld_extra -L/usr/local/lib"
526 _inc_extra
="$_inc_extra -I/usr/local/include"
530 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
531 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
541 # Checking CC version...
542 if test "$_skip_cc_check" != yes ; then
543 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
544 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
545 echocheck
"$_cc version"
547 cc_name
=`( $_cc -V ) 2>&1 | head -1 | cut -d ',' -f 1`
548 cc_version
=`( $_cc -V ) 2>&1 | head -1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
549 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
550 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
551 # TODO verify older icc/ecc compatibility
554 cc_version
="v. ?.??, bad"
558 cc_version
="$cc_version, ok"
562 cc_version
="$cc_version, bad"
566 echores
"$cc_version"
568 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
569 echocheck
"$_cc version"
571 cc_name
=`( $_cc -v ) 2>&1 | tail -1 | cut -d ' ' -f 1`
572 cc_version
=`( $_cc -dumpversion ) 2>&1`
573 if test "$?" -gt 0; then
574 cc_version
="not found"
578 cc_version
="v. ?.??, bad"
581 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
3.
[0-9]|
3.
[0-9].
[0-9])
582 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
583 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
584 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
585 cc_version
="$cc_version, ok"
592 cc_version
="$cc_version, bad"
596 echores
"$cc_version"
597 (test "$cc_verc_fail" = "no") && break
600 if test "$cc_verc_fail" = yes ; then
603 *** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
605 You are not using a supported compiler. We do not have the time to make sure
606 everything works with compilers other than the ones we use. Use either the
607 same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
608 unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
610 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
611 mplayer and lame (which is used for mencoder). If you get compile errors,
612 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
613 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
616 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
618 *** For details please read DOCS/HTML/en/users-vs-dev.html ***
621 die
"Bad gcc version"
626 ******************************************************************************
628 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
629 Ok. You know. Do it. Did you read DOCS/HTML/en/users-vs-dev.html???
631 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
632 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
633 Lame which is used by mencoder produces weird errors, too.
635 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
636 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
638 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
640 ******************************************************************************
648 if not
test "$_host_cc" ; then
656 # now that we know what compiler should be used for compilation, try to find
657 # out which assembler is used by the $_cc compiler
658 if test "$_as" = auto
; then
659 _as
=`$_cc -print-prog-name=as`
660 test -z "$_as" && _as
=as
663 # XXX: this should be ok..
665 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
666 # FIXME: Remove the cygwin check once AMD CPUs are supported
667 if test -r /proc
/cpuinfo
&& not cygwin
; then
668 # Linux with /proc mounted, extract CPU information from it
669 _cpuinfo
="cat /proc/cpuinfo"
670 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86
; then
671 # FreeBSD with Linux emulation /proc mounted,
672 # extract CPU information from it
673 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
675 # use hostinfo on Darwin
678 # all other OSes try to extract CPU information from a small helper
679 # program TOOLS/cpuinfo instead
680 $_cc -o TOOLS
/cpuinfo TOOLS
/cpuinfo.c
681 _cpuinfo
="TOOLS/cpuinfo"
686 pparam
=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | head -1`
687 if test -z "$pparam" ; then
688 pparam
=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | head -1`
699 for i
in $pparam ; do
702 3dnowext
) _3dnow
=yes _3dnowex
=yes ;;
705 mtrr|k6_mtrr|cyrix_arr
) _mtrr
=yes ;;
706 xmm|sse|kni
) _sse
=yes _mmx2
=yes ;;
713 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
714 _def_arch
="#define ARCH_X86 1"
715 _target_arch
="TARGET_ARCH_X86 = yes"
717 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
718 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
719 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
720 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
721 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
725 echocheck
"CPU vendor"
726 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
734 3) proc
=i386 iproc
=386 ;;
735 4) proc
=i486 iproc
=486 ;;
736 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
737 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
738 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
740 elif test "$pmodel" -ge 8; then
742 elif test "$pmodel" -ge 6; then
750 if test "$pmodel" -ge 7; then
752 elif test "$pmodel" -ge 6; then
753 # only Athlon XP supports ssem MP, Duron etc not
754 # but most of them are CPUID 666, so check if sse detected
755 # btw. there is also athlon-mp opt, but we need extended
756 # CPUID to detect if CPU is SMP capable -> athlon-mp ::atmos
757 if test "$_sse" = yes && test "$pstepping" -ge 2; then
762 elif test "$pmodel" -ge 4; then
765 proc
=athlon
# TODO: should the Duron Spitfire be considered a Thunderbird instead?
769 *) proc
=athlon-xp iproc
=686 ;;
774 3) proc
=i386 iproc
=386 ;;
775 4) proc
=i486 iproc
=486 ;;
777 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
778 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
784 if test "$pmodel" -ge 7; then
786 elif test "$pmodel" -ge 3; then
792 15) proc
=pentium4 iproc
=686 ;;
793 *) proc
=pentium4 iproc
=686 ;;
798 3) proc
=i386 iproc
=386 ;;
799 4) proc
=i486 iproc
=486 ;;
800 *) proc
=i586 iproc
=586 ;;
804 proc
=i586 iproc
=586 ;;
807 # check that gcc supports our CPU, if not, fall back to earlier ones
808 # LGB: check -mcpu and -march swithing step by step with enabling
809 # to fall back till 386.
811 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
813 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
819 echocheck
"GCC & CPU optimization abilities"
821 int main(void) { return 0; }
823 if test "$_runtime_cpudetection" = no
; then
824 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ||
test "$proc" = "athlon-tbird"; then
825 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
827 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
828 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
830 if test "$proc" = "k6"; then
831 if not cc_check
-march=$proc $cpuopt=$proc; then
832 if cc_check
-march=i586
$cpuopt=i686
; then
839 if test "$proc" = "pentium4" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon"; then
840 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
842 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx"; then
843 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
845 if test "$proc" = "i586" ; then
846 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
848 if test "$proc" = "i486" ; then
849 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
851 if test "$proc" = "i386" ; then
852 cc_check
-march=$proc $cpuopt=$proc || proc
=error
854 if test "$proc" = "error" ; then
855 echores
"Your $_cc does not even support \"i386\" for '-march' and '$cpuopt'."
859 elif test "$proc" = "i586-i686"; then
864 _march
="-march=$proc"
865 _mcpu
="$cpuopt=$proc"
869 # i686 is probably the most common CPU - optimize for it
871 # at least i486 required, for bswap instruction
873 cc_check
$_mcpu || _mcpu
=""
874 cc_check
$_march $_mcpu || _march
=""
877 ## Gabucino : --target takes effect here (hopefully...) by overwriting
878 ## autodetected mcpu/march parameters
879 if test "$_target" ; then
880 # TODO: it may be a good idea to check GCC and fall back in all cases
881 if test "$host_arch" = "i586-i686"; then
885 _march
="-march=$host_arch"
886 _mcpu
="$cpuopt=$host_arch"
894 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
895 i686|athlon
*|pentium
*) iproc
=686 ;;
904 _def_arch
='#define ARCH_IA64 1'
905 _target_arch
='TARGET_ARCH_IA64 = yes'
914 _def_arch
='#define ARCH_X86_64 1'
915 _target_arch
='TARGET_ARCH_X86_64 = yes'
925 _def_arch
='#define ARCH_SPARC 1'
926 _target_arch
='TARGET_ARCH_SPARC = yes'
931 case "`echo $karch`" in
936 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
949 _def_arch
='#define ARCH_SPARC 1'
950 _target_arch
='TARGET_ARCH_SPARC = yes'
952 _def_vis
='#define HAVE_VIS = yes'
961 _def_arch
='#define ARCH_ARMV4L 1'
962 _target_arch
='TARGET_ARCH_ARMV4L = yes'
971 _def_arch
='#define ARCH_POWERPC 1'
972 _target_arch
='TARGET_ARCH_POWERPC = yes'
981 if linux
&& test -n "$_cpuinfo"; then
982 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -1`
983 if test -n "`$_cpuinfo | grep altivec`"; then
988 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
989 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
991 elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
995 # only gcc 3.4 works reliably with altivec code under netbsd
998 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1001 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1007 if test "$_altivec" = yes; then
1008 echores
"$proc altivec"
1013 echocheck
"GCC & CPU optimization abilities"
1015 if test -n "$proc"; then
1017 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1018 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1019 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1020 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1021 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1022 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1025 # gcc 3.1(.1) and up supports 7400 and 7450
1026 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1"; then
1028 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1029 7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1033 # gcc 3.2 and up supports 970
1034 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3"; then
1036 970*) _march
='-mcpu=970' _mcpu
='-mtune=970' ;;
1042 if test -n "$_mcpu"; then
1043 _optimizing
=`echo $_mcpu | cut -c 8-`
1044 echores
"$_optimizing"
1052 _def_arch
='#define ARCH_ALPHA 1'
1053 _target_arch
='TARGET_ARCH_ALPHA = yes'
1057 echocheck
"CPU type"
1060 unsigned long ver, mask;
1061 asm ("implver %0" : "=r" (ver));
1062 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1063 printf("%ld-%x\n", ver, ~mask);
1067 $_cc -o "$TMPO" "$TMPC"
1070 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
1071 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
1072 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
1073 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
1074 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
1075 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
1076 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
1080 echocheck
"GCC & CPU optimization abilities"
1081 if test "$proc" = "ev68" ; then
1082 cc_check
-mcpu=$proc || proc
=ev67
1084 if test "$proc" = "ev67" ; then
1085 cc_check
-mcpu=$proc || proc
=ev6
1092 echocheck
"MVI instruction support in GCC"
1093 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1094 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
1097 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
1098 echores
"no, GCC = `( $_cc -dumpversion ) 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1103 _def_arch
='#define ARCH_SGI_MIPS 1'
1104 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
1112 echocheck
"CPU type"
1113 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
1114 case "`echo $proc`" in
1115 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
1116 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
1117 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
1118 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
1119 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
1120 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
1128 _def_arch
='#define ARCH_PA_RISC 1'
1129 _target_arch
='TARGET_ARCH_PA_RISC = yes'
1138 _def_arch
='#define ARCH_S390 1'
1139 _target_arch
='TARGET_ARCH_S390 = yes'
1148 _def_arch
='#define ARCH_S390X 1'
1149 _target_arch
='TARGET_ARCH_S390X = yes'
1158 _def_arch
='#define ARCH_VAX 1'
1159 _target_arch
='TARGET_ARCH_VAX = yes'
1168 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
1169 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
1170 die
"unsupported architecture $host_arch"
1174 if test "$_runtime_cpudetection" = yes ; then
1189 if x86
&& test "$_runtime_cpudetection" = no
; then
1191 if test "$1" = yes ; then
1192 echocheck
"kernel support of $2"
1195 void catch() { exit(1); }
1197 signal(SIGILL, catch);
1198 __asm__ __volatile__ ("$3":::"memory");return(0);
1202 if ( cc_check
&& $TMPO ) > /dev
/null
2>&1 ; then
1204 _optimizing
="$_optimizing $2"
1208 echo "It seems that your kernel does not correctly support $2."
1209 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1216 extcheck
$_mmx "mmx" "emms" || _mmx
=no
1217 extcheck
$_mmx2 "mmx2" "sfence" || _mmx2
=no
1218 extcheck
$_3dnow "3dnow" "femms" || _3dnow
=no
1219 extcheck
$_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex
=no
1220 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _sse
=no _gcc3_ext
="$_gcc3_ext -mno-sse"
1221 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2
=no _gcc3_ext
="$_gcc3_ext -mno-sse2"
1222 echocheck
"mtrr support"
1225 if test "$_mtrr" = yes ; then
1226 _optimizing
="$_optimizing mtrr"
1229 if test "$_gcc3_ext" != ""; then
1230 # if we had to disable sse/sse2 because the active kernel does not
1231 # support this instruction set extension, we also have to tell
1232 # gcc3 to not generate sse/sse2 instructions for normal C code
1234 int main(void) { return 0; }
1236 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1241 echocheck
"assembler support of -pipe option"
1243 int main(void) { return 0; }
1245 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
1247 _prefix
="/usr/local"
1248 _xvmclib
="XvMCNVIDIA"
1250 # GOTCHA: the variables below defines the default behavior for autodetection
1251 # and have - unless stated otherwise - at least 2 states : yes no
1252 # If autodetection is available then the third state is: auto
1260 _dga
=auto
# 1 2 no auto
1262 _xvmc
=no
#auto when complete
1299 _matroska_internal
=yes
1304 # dvdnav disabled, it does not work
1369 _freetypeconfig
='freetype-config'
1371 _fribidiconfig
='fribidi-config'
1374 _gethostbyname2
=auto
1377 case "$ac_option" in
1383 --enable-gcc-checking) ;;
1384 --disable-gcc-checking) ;;
1385 --enable-static*) ;;
1386 --disable-static*) ;;
1387 --with-extraincdir=*) ;;
1388 --with-extralibdir=*) ;;
1389 --enable-runtime-cpudetection) ;;
1390 --disable-runtime-cpudetection) ;;
1391 --install-path=*) ;;
1392 --with-install=*) ;;
1395 --enable-mencoder) _mencoder
=yes ;;
1396 --disable-mencoder) _mencoder
=no
;;
1397 --enable-i18n) _i18n
=yes ;;
1398 --disable-i18n) _i18n
=no
;;
1399 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
1400 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
1401 --enable-setlocale) _setlocale
=yes ;;
1402 --disable-setlocale) _setlocale
=no
;;
1403 --enable-x11) _x11
=yes ;;
1404 --disable-x11) _x11
=no
;;
1405 --enable-xv) _xv
=yes ;;
1406 --disable-xv) _xv
=no
;;
1407 --enable-xvmc) _xvmc
=yes ;;
1408 --disable-xvmc) _xvmc
=no
;;
1409 --enable-sdl) _sdl
=yes ;;
1410 --disable-sdl) _sdl
=no
;;
1411 --enable-directx) _directx
=yes ;;
1412 --disable-directx) _directx
=no
;;
1413 --enable-win32waveout) _win32waveout
=yes ;;
1414 --disable-win32waveout) _win32waveout
=no
;;
1415 --enable-nas) _nas
=yes ;;
1416 --disable-nas) _nas
=no
;;
1417 --enable-png) _png
=yes ;;
1418 --disable-png) _png
=no
;;
1419 --enable-jpeg) _jpg
=yes ;;
1420 --disable-jpeg) _jpg
=no
;;
1421 --enable-pnm) _pnm
=yes ;;
1422 --disable-pnm) _pnm
=no
;;
1423 --enable-md5sum) _md5sum
=yes ;;
1424 --disable-md5sum) _md5sum
=no
;;
1425 --enable-gif) _gif
=yes ;;
1426 --disable-gif) _gif
=no
;;
1427 --enable-gl) _gl
=yes ;;
1428 --disable-gl) _gl
=no
;;
1429 --enable-ggi) _ggi
=yes ;;
1430 --disable-ggi) _ggi
=no
;;
1431 --enable-aa) _aa
=yes ;;
1432 --disable-aa) _aa
=no
;;
1433 --enable-caca) _caca
=yes ;;
1434 --disable-caca) _caca
=no
;;
1435 --enable-svga) _svga
=yes ;;
1436 --disable-svga) _svga
=no
;;
1437 --enable-vesa) _vesa
=yes ;;
1438 --disable-vesa) _vesa
=no
;;
1439 --enable-fbdev) _fbdev
=yes ;;
1440 --disable-fbdev) _fbdev
=no
;;
1441 --enable-dvb) _dvb
=yes ;;
1442 --disable-dvb) _dvb
=no
;;
1443 --enable-dvbhead) _dvbhead
=yes ;;
1444 --disable-dvbhead) _dvbhead
=no
;;
1445 --enable-dxr2) _dxr2
=yes ;;
1446 --disable-dxr2) _dxr2
=no
;;
1447 --enable-dxr3) _dxr3
=yes ;;
1448 --disable-dxr3) _dxr3
=no
;;
1449 --enable-iconv) _iconv
=yes ;;
1450 --disable-iconv) _iconv
=no
;;
1451 --enable-langinfo) _langinfo
=yes ;;
1452 --disable-langinfo) _langinfo
=no
;;
1453 --enable-rtc) _rtc
=yes ;;
1454 --disable-rtc) _rtc
=no
;;
1455 --enable-mp1e) _mp1e
=yes ;;
1456 --disable-mp1e) _mp1e
=no
;;
1457 --enable-libdv) _libdv
=yes ;;
1458 --disable-libdv) _libdv
=no
;;
1459 --enable-ossaudio) _ossaudio
=yes ;;
1460 --disable-ossaudio) _ossaudio
=no
;;
1461 --enable-arts) _arts
=yes ;;
1462 --disable-arts) _arts
=no
;;
1463 --enable-esd) _esd
=yes ;;
1464 --disable-esd) _esd
=no
;;
1465 --enable-jack) _jack
=yes ;;
1466 --disable-jack) _jack
=no
;;
1467 --enable-mad) _mad
=yes ;;
1468 --disable-mad) _mad
=no
;;
1469 --disable-toolame) _toolame
=no
;;
1470 --enable-liblzo) _liblzo
=yes ;;
1471 --disable-liblzo) _liblzo
=no
;;
1472 --enable-vorbis) _vorbis
=yes ;;
1473 --disable-vorbis) _vorbis
=no
;;
1474 --enable-tremor) _tremor
=yes ;;
1475 --disable-tremor) _tremor
=no
;;
1476 --enable-theora) _theora
=yes ;;
1477 --disable-theora) _theora
=no
;;
1478 --enable-mp3lib) _mp3lib
=yes ;;
1479 --disable-mp3lib) _mp3lib
=no
;;
1480 --enable-liba52) _liba52
=yes ;;
1481 --disable-liba52) _liba52
=no
;;
1482 --enable-libdts) _libdts
=yes ;;
1483 --disable-libdts) _libdts
=no
;;
1484 --enable-libmpeg2) _libmpeg2
=yes ;;
1485 --disable-libmpeg2) _libmpeg2
=no
;;
1486 --enable-internal-matroska) _matroska_internal
=yes ;;
1487 --disable-internal-matroska) _matroska_internal
=no
;;
1488 --enable-internal-faad) _faad_internal
=yes _faad_external
=no
;;
1489 --disable-internal-faad) _faad_internal
=no
;;
1490 --enable-external-faad) _faad_external
=yes _faad_internal
=no
;;
1491 --disable-external-faad) _faad_external
=no
;;
1492 --enable-xmms) _xmms
=yes ;;
1493 --disable-xmms) _xmms
=no
;;
1494 --enable-dvdread) _dvdread
=yes ;;
1495 --disable-dvdread) _dvdread
=no
;;
1496 --enable-mpdvdkit) _dvdkit
=yes ;;
1497 --disable-mpdvdkit) _dvdkit
=no
;;
1498 # dvdnav disabled, it does not work
1499 # --enable-dvdnav) _dvdnav=yes ;;
1500 # --disable-dvdnav) _dvdnav=no ;;
1501 --enable-xanim) _xanim
=yes ;;
1502 --disable-xanim) _xanim
=no
;;
1503 --enable-real) _real
=yes ;;
1504 --disable-real) _real
=no
;;
1505 --enable-live) _live
=yes ;;
1506 --disable-live) _live
=no
;;
1507 --enable-xinerama) _xinerama
=yes ;;
1508 --disable-xinerama) _xinerama
=no
;;
1509 --enable-mga) _mga
=yes ;;
1510 --disable-mga) _mga
=no
;;
1511 --enable-xmga) _xmga
=yes ;;
1512 --disable-xmga) _xmga
=no
;;
1513 --enable-vm) _vm
=yes ;;
1514 --disable-vm) _vm
=no
;;
1515 --enable-mlib) _mlib
=yes ;;
1516 --disable-mlib) _mlib
=no
;;
1517 --enable-sunaudio) _sunaudio
=yes ;;
1518 --disable-sunaudio) _sunaudio
=no
;;
1519 --enable-sgiaudio) _sgiaudio
=yes ;;
1520 --disable-sgiaudio) _sgiaudio
=no
;;
1521 --enable-alsa) _alsa
=yes ;;
1522 --disable-alsa) _alsa
=no
;;
1523 --enable-tv) _tv
=yes ;;
1524 --disable-tv) _tv
=no
;;
1525 --enable-edl) _edl
=yes ;;
1526 --disable-edl) _edl
=no
;;
1527 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1528 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1529 --enable-tv-v4l) _tv_v4l
=yes ;;
1530 --disable-tv-v4l) _tv_v4l
=no
;;
1531 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1532 --disable-tv-v4l2) _tv_v4l2
=no
;;
1533 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1534 --disable-fastmemcpy) _fastmemcpy
=no
;;
1535 --enable-network) _network
=yes ;;
1536 --disable-network) _network
=no
;;
1537 --enable-winsock2) _winsock2
=yes ;;
1538 --disable-winsock2) _winsock2
=no
;;
1539 --enable-smb) _smbsupport
=yes ;;
1540 --disable-smb) _smbsupport
=no
;;
1541 --enable-vidix) _vidix
=yes ;;
1542 --disable-vidix) _vidix
=no
;;
1543 --enable-joystick) _joystick
=yes ;;
1544 --disable-joystick) _joystick
=no
;;
1545 --enable-xvid) _xvid
=yes ;;
1546 --disable-xvid) _xvid
=no
;;
1547 --enable-x264) _x264
=yes ;;
1548 --disable-x264) _x264
=no
;;
1549 --enable-divx4linux) _divx4linux
=yes ;;
1550 --disable-divx4linux) _divx4linux
=no
;;
1551 --enable-opendivx) _opendivx
=yes ;;
1552 --disable-opendivx) _opendivx
=no
;;
1553 --enable-libavcodec) _libavcodec
=yes ;;
1554 --disable-libavcodec) _libavcodec
=no
;;
1555 --enable-libavformat) _libavformat
=yes;;
1556 --disable-libavformat) _libavformat
=no
;;
1557 --enable-libfame) _fame
=yes ;;
1558 --disable-libfame) _fame
=no
;;
1559 --enable-lirc) _lirc
=yes ;;
1560 --disable-lirc) _lirc
=no
;;
1561 --enable-lircc) _lircc
=yes ;;
1562 --disable-lircc) _lircc
=no
;;
1563 --enable-gui) _gui
=yes ;;
1564 --disable-gui) _gui
=no
;;
1565 --enable-termcap) _termcap
=yes ;;
1566 --disable-termcap) _termcap
=no
;;
1567 --enable-termios) _termios
=yes ;;
1568 --disable-termios) _termios
=no
;;
1569 --enable-3dfx) _3dfx
=yes ;;
1570 --disable-3dfx) _3dfx
=no
;;
1571 --enable-tdfxfb) _tdfxfb
=yes ;;
1572 --disable-tdfxvid) _tdfxvid
=no
;;
1573 --enable-tdfxvid) _tdfxvid
=yes ;;
1574 --disable-tga) _tga
=no
;;
1575 --enable-tga) _tga
=yes ;;
1576 --disable-tdfxfb) _tdfxfb
=no
;;
1577 --enable-directfb) _directfb
=yes ;;
1578 --disable-directfb) _directfb
=no
;;
1579 --enable-zr) _zr
=yes ;;
1580 --disable-zr) _zr
=no
;;
1581 --enable-bl) _bl
=yes ;;
1582 --disable-bl) _bl
=no
;;
1583 --enable-mtrr) _mtrr
=yes ;;
1584 --disable-mtrr) _mtrr
=no
;;
1585 --enable-largefiles) _largefiles
=yes ;;
1586 --disable-largefiles) _largefiles
=no
;;
1587 --enable-shm) _shm
=yes ;;
1588 --disable-shm) _shm
=no
;;
1589 --enable-select) _select
=yes ;;
1590 --disable-select) _select
=no
;;
1591 --enable-linux-devfs) _linux_devfs
=yes ;;
1592 --disable-linux-devfs) _linux_devfs
=no
;;
1593 --enable-cdparanoia) _cdparanoia
=yes ;;
1594 --disable-cdparanoia) _cdparanoia
=no
;;
1595 --enable-big-endian) _big_endian
=yes ;;
1596 --disable-big-endian) _big_endian
=no
;;
1597 --enable-freetype) _freetype
=yes ;;
1598 --disable-freetype) _freetype
=no
;;
1599 --enable-fontconfig) _fontconfig
=yes ;;
1600 --disable-fontconfig) _fontconfig
=no
;;
1601 --enable-unrarlib) _unrarlib
=yes ;;
1602 --disable-unrarlib) _unrarlib
=no
;;
1603 --enable-ftp) _ftp
=yes ;;
1604 --disable-ftp) _ftp
=no
;;
1606 --enable-fribidi) _fribidi
=yes ;;
1607 --disable-fribidi) _fribidi
=no
;;
1609 --enable-enca) _enca
=yes ;;
1610 --disable-enca) _enca
=no
;;
1612 --enable-inet6) _inet6
=yes ;;
1613 --disable-inet6) _inet6
=no
;;
1615 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1616 --disable-gethostbyname2) _gethostbyname2
=no
;;
1618 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1619 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1620 --disable-dga) _dga
=no
;;
1622 --enable-shared-pp) _shared_pp
=yes ;;
1623 --disable-shared-pp) _shared_pp
=no
;;
1625 --enable-menu) _menu
=yes ;;
1626 --disable-menu) _menu
=no
;;
1628 --enable-qtx) _qtx
=yes ;;
1629 --disable-qtx) _qtx
=no
;;
1631 --enable-macosx) _macosx
=yes ;;
1632 --disable-macosx) _macosx
=no
;;
1634 --enable-sortsub) _sortsub
=yes ;;
1635 --disable-sortsub) _sortsub
=no
;;
1638 _language
=`echo $ac_option | cut -d '=' -f 2`
1640 # dvdnav disabled, it does not work
1641 # --with-libdvdnav=*)
1642 # _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
1647 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1648 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1649 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1651 --with-win32libdir=*)
1652 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1655 --with-xanimlibdir=*)
1656 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1659 --with-reallibdir=*)
1660 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1663 --with-livelibdir=*)
1664 _livelibdir
=`echo $ac_option | cut -d '=' -f 2`
1666 --with-toolamedir=*)
1667 _toolamedir
=`echo $ac_option | cut -d '=' -f 2`
1670 _mlibdir
=`echo $ac_option | cut -d '=' -f 2`
1674 --with-xmmslibdir=*)
1675 _xmmslibdir
=`echo $ac_option | cut -d '=' -f 2`
1678 --with-xmmsplugindir=*)
1679 _xmmsplugindir
=`echo $ac_option | cut -d '=' -f 2`
1683 _bio2jackdir
=`echo $ac_option | cut -d '=' -f 2`
1696 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
1701 --enable-sighandler)
1704 --disable-sighandler)
1708 --enable-sse) _sse
=yes ;;
1709 --disable-sse) _sse
=no
;;
1710 --enable-sse2) _sse2
=yes ;;
1711 --disable-sse2) _sse2
=no
;;
1712 --enable-mmx2) _mmx2
=yes ;;
1713 --disable-mmx2) _mmx2
=no
;;
1714 --enable-3dnow) _3dnow
=yes ;;
1715 --disable-3dnow) _3dnow
=no _3dnowex
=no
;;
1716 --enable-3dnowex) _3dnow
=yes _3dnowex
=yes ;;
1717 --disable-3dnowex) _3dnowex
=no
;;
1718 --enable-altivec) _altivec
=yes ;;
1719 --disable-altivec) _altivec
=no
;;
1720 --enable-mmx) _mmx
=yes ;;
1721 --disable-mmx) # 3Dnow! and MMX2 require MMX
1722 _3dnow
=no _3dnowex
=no _mmx
=no _mmx2
=no
;;
1724 --enable-macshlb) _macshlb
=yes ;;
1725 --disable-macshlb) _macshlb
=no
;;
1726 --enable-win32) _win32
=yes ;;
1727 --disable-win32) _win32
=no _dshow
=no
;;
1728 --enable-dshow) _win32
=yes _dshow
=yes ;;
1729 --disable-dshow) _dshow
=no
;;
1732 _inc_x11
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1735 _ld_x11
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1737 --with-dxr2incdir=*)
1738 _inc_dxr2
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1741 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
1744 _inc_dvb
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1746 --with-xvidlibdir=*)
1747 _ld_xvid
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1749 --with-xvidincdir=*)
1750 _inc_xvid
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1753 _ld_libdts
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1756 _inc_libdts
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1758 --with-x264libdir=*)
1759 _ld_x264
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1761 --with-x264incdir=*)
1762 _inc_x264
=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
1764 --with-sdl-config=*)
1765 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
1767 --with-freetype-config=*)
1768 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
1770 --with-fribidi-config=*)
1771 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
1773 --with-gtk-config=*)
1774 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
1776 --with-glib-config=*)
1777 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
1779 # dvdnav disabled, it does not work
1780 # --with-dvdnav-config=*)
1781 # _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
1784 _ld_mad
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1786 --with-cdparanoiaincdir=*)
1787 _inc_cdparanoia
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1789 --with-cdparanoialibdir=*)
1790 _ld_cdparanoia
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1792 --with-termcaplib=*)
1793 _ld_termcap
=-l`echo $ac_option | cut -d '=' -f 2`
1797 _prefix
=`echo $ac_option | cut -d '=' -f 2`
1800 _bindir
=`echo $ac_option | cut -d '=' -f 2`
1803 _datadir
=`echo $ac_option | cut -d '=' -f 2`
1806 _mandir
=`echo $ac_option | cut -d '=' -f 2`
1809 _confdir
=`echo $ac_option | cut -d '=' -f 2`
1812 _libdir
=`echo $ac_option | cut -d '=' -f 2`
1816 echo "Unknown parameter: $ac_option"
1823 # Atmos: moved this here, to be correct, if --prefix is specified
1824 test -z "$_bindir" && _bindir
="$_prefix/bin"
1825 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
1826 test -z "$_mandir" && _mandir
="$_prefix/man"
1827 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
1828 test -z "$_libdir" && _libdir
="$_prefix/lib"
1829 test -z "$_mlibdir" && _mlibdir
="$MLIBHOME"
1832 # Checking assembler (_as) compatibility...
1833 # Added workaround for older as that reads from stdin by default - atmos
1834 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
1835 echocheck
"assembler ($_as $as_version)"
1837 _pref_as_version
='2.9.1'
1839 if test "$_mmx" = yes ; then
1840 echo 'emms' >> $TMPS
1842 if test "$_3dnow" = yes ; then
1843 _pref_as_version
='2.10.1'
1844 echo 'femms' >> $TMPS
1846 if test "$_3dnowex" = yes ; then
1847 _pref_as_version
='2.10.1'
1848 echo 'pswapd %mm0, %mm0' >> $TMPS
1850 if test "$_mmx2" = yes ; then
1851 _pref_as_version
='2.10.1'
1852 echo 'movntq %mm0, (%eax)' >> $TMPS
1854 if test "$_sse" = yes ; then
1855 _pref_as_version
='2.10.1'
1856 echo 'xorps %xmm0, %xmm0' >> $TMPS
1858 #if test "$_sse2" = yes ; then
1859 # _pref_as_version='2.11'
1860 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
1862 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
1864 if test "$as_verc_fail" != yes ; then
1868 echo "Upgrade binutils to ${_pref_as_version} ..."
1869 die
"obsolete binutils version"
1875 # check if altivec is supported by the compiler, and how to enable it
1877 _altivec_gcc_flags
=''
1879 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
1880 echocheck
"GCC altivec support"
1888 FSF_flags
='-maltivec -mabi=altivec'
1889 Darwin_flags
='-faltivec'
1891 # check for Darwin-style flags first, since
1892 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
1893 # accepts but ignores FSF-style flags...
1895 if test -z "$p"; then
1896 cc_check
$Darwin_flags && p
='Darwin'
1898 if test -z "$p"; then
1899 cc_check
$FSF_flags && p
='FSF'
1903 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
1904 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
1908 if test -z "$p"; then
1911 p
="$p-style ($_altivec_gcc_flags)"
1917 # check if <altivec.h> should be included
1919 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
1921 if test "$_altivec" = yes ; then
1922 echocheck
"altivec.h"
1924 #include <altivec.h>
1925 int main(void) { return 0; }
1928 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
1929 if test "$_have_altivec_h" = yes ; then
1930 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
1932 echores
"$_have_altivec_h"
1935 # disable runtime cpudetection if
1936 # - we cannot generate altivec code
1937 # - altivec is disabled by the user
1939 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
1940 _runtime_cpudetection
=no
1943 # show that we are optimizing for altivec (if enabled and supported)
1945 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
1946 _optimizing
="$_optimizing altivec"
1949 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
1951 if test "$_altivec" = yes ; then
1952 _mcpu
="$_mcpu $_altivec_gcc_flags"
1955 # setup _def_altivec correctly
1957 if test "$_altivec" = yes ; then
1958 _def_altivec
='#define HAVE_ALTIVEC 1'
1960 _def_altivec
='#undef HAVE_ALTIVEC'
1964 _def_mmx
='#undef HAVE_MMX'
1965 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
1966 _def_mmx2
='#undef HAVE_MMX2'
1967 test "$_mmx2" = yes && _def_mmx2
='#define HAVE_MMX2 1'
1968 _def_3dnow
='#undef HAVE_3DNOW'
1969 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
1970 _def_3dnowex
='#undef HAVE_3DNOWEX'
1971 test "$_3dnowex" = yes && _def_3dnowex
='#define HAVE_3DNOWEX 1'
1972 _def_sse
='#undef HAVE_SSE'
1973 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
1974 _def_sse2
='#undef HAVE_SSE2'
1975 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
1977 # Checking kernel version...
1978 if x86
&& linux
; then
1980 kernel_version
=`uname -r 2>&1`
1981 echocheck
"$system_name kernel version"
1982 case "$kernel_version" in
1983 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
1984 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
1985 _k_verc_problem
=yes;;
1987 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
1990 if test "$_k_verc_fail" ; then
1991 echores
"$kernel_version, fail"
1992 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
1993 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
1994 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
1995 echo "supports SSE, but you have been warned! If you are using a kernel older than"
1996 echo "2.2.x you must upgrade it to get SSE support!"
1997 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
1999 echores
"$kernel_version, ok"
2003 if test "$_vidix" = auto
; then
2005 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2007 ppc
&& linux
&& _vidix
=yes
2008 alpha
&& linux
&& _vidix
=yes
2014 echocheck
"mplayer binary name"
2017 _prg_mencoder
="mencoder.exe"
2020 _prg_mencoder
="mencoder"
2025 # On QNX we must link to libph - Gabucino
2027 _ld_arch
="$_ld_arch -lph"
2030 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2032 if test "$_vidix" = yes ; then
2035 for _awk
in mawk gawk nawk
awk; do
2036 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2041 test "$_awk_verc_fail" = yes && _awk
=no
2043 if test "$_awk_verc_fail" = yes; then
2044 echo "VIDIX needs awk, but no working implementation was found!"
2045 echo "Try the GNU version, which can be downloaded from:"
2046 echo "ftp://ftp.gnu.org/gnu/gawk/"
2047 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2052 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
2059 ######################
2060 # MAIN TESTS GO HERE #
2061 ######################
2064 echocheck
"extra headers"
2065 if test "$_inc_extra" ; then
2066 echores
"$_inc_extra"
2072 echocheck
"extra libs"
2073 if test "$_ld_extra" ; then
2074 echores
"$_ld_extra"
2081 int main(void) { return 0; }
2083 if cc_check
-lposix ; then
2084 _ld_arch
="$_ld_arch -lposix"
2092 int main(void) { return 0; }
2094 if cc_check
-lm ; then
2102 # Checking for localization ...
2103 # CSAK EGY MARADHAT - A HEGYLAKO
2105 if test "$_i18n" != no
; then
2107 #include <libintl.h>
2108 int main(void) { gettext("test"); return 0; }
2112 if test "$_i18n" = auto
; then
2113 cc_check
&& _i18n
=yes
2115 for i18n_lib
in "" "-lintl"; do
2116 cc_check
$i18n_lib && _i18n
=yes && _i18n_libs
=$i18n_lib && break
2120 if test "$_i18n" = yes ; then
2121 _def_i18n
='#define USE_I18N 1'
2123 _def_i18n
='#undef USE_I18N'
2125 if test -z "$_i18n_libs" ; then
2128 echores
"$_i18n (using $_i18n_libs)"
2132 # Checking for setlocale() ...
2133 # CSAK EGY MARADHAT - A HEGYLAKO
2134 # Nemnem. a TV Maci !
2135 echocheck
"setlocale()"
2136 if test "$_setlocale" = auto
; then
2139 int main(void) { setlocale( LC_ALL,"" ); return 0; }
2142 cc_check
&& _setlocale
=yes
2144 if test "$_setlocale" = yes ; then
2145 _def_setlocale
='#define USE_SETLOCALE 1'
2147 _def_setlocale
='#undef USE_SETLOCALE'
2149 echores
"$_setlocale"
2153 if test "$_iconv" = auto
; then
2154 _iconv_tmp
='#include <iconv.h>'
2160 #define INBUFSIZE 1024
2161 #define OUTBUFSIZE 4096
2163 char inbuffer[INBUFSIZE];
2164 char outbuffer[OUTBUFSIZE];
2169 char *tocode="UTF-8";
2170 char *fromcode="cp1250";
2171 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
2172 while ((numread = read (0, inbuffer, INBUFSIZE))) {
2173 char *iptr=inbuffer;
2174 char *optr=outbuffer;
2175 size_t inleft=numread;
2176 size_t outleft=OUTBUFSIZE;
2177 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
2179 write (1, outbuffer, OUTBUFSIZE - outleft);
2182 if (iconv_close(icdsc) == -1)
2188 if cc_check
$_ld_lm ; then
2190 elif cc_check
$_ld_lm -liconv ; then
2195 if test "$_iconv" = yes ; then
2196 _def_iconv
='#define USE_ICONV 1'
2198 _def_iconv
='#undef USE_ICONV'
2203 echocheck
"langinfo"
2204 if test "$_langinfo" = auto
; then
2206 #include <langinfo.h>
2207 int main(void) { nl_langinfo(CODESET); return 0; }
2210 cc_check
&& _langinfo
=yes
2212 if test "$_langinfo" = yes ; then
2213 _def_langinfo
='#define USE_LANGINFO 1'
2215 _def_langinfo
='#undef USE_LANGINFO'
2217 echores
"$_langinfo"
2220 echocheck
"language"
2221 test -z "$_language" && _language
=$LINGUAS
2222 _language
=`echo $_language | sed 's/,/ /g'`
2223 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2224 for lang
in $_language ; do
2225 test "$lang" = all
&& lang
=en
2226 if test -f "help/help_mp-${lang}.h" ; then
2230 echo -n "$lang not found, "
2231 _language
=`echo $_language | sed "s/$lang *//"`
2234 test -z "$_language" && _language
=en
2235 _mp_help
="help/help_mp-${_language}.h"
2236 test -f $_mp_help || die
"$_mp_help not found"
2237 for lang
in $LANGUAGES ; do
2238 if test -f "DOCS/man/$lang/mplayer.1" ; then
2239 MAN_LANG
="$MAN_LANG $lang"
2242 _doc_lang
=$_language
2243 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2244 echores
"using $_language (man pages: $MAN_LANG)"
2247 echocheck
"enable sighandler"
2248 if test "$_sighandler" = yes ; then
2249 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2251 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2253 echores
"$_sighandler"
2255 echocheck
"runtime cpudetection"
2256 if test "$_runtime_cpudetection" = yes ; then
2257 _optimizing
="Runtime CPU-Detection enabled"
2258 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2260 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2262 echores
"$_runtime_cpudetection"
2265 echocheck
"restrict keyword"
2266 for restrict_keyword
in restrict __restrict __restrict__
; do
2267 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2269 _def_restrict_keyword
=$restrict_keyword
2273 if [ -n "$_def_restrict_keyword" ]; then
2274 echores
"$_def_restrict_keyword"
2283 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2286 cc_check
-lkstat && _kstat
=yes
2287 if test "$_kstat" = yes ; then
2288 _ld_arch
="-lkstat $_ld_arch"
2290 if test "$_kstat" = yes ; then
2291 _def_kstat
="#define HAVE_LIBKSTAT 1"
2293 _def_kstat
="#undef HAVE_LIBKSTAT"
2299 # required for nanosleep on some systems
2302 int main(void) { (void) nanosleep(0, 0); return 0; }
2305 cc_check
-lposix4 && _posix4
=yes
2306 if test "$_posix4" = yes ; then
2307 _ld_arch
="-lposix4 $_ld_arch"
2315 int main(void) { (void) lrintf(0.0); return 0; }
2318 cc_check
$_ld_lm && _lrintf
=yes
2319 if test "$_lrintf" = yes ; then
2320 _def_lrintf
="#define HAVE_LRINTF 1"
2322 _def_lrintf
="#undef HAVE_LRINTF"
2327 echocheck
"nanosleep"
2328 # also check for nanosleep
2331 int main(void) { (void) nanosleep(0, 0); return 0; }
2334 cc_check
$_ld_arch && _nanosleep
=yes
2335 if test "$_nanosleep" = yes ; then
2336 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2338 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2340 echores
"$_nanosleep"
2344 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2345 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2348 int main(void) { (void) gethostbyname(0); return 0; }
2350 cc_check
-lsocket && _ld_sock
="-lsocket"
2351 cc_check
-lnsl && _ld_sock
="-lnsl"
2352 cc_check
-lsocket -lnsl && _ld_sock
="-lsocket -lnsl"
2353 cc_check
-lsocket -ldnet && _ld_sock
="-lsocket -ldnet"
2354 cc_check
-lsocket -lbind && _ld_sock
="-lsocket -lbind"
2355 if test $_winsock2 = auto
&& not cygwin
; then
2358 #include <winsock2.h>
2359 int main(void) { (void) gethostbyname(0); return 0; }
2361 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2363 if test "$_ld_sock" ; then
2364 echores
"yes (using $_ld_sock)"
2370 if test $_winsock2 = yes ; then
2372 _def_winsock2
='#define HAVE_WINSOCK2 1'
2374 _def_winsock2
='#undef HAVE_WINSOCK2'
2379 echocheck
"inet_pton()"
2381 #include <sys/types.h>
2382 #include <sys/socket.h>
2383 #include <arpa/inet.h>
2384 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2386 if test "$_winsock2" = yes ; then
2387 echores
"not needed (using winsock2 functions)"
2388 elif cc_check
$_ld_sock ; then
2389 # NOTE: Linux has libresolv but does not need it
2391 echores
"yes (using $_ld_sock)"
2392 elif cc_check
$_ld_sock -lresolv ; then
2393 # NOTE: needed for SunOS at least
2394 _ld_sock
="$_ld_sock -lresolv"
2395 echores
"yes (using $_ld_sock)"
2397 echores
"no (=> i'll try inet_aton next)"
2399 echocheck
"inet_aton()"
2401 #include <sys/types.h>
2402 #include <sys/socket.h>
2403 #include <arpa/inet.h>
2404 int main(void) { (void) inet_aton(0, 0); return 0; }
2407 if cc_check
$_ld_sock ; then
2408 # NOTE: Linux has libresolv but does not need it
2410 echores
"yes (using $_ld_sock)"
2411 elif cc_check
$_ld_sock -lresolv ; then
2412 # NOTE: needed for SunOS at least
2413 _ld_sock
="$_ld_sock -lresolv"
2414 echores
"yes (using $_ld_sock)"
2418 echores
"no (=> network support disabled)"
2422 _def_use_aton
='#undef USE_ATON'
2423 if test "$_use_aton" != no
; then
2424 _def_use_aton
='#define USE_ATON 1'
2428 echocheck
"inttypes.h (required)"
2430 #include <inttypes.h>
2431 int main(void) { return 0; }
2434 cc_check
&& _inttypes
=yes
2435 if test "$_inttypes" = yes ; then
2440 echocheck
"bitypes.h (inttypes.h predecessor)"
2442 #include <sys/bitypes.h>
2443 int main(void) { return 0; }
2446 cc_check
&& _inttypes
=yes
2447 if test "$_inttypes" = yes ; then
2448 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."
2450 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2453 echores
"$_inttypes"
2456 echocheck
"int_fastXY_t in inttypes.h"
2458 #include <inttypes.h>
2460 volatile int_fast16_t v= 0;
2464 cc_check
&& _fast_inttypes
=yes
2465 if test "$_fast_inttypes" = yes ; then
2469 _def_fast_inttypes
='
2470 typedef signed char int_fast8_t;
2471 typedef signed int int_fast16_t;
2472 typedef signed int int_fast32_t;
2473 typedef unsigned char uint_fast8_t;
2474 typedef unsigned int uint_fast16_t;
2475 typedef unsigned int uint_fast32_t;'
2477 echores
"$_fast_inttypes"
2480 echocheck
"word size"
2481 _mp_wordsize
="#undef MP_WORDSIZE"
2484 #include <sys/types.h>
2485 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2487 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2488 echores
"$_wordsize"
2491 echocheck
"stddef.h"
2494 int main(void) { return 0; }
2497 cc_check
&& _stddef
=yes
2498 if test "$_stddef" = yes ; then
2499 _def_stddef
='#define HAVE_STDDEF_H 1'
2501 _def_stddef
='#undef HAVE_STDDEF_H'
2506 echocheck
"malloc.h"
2509 int main(void) { (void) malloc(0); return 0; }
2512 cc_check
&& _malloc
=yes
2513 if test "$_malloc" = yes ; then
2514 _def_malloc
='#define HAVE_MALLOC_H 1'
2516 _def_malloc
='#undef HAVE_MALLOC_H'
2518 # malloc.h emits a warning in FreeBSD and OpenBSD
2519 (freebsd || openbsd
) && _def_malloc
='#undef HAVE_MALLOC_H'
2523 echocheck
"memalign()"
2524 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2527 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2530 cc_check
&& _memalign
=yes
2531 if test "$_memalign" = yes ; then
2532 _def_memalign
='#define HAVE_MEMALIGN 1'
2534 _def_memalign
='#undef HAVE_MEMALIGN'
2536 echores
"$_memalign"
2539 echocheck
"alloca.h"
2542 int main(void) { (void) alloca(0); return 0; }
2545 cc_check
&& _alloca
=yes
2547 _def_alloca
='#define HAVE_ALLOCA_H 1'
2549 _def_alloca
='#undef HAVE_ALLOCA_H'
2556 #include <sys/types.h>
2557 #include <sys/mman.h>
2558 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2561 cc_check
&& _mman
=yes
2562 if test "$_mman" = yes ; then
2563 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2565 _def_mman
='#undef HAVE_SYS_MMAN_H'
2569 echocheck
"dynamic loader"
2572 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2577 elif cc_check
-ldl ; then
2581 if test "$_dl" = yes ; then
2582 _def_dl
='#define HAVE_LIBDL 1'
2584 _def_dl
='#undef HAVE_LIBDL'
2589 echocheck
"dynamic a/v plugins support"
2590 if test "$_dl" = no
; then
2593 if test "$_dynamic_plugins" = yes ; then
2594 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
2596 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
2598 echores
"$_dynamic_plugins"
2601 #echocheck "dynamic linking"
2602 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2603 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
2605 #int main(void) { return 0; }
2607 #if cc_check -rdynamic ; then
2608 # _ld_dl_dynamic='-rdynamic'
2609 #elif cc_check -Bdynamic ; then
2610 # _ld_dl_dynamic='-Bdynamic'
2611 #elif cc_check ; then
2614 #echores "using $_ld_dl_dynamic"
2619 #include <pthread.h>
2620 void* func(void *arg) { return arg; }
2621 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2625 elif ( cc_check
&& $TMPO ) ; then # QNX
2627 elif ( cc_check
-lpthread && $TMPO ) ; then
2628 _ld_pthread
='-lpthread'
2629 elif ( cc_check
-pthread && $TMPO ) ; then
2630 _ld_pthread
='-pthread'
2632 if test "$_ld_static" ; then
2633 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2634 if ( cc_check
-lpthread ) ; then
2635 _ld_pthread
='-lpthread'
2636 elif ( cc_check
-pthread ) ; then
2637 _ld_pthread
='-pthread'
2639 echores
"no static pthread found (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, Win32 loader disabled)"
2640 _ld_pthread
='' ; _nas
=no
; _tv_v4l
=no
; _macosx
=no
; _win32
=no
2643 echores
"no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled)"
2644 _ld_pthread
='' ; _nas
=no
; _tv_v4l
=no
; _macosx
=no
; _win32
=no
2647 if test "$_ld_pthread" != '' ; then
2648 echores
"yes (using $_ld_pthread)"
2650 _def_pthreads
='#define HAVE_PTHREADS 1'
2654 _def_pthreads
='#undef HAVE_PTHREADS'
2658 echocheck
"sys/soundcard.h"
2660 #include <sys/soundcard.h>
2661 int main(void) { return 0; }
2664 cc_check
&& _sys_soundcard
=yes
2665 if test "$_sys_soundcard" = yes ; then
2666 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
2667 _inc_soundcard
='#include <sys/soundcard.h>'
2669 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
2671 echores
"$_sys_soundcard"
2673 if test "$_sys_soundcard" != yes ; then
2674 echocheck
"soundcard.h"
2676 #include <soundcard.h>
2677 int main(void) { return 0; }
2680 cc_check
&& _soundcard
=yes
2681 if linux ||
test "$_ossaudio" != no
; then
2682 # use soundcard.h on Linux, or when OSS support is enabled
2683 echores
"$_soundcard"
2685 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
2686 echores
"$_soundcard, but ignored!"
2689 if test "$_soundcard" = yes ; then
2690 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
2691 _inc_soundcard
='#include <soundcard.h>'
2693 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2696 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2700 echocheck
"sys/dvdio.h"
2703 #include <sys/dvdio.h>
2704 int main(void) { return 0; }
2707 cc_check
&& _dvdio
=yes
2708 if test "$_dvdio" = yes ; then
2709 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
2711 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
2716 echocheck
"sys/cdio.h"
2719 #include <sys/cdio.h>
2720 int main(void) { return 0; }
2723 cc_check
&& _cdio
=yes
2724 if test "$_cdio" = yes ; then
2725 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
2727 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
2732 echocheck
"linux/cdrom.h"
2734 #include <sys/types.h>
2735 #include <linux/cdrom.h>
2736 int main(void) { return 0; }
2739 cc_check
&& _cdrom
=yes
2740 if test "$_cdrom" = yes ; then
2741 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
2743 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
2751 int main(void) { return 0; }
2754 cc_check
&& _dvd
=yes
2755 if test "$_dvd" = yes ; then
2756 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
2758 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
2763 echocheck
"BSDI dvd.h"
2766 int main(void) { return 0; }
2769 cc_check
&& _bsdi_dvd
=yes
2770 if test "$_bsdi_dvd" = yes ; then
2771 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
2773 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
2775 echores
"$_bsdi_dvd"
2778 echocheck
"HPUX SCSI header"
2780 #include <sys/scsi.h>
2781 int main(void) { return 0; }
2784 cc_check
&& _hpux_scsi_h
=yes
2785 if test "$_hpux_scsi_h" = yes ; then
2786 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
2788 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
2790 echores
"$_hpux_scsi_h"
2793 echocheck
"userspace SCSI headers (Solaris)"
2795 # include <unistd.h>
2796 # include <stropts.h>
2797 # include <sys/scsi/scsi_types.h>
2798 # include <sys/scsi/impl/uscsi.h>
2799 int main(void) { return 0; }
2802 cc_check
&& _sol_scsi_h
=yes
2803 if test "$_sol_scsi_h" = yes ; then
2804 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
2806 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
2808 echores
"$_sol_scsi_h"
2812 if test "$_termcap" = auto
; then
2814 int main(void) { return 0; }
2817 cc_check
-ltermcap && _termcap
=yes && _ld_termcap
='-ltermcap'
2818 cc_check
-ltinfo && _termcap
=yes && _ld_termcap
='-ltinfo'
2820 if test "$_termcap" = yes ; then
2821 _def_termcap
='#define USE_TERMCAP 1'
2822 echores
"yes (using $_ld_termcap)"
2824 _def_termcap
='#undef USE_TERMCAP'
2830 if test "$_termios" = auto
; then
2832 #include <sys/termios.h>
2833 int main(void) { return 0; }
2836 cc_check
&& _termios
=yes
2837 _def_termios_h_name
='sys/termios.h'
2840 if test "$_termios" = no
; then
2842 #include <termios.h>
2843 int main(void) { return 0; }
2846 cc_check
&& _termios
=yes
2847 _def_termios_h_name
='termios.h'
2850 if test "$_termios" = yes ; then
2851 _def_termios
='#define HAVE_TERMIOS 1'
2852 _def_termios_h
='#undef HAVE_TERMIOS_H'
2853 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
2855 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
2856 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
2857 elif test "$_def_termios_h_name" = 'termios.h' ; then
2858 _def_termios_h
='#define HAVE_TERMIOS_H 1'
2860 echores
"yes (using $_def_termios_h_name)"
2862 _def_termios
='#undef HAVE_TERMIOS'
2863 _def_termios_h_name
=''
2869 if test "$_shm" = auto
; then
2871 #include <sys/types.h>
2872 #include <sys/shm.h>
2873 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
2876 cc_check
&& _shm
=yes
2878 if test "$_shm" = yes ; then
2879 _def_shm
='#define HAVE_SHM 1'
2881 _def_shm
='#undef HAVE_SHM'
2886 # XXX: FIXME, add runtime checking
2887 echocheck
"linux devfs"
2888 echores
"$_linux_devfs"
2891 echocheck
"scandir()"
2893 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
2896 cc_check
&& _scandir
=yes
2897 if test "$_scandir" = yes ; then
2898 _def_scandir
='#define HAVE_SCANDIR 1'
2900 _def_scandir
='#undef HAVE_SCANDIR'
2905 echocheck
"strsep()"
2908 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
2911 cc_check
&& _strsep
=yes
2912 if test "$_strsep" = yes ; then
2913 _def_strsep
='#define HAVE_STRSEP 1'
2915 _def_strsep
='#undef HAVE_STRSEP'
2919 echocheck
"strlcpy()"
2922 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
2925 cc_check
&& _strlcpy
=yes
2926 if test "$_strlcpy" = yes ; then
2927 _def_strlcpy
='#define HAVE_STRLCPY 1'
2929 _def_strlcpy
='#undef HAVE_STRLCPY'
2933 echocheck
"strlcat()"
2936 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
2939 cc_check
&& _strlcat
=yes
2940 if test "$_strlcat" = yes ; then
2941 _def_strlcat
='#define HAVE_STRLCAT 1'
2943 _def_strlcat
='#undef HAVE_STRLCAT'
2947 echocheck
"fseeko()"
2950 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
2953 cc_check
&& _fseeko
=yes
2954 if test "$_fseeko" = yes ; then
2955 _def_fseeko
='#define HAVE_FSEEKO 1'
2957 _def_fseeko
='#undef HAVE_FSEEKO'
2961 echocheck
"localtime_r()"
2964 int main( void ) { localtime_r(NULL, NULL); }
2967 cc_check
&& _localtime_r
=yes
2968 if test "$_localtime_r" = yes ; then
2969 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
2971 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
2973 echores
"$_localtime_r"
2975 echocheck
"vsscanf()"
2978 int main(void) { vsscanf(0, 0, 0); return 0; }
2981 cc_check
&& _vsscanf
=yes
2982 if test "$_vsscanf" = yes ; then
2983 _def_vsscanf
='#define HAVE_VSSCANF 1'
2985 _def_vsscanf
='#undef HAVE_VSSCANF'
2993 int main(void) { swab(0, 0, 0); return 0; }
2996 cc_check
&& _swab
=yes
2997 if test "$_swab" = yes ; then
2998 _def_swab
='#define HAVE_SWAB 1'
3000 _def_swab
='#undef HAVE_SWAB'
3004 echocheck
"posix select()"
3008 #include <sys/types.h>
3010 #include <sys/time.h>
3012 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3015 cc_check
&& _posix_select
=yes
3016 if test "$_posix_select" = no
; then
3017 _def_no_posix_select
='#define HAVE_NO_POSIX_SELECT 1'
3019 _def_no_posix_select
='#undef HAVE_NO_POSIX_SELECT'
3021 echores
"$_posix_select"
3024 echocheck
"gettimeofday()"
3027 #include <sys/time.h>
3028 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3031 cc_check
&& _gettimeofday
=yes
3032 if test "$_gettimeofday" = yes ; then
3033 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3035 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3037 echores
"$_gettimeofday"
3044 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3047 cc_check
&& _glob
=yes
3048 if test "$_glob" = yes ; then
3049 _def_glob
='#define HAVE_GLOB 1'
3051 _def_glob
='#undef HAVE_GLOB'
3056 echocheck
"sys/sysinfo.h"
3058 #include <sys/sysinfo.h>
3060 struct sysinfo s_info;
3066 cc_check
&& _sys_sysinfo
=yes
3067 if test "$_sys_sysinfo" = yes ; then
3068 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3069 _inc_sysinfo
='#include <sys/sysinfo.h>'
3071 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3073 echores
"$_sys_sysinfo"
3076 echocheck
"Mac OS X APIs"
3077 if test "$_macosx" = auto
; then
3078 if darwin
&& ppc
; then
3082 _def_macosx
='#undef MACOSX'
3083 _noaomodules
="macosx $_noaomodules"
3084 _novomodules
="quartz $_novomodules"
3087 if test "$_macosx" = yes ; then
3089 #include <Carbon/Carbon.h>
3090 #include <QuickTime/QuickTime.h>
3091 #include <CoreAudio/CoreAudio.h>
3095 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3098 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3100 _macosx_frameworks
="-framework Carbon -framework QuickTime -framework CoreAudio"
3101 _def_macosx
='#define MACOSX 1'
3102 _aosrc
="$_aosrc ao_macosx.c"
3103 _aomodules
="macosx $_aomodules"
3104 _vosrc
="$_vosrc vo_quartz.c"
3105 _vomodules
="quartz $_vomodules"
3108 _def_macosx
='#undef MACOSX'
3109 _noaomodules
="macosx $_noaomodules"
3110 _novomodules
="quartz $_novomodules"
3116 echocheck
"Samba support (libsmbclient)"
3117 if test "$_smbsupport" = yes; then
3118 _ld_smb
="-lsmbclient"
3120 if test "$_smbsupport" = auto
; then
3123 #include <libsmbclient.h>
3124 int main(void) { smbc_opendir("smb://"); return 0; }
3126 if cc_check
-lsmbclient ; then
3128 _ld_smb
="-lsmbclient"
3130 if cc_check
-lsmbclient $_ld_dl ; then
3132 _ld_smb
="-lsmbclient $_ld_dl"
3134 if cc_check
-lsmbclient $_ld_dl -lnsl ; then
3136 _ld_smb
="-lsmbclient $_ld_dl -lnsl"
3142 if test "$_smbsupport" = yes; then
3143 _def_smbsupport
="#define LIBSMBCLIENT"
3144 _inputmodules
="smb $_inputmodules"
3146 _def_smbsupport
="#undef LIBSMBCLIENT"
3147 _noinputmodules
="smb $_noinputmodules"
3149 echores
"$_smbsupport"
3158 if test "$_3dfx" = yes ; then
3159 _def_3dfx
='#define HAVE_3DFX 1'
3160 _vosrc
="$_vosrc vo_3dfx.c"
3161 _vomodules
="3dfx $_vomodules"
3163 _def_3dfx
='#undef HAVE_3DFX'
3164 _novomodules
="3dfx $_novomodules"
3170 if test "$_tdfxfb" = yes ; then
3171 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3172 _vosrc
="$_vosrc vo_tdfxfb.c"
3173 _vomodules
="tdfxfb $_vomodules"
3175 _def_tdfxfb
='#undef HAVE_TDFXFB'
3176 _novomodules
="tdfxfb $_novomodules"
3181 if test "$_tdfxvid" = yes ; then
3182 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3183 _vosrc
="$_vosrc vo_tdfx_vid.c"
3184 _vomodules
="tdfx_vid $_vomodules"
3186 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3187 _novomodules
="tdfx_vid $_novomodules"
3192 if test "$_tga" = yes ; then
3193 _def_tga
='#define HAVE_TGA 1'
3194 _vosrc
="$_vosrc vo_tga.c"
3195 _vomodules
="tga $_vomodules"
3197 _def_tga
='#undef HAVE_TGA'
3198 _novomodules
="tga $_novomodules"
3202 echocheck
"DirectFB headers presence"
3203 if test -z "$_inc_directfb" ; then
3204 for I
in /usr
/include
/usr
/local
/include
$_inc_extra; do
3205 if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
3206 _inc_directfb
="-I$I/directfb"
3207 echores
"yes (using $_inc_directfb)"
3210 if test -d "$I" && test -f "$I/directfb.h" ; then
3211 _inc_directfb
="-I$I"
3212 echores
"yes (using $_inc_directfb)"
3216 if test -z "$_inc_directfb" ; then
3221 echores
"yes (using $_inc_directfb)"
3223 if test "$_inc_directfb" = "-I/usr/include" ; then
3227 echocheck
"DirectFB"
3228 if test "$_directfb" = auto
; then
3231 #include <directfb.h>
3232 int main(void) { IDirectFB *foo; return 0; }
3234 linux
&& test -c /dev
/fb0
&& cc_check
$_inc_directfb -ldirectfb && _directfb
=yes
3237 if test "$_directfb" = yes; then
3239 #include <directfb.h>
3241 printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version);
3245 if cc_check
$_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then
3246 _directfb_version
=`"$TMPO"`
3247 _def_directfb_version
="#define DIRECTFBVERSION $_directfb_version"
3248 echores
"yes ($_directfb_version)"
3251 echores
"no (failed to get version)"
3254 echores
"$_directfb"
3257 if test "$_directfb" = yes ; then
3258 _def_directfb
='#define HAVE_DIRECTFB 1'
3259 if test "$_directfb_version" -ge 913; then
3260 _vosrc
="$_vosrc vo_directfb2.c"
3262 _vosrc
="$_vosrc vo_directfb.c"
3264 _vomodules
="directfb $_vomodules"
3265 _ld_directfb
='-ldirectfb'
3267 if test "$_directfb_version" -ge 915; then
3268 _vosrc
="$_vosrc vo_dfbmga.c"
3269 _vomodules
="dfbmga $_vomodules"
3272 _def_directfb
='#undef HAVE_DIRECTFB'
3273 _novomodules
="directfb $_novomodules"
3278 echocheck
"X11 headers presence"
3279 if test -z "$_inc_x11" ; then
3280 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3281 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
3283 echores
"yes (using $I)"
3287 if test -z "$_inc_x11" ; then
3289 echores
"not found (check if the dev(el) packages are installed)"
3292 echores
"yes (using $_inc_x11)"
3294 if test "$_inc_x11" = "-I/usr/include" ; then
3299 echocheck
"X11 libs presence"
3300 if test -z "$_ld_x11" ; then
3301 for I
in /usr
/X11R
6/lib
/usr
/lib
/X11R6
/usr
/X11
/lib
/usr
/lib32
/usr
/openwin
/lib
/usr
/X11R
6/lib64
/usr
/lib
; do
3302 if test -d "$I" && ( test -f "$I/libX11.so" ||
test -f "$I/libX11.a" ||
test -f "$I/libX11.dll.a" ) ; then
3304 _ld_x11
="-L$I -Wl,-R$I"
3308 echores
"yes (using $I)"
3312 if test -z "$_ld_x11" ; then
3314 echores
"not found (check if the dev(el) packages are installed)"
3317 echores
"yes (using $_ld_x11)"
3319 _ld_x11
="$_ld_x11 -lXext -lX11 $_ld_sock"
3323 if test "$_x11" != no
; then
3325 #include <X11/Xlib.h>
3326 #include <X11/Xutil.h>
3327 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3330 cc_check
$_inc_x11 $_ld_x11 && _x11
=yes
3332 if test "$_x11" = yes ; then
3333 _def_x11
='#define HAVE_X11 1'
3334 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3335 _vomodules
="x11 xover $_vomodules"
3337 _def_x11
='#undef HAVE_X11'
3340 _novomodules
="x11 $_novomodules"
3347 if test "$_x11" = yes ; then
3349 #include <X11/Xmd.h>
3350 #include <X11/Xlib.h>
3351 #include <X11/Xutil.h>
3352 #include <X11/Xatom.h>
3353 #include <X11/extensions/dpms.h>
3355 (void) DPMSQueryExtension(0, 0, 0);
3358 cc_check
$_inc_x11 -lXdpms $_ld_x11 && _xdpms3
=yes
3361 if test "$_x11" = yes ; then
3363 #include <X11/Xlib.h>
3364 #include <X11/extensions/dpms.h>
3366 (void) DPMSQueryExtension(0, 0, 0);
3369 cc_check
$_inc_x11 $_ld_x11 && _xdpms4
=yes
3371 if test "$_xdpms4" = yes ; then
3372 _def_xdpms
='#define HAVE_XDPMS 1'
3373 echores
"yes (using Xdpms 4)"
3374 elif test "$_xdpms3" = yes ; then
3375 _def_xdpms
='#define HAVE_XDPMS 1'
3376 _ld_x11
="-lXdpms $_ld_x11"
3377 echores
"yes (using Xdpms 3)"
3379 _def_xdpms
='#undef HAVE_XDPMS'
3385 if test "$_x11" = yes && test "$_xv" != no
; then
3387 #include <X11/Xlib.h>
3388 #include <X11/extensions/Xvlib.h>
3389 int main(void) { (void) XvGetPortAttribute(0, 0, 0, 0); return 0; }
3392 cc_check
$_inc_x11 -lXv $_ld_x11 && _xv
=yes
3396 if test "$_xv" = yes ; then
3397 _def_xv
='#define HAVE_XV 1'
3399 _vosrc
="$_vosrc vo_xv.c"
3400 _vomodules
="xv $_vomodules"
3402 _def_xv
='#undef HAVE_XV'
3403 _novomodules
="xv $_novomodules"
3409 if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no
; then
3412 #include <X11/Xlib.h>
3413 #include <X11/extensions/Xvlib.h>
3414 #include <X11/extensions/XvMClib.h>
3416 (void) XvMCQueryExtension(0,0,0);
3417 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3420 cc_check
$_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _xvmc
=yes
3422 if test "$_xvmc" = yes ; then
3423 _def_xvmc
='#define HAVE_XVMC 1'
3424 _ld_xvmc
="-lXvMC -l$_xvmclib"
3425 _vosrc
="$_vosrc vo_xvmc.c"
3426 _vomodules
="xvmc $_vomodules"
3428 _def_xvmc
='#undef HAVE_XVMC'
3429 _novomodules
="xvmc $_novomodules"
3434 echocheck
"Xinerama"
3435 if test "$_x11" = yes && test "$_xinerama" != no
; then
3437 #include <X11/Xlib.h>
3438 #include <X11/extensions/Xinerama.h>
3439 int main(void) { (void) XineramaIsActive(0); return 0; }
3442 cc_check
$_inc_x11 -lXinerama $_ld_x11 && _xinerama
=yes
3446 if test "$_xinerama" = yes ; then
3447 _def_xinerama
='#define HAVE_XINERAMA 1'
3448 _ld_xinerama
='-lXinerama'
3450 _def_xinerama
='#undef HAVE_XINERAMA'
3452 echores
"$_xinerama"
3455 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3456 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3457 # named 'X extensions' or something similar.
3458 # This check may be useful for future mplayer versions (to change resolution)
3459 # If you run into problems, remove '-lXxf86vm'.
3461 if test "$_x11" = yes && test "$_vm" != no
; then
3463 #include <X11/Xlib.h>
3464 #include <X11/extensions/xf86vmode.h>
3465 #include <X11/XF86keysym.h>
3466 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3469 cc_check
$_inc_x11 -lXxf86vm $_ld_x11 && _vm
=yes
3473 if test "$_vm" = yes ; then
3474 _def_vm
='#define HAVE_XF86VM 1'
3477 _def_vm
='#undef HAVE_XF86VM'
3483 # Version 2 is preferred to version 1 if available
3484 if test "$_dga" = auto
; then
3486 #include <X11/Xlib.h>
3487 #include <X11/extensions/xf86dga.h>
3488 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
3491 cc_check
$_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga
=1
3494 #include <X11/Xlib.h>
3495 #include <X11/extensions/xf86dga.h>
3496 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
3498 cc_check
$_inc_x11 -lXxf86dga $_ld_x11 && _dga
=2
3501 _def_dga
='#undef HAVE_DGA'
3502 _def_dga2
='#undef HAVE_DGA2'
3503 if test "$_dga" = 1 ; then
3504 _def_dga
='#define HAVE_DGA 1'
3505 _ld_dga
='-lXxf86dga'
3506 _vosrc
="$_vosrc vo_dga.c"
3507 _vomodules
="dga $_vomodules"
3508 echores
"yes (using DGA 1.0)"
3509 elif test "$_dga" = 2 ; then
3510 _def_dga
='#define HAVE_DGA 1'
3511 _def_dga2
='#define HAVE_DGA2 1'
3512 _ld_dga
='-lXxf86dga'
3513 _vosrc
="$_vosrc vo_dga.c"
3514 _vomodules
="dga $_vomodules"
3515 echores
"yes (using DGA 2.0)"
3516 elif test "$_dga" = no
; then
3518 _novomodules
="dga $_novomodules"
3520 die
"DGA version must be 1 or 2"
3525 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
3526 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
3529 int main(void) { return 0; }
3532 if cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3535 elif cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3537 _ld_gl
="-lGL $_ld_pthread"
3538 elif cc_check
-lopengl32 ; then
3541 _ld_gl
="-lopengl32 -lgdi32"
3546 if test "$_gl" = yes ; then
3547 _def_gl
='#define HAVE_GL 1'
3548 if test "$_gl_win32" = yes ; then
3549 _def_gl_win32
='#define GL_WIN32 1'
3550 _vosrc
="$_vosrc vo_gl2.c w32_common.c gl_common.c"
3552 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
3554 _vomodules
="opengl $_vomodules"
3556 _def_gl
='#undef HAVE_GL'
3557 _def_gl_win32
='#undef GL_WIN32'
3558 _novomodules
="opengl $_novomodules"
3563 echocheck
"/dev/mga_vid"
3564 if test "$_mga" = auto
; then
3566 test -c /dev
/mga_vid
&& _mga
=yes
3568 if test "$_mga" = yes ; then
3569 _def_mga
='#define HAVE_MGA 1'
3570 _vosrc
="$_vosrc vo_mga.c"
3571 _vomodules
="mga $_vomodules"
3573 _def_mga
='#undef HAVE_MGA'
3574 _novomodules
="mga $_novomodules"
3579 # echocheck "syncfb"
3581 # test "$_mga" = yes && _syncfb=yes
3582 # if test "$_syncfb" = yes ; then
3583 # _def_syncfb='#define HAVE_SYNCFB 1'
3584 # _vosrc="$_vosrc vo_syncfb.c"
3586 # _def_syncfb='#undef HAVE_SYNCFB'
3588 # echores "$_syncfb"
3592 if test "$_xmga" = auto
; then
3594 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
3596 if test "$_xmga" = yes ; then
3597 _def_xmga
='#define HAVE_XMGA 1'
3598 _vosrc
="$_vosrc vo_xmga.c"
3599 _vomodules
="xmga $_vomodules"
3601 _def_xmga
='#undef HAVE_XMGA'
3602 _novomodules
="xmga $_novomodules"
3608 if test "$_ggi" = auto
; then
3610 #include <ggi/ggi.h>
3611 int main(void) { return 0; }
3614 cc_check
-lggi && _ggi
=yes
3616 if test "$_ggi" = yes ; then
3617 _def_ggi
='#define HAVE_GGI 1'
3619 _vosrc
="$_vosrc vo_ggi.c"
3620 _vomodules
="ggi $_vomodules"
3622 _def_ggi
='#undef HAVE_GGI'
3623 _novomodules
="ggi $_novomodules"
3629 if test "$_aa" = auto
; then
3632 int main(void) { (void) aa_init(0, 0, 0); return 0; }
3635 cc_check
-laa && _aa
=yes
3637 if test "$_aa" = yes ; then
3638 _def_aa
='#define HAVE_AA 1'
3640 _ld_aa
=`aalib-config --libs | cut -d " " -f 2,5,6`
3644 _vosrc
="$_vosrc vo_aa.c"
3645 _vomodules
="aa $_vomodules"
3647 _def_aa
='#undef HAVE_AA'
3648 _novomodules
="aa $_novomodules"
3654 if test "$_caca" = auto
; then
3656 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
3659 int main(void) { (void) caca_init(); return 0; }
3661 cc_check
`caca-config --libs` && _caca
=yes
3664 if test "$_caca" = yes ; then
3665 _def_caca
='#define HAVE_CACA 1'
3666 _inc_caca
=`caca-config --cflags`
3667 _ld_caca
=`caca-config --libs`
3668 _vosrc
="$_vosrc vo_caca.c"
3669 _vomodules
="caca $_vomodules"
3671 _def_caca
='#undef HAVE_CACA'
3672 _novomodules
="caca $_novomodules"
3678 if test "$_svga" = auto
; then
3682 int main(void) { return 0; }
3685 cc_check
-lvgagl -lvga $_ld_lm && _svga
=yes
3687 if test "$_svga" = yes ; then
3688 _def_svga
='#define HAVE_SVGALIB 1'
3689 _ld_svga
="-lvgagl -lvga $_ld_lm"
3690 _vosrc
="$_vosrc vo_svga.c"
3691 _vomodules
="svga $_vomodules"
3693 _def_svga
='#undef HAVE_SVGALIB'
3694 _novomodules
="svga $_novomodules"
3700 if test "$_fbdev" = auto
; then
3702 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
3704 if test "$_fbdev" = yes ; then
3705 _def_fbdev
='#define HAVE_FBDEV 1'
3706 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
3707 _vomodules
="fbdev $_vomodules"
3709 _def_fbdev
='#undef HAVE_FBDEV'
3710 _novomodules
="fbdev $_novomodules"
3717 if test "$_dvb" != no
; then
3720 #include <sys/poll.h>
3721 #include <sys/ioctl.h>
3726 #include <ost/dmx.h>
3727 #include <ost/frontend.h>
3728 #include <ost/sec.h>
3729 #include <ost/video.h>
3730 #include <ost/audio.h>
3731 int main(void) {return 0;}
3737 for I
in "$_inc_dvb" "-I/usr/src/DVB/ost/include" ; do
3738 if cc_check
"$I" ; then
3741 echores
"yes (using $_inc_dvb)"
3745 test "$_dvb" = no
&& echores
"no (specify path to DVB/ost/include with --with-dvbincdir=DIR)"
3750 if test "$_dvb" = yes ; then
3751 _def_dvb
='#define HAVE_DVB 1'
3752 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
3753 _aomodules
="mpegpes(dvb) $_aomodules"
3754 _vomodules
="mpegpes(dvb) $_vomodules"
3756 if test "$_dvbhead" != no
; then
3757 echocheck
"DVB HEAD"
3758 if test "$_dvbhead" != no
; then
3762 #include <sys/poll.h>
3763 #include <sys/ioctl.h>
3768 #include <linux/dvb/dmx.h>
3769 #include <linux/dvb/frontend.h>
3770 #include <linux/dvb/video.h>
3771 #include <linux/dvb/audio.h>
3772 int main(void) {return 0;}
3778 for I
in "$_inc_dvb" "-I/usr/src/DVB/include" ; do
3779 if cc_check
"$I" ; then
3782 echores
"yes (using $_inc_dvb)"
3786 test "$_dvbhead" = no
&& echores
"no (specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR)"
3791 if test "$_dvbhead" = yes ; then
3792 _def_dvb
='#define HAVE_DVB_HEAD 1'
3793 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
3794 _aomodules
="mpegpes(dvb) $_aomodules"
3795 _vomodules
="mpegpes(dvb) $_vomodules"
3798 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
3799 _def_dvb
='#undef HAVE_DVB'
3800 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
3801 _aomodules
="mpegpes(file) $_aomodules"
3802 _vomodules
="mpegpes(file) $_vomodules"
3805 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
3807 _inputmodules
="dvb $_inputmodules"
3810 _noinputmodules
="dvb $_noinputmodules"
3813 echocheck
"PNG support"
3814 if test "$_png" = auto
; then
3817 # Don't check for -lpng on irix since it has its own libpng
3818 # incompatible with the GNU libpng
3819 echores
"disabled on irix (not GNU libpng)"
3825 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
3826 printf("libpng: %s\n", png_libpng_ver);
3827 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
3830 if cc_check
-lpng -lz $_ld_lm ; then
3831 if "$TMPO" >> "$TMPLOG" ; then
3835 echores
"no (mismatch of library and header versions)"
3844 if test "$_png" = yes ; then
3845 _def_png
='#define HAVE_PNG 1'
3847 _vosrc
="$_vosrc vo_png.c"
3848 _vomodules
="png $_vomodules"
3851 _def_png
='#undef HAVE_PNG'
3852 _novomodules
="png $_novomodules"
3856 echocheck
"JPEG support"
3857 if test "$_jpg" = auto
; then
3864 #include <jpeglib.h>
3869 if cc_check
-ljpeg $_ld_lm ; then
3870 if "$TMPO" >> "$TMPLOG" ; then
3877 if test "$_jpg" = yes ; then
3878 _def_jpg
='#define HAVE_JPEG 1'
3879 _vosrc
="$_vosrc vo_jpeg.c"
3880 _vomodules
="jpeg $_vomodules"
3884 _def_jpg
='#undef HAVE_JPEG'
3885 _novomodules
="jpeg $_novomodules"
3891 echocheck
"PNM support"
3892 if test "$_pnm" = yes; then
3893 _def_pnm
="#define HAVE_PNM"
3894 _vosrc
="$_vosrc vo_pnm.c"
3895 _vomodules
="pnm $_vomodules"
3897 _def_pnm
="#undef HAVE_PNM"
3898 _novomodules
="pnm $_novomodules"
3904 echocheck
"md5sum support"
3905 if test "$_md5sum" = yes; then
3906 _def_md5sum
="#define HAVE_MD5SUM"
3907 _vosrc
="$_vosrc vo_md5sum.c md5sum.c"
3908 _vomodules
="md5sum $_vomodules"
3910 _def_md5sum
="#undef HAVE_MD5SUM"
3911 _novomodules
="md5sum $_novomodules"
3917 echocheck
"GIF support"
3918 # This is to appease people who want to force gif support.
3919 # If it is forced to yes, then we still do checks to determine
3920 # which gif library to use.
3921 if test "$_gif" = yes ; then
3926 if test "$_gif" = auto
; then
3929 #include <gif_lib.h>
3934 if cc_check
-lungif && "$TMPO" >> "$TMPLOG" ; then
3937 elif cc_check
-lungif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
3939 _ld_gif
="-lungif $_ld_x11"
3940 elif cc_check
-lgif && "$TMPO" >> "$TMPLOG" ; then
3943 elif cc_check
-lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
3945 _ld_gif
="-lgif $_ld_x11"
3949 # If no library was found, and the user wants support forced,
3950 # then we force it on with libgif, as this is the safest
3951 # assumption IMHO. (libungif & libregif both create symbolic
3952 # links to libgif. We also assume that no x11 support is needed,
3953 # because if you are forcing this, then you _should_ know what
3954 # you are doing. [ Besides, package maintainers should never
3955 # have compiled x11 deps into libungif in the first place. ] )
3958 if test "$_force_gif" = yes && test "$_gif" = no
; then
3963 if test "$_gif" = yes ; then
3964 _def_gif
='#define HAVE_GIF 1'
3965 _vosrc
="$_vosrc vo_gif89a.c"
3966 _codecmodules
="gif $_codecmodules"
3967 _vomodules
="gif89a $_vomodules"
3969 _gif
="yes (old version, some encoding functions disabled)"
3970 _def_gif_4
='#undef HAVE_GIF_4'
3974 #include <gif_lib.h>
3975 void catch() { exit(1); }
3977 signal(SIGSEGV, catch); // catch segfault
3978 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
3979 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
3983 if cc_check
"$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
3984 _def_gif_4
='#define HAVE_GIF_4 1'
3988 _def_gif
='#undef HAVE_GIF'
3989 _def_gif_4
='#undef HAVE_GIF_4'
3990 _novomodules
="gif89a $_novomodules"
3991 _nocodecmodules
="gif $_codecmodules"
3997 case "$_gif" in yes*)
3998 echocheck
"broken giflib workaround"
3999 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4002 #include <gif_lib.h>
4005 printf("UserData is at address %p\n", gif.UserData);
4009 if cc_check
"$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then
4010 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4019 echocheck
"VESA support"
4020 if test "$_vesa" = auto
; then
4021 if x86
&& linux
; then
4025 int main(void) { return 0; }
4027 cc_check
&& _vesa
=yes
4030 if test "$_vesa" = yes ; then
4031 _def_vesa
='#define HAVE_VESA 1'
4032 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c"
4033 _vomodules
="vesa $_vomodules"
4036 _def_vesa
='#undef HAVE_VESA'
4037 echores
"no (not supported on this OS/architecture)"
4038 _novomodules
="vesa $_novomodules"
4047 if test -z "$_sdlconfig" ; then
4048 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4049 _sdlconfig
="sdl-config"
4050 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4051 _sdlconfig
="sdl11-config"
4056 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4059 int main(int argc, char *argv[]) { return 0; }
4062 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4063 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4064 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4065 if test "$_sdlversion" -gt 116 ; then
4066 if test "$_sdlversion" -lt 121 ; then
4067 _def_sdlbuggy
='#define BUGGY_SDL'
4069 _def_sdlbuggy
='#undef BUGGY_SDL'
4078 if test "$_sdl" = yes ; then
4079 _def_sdl
='#define HAVE_SDL 1'
4081 _ld_sdl
=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
4082 _inc_sdl
=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
4084 _ld_sdl
=`$_sdlconfig --libs | sed s/-mwindows//`
4085 _inc_sdl
=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
4087 _ld_sdl
=`$_sdlconfig --libs`
4088 _inc_sdl
=`$_sdlconfig --cflags`
4090 _vosrc
="$_vosrc vo_sdl.c"
4091 _vomodules
="sdl $_vomodules"
4092 _aosrc
="$_aosrc ao_sdl.c"
4093 _aomodules
="sdl $_aomodules"
4094 echores
"yes (using $_sdlconfig)"
4096 _def_sdl
='#undef HAVE_SDL'
4097 _novomodules
="sdl $_novomodules"
4098 _noaomodules
="sdl $_noaomodules"
4102 echocheck
"Windows waveout"
4103 if test "$_win32waveout" = auto
; then
4105 #include <windows.h>
4106 #include <mmsystem.h>
4107 int main(void) { return 0; }
4110 cc_check
-lwinmm && _win32waveout
=yes
4112 if test "$_win32waveout" = yes ; then
4113 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4114 _ld_win32libs
="-lwinmm $_ld_win32libs"
4115 _aosrc
="$_aosrc ao_win32.c"
4116 _aomodules
="win32 $_aomodules"
4118 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4119 _noaomodules
="win32 $_noaomodules"
4121 echores
"$_win32waveout"
4124 if test "$_directx" = auto
; then
4126 #include <windows.h>
4129 int main(void) { return 0; }
4132 cc_check
-lgdi32 && _directx
=yes
4134 if test "$_directx" = yes ; then
4135 _def_directx
='#define HAVE_DIRECTX 1'
4136 _ld_win32libs
="-lgdi32 $_ld_win32libs"
4137 _vosrc
="$_vosrc vo_directx.c"
4138 _vomodules
="directx $_vomodules"
4139 _aosrc
="$_aosrc ao_dsound.c"
4140 _aomodules
="dsound $_aomodules"
4142 _def_directx
='#undef HAVE_DIRECTX'
4143 _novomodules
="directx $_novomodules"
4144 _noaomodules
="dsound $_noaomodules"
4149 if test "$_nas" = auto ||
test "$_nas" = yes ; then
4151 #include <audio/audiolib.h>
4152 int main(void) { return 0; }
4155 cc_check
-laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas
=yes
4157 if test "$_nas" = yes ; then
4158 _def_nas
='#define HAVE_NAS 1'
4159 _ld_nas
="-laudio -lXt $_ld_x11"
4160 _aosrc
="$_aosrc ao_nas.c"
4161 _aomodules
="nas $_aomodules"
4163 _noaomodules
="nas $_noaomodules"
4164 _def_nas
='#undef HAVE_NAS'
4169 if test "$_dxr2" = auto
; then
4171 for _inc_dxr2
in "$_inc_dxr2" \
4172 "-I/usr/local/include/dxr2" \
4173 "-I/usr/include/dxr2"; do
4175 #include <dxr2ioctl.h>
4176 int main(void) { return 0; }
4178 cc_check
$_inc_dxr2 && _dxr2
=yes && break
4181 if test "$_dxr2" = yes; then
4182 _def_dxr2
='#define HAVE_DXR2 1'
4183 _vosrc
="$_vosrc vo_dxr2.c"
4184 _aosrc
="$_aosrc ao_dxr2.c"
4185 _aomodules
="dxr2 $_aomodules"
4186 _vomodules
="dxr2 $_vomodules"
4187 echores
"yes (using $_inc_dxr2)"
4189 _def_dxr2
='#undef HAVE_DXR2'
4190 _noaomodules
="dxr2 $_noaomodules"
4191 _novomodules
="dxr2 $_novomodules"
4197 if test "$_dxr3" = auto
; then
4199 #include <linux/em8300.h>
4200 int main(void) { return 0; }
4203 cc_check
&& _dxr3
=yes
4205 if test "$_dxr3" = yes ; then
4206 _def_dxr3
='#define HAVE_DXR3 1'
4207 _vosrc
="$_vosrc vo_dxr3.c"
4208 _vomodules
="dxr3 $_vomodules"
4210 _def_dxr3
='#undef HAVE_DXR3'
4211 _novomodules
="dxr3 $_novomodules"
4212 if test "$_mp1e" = auto
; then
4213 # we don't need mp1e
4220 if test "$_mmx" = no
; then
4221 # mp1e REQUIRES mmx!
4224 if test "$_mp1e" != no
; then
4226 _def_mp1e
='#define USE_MP1E'
4227 _ld_mp1e
='libmp1e/libmp1e.a'
4228 _dep_mp1e
='libmp1e/libmp1e.a'
4231 _def_mp1e
='#undef USE_MP1E'
4239 if test "$_fame" = auto
; then
4241 test "$_dxr2" = yes && _fame
=auto
4242 test "$_dxr3" = yes && _fame
=auto
4243 test "$_dvb" = yes && _fame
=auto
4245 if test "$_fame" = auto
; then
4247 if test -d libfame
&& test -f libfame
/fame.h
; then
4248 # disable fame on cygwin as no sense to port - atmos
4252 echores
"no (no fame dir)"
4258 _def_fame
='#undef USE_LIBFAME'
4259 if test "$_fame" = yes ; then
4260 _def_fame
='#define USE_LIBFAME 1'
4261 _ld_fame
='libfame/libfame.a'
4270 echocheck
"OSS Audio"
4271 if test "$_ossaudio" = auto
; then
4273 #include <sys/ioctl.h>
4275 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4278 cc_check
&& _ossaudio
=yes
4280 if test "$_ossaudio" = yes ; then
4281 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4282 _aosrc
="$_aosrc ao_oss.c"
4283 _aomodules
="oss $_aomodules"
4284 if test "$_linux_devfs" = yes; then
4285 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4286 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4289 #include <sys/ioctl.h>
4291 #ifdef OPEN_SOUND_SYSTEM
4292 int main(void) { return 0; }
4294 #error Not the real thing
4298 cc_check
&& _real_ossaudio
=yes
4299 if test "$_real_ossaudio" = yes; then
4300 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4301 elif netbsd || openbsd
; then
4302 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4303 _ld_arch
="$_ld_arch -lossaudio"
4305 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4307 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4310 _def_ossaudio
='#undef USE_OSS_AUDIO'
4311 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4312 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4313 _noaomodules
="oss $_noaomodules"
4315 echores
"$_ossaudio"
4319 if test "$_arts" = auto
; then
4321 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4325 int main(void) { return 0; }
4327 cc_check
`artsc-config --libs` `artsc-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _arts
=yes
4332 if test "$_arts" = yes ; then
4333 _def_arts
='#define USE_ARTS 1'
4334 _aosrc
="$_aosrc ao_arts.c"
4335 _aomodules
="arts $_aomodules"
4336 _ld_arts
=`artsc-config --libs`
4337 _inc_arts
=`artsc-config --cflags`
4339 _noaomodules
="arts $_noaomodules"
4345 if test "$_esd" = auto
; then
4347 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4351 int main(void) { return 0; }
4353 cc_check
`esd-config --libs` `esd-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _esd
=yes
4359 if test "$_esd" = yes ; then
4360 _def_esd
='#define USE_ESD 1'
4361 _aosrc
="$_aosrc ao_esd.c"
4362 _aomodules
="esd $_aomodules"
4363 _ld_esd
=`esd-config --libs`
4364 _inc_esd
=`esd-config --cflags`
4366 echocheck
"esd_get_latency()"
4369 int main(void) { return esd_get_latency(0); }
4371 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4372 echores
"$_esd_latency"
4374 _def_esd
='#undef USE_ESD'
4375 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4376 _noaomodules
="esd $_noaomodules"
4381 if test "$_jack" = auto
; then
4383 if ( ( pkg-config
--modversion jack
) > /dev
/null
2>&1 ) &&
4384 ( jackd
--version |
grep version |
awk '{ print $3 }' ) >> "$TMPLOG" 2>&1 ; then
4387 #include <jack/jack.h>
4388 int main(void) { JACK_Init(); return 0; }
4390 # This test only checks the minor version number.
4391 if ( ( test `bio2jack-config --version | cut -d '.' -f 2` -ge 3 ) ) >/dev
/null
2>&1 ; then
4392 if test -z "$_bio2jackdir" ; then
4393 cc_check
-lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack
=yes
4395 cc_check
-L "$_bio2jackdir" -lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack
=yes
4401 if test "$_jack" = yes ; then
4402 _def_jack
='#define USE_JACK 1'
4403 _aosrc
="$_aosrc ao_jack.c"
4404 _aomodules
="jack $_aomodules"
4405 if test -z "$_bio2jackdir" ; then
4406 _ld_jack
="-lbio2jack `pkg-config --libs jack`"
4408 _ld_jack
="-L \"$_bio2jackdir\" -lbio2jack `pkg-config --libs jack`"
4410 _inc_jack
=`pkg-config --cflags jack`
4412 _noaomodules
="jack $_noaomodules"
4417 echocheck
"ALSA audio"
4418 if test "$_alsa" != no
; then
4421 #include <sys/asoundlib.h>
4422 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==5)); }
4424 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.5.x'
4427 #include <sys/asoundlib.h>
4428 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4430 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.9.x-sys'
4432 #include <alsa/asoundlib.h>
4433 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
4435 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='0.9.x-alsa'
4438 #include <sys/asoundlib.h>
4439 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4441 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='1.0.x-sys'
4443 #include <alsa/asoundlib.h>
4444 int main(void) { return (!(SND_LIB_MAJOR==1 && SND_LIB_MINOR==0)); }
4446 cc_check
-lasound $_ld_dl $_ld_pthread && $TMPO && _alsaver
='1.0.x-alsa'
4448 _def_alsa5
='#undef HAVE_ALSA5'
4449 _def_alsa9
='#undef HAVE_ALSA9'
4450 _def_alsa1x
='#undef HAVE_ALSA1X'
4451 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
4452 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
4453 if test "$_alsaver" ; then
4454 if test "$_alsaver" = '0.5.x' ; then
4455 _aosrc
="$_aosrc ao_alsa5.c"
4456 _aomodules
="alsa5 $_aomodules"
4457 _def_alsa5
='#define HAVE_ALSA5 1'
4458 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4459 echores
"yes (using alsa 0.5.x and sys/asoundlib.h)"
4460 elif test "$_alsaver" = '0.9.x-sys' ; then
4461 _aosrc
="$_aosrc ao_alsa.c"
4462 _aomodules
="alsa $_aomodules"
4463 _def_alsa9
='#define HAVE_ALSA9 1'
4464 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4465 echores
"yes (using alsa 0.9.x and sys/asoundlib.h)"
4466 elif test "$_alsaver" = '0.9.x-alsa' ; then
4467 _aosrc
="$_aosrc ao_alsa.c"
4468 _aomodules
="alsa $_aomodules"
4469 _def_alsa9
='#define HAVE_ALSA9 1'
4470 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4471 echores
"yes (using alsa 0.9.x and alsa/asoundlib.h)"
4472 elif test "$_alsaver" = '1.0.x-sys' ; then
4473 _aosrc
="$_aosrc ao_alsa.c"
4474 _aomodules
="alsa $_aomodules"
4475 _def_alsa1x
="#define HAVE_ALSA1X 1"
4476 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4477 echores
"yes (using alsa 1.0.x and sys/asoundlib.h)"
4478 elif test "$_alsaver" = '1.0.x-alsa' ; then
4479 _aosrc
="$_aosrc ao_alsa.c"
4480 _aomodules
="alsa $_aomodules"
4481 _def_alsa1x
="#define HAVE_ALSA1X 1"
4482 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4483 echores
"yes (using alsa 1.0.x and alsa/asoundlib.h)"
4485 _ld_alsa
="-lasound $_ld_dl $_ld_pthread"
4487 _noaomodules
="alsa $_noaomodules"
4492 echocheck
"Sun audio"
4493 if test "$_sunaudio" = auto
; then
4495 #include <sys/types.h>
4496 #include <sys/audioio.h>
4497 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4500 cc_check
&& _sunaudio
=yes
4502 if test "$_sunaudio" = yes ; then
4503 _def_sunaudio
='#define USE_SUN_AUDIO 1'
4504 _aosrc
="$_aosrc ao_sun.c"
4505 _aomodules
="sun $_aomodules"
4507 _def_sunaudio
='#undef USE_SUN_AUDIO'
4508 _noaomodules
="sun $_noaomodules"
4510 echores
"$_sunaudio"
4513 echocheck
"Sun mediaLib"
4514 if test "$_mlib" = auto
; then
4516 test -z "$_mlibdir" && _mlibdir
=/opt
/SUNWmlib
4519 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
4521 cc_check
-I${_mlibdir}/include
-L${_mlibdir}/lib
-lmlib && _mlib
=yes
4523 if test "$_mlib" = yes ; then
4524 _def_mlib
='#define HAVE_MLIB 1'
4525 _inc_mlib
=" -I${_mlibdir}/include "
4526 _ld_mlib
=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
4528 _def_mlib
='#undef HAVE_MLIB'
4533 echocheck
"SGI audio"
4534 if test "$_sgiaudio" = auto
; then
4535 # check for SGI audio
4537 #include <dmedia/audio.h>
4538 int main(void) { return 0; }
4541 cc_check
&& _sgiaudio
=yes
4543 if test "$_sgiaudio" = "yes" ; then
4544 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
4545 _ld_sgiaudio
='-laudio'
4546 _aosrc
="$_aosrc ao_sgi.c"
4547 _aomodules
="sgi $_aomodules"
4549 _def_sgiaudio
='#undef USE_SGI_AUDIO'
4550 _noaomodules
="sgi $_noaomodules"
4552 echores
"$_sgiaudio"
4555 echocheck
"VCD support"
4556 if linux || bsdos || freebsd || netbsd || sunos ||
(darwin
&& ppc
) ; then
4557 _inputmodules
="vcd $_inputmodules"
4558 _def_vcd
='#define HAVE_VCD 1'
4561 _def_vcd
='#undef HAVE_VCD'
4562 _noinputmodules
="vcd $_noinputmodules"
4563 echores
"not supported on this OS"
4566 echocheck
"DVD support (libmpdvdkit)"
4567 if test "$_dvdkit" = auto
; then
4569 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
; then
4570 test -f "./libmpdvdkit2/Makefile" && _dvdkit
=yes
4571 test -f "./libmpdvdkit/Makefile" && _dvdkit
=yes
4574 if test "$_dvdkit" = yes ; then
4575 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
4576 if test -f "./libmpdvdkit2/Makefile" ; then
4577 _inputmodules
="mpdvdkit2 $_inputmodules"
4578 _dvdread
=libmpdvdkit2
4582 _inputmodules
="mpdvdkit $_inputmodules"
4583 _dvdread
=libmpdvdkit
4586 _noinputmodules
="mpdvdkit $_noinputmodules"
4588 _def_dvd_linux
='#undef HAVE_LINUX_DVD_STRUCT'
4589 _def_dvd_bsd
='#undef HAVE_BSD_DVD_STRUCT'
4590 _dev_dvd_openbsd
='#undef HAVE_OPENBSD_DVD_STRUCT'
4591 _def_dvd_darwin
='#undef DARWIN_DVD_IOCTL'
4592 if linux || netbsd || openbsd || bsdos
; then
4593 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
4595 _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
4599 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
4602 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
4607 _noinputmodules
="mpdvdkit $_noinputmodules"
4609 if test "$_dvdkit" = yes ||
test "$_dvdkit2" = yes; then
4615 echocheck
"DVD support (libdvdread)"
4616 if test "$_dvdread" = auto
; then
4618 #include <inttypes.h>
4619 #include <dvdread/dvd_reader.h>
4620 #include <dvdread/ifo_types.h>
4621 #include <dvdread/ifo_read.h>
4622 #include <dvdread/nav_read.h>
4623 int main(void) { return 0; }
4626 if test "$_dl" = yes; then
4628 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
4632 _def_mpdvdkit
="#undef USE_MPDVDKIT"
4636 _def_dvdread
='#define USE_DVDREAD 1'
4637 _ld_dvdread
='-ldvdread'
4638 _inputmodules
="dvdread $_inputmodules"
4642 _def_dvdread
='#undef USE_DVDREAD'
4643 _noinputmodules
="dvdread $_noinputmodules"
4648 _def_dvdread
='#define USE_DVDREAD 1'
4649 _ld_dvdread
='-Llibmpdvdkit -lmpdvdkit'
4650 _noinputmodules
="dvdread $_noinputmodules"
4651 _def_mpdvdkit
="#define USE_MPDVDKIT 1"
4652 echores
"disabled by libmpdvdkit"
4656 _def_dvdread
='#define USE_DVDREAD 1'
4657 _ld_dvdread
='-Llibmpdvdkit2 -lmpdvdkit'
4658 _noinputmodules
="dvdread $_noinputmodules"
4659 _def_mpdvdkit
="#define USE_MPDVDKIT 2"
4660 echores
"disabled by libmpdvdkit2"
4664 # dvdnav disabled, it does not work
4665 # echocheck "DVD support (libdvdnav)"
4666 # if test "$_dvdnav" = yes ; then
4668 # #include <dvdnav.h>
4669 # int main(void) { dvdnav_t *dvd=0; return 0; }
4672 # test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
4673 # if test -z "$_dvdnavconfig" ; then
4674 # if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
4675 # _dvdnavconfig="dvdnav-config"
4678 # test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
4680 # test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
4681 # cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
4683 # if test "$_dvdnav" = yes ; then
4685 # _def_dvdnav='#define USE_DVDNAV 1'
4686 # if test -n "$_legal_dvdnavdir" ; then
4687 # _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
4688 # elif test -n "$_dvdnavconfig" ; then
4689 # _ld_css="$_ld_css `$_dvdnavconfig --libs`"
4691 # _ld_css="$_ld_css -ldvdnav"
4693 # if test -n "$_dvdnavconfig" ; then
4694 # _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
4695 # _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
4697 # if test -n "$_dvdnavdir" ; then
4698 # _inc_extra="$_inc_extra -I$_dvdnavdir"
4700 # _inputmodules="dvdnav $_inputmodules"
4703 # _def_dvdnav='#undef USE_DVDNAV'
4704 # _noinputmodules="dvdnav $_noinputmodules"
4708 echocheck
"cdparanoia"
4709 if test "$_cdparanoia" = auto
; then
4711 #include <cdda_interface.h>
4712 #include <cdda_paranoia.h>
4713 // This need a better test. How ?
4714 int main(void) { return 1; }
4717 if cc_check
$_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
4720 for I
in /usr
/include
/cdda
/usr
/local
/include
/cdda
; do
4721 if cc_check
-I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
4722 _cdparanoia
=yes; _inc_cdparanoia
="-I$I"; break
4727 if test "$_cdparanoia" = yes ; then
4728 _def_cdparanoia
='#define HAVE_CDDA'
4729 _inputmodules
="cdda $_inputmodules"
4730 _ld_cdparanoia
="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
4731 openbsd
&& _ld_cdparanoia
="$_ld_cdparanoia -lutil"
4733 _def_cdparanoia
='#undef HAVE_CDDA'
4734 _noinputmodules
="cdda $_noinputmodules"
4736 echores
"$_cdparanoia"
4739 echocheck
"freetype >= 2.0.9"
4741 # freetype depends on iconv
4742 if test "$_iconv" = no
; then
4743 _freetype
="no (iconv support needed)"
4746 if test "$_freetype" = auto
; then
4747 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
4750 #include <ft2build.h>
4751 #include FT_FREETYPE_H
4752 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
4753 #error "Need FreeType 2.0.9 or newer"
4758 FT_Int major=-1,minor=-1,patch=-1;
4759 int err=FT_Init_FreeType(&library);
4761 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
4764 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
4765 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
4766 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
4767 (int)major,(int)minor,(int)patch );
4768 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
4769 printf("Library and header version mismatch! Fix it in your distribution!\n");
4776 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _freetype
=yes
4781 if test "$_freetype" = yes ; then
4782 _def_freetype
='#define HAVE_FREETYPE'
4783 _inc_freetype
=`$_freetypeconfig --cflags`
4784 _ld_freetype
=`$_freetypeconfig --libs`
4786 _def_freetype
='#undef HAVE_FREETYPE'
4788 echores
"$_freetype"
4790 if test "$_freetype" = no
; then
4793 echocheck
"fontconfig"
4794 if test "$_fontconfig" = auto
; then
4795 if ( pkg-config
--modversion fontconfig
) > /dev
/null
2>&1 ; then
4798 #include <fontconfig/fontconfig.h>
4803 printf("Couldn't initialize fontconfig lib\n");
4811 cc_check
`pkg-config --cflags --libs fontconfig` && ( $TMPO >> "$TMPLOG" ) && _fontconfig
=yes
4816 if test "$_fontconfig" = yes ; then
4817 _def_fontconfig
='#define HAVE_FONTCONFIG'
4818 _inc_fontconfig
=`pkg-config --cflags fontconfig`
4819 _ld_fontconfig
=`pkg-config --libs fontconfig`
4821 _def_fontconfig
='#undef HAVE_FONTCONFIG'
4823 echores
"$_fontconfig"
4825 echocheck
"fribidi with charsets"
4826 if test "$_fribidi" = yes ; then
4827 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
4830 #include <fribidi/fribidi.h>
4833 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHARSET_UTF8) {
4834 printf("Fribidi headers are not consistents with the library!\n");
4841 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _fribidi
=yes
4846 if test "$_fribidi" = yes ; then
4847 _def_fribidi
='#define USE_FRIBIDI'
4848 _inc_fribidi
=`$_fribidiconfig --cflags`
4849 _ld_fribidi
=`$_fribidiconfig --libs`
4851 _def_fribidi
='#undef USE_FRIBIDI'
4857 if test "$_enca" = auto
; then
4864 langs = enca_get_languages(&langcnt);
4869 cc_check
-lenca && _enca
=yes
4871 if test "$_enca" = yes ; then
4872 _def_enca
='#define HAVE_ENCA 1'
4875 _def_enca
='#undef HAVE_ENCA'
4883 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
4886 cc_check
-lz && _zlib
=yes
4887 if test "$_zlib" = yes ; then
4888 _def_zlib
='#define HAVE_ZLIB 1'
4891 _def_zlib
='#undef HAVE_ZLIB'
4898 if test "$_rtc" = auto
; then
4900 #include <sys/ioctl.h>
4901 #include <linux/rtc.h>
4902 int main(void) { return RTC_IRQP_READ; }
4905 cc_check
&& _rtc
=yes
4910 echores
"no (Linux specific feature)"
4912 if test "$_rtc" = yes ; then
4913 _def_rtc
='#define HAVE_RTC 1'
4915 _def_rtc
='#undef HAVE_RTC'
4919 echocheck
"external liblzo support"
4920 if test "$_liblzo" = auto
; then
4924 int main(void) { lzo_init();return 0; }
4926 cc_check
-llzo && _liblzo
=yes
4928 if test "$_liblzo" = yes ; then
4929 _def_liblzo
='#define USE_LIBLZO 1'
4931 _codecmodules
="liblzo $_codecmodules"
4933 _def_liblzo
='#undef USE_LIBLZO'
4934 _nocodecmodules
="liblzo $_nocodecmodules"
4939 echocheck
"mad support"
4940 if test "$_mad" = auto
; then
4944 int main(void) { return 0; }
4946 cc_check
$_madlibdir -lmad && _mad
=yes
4948 if test "$_mad" = yes ; then
4949 _def_mad
='#define USE_LIBMAD 1'
4951 _codecmodules
="libmad $_codecmodules"
4953 _def_mad
='#undef USE_LIBMAD'
4954 _nocodecmodules
="libmad $_nocodecmodules"
4959 if test "$_toolame" = auto
; then
4961 #include <toolame.h>
4962 int main(void) { toolame_init(); return 0; }
4965 _toolame_extraflags
=""
4966 _toolame_lib
="-ltoolame"
4967 if test -n "$_toolamedir"; then
4968 _toolame_extraflags
="-I$_toolamedir -L$_toolamedir"
4970 cc_check
$_toolame_extraflags $_toolame_lib $_ld_lm && _toolame
=yes
4972 if test "$_toolame" = yes ; then
4973 _def_toolame
='#define HAVE_TOOLAME 1'
4974 _codecmodules
="$_codecmodules toolame"
4976 _def_toolame
='#undef HAVE_TOOLAME'
4978 _nocodecmodules
="toolame $_nocodecmodules"
4980 if test -z "$_toolamedir" ; then
4983 echores
"$_toolame (using $_toolamedir)"
4986 echocheck
"OggVorbis support"
4987 if test "$_vorbis" = auto
; then
4990 #include <vorbis/codec.h>
4991 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
4993 cc_check
-lvorbis -logg $_ld_lm && _vorbis
=yes
4995 if test "$_vorbis" = yes ; then
4996 _def_vorbis
='#define HAVE_OGGVORBIS 1'
4997 if test "$_tremor" = yes ; then
4998 _def_tremor
='#define TREMOR 1'
4999 _ld_vorbis
='-lvorbisidec'
5001 _def_tremor
='#undef TREMOR'
5002 _ld_vorbis
='-lvorbis -logg'
5004 _codecmodules
="libvorbis $_codecmodules"
5006 _def_vorbis
='#undef HAVE_OGGVORBIS'
5007 _def_tremor
='#undef TREMOR'
5008 _nocodecmodules
="libvorbis $_nocodecmodules"
5010 if test "$_vorbis" = yes -a "$_tremor" = yes ; then
5011 echores
"$_vorbis (Tremor)"
5016 echocheck
"OggTheora support (only the CVS version!)"
5017 if test "$_theora" = auto
; then
5020 #include <theora/theora.h>
5024 /* theora is in flux, make sure that all interface routines and
5025 * datatypes exist and work the way we expect it, so we don't break
5035 theora_info_init (&inf);
5036 theora_comment_init (&tc);
5040 /* we don't want to execute this kind of nonsense; just for making sure
5041 * that compilation works... */
5042 memset(&op, 0, sizeof(op));
5043 r = theora_decode_header (&inf, &tc, &op);
5044 r = theora_decode_init (&st, &inf);
5045 t = theora_granule_time (&st, op.granulepos);
5046 r = theora_decode_packetin (&st, &op);
5047 r = theora_decode_YUVout (&st, &yuv);
5053 cc_check
-ltheora -logg $_ld_lm && _theora
=yes
5055 if test "$_theora" = yes ; then
5056 _def_theora
='#define HAVE_OGGTHEORA 1'
5057 _codecmodules
="libtheora $_codecmodules"
5058 _ld_theora
="-ltheora -logg"
5060 _def_theora
='#undef HAVE_OGGTHEORA'
5061 _nocodecmodules
="libtheora $_nocodecmodules"
5065 echocheck
"mp3lib support"
5066 if test "$_mp3lib" = yes ; then
5067 _def_mp3lib
='#define USE_MP3LIB 1'
5068 _codecmodules
="mp3lib $_codecmodules"
5070 _def_mp3lib
='#undef USE_MP3LIB'
5071 _nocodecmodules
="mp3lib $_nocodecmodules"
5075 echocheck
"liba52 support"
5076 if test "$_liba52" = yes ; then
5077 _def_liba52
='#define USE_LIBA52 1'
5078 _codecmodules
="liba52 $_codecmodules"
5080 _def_liba52
='#undef USE_LIBA52'
5081 _nocodecmodules
="liba52 $_nocodecmodules"
5085 echocheck
"libdts support"
5086 if test "$_libdts" = auto
; then
5091 int main(void) { dts_init (0); return 0; }
5093 cc_check
$_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts
=yes
5095 if test "$_libdts" = yes ; then
5096 _def_libdts
='#define CONFIG_DTS 1'
5097 _ld_libdts
="$_ld_libdts -ldts $_ld_lm"
5098 _codecmodules
="libdts $_codecmodules"
5100 _def_libdts
='#undef CONFIG_DTS'
5101 _nocodecmodules
="libdts $_nocodecmodules"
5105 echocheck
"libmpeg2 support"
5106 if test "$_libmpeg2" = yes ; then
5107 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5108 _codecmodules
="libmpeg2 $_codecmodules"
5110 _def_libmpeg2
='#undef USE_LIBMPEG2'
5111 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5113 echores
"$_libmpeg2"
5116 echocheck
"Matroska support"
5117 if test "$_matroska_internal" = yes ; then
5118 _inputmodules
="matroska $_inputmodules"
5119 _def_matroska
='#define HAVE_MATROSKA 1'
5121 _noinputmodules
="matroska $_noinputmodules"
5122 _def_matroska
='#undef HAVE_MATROSKA'
5124 echores
"$_matroska_internal"
5127 echocheck
"internal FAAD2 (AAC) support"
5128 _inc_faad
="-I`pwd`/libfaad2"
5129 if test "$_faad_internal" = auto
; then
5130 # the faad check needs a config.h file
5131 if not
test -f "config.h" ; then
5134 # internal faad: check if our dear gcc is able to compile it...
5135 cp "`pwd`/libfaad2/cfft.c" $TMPC
5136 if ( cc_check
-c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer $_inc_faad ); then
5139 _faad_internal
="no (broken gcc)"
5142 if test "$_faad_internal" = yes ; then
5143 _def_faad_internal
="#define USE_INTERNAL_FAAD 1"
5146 _def_faad_internal
="#undef USE_INTERNAL_FAAD"
5149 echores
"$_faad_internal"
5152 echocheck
"external FAAD2 (AAC) support"
5153 if test "$_faad_external" != no
; then
5155 _inc_faad
="$_inc_extra"
5156 # external faad: check if it's really faad2 :)
5157 if test "$_faad_external" = auto
; then
5161 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; }
5163 cc_check
$_inc_faad $_ld_faad $_ld_lm && _faad_external
=yes
5165 echores
"$_faad_external"
5170 if test "$_faad_internal" = yes -o "$_faad_external" = yes; then
5171 echocheck
"FAAD2 version"
5174 #ifndef FAAD_MIN_STREAMSIZE
5175 #error Too old version
5178 #ifdef FAAD2_VERSION
5179 printf("%s\n",FAAD2_VERSION);
5186 if cc_check
-I- $_inc_faad $_ld_faad $_ld_lm && "$TMPO" >> "$TMPLOG" ; then
5187 _faad_version
=`"$TMPO"`
5188 _faad_tempversion
=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'`
5189 _def_faad_version
="#define FAADVERSION $_faad_tempversion"
5190 echores
"$_faad_version"
5194 echores
"failed to get version"
5198 if test "$_faad_external" = yes; then
5199 _def_faad
='#define HAVE_FAAD 1'
5200 _codecmodules
="faad2(external) $_codecmodules"
5201 elif test "$_faad_internal" = yes; then
5202 _def_faad
='#define HAVE_FAAD 1'
5203 _codecmodules
="faad2(internal) $_codecmodules"
5205 _def_faad
='#undef HAVE_FAAD'
5206 _nocodecmodules
="faad2 $_nocodecmodules"
5210 echocheck
"MacOS X SHLB (shared lib) support"
5211 if test "$_macshlb" = auto
; then
5212 if test "$_macosx" = yes ; then
5219 if test "$_macshlb" = yes ; then
5220 _def_macshlb
='#define USE_MACSHLB 1'
5222 _def_macshlb
='#undef USE_MACSHLB'
5225 if test "$_win32" = auto
; then
5229 _win32
=no
# x86 arch only
5233 if test "$_win32" != no
; then
5234 if test -z "$_win32libdir" ; then
5235 for I
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5236 if test -d "$I" ; then
5244 echocheck
"Win32 codec DLL support"
5245 if test "$_win32" = auto
; then
5247 test -n "$_win32libdir" && _win32
=yes
5249 if test "$_win32" = yes ; then
5250 _def_win32
='#define USE_WIN32DLL 1'
5251 echores
"yes (using $_win32libdir)"
5253 _def_win32
='#undef USE_WIN32DLL'
5254 _nocodecmodules
="win32 $_nocodecmodules"
5259 if test "$_win32" != no
; then
5260 _def_win32_loader
='#undef WIN32_LOADER'
5261 echocheck
"Win32 loader support"
5262 _ld_win32
='loader/libloader.a'
5263 _dep_win32
='loader/libloader.a'
5264 _codecmodules
="win32 $_codecmodules"
5266 x86
&& _ld_win32
="$_ld_win32 -li386"
5269 _def_win32_loader
='#define WIN32_LOADER 1'
5272 _ld_win32libs
="$_ld_win32libs -ladvapi32 -lole32"
5273 echores
"no (using native windows)"
5277 echocheck
"DirectShow"
5280 if test "$_dshow" != no
; then
5282 # check if compiler supports C++ and C++-libs are installed correctly
5283 cat > "$TMPCPP" << EOF
5287 public: int myreturn(void);
5289 int myclass::myreturn(void) { ret = 0; return ret ; }
5290 int main(void) { myclass myobject; return myobject.myreturn(); }
5292 echo "------------------------------------------------" >> "$TMPLOG"
5293 cat "$TMPCPP" >> "$TMPLOG"
5294 if ( $_cc "$TMPCPP" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; then
5296 echores
"yes (C++ is ok)"
5301 Your C++ runtime environment is broken.
5303 Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
5304 Are the C++ libraries correctly installed?
5305 Check for libstdc++ and in (/etc/)ld.so.conf.
5307 If you do not need DirectShow support, you can also use:
5308 ./configure --disable-dshow <your-normal-configure-options>
5309 to disable building the C++ based DirectShow code.
5312 die
"$_cc's C++ is broken"
5320 if test "$_dshow" = yes ; then
5321 _def_dshow
='#define USE_DIRECTSHOW 1'
5322 _ld_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5323 _dep_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5324 _codecmodules
="dshow/dmo $_codecmodules"
5326 _def_dshow
='#undef USE_DIRECTSHOW'
5327 _nocodecmodules
="dshow/dmo $_nocodecmodules"
5331 echocheck
"XAnim DLL"
5332 if test "$_xanim" = auto
; then
5334 if test "$_dl" = yes ; then
5335 if test -z "$_xanimlibdir" ; then
5336 for I
in "$_libdir/codecs" /usr
/local
/lib
/xanim
/mods
/usr
/lib
/xanim
/mods
/usr
/lib
/xanim
$XANIM_MOD_DIR ; do
5337 if test -d "$I" ; then
5343 test "$_xanimlibdir" && _xanim
=yes
5344 if test "$_xanim" = yes ; then
5345 echores
"yes (using $_xanimlibdir)"
5347 echores
"no (no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html)"
5350 echores
"no (dynamic loader support needed)"
5353 echores
"$_xanim (using $_xanimlibdir)"
5355 if test "$_xanim" = yes ; then
5356 _def_xanim
='#define USE_XANIM 1'
5357 _def_xanim_path
="#define XACODEC_PATH \"$_xanimlibdir\""
5358 _codecmodules
="xanim $_codecmodules"
5360 _def_xanim
='#undef USE_XANIM'
5361 _def_xanim_path
='#undef XACODEC_PATH'
5362 _nocodecmodules
="xanim $_nocodecmodules"
5365 echocheck
"RealPlayer DLL"
5366 if test "$_real" = auto
; then
5368 if test "$_dl" = yes ||
test "$_win32" = yes ||
test "$_macshlb" = yes ; then
5369 # if test "$_dl" = yes ; then
5370 if linux || freebsd || netbsd || win32 || darwin
; then
5373 echores
"no (tested only on Linux/FreeBSD/NetBSD/Cygwin/MinGW/Darwin)"
5375 if test "$_real" = yes ; then
5376 if test -z "$_reallibdir" ; then
5377 for I
in "$_libdir/codecs" "$_libdir/real" /usr
/lib
/real \
5378 /usr
/lib
/RealPlayer
{9,8,}/Codecs
/usr
/local
/RealPlayer
{9,8,}/Codecs \
5379 /usr
/local
/lib
/RealPlayer
{9,8,}/Codecs
/opt
/RealPlayer
{9,8,}/{Real
/,}Codecs \
5380 {~
,}/Applications
/RealOne\ Player.app
/Contents
/MacOS
/Library
/Codecs \
5382 if test -d "$I" ; then
5388 test "$_reallibdir" || _real
=no
5389 if test "$_real" = yes ; then
5390 echores
"yes (using $_reallibdir)"
5392 echores
"no (no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html)"
5396 echores
"no (dynamic loader support needed)"
5399 echores
"$_real (using $_reallibdir)"
5401 if test "$_real" = yes ; then
5402 _def_real
='#define USE_REALCODECS 1'
5403 _def_real_path
="#define REALCODEC_PATH \"$_reallibdir\""
5404 _codecmodules
="real $_codecmodules"
5406 _def_real
='#undef USE_REALCODECS'
5407 _def_real_path
="#undef REALCODEC_PATH"
5408 _nocodecmodules
="real $_nocodecmodules"
5412 if test -z "$_livelibdir" ; then
5413 for I
in $_libdir/live
/usr
/lib
/live
/usr
/local
/live
/usr
/local
/lib
/live
; do
5414 if test -d "$I" ; then
5421 echocheck
"LIVE.COM Streaming Media libraries"
5422 if test "$_live" = auto
&& test "$_network" = yes ; then
5426 #include <liveMedia.hh>
5427 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1090195200)
5428 #error Please upgrade to version 2004.07.19 or later of the "LIVE.COM Streaming Media" libraries - available from <www.live.com/liveMedia/>
5432 if cc_check
-I$_livelibdir/liveMedia
/include
/ -I$_livelibdir/UsageEnvironment
/include
-I$_livelibdir/groupsock
/include
; then
5439 if test "$_live" = yes && test "$_network" = yes ; then
5440 echores
"yes (using $_livelibdir)"
5441 _def_live
='#define STREAMING_LIVE_DOT_COM 1'
5442 _live_libs_def
="# LIVE.COM Streaming Media libraries:
5443 LIVE_LIB_DIR = $_livelibdir
5444 LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
5445 LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
5446 LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
5447 LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
5448 LIVE_LIBS += -lstdc++"
5449 _ld_live
='$(LIVE_LIBS)'
5450 _inputmodules
="live.com $_inputmodules"
5453 _def_live
='#undef STREAMING_LIVE_DOT_COM'
5454 _noinputmodules
="live.com $_noinputmodules"
5458 echocheck
"FFmpeg libavcodec (static)"
5459 if test "$_libavcodec" = auto
; then
5460 # Note: static linking is preferred to dynamic linking
5462 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
5463 if grep avcodec_find_encoder_by_name libavcodec
/utils.c
> /dev
/null
2>&1 ; then
5467 echores
"no (old ffmpeg version, use CVS !)"
5470 echores
"no (see DOCS/HTML/$_doc_lang/codecs.html)"
5473 echores
"$_libavcodec"
5476 echocheck
"FFmpeg libavformat (static)"
5477 if test "$_libavformat" = auto
; then
5478 # Note: static linking is preferred to dynamic linking
5480 if test -d libavformat
&& test -f libavformat
/utils.c
; then
5487 echores
"$_libavformat"
5490 _def_haveffpostprocess
='no'
5491 if test -d libavcodec
&& test -f libavcodec
/libpostproc
/postprocess.h
; then
5492 _def_haveffpostprocess
='yes'
5495 if test "$_libavcodec" != yes ; then
5496 echocheck
"FFmpeg libavcodec (dynamic)"
5497 if test "$_libavcodecso" = auto
; then
5499 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
5501 #define FF_POSTPROCESS 1
5502 #include <ffmpeg/avcodec.h>
5504 avcodec_find_encoder_by_name("");
5508 if cc_check
-lavcodec $_ld_lm ; then
5510 echores
"yes (using libavcodec.so)"
5512 echores
"no (libavcodec.so is broken/obsolete)"
5515 echores
"$_libavcodecso"
5519 _def_libavcodec
='#undef USE_LIBAVCODEC'
5520 _def_libavcodecso
='#undef USE_LIBAVCODEC_SO'
5521 _def_ffpostprocess
='#undef FF_POSTPROCESS'
5522 if test "$_libavcodec" = yes ; then
5523 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5524 _ld_libavcodec
='libavcodec/libavcodec.a'
5525 _dep_libavcodec
='libavcodec/libavcodec.a'
5526 _def_ffpostprocess
='#define FF_POSTPROCESS 1'
5527 _codecmodules
="libavcodec $_codecmodules"
5528 elif test "$_libavcodecso" = yes ; then
5529 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5530 _def_libavcodecso
='#define USE_LIBAVCODEC_SO 1'
5531 _ld_libavcodec
='-lavcodec'
5532 _codecmodules
="libavcodec.so $_codecmodules"
5534 _nocodecmodules
="libavcodec $_nocodecmodules"
5537 _def_libavformat
='#undef USE_LIBAVFORMAT'
5538 _def_libavformat_win32
='#undef CONFIG_WIN32'
5539 if test "$_libavformat" = yes ; then
5540 _def_libavformat
='#define USE_LIBAVFORMAT 1'
5541 _ld_libavformat
='libavformat/libavformat.a'
5542 _dep_libavformat
='libavformat/libavformat.a'
5544 _def_libavformat_win32
='#define CONFIG_WIN32 1'
5548 echocheck
"libdv-0.9.5+"
5549 if test "$_libdv" = auto
; then
5552 #include <libdv/dv.h>
5553 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
5555 cc_check
-ldv $_ld_lm && _libdv
=yes
5557 if test "$_libdv" = yes ; then
5558 _def_libdv
='#define HAVE_LIBDV095 1'
5560 _codecmodules
="libdv $_codecmodules"
5562 _def_libdv
='#undef HAVE_LIBDV095'
5563 _nocodecmodules
="libdv $_nocodecmodules"
5568 if test "$_zr" = auto
; then
5569 #36067's seem to identify themselves as 36057PQC's, so the line
5570 #below should work for 36067's and 36057's.
5571 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
5577 if test "$_zr" = yes ; then
5578 if test "$_libavcodec" = yes ; then
5579 _def_zr
='#define HAVE_ZR 1'
5580 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
5581 _vomodules
="zr zr2 $_vomodules"
5584 echores
"libavcodec (static) is required by zr, sorry"
5585 _novomodules
="zr $_novomodules"
5586 _def_zr
='#undef HAVE_ZR'
5589 _def_zr
='#undef HAVE_ZR'
5590 _novomodules
="zr zr2 $_novomodules"
5595 if test "$_bl" = yes ; then
5596 _def_bl
='#define HAVE_BL 1'
5597 _vosrc
="$_vosrc vo_bl.c"
5598 _vomodules
="bl $_vomodules"
5600 _def_bl
='#undef HAVE_BL'
5601 _novomodules
="bl $_novomodules"
5608 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
5610 _ld_xvid
="$_ld_xvid -lxvidcore $_ld_lm"
5611 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid ; then
5613 _def_xvid3
='#define HAVE_XVID3 1'
5614 _def_xvid4
='#undef HAVE_XVID4'
5615 _codecmodules
="xvid $_codecmodules"
5619 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
5621 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid ; then
5623 _def_xvid3
='#undef HAVE_XVID3'
5624 _def_xvid4
='#define HAVE_XVID4 1'
5625 _codecmodules
="xvid $_codecmodules"
5629 _def_xvid3
='#undef HAVE_XVID3'
5630 _def_xvid4
='#undef HAVE_XVID4'
5631 _nocodecmodules
="xvid $_nocodecmodules"
5637 _def_decore_xvid
='#undef DECORE_XVID'
5638 _def_encore_xvid
='#undef ENCORE_XVID'
5639 if test "$_xvid" = yes ; then
5640 echocheck
"DivX4 compatibility in XviD"
5643 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
5645 cc_check
$_ld_lm "$_ld_xvid" && _xvidcompat
=yes
5646 echores
"$_xvidcompat"
5654 int main(void) { x264_encoder_open((void*)0); return 0; }
5656 _ld_x264
="$_ld_x264 -lx264 $_ld_lm"
5657 if test "$_x264" != no
&& cc_check
$_inc_x264 $_ld_x264 ; then
5659 _def_x264
='#define HAVE_X264 1'
5660 _codecmodules
="x264 $_codecmodules"
5664 _def_x264
='#undef HAVE_X264'
5665 _nocodecmodules
="x264 $_nocodecmodules"
5669 echocheck
"DivX4linux/DivX5linux/OpenDivX decore"
5670 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
5673 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
5675 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
5677 _ld_decore
='-ldivxdecore'
5678 _def_decore
='#define NEW_DECORE 1'
5679 _def_divx
='#define USE_DIVX'
5680 _def_divx5
='#undef DECORE_DIVX5'
5681 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5682 _codecmodules
="divx4linux $_codecmodules"
5683 echores
"DivX4linux (with libdivxdecore.so)"
5685 # if test "$_divx4linux" != no ; then
5687 # OdivxPP disabled because of:
5688 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
5691 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
5693 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
5695 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
5696 _ld_decore
='-ldivxdecore'
5697 _def_decore
='#define NEW_DECORE 1'
5698 _def_divx
='#define USE_DIVX'
5699 _def_divx5
='#define DECORE_DIVX5 1'
5700 # _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
5701 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5702 _codecmodules
="divx5linux $_codecmodules"
5703 _nocodecmodules
="divx4linux $_nocodecmodules"
5704 echores
"DivX5linux (with libdivxdecore.so)"
5705 elif test "$_opendivx" != no
; then
5707 _ld_decore
='opendivx/libdecore.a'
5708 _def_decore
='#undef NEW_DECORE'
5709 _def_divx
='#define USE_DIVX'
5710 _def_divx5
='#undef DECORE_DIVX5'
5711 _def_odivx_postprocess
='#define HAVE_ODIVX_POSTPROCESS 1'
5712 _codecmodules
="opendivx $_codecmodules"
5713 _nocodecmodules
="divx5linux $_nocodecmodules"
5715 elif test "$_xvidcompat" = yes ; then
5718 _def_decore
='#define NEW_DECORE 1'
5719 _def_divx
='#define USE_DIVX 1'
5720 _def_divx5
='#undef DECORE_DIVX5'
5721 _def_decore_xvid
='#define DECORE_XVID 1'
5722 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5723 _nocodecmodules
="opendivx divx5linux divx4linux $_nocodecmodules"
5724 echores
"XviD compat."
5728 _def_decore
='#undef NEW_DECORE'
5729 _def_divx
='#undef USE_DIVX'
5730 _def_divx5
='#undef DECORE_DIVX5'
5731 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
5732 _nocodecmodules
="opendivx $_nocodecmodules"
5738 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
5739 if test "$_mencoder" != no
; then
5741 echocheck
"libmp3lame (for mencoder)"
5744 #include <lame/lame.h>
5745 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; }
5747 # Note: libmp3lame usually depends on vorbis
5748 cc_check
-lmp3lame $_ld_vorbis $_ld_lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame
=yes
5749 if test "$_mp3lame" = yes ; then
5750 _def_mp3lame
="#define HAVE_MP3LAME `$TMPO`"
5751 _def_cfg_mp3lame
="#define CONFIG_MP3LAME `$TMPO`"
5752 _ld_mp3lame
="-lmp3lame $_ld_vorbis"
5754 _def_mp3lame
='#undef HAVE_MP3LAME'
5755 _def_cfg_mp3lame
='#undef CONFIG_MP3LAME'
5760 echocheck
"DivX4linux encore (for mencoder)"
5762 #include <encore2.h>
5763 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
5765 if test "$_divx4linux" != no
&& cc_check
-ldivxencore $_ld_lm ; then
5766 _def_encore
='#define HAVE_DIVX4ENCORE 1'
5767 _ld_encore
='-ldivxencore'
5768 echores
"DivX4linux (with libdivxencore.so)"
5769 elif test "$_xvidcompat" = yes ; then
5770 _def_encore
='#define HAVE_DIVX4ENCORE 1'
5772 _def_encore_xvid
='#define ENCORE_XVID 1'
5773 echores
"XviD compat."
5775 _def_encore
='#undef HAVE_DIVX4ENCORE'
5781 echocheck
"mencoder"
5782 _mencoder_flag
='#undef HAVE_MENCODER'
5783 if test "$_mencoder" = yes ; then
5784 _mencoder_flag
='#define HAVE_MENCODER'
5786 echores
"$_mencoder"
5788 echocheck
"fastmemcpy"
5789 # fastmemcpy check is done earlier with tests of CPU & binutils features
5790 if test "$_fastmemcpy" = yes ; then
5791 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
5793 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
5795 echores
"$_fastmemcpy"
5797 echocheck
"UniquE RAR File Library"
5798 if test "$_unrarlib" = yes ; then
5799 _def_unrarlib
='#define USE_UNRARLIB 1'
5801 _def_unrarlib
='#undef USE_UNRARLIB'
5803 echores
"$_unrarlib"
5805 echocheck
"TV interface"
5806 if test "$_tv" = yes ; then
5807 _def_tv
='#define USE_TV 1'
5808 _inputmodules
="tv $_inputmodules"
5810 _noinputmodules
="tv $_noinputmodules"
5811 _def_tv
='#undef USE_TV'
5815 echocheck
"EDL support"
5816 if test "$_edl" = yes ; then
5817 _def_edl
='#define USE_EDL'
5818 _inputmodules
="edl $_inputmodules"
5820 _noinputmodules
="edl $_noinputmodules"
5821 _def_edl
='#undef USE_EDL'
5825 echocheck
"*BSD BrookTree 848 TV interface"
5826 if test "$_tv_bsdbt848" = auto
; then
5828 if test "$_tv" = yes ; then
5830 #include <sys/types.h>
5831 #if defined(__NetBSD__)
5832 #include <dev/ic/bt8xx.h>
5834 #include <machine/ioctl_bt848.h>
5836 int main(void) { return 0; }
5838 cc_check
&& _tv_bsdbt848
=yes
5841 if test "$_tv_bsdbt848" = yes ; then
5842 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
5843 _inputmodules
="tv-bsdbt848 $_inputmodules"
5845 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
5846 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
5848 echores
"$_tv_bsdbt848"
5850 echocheck
"Video 4 Linux TV interface"
5851 if test "$_tv_v4l" = auto
; then
5853 if test "$_tv" = yes && linux
; then
5854 for I
in /dev
/video
/dev
/video?
; do
5855 if test -c $I ; then
5858 #include <linux/videodev.h>
5859 int main(void) { return 0; }
5861 cc_check
&& _tv_v4l
=yes
5867 if test "$_tv_v4l" = yes ; then
5868 _def_tv_v4l
='#define HAVE_TV_V4L 1'
5869 _inputmodules
="tv-v4l $_inputmodules"
5871 _noinputmodules
="tv-v4l $_noinputmodules"
5872 _def_tv_v4l
='#undef HAVE_TV_V4L'
5877 echocheck
"Video 4 Linux 2 TV interface"
5878 if test "$_tv_v4l2" = auto
; then
5880 if test "$_tv" = yes && linux
; then
5881 for I
in /dev
/video
/dev
/video?
; do
5882 if test -c $I ; then
5889 if test "$_tv_v4l2" = yes ; then
5890 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
5891 _inputmodules
="tv-v4l2 $_inputmodules"
5893 _noinputmodules
="tv-v4l2 $_noinputmodules"
5894 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
5899 echocheck
"audio select()"
5900 if test "$_select" = no
; then
5901 _def_select
='#undef HAVE_AUDIO_SELECT'
5902 elif test "$_select" = yes ; then
5903 _def_select
='#define HAVE_AUDIO_SELECT 1'
5909 # FIXME network check
5910 if test "$_network" != no
; then
5911 _def_network
='#define MPLAYER_NETWORK 1'
5912 _ld_network
="$_ld_sock"
5913 _inputmodules
="network $_inputmodules"
5915 _noinputmodules
="network $_noinputmodules"
5916 _def_network
='#undef MPLAYER_NETWORK'
5922 if (not beos
) && (test "$_ftp" != no
) ; then
5923 _def_ftp
='#define HAVE_FTP 1'
5924 _inputmodules
="ftp $_inputmodules"
5926 _noinputmodules
="ftp $_noinputmodules"
5927 _def_ftp
='#undef HAVE_FTP'
5932 echocheck
"byte order"
5933 if test "$_big_endian" = auto
; then
5935 short asci_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|0)};
5937 char* s = (char*)asci_name;
5942 if test `grep -l MPlayer $TMPO` ; then
5948 echo -n "failed to autodetect byte order, defaulting to "
5951 if test "$_big_endian" = yes ; then
5952 _byte_order
='big-endian'
5953 _def_words_endian
='#define WORDS_BIGENDIAN 1'
5955 _byte_order
='little-endian'
5956 _def_words_endian
='#undef WORDS_BIGENDIAN'
5958 echores
"$_byte_order"
5960 echocheck
"shared postprocess lib"
5961 echores
"$_shared_pp"
5963 echocheck
"OSD menu"
5964 if test "$_menu" = yes ; then
5965 _def_menu
='#define HAVE_MENU 1'
5967 _def_menu
='#undef HAVE_MENU'
5971 # Check to see if they want QTX codecs enabled
5972 echocheck
"QTX codecs"
5973 if test "$_qtx" = auto
; then
5976 if test "$_qtx" = yes ; then
5977 _def_qtx
='#define USE_QTX_CODECS 1'
5978 _codecmodules
="qtx $_codecmodules"
5980 _def_qtx
='#undef USE_QTX_CODECS'
5981 _nocodecmodules
="qtx $_nocodecmodules"
5986 echocheck
"Subtitles sorting"
5987 if test "$_sortsub" = yes ; then
5988 _def_sortsub
='#define USE_SORTSUB 1'
5990 _def_sortsub
='#undef USE_SORTSUB'
5995 echocheck
"XMMS inputplugin support"
5996 if test "$_xmms" = yes ; then
5998 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
5999 if test -z "$_xmmsplugindir" ; then
6000 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6002 if test -z "$_xmmslibdir" ; then
6003 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6006 if test -z "$_xmmsplugindir" ; then
6007 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6009 if test -z "$_xmmslibdir" ; then
6010 _xmmslibdir
=/usr
/lib
6014 _def_xmms
='#define HAVE_XMMS 1'
6016 _xmms_lib
="${_xmmslibdir}/libxmms.dylib"
6018 _xmms_lib
="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6021 _def_xmms
='#undef HAVE_XMMS'
6026 if test "$_inet6" = auto
; then
6028 #include <sys/types.h>
6029 #include <sys/socket.h>
6030 int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6037 if test "$_inet6" = yes ; then
6038 _def_inet6
='#define HAVE_AF_INET6 1'
6040 _def_inet6
='#undef HAVE_AF_INET6'
6045 echocheck
"gethostbyname2"
6046 if test "$_gethostbyname2" = auto
; then
6048 #include <sys/types.h>
6049 #include <sys/socket.h>
6051 int main(void) { gethostbyname2("", AF_INET); }
6059 if test "$_gethostbyname2" = yes ; then
6060 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6062 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6064 echores
"$_gethostbyname2"
6066 # --------------- GUI specific tests begin -------------------
6069 if test "$_gui" = yes ; then
6071 # Required libraries
6072 test "$_png" != yes && die
"PNG support required for GUI compilation, please install libpng and libpng-dev packages."
6073 test "$_x11" != yes && die
"X11 support required for GUI compilation"
6075 echocheck
"XShape extension"
6077 if test "$_x11" = yes ; then
6079 #include <X11/Xlib.h>
6080 #include <X11/Xproto.h>
6081 #include <X11/Xutil.h>
6082 #include <X11/extensions/shape.h>
6085 char *name = ":0.0";
6088 int eventbase, errorbase;
6089 if (getenv("DISPLAY"))
6090 name=getenv("DISPLAY");
6091 wsDisplay=XOpenDisplay(name);
6092 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6094 XCloseDisplay(wsDisplay);
6098 cc_check
$_inc_x11 $_ld_x11 && _xshape
=yes
6100 if test "$_xshape" = yes ; then
6101 _def_xshape
='#define HAVE_XSHAPE 1'
6103 die
"The GUI requires the X11 extension XShape (which was not found)."
6109 echocheck
"GTK version"
6110 if test -z "$_gtkconfig" ; then
6111 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
6112 _gtkconfig
="gtk-config"
6113 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
6114 _gtkconfig
="gtk12-config"
6116 die
"The GUI requires GTK devel packages (which were not found)."
6119 _gtk
=`$_gtkconfig --version 2>&1`
6120 _inc_gtk
=`$_gtkconfig --cflags 2>&1`
6121 _ld_gtk
=`$_gtkconfig --libs 2>&1`
6122 echores
"$_gtk (using $_gtkconfig)"
6125 echocheck
"glib version"
6126 if test -z "$_glibconfig" ; then
6127 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
6128 _glibconfig
="glib-config"
6129 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
6130 _glibconfig
="glib12-config"
6132 die
"The GUI requires GLib devel packages (which were not found)"
6135 _glib
=`$_glibconfig --version 2>&1`
6136 _inc_glib
=`$_glibconfig --cflags 2>&1`
6137 _ld_glib
=`$_glibconfig --libs 2>&1`
6138 echores
"$_glib (using $_glibconfig)"
6140 _def_gui
='#define HAVE_NEW_GUI 1'
6141 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6143 echo "Creating Gui/config.mak"
6144 cat > Gui
/config.mak
<< EOF
6145 # -------- Generated by configure -----------
6149 GLIBINC = $_inc_glib
6150 GLIBLIBS = $_ld_glib
6155 _def_gui
='#undef HAVE_NEW_GUI'
6157 # --------------- GUI specific tests end -------------------
6161 #############################################################################
6163 # Checking for CFLAGS
6165 if test "$_profile" != "" ||
test "$_debug" != "" ; then
6166 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
6167 if test "$_cc_major" -ge "3" ; then
6168 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
6171 elif test -z "$CFLAGS" ; then
6172 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6173 # always compile with '-g' if .developer:
6174 if test -f ".developer" ; then
6181 MPlayer compilation will use the CFLAGS set by you, but:
6183 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
6185 It is strongly recommended to let MPlayer choose the correct CFLAGS!
6186 To do so, execute 'CFLAGS= ./configure <options>'
6191 CFLAGS
="$CFLAGS -DSYS_DARWIN"
6192 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
6193 CFLAGS
="$CFLAGS -no-cpp-precomp"
6196 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
6197 test "$_altivec" = yes && CFLAGS
="$CFLAGS -DCONFIG_DARWIN"
6200 # use flag for HPUX missing setenv()
6201 CFLAGS
="$CFLAGS -DHPUX"
6205 CFLAGS
="$CFLAGS -D_REENTRANT"
6207 # FIXME bsd needs this so maybe other OS'es
6208 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
6210 # 64 bit file offsets?
6211 if test "$_largefiles" = yes || freebsd
; then
6212 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
6213 if test "$_dvdread" = yes ; then
6214 # dvdread support requires this (for off64_t)
6215 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
6219 echocheck
"compiler support for -fno-PIC"
6222 int main(void) { return 0; }
6224 if cc_check
-fno-PIC ; then
6225 CFLAGS
="-fno-PIC $CFLAGS"
6231 echores
"only used for x86"
6234 echocheck
"ftello()"
6235 # if we don't have ftello use the osdep/ compatibility module
6238 #include <sys/types.h>
6239 int main (void) { ftello(stdin); return 0; }
6242 cc_check
&& _ftello
=yes
6243 if test "$_ftello" = yes ; then
6244 _def_ftello
='#define HAVE_FTELLO 1'
6246 _def_ftello
='#undef HAVE_FTELLO'
6250 # Determine OS dependent libs
6252 _def_confwin32
='#define WIN32'
6253 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
6254 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
6255 CFLAGS
="$CFLAGS -D__CYGWIN__"
6259 _confwin32
='TARGET_WIN32 = yes'
6261 _confwin32
='TARGET_WIN32 = no'
6264 # Dynamic linking flags
6265 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6267 bsd
&& _ld_dl_dynamic
='-rdynamic'
6268 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
; then
6269 _ld_dl_dynamic
='-rdynamic'
6272 _ld_arch
="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6273 bsdos
&& _ld_arch
="$_ld_arch -ldvd"
6275 x86
&& _ld_arch
="$_ld_arch -li386"
6278 _def_debug
='#undef MP_DEBUG'
6279 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
6281 _def_linux
='#undef TARGET_LINUX'
6282 linux
&& _def_linux
='#define TARGET_LINUX 1'
6284 # TODO cleanup the VIDIX stuff here
6285 _def_vidix
='#define CONFIG_VIDIX 1'
6286 test "$_vidix" = no
&& _def_vidix
='#undef CONFIG_VIDIX'
6287 if test "$_vidix" = yes; then
6288 _vosrc
="$_vosrc vo_cvidix.c"
6289 _vomodules
="cvidix $_vomodules"
6291 _novomodules
="cvidix $_novomodules"
6293 if test "$_vidix" = yes && (win32
); then
6294 _vosrc
="$_vosrc vo_winvidix.c"
6295 _vomodules
="winvidix $_vomodules"
6297 _novomodules
="winvidix $_novomodules"
6299 if test "$_vidix" = yes && test "$_x11" = yes; then
6300 _vosrc
="$_vosrc vo_xvidix.c"
6301 _vomodules
="xvidix $_vomodules"
6303 _novomodules
="xvidix $_novomodules"
6305 echo Checking
for VIDIX ...
"$_vidix"
6307 _def_joystick
='#undef HAVE_JOYSTICK'
6308 if test "$_joystick" = yes ; then
6310 # TODO add some check
6311 _def_joystick
='#define HAVE_JOYSTICK 1'
6313 _joystick
="no (unsupported under $system_name)"
6316 echo Checking
for joystick ...
"$_joystick"
6319 if test "$_lirc" = auto
; then
6321 if test -c /dev
/lirc
-o -c /dev
/lirc
/0 ; then
6323 #include <lirc/lirc_client.h>
6324 int main(void) { return 0; }
6326 cc_check
-llirc_client && _lirc
=yes
6329 if test "$_lirc" = yes ; then
6330 _def_lirc
='#define HAVE_LIRC 1'
6331 _ld_lirc
='-llirc_client'
6333 _def_lirc
='#undef HAVE_LIRC'
6338 if test "$_lircc" = auto
; then
6341 #include <lirc/lircc.h>
6342 int main(void) { return 0; }
6344 cc_check
-llircc && _lircc
=yes
6346 if test "$_lircc" = yes ; then
6347 _def_lircc
='#define HAVE_LIRCC 1'
6350 _def_lircc
='#undef HAVE_LIRCC'
6354 #############################################################################
6355 echo "Creating config.mak"
6356 cat > config.mak
<< EOF
6357 # -------- Generated by configure -----------
6360 MAN_LANG = $MAN_LANG
6361 TARGET_OS = $system_name
6363 prefix = \$(DESTDIR)$_prefix
6364 BINDIR = \$(DESTDIR)$_bindir
6365 DATADIR = \$(DESTDIR)$_datadir
6366 MANDIR = \$(DESTDIR)$_mandir
6367 CONFDIR = \$(DESTDIR)$_confdir
6368 LIBDIR = \$(DESTDIR)$_libdir
6375 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
6376 EXTRA_INC = $_inc_extra $_inc_gtk
6377 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
6378 STRIPBINARIES = $_stripbinaries
6379 HELP_FILE = $_mp_help
6382 PRG_MENCODER = $_prg_mencoder
6386 MPLAYER_NETWORK = $_network
6387 STREAMING_LIVE_DOT_COM = $_live
6388 MPLAYER_NETWORK_LIB = $_ld_live $_ld_network
6391 SHARED_PP = $_shared_pp
6394 CONFIG_MP3LAME = $_mp3lame
6396 I18NLIBS = $_i18n_libs
6397 MATROSKA = $_matroska_internal
6399 OPENDIVX = $_opendivx
6403 LIBMPEG2 = $_libmpeg2
6405 UNRARLIB = $_unrarlib
6406 HAVE_FFPOSTPROCESS = $_def_haveffpostprocess
6411 EXTRA_LIB = $_ld_extra
6412 Z_LIB = $_ld_static $_ld_zlib
6414 WIN32_LIB = $_ld_win32libs
6415 STATIC_LIB = $_ld_static
6416 ENCA_LIB = $_ld_enca
6417 HAVE_PTHREADS = $_pthreads
6423 HAVE_XVMC_ACCEL = $_xvmc
6433 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
6435 MLIB_LIB = $_ld_mlib
6436 MLIB_INC = $_inc_mlib
6437 DXR2_INC = $_inc_dxr2
6443 SVGA_LIB = $_ld_svga
6445 CACA_INC = $_inc_caca
6446 CACA_LIB = $_ld_caca
6449 ALSA_LIB = $_ld_alsa
6451 ARTS_LIB = $_ld_arts
6452 ARTS_INC = $_inc_arts
6455 JACK_LIB = $_ld_jack
6456 JACK_INC = $_inc_jack
6457 SGIAUDIO_LIB = $_ld_sgiaudio
6459 # input/demuxer/codecs
6460 TERMCAP_LIB = $_ld_termcap
6461 LIRC_LIB = $_ld_lirc
6462 LIRCC_LIB = $_ld_lircc
6463 DVDREAD_LIB = $_ld_dvdread
6468 W32_DEP = $_dep_win32
6469 W32_LIB = $_ld_win32
6470 DS_DEP = $_dep_dshow
6472 AV_DEP = $_dep_libavcodec $_dep_libavformat
6473 AV_LIB = $_ld_libavcodec $_ld_libavformat
6474 CONFIG_LIBAVFORMAT = $_libavformat
6477 FAME_LIB = $_ld_fame
6478 MP1E_DEP = $_dep_mp1e
6479 MP1E_LIB = $_ld_mp1e
6480 ARCH_LIB = $_ld_arch $_ld_iconv
6482 XVID_INC = $_inc_xvid
6483 XVID_LIB = $_ld_xvid
6485 X264_INC = $_inc_x264
6486 X264_LIB = $_ld_x264
6487 CONFIG_DTS = $_libdts
6488 DTS_INC = $_inc_libdts
6489 DTS_LIB = $_ld_libdts
6490 DECORE_LIB = $_ld_decore $_ld_mp3lame
6491 MENCODER = $_mencoder
6492 ENCORE_LIB = $_ld_encore $_ld_mp3lame
6493 DIRECTFB_INC = $_inc_directfb
6494 DIRECTFB_LIB = $_ld_directfb
6495 CDPARANOIA_INC = $_inc_cdparanoia
6496 CDPARANOIA_LIB = $_ld_cdparanoia
6497 FREETYPE_INC = $_inc_freetype
6498 FREETYPE_LIB = $_ld_freetype
6499 FONTCONFIG_INC = $_inc_fontconfig
6500 FONTCONFIG_LIB = $_ld_fontconfig
6501 FRIBIDI_INC = $_inc_fribidi
6502 FRIBIDI_LIB = $_ld_fribidi
6503 LIBLZO_LIB= $_ld_liblzo
6505 VORBIS_LIB = $_ld_vorbis $_ld_libdv
6506 THEORA_LIB = $_ld_theora
6507 FAAD_LIB = $_ld_faad
6508 INTERNAL_FAAD = $_faad_internal
6509 SMBSUPPORT_LIB = $_ld_smb
6510 XMMS_PLUGINS = $_xmms
6511 XMMS_LIB = $_xmms_lib
6513 MACOSX_FRAMEWORKS = $_macosx_frameworks
6515 TOOLAME_EXTRAFLAGS=$_toolame_extraflags
6516 TOOLAME_LIB=$_toolame_lib
6518 # --- Some stuff for autoconfigure ----
6523 TARGET_MMX2 = $_mmx2
6524 TARGET_3DNOW = $_3dnow
6525 TARGET_3DNOWEX = $_3dnowex
6527 TARGET_ALTIVEC = $_altivec
6531 GTKLIB = $_ld_static $_ld_gtk
6532 GLIBLIB = $_ld_static $_ld_glib
6533 GTK_LIBS = $_ld_static $_ld_gui
6539 #############################################################################
6540 echo "Creating config.h"
6541 cat > config.h
<< EOF
6542 /* -------- This file has been automatically generated by configure ---------
6543 Note: Any changes in it will be lost when you run configure again. */
6545 /* Protect against multiple inclusion */
6546 #ifndef MPLAYER_CONFIG_H
6547 #define MPLAYER_CONFIG_H 1
6549 /* use GNU internationalization */
6552 /* missing mmap function on libc5 systems */
6554 # define MAP_FAILED ((void *) -1)
6557 /* use setlocale() function */
6560 /* Runtime CPU detection */
6561 $_def_runtime_cpudetection
6563 /* Dynamic a/v plugins */
6564 $_def_dynamic_plugins
6566 /* "restrict" keyword */
6567 #define restrict $_def_restrict_keyword
6569 /* attribute(used) as needed by some compilers */
6570 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
6571 # define attribute_used __attribute__((used))
6573 # define attribute_used
6576 #define PREFIX "$_prefix"
6581 /* enable/disable SIGHANDLER */
6584 /* Toggles debugging informations */
6587 /* Indicates that Ogle's libdvdread is available for DVD playback */
6590 /* Indicates that dvdread is from libmpdvdkit */
6593 /* Additional options for libmpdvdkit*/
6607 /* Common data directory (for fonts, etc) */
6608 #define MPLAYER_DATADIR "$_datadir"
6609 #define MPLAYER_CONFDIR "$_confdir"
6610 #define MPLAYER_LIBDIR "$_libdir"
6612 /* Define this to compile stream-caching support, it can be enabled via
6613 -cache <kilobytes> */
6614 #define USE_STREAM_CACHE 1
6616 /* Define to include support for XviD/Divx4Linux/OpenDivx */
6619 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
6620 /* You have to change DECORE_LIBS in config.mak, too! */
6623 /* Define if you are using DivX5Linux Decore library */
6626 /* Define if you are using XviD library */
6632 /* Define if you are using the X.264 library */
6635 /* Define to include support for libdv-0.9.5 */
6638 /* If build mencoder */
6641 /* Indicates if XviD/Divx4linux encore is available
6642 Note: for mencoder */
6645 /* Indicates if libmp3lame is available
6646 Note: for mencoder */
6650 /* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
6653 /* Define this to enable avg. byte/sec-based AVI sync method by default:
6654 (use -bps or -nobps commandline option for run-time method selection)
6655 -bps gives better sync for vbr mp3 audio, it is now default */
6656 #define AVI_SYNC_BPS 1
6658 /* Undefine this if you do not want to select mono audio (left or right)
6659 with a stereo MPEG layer 2/3 audio stream. The command line option
6660 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
6661 right-only), with 0 being the default.
6663 #define USE_FAKE_MONO 1
6665 /* Undefine this if your sound card driver has no working select().
6666 If you have kernel Oops, player hangups, or just no audio, you should
6667 try to recompile MPlayer with this option disabled! */
6670 /* define this to use iconv(3) function to codepage conversions */
6673 /* define this to use nl_langinfo function */
6676 /* define this to use RTC (/dev/rtc) for video timers (LINUX only) */
6679 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
6680 #define MAX_OUTBURST 65536
6682 /* set up audio OUTBURST. Do not change this! */
6683 #define OUTBURST 512
6685 /* Define this if your system has the header file for the OSS sound interface */
6688 /* Define this if your system has the header file for the OSS sound interface
6689 * in /usr/include */
6692 /* Define this if your system has the sysinfo header */
6695 /* Define this if your system has ftello() */
6699 /* Need these for FILE and off_t an config.h is usually before other includes*/
6701 #include <sys/types.h>
6702 off_t ftello(FILE *);
6705 /* Define this if your system has the "malloc.h" header file */
6708 /* memalign is mapped to malloc if unsupported */
6710 #ifndef HAVE_MEMALIGN
6711 # define memalign(a,b) malloc(b)
6714 /* Define this if your system has the "alloca.h" header file */
6717 /* Define this if your system has the "sys/mman.h" header file */
6720 /* Define this if you have the elf dynamic linker -ldl library */
6723 /* Define this if you have the kstat kernel statistics library */
6726 /* Define this if you have zlib */
6729 #define CONFIG_ZLIB 1
6732 /* Define this if you have shm support */
6735 /* Define this if your system has scandir & alphasort */
6738 /* Define this if your system has strsep */
6741 /* Define this if your system has strlcpy */
6743 #ifndef HAVE_STRLCPY
6744 unsigned int strlcpy (char *dest, char *src, unsigned int size);
6747 /* Define this if your system has strlcat */
6749 #ifndef HAVE_STRLCAT
6750 unsigned int strlcat (char *dest, char *src, unsigned int size);
6753 /* Define this if your system has fseeko */
6756 /* Need these for FILE and off_t an config.h is usually before other includes*/
6758 #include <sys/types.h>
6759 int fseeko(FILE *, off_t, int);
6764 /* Define this if your system has vsscanf */
6767 /* Define this if your system has swab */
6770 /* Define this if your system has no posix select */
6771 $_def_no_posix_select
6773 /* Define this if your system has gettimeofday */
6776 /* Define this if your system has glob */
6779 /* Define this if your system has pthreads */
6782 /* LIRC (remote control, see www.lirc.org) support: */
6786 * LIRCCD (LIRC client daemon)
6787 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
6791 /* DVD navigation support using libdvdnav */
6793 $_def_dvdnav_version
6795 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
6796 #define MPEG12_POSTPROC 1
6798 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
6801 /* Define to include support for OpenDivx postprocessing */
6802 $_def_odivx_postprocess
6804 /* Win32 DLL support */
6806 #define WIN32_PATH "$_win32libdir"
6808 /* DirectShow support */
6811 /* Mac OS X specific features */
6814 /* Mac OS X SHLB support */
6817 /* Build our Win32-loader */
6820 /* ffmpeg's libavcodec support (requires libavcodec source) */
6824 /* ffmpeg's libavformat support (requires libavformat source) */
6826 $_def_libavformat_win32
6829 #define CONFIG_RISKY 1
6831 /* Use libavcodec's decoders */
6832 #define CONFIG_DECODERS 1
6833 /* Use libavcodec's encoders */
6834 #define CONFIG_ENCODERS 1
6836 #define CONFIG_MPEGAUDIO_HP 1
6838 /* Use codec libs included in mplayer CVS / source dist: */
6844 /* Use libfame encoder filter */
6847 /* XAnim DLL support */
6849 /* Default search path */
6852 /* RealPlayer DLL support */
6854 /* Default search path */
6857 /* LIVE.COM Streaming Media library support */
6860 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
6863 /* Use unrarlib for Vobsubs */
6866 /* gui support, please do not edit this option */
6869 /* Audio output drivers */
6871 $_def_ossaudio_devdsp
6872 $_def_ossaudio_devmixer
6880 $_def_sys_asoundlib_h
6881 $_def_alsa_asoundlib_h
6887 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
6889 #undef FAST_OSD_TABLE
6891 /* Enable TV Interface support */
6894 /* Enable EDL support */
6897 /* Enable Video 4 Linux TV interface support */
6900 /* Enable Video 4 Linux 2 TV interface support */
6903 /* Enable *BSD BrookTree TV interface support */
6906 /* Define if your processor stores words with the most significant
6907 byte first (like Motorola and SPARC, unlike Intel and VAX). */
6912 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
6913 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
6919 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
6924 /* only gcc3 can compile mvi instructions */
6925 $_def_gcc_mvi_support
6927 /* Define this for Cygwin build for win32 */
6930 /* Define this to any prefered value from 386 up to infinity with step 100 */
6931 #define __CPU__ $iproc
6940 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
6941 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
6943 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
6944 #define DEFAULT_DVD_DEVICE "/dev/dvd"
6945 #elif defined(WIN32)
6946 #define DEFAULT_CDROM_DEVICE "D:"
6947 #define DEFAULT_DVD_DEVICE "D:"
6948 #elif defined(SYS_DARWIN)
6949 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
6950 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
6951 #elif defined(__OpenBSD__)
6952 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
6953 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
6955 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
6956 #define DEFAULT_DVD_DEVICE "/dev/dvd"
6960 /*----------------------------------------------------------------------------
6962 ** NOTE: Instead of modifying these definitions here, use the
6963 ** --enable/--disable options of the ./configure script!
6964 ** See ./configure --help for details.
6966 *---------------------------------------------------------------------------*/
6968 /* C99 lrintf function available */
6971 /* yes, we have inttypes.h */
6972 #define HAVE_INTTYPES_H 1
6974 /* int_fastXY_t emulation */
6977 /* nanosleep support */
6983 /* termcap flag for getch2.c */
6986 /* termios flag for getch2.c */
6991 /* enable PNG support */
6994 /* enable JPEG support */
6997 /* enable PNM support */
7000 /* enable md5sum support */
7003 /* enable GIF support */
7008 /* enable FreeType support */
7011 /* enable Fontconfig support */
7014 /* enable FriBiDi usage */
7017 /* enable ENCA usage */
7020 /* liblzo support */
7023 /* libmad support */
7026 /* enable OggVorbis support */
7029 /* enable Tremor as vorbis decoder */
7032 /* enable OggTheora support */
7035 /* enable Matroska support */
7038 /* enable FAAD (AAC) support */
7043 /* enable network */
7046 /* enable ftp support */
7049 /* enable winsock2 instead of Unix functions*/
7052 /* define this to use inet_aton() instead of inet_pton() */
7055 /* enables / disables cdparanoia support */
7058 /* enables / disables VIDIX usage */
7061 /* enables / disables new input joystick support */
7064 /* enables / disables QTX codecs */
7067 /* enables / disables osd menu */
7070 /* enables / disables subtitles sorting */
7073 /* XMMS input plugin support */
7075 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7077 /* enables inet6 support */
7080 /* do we have gethostbyname2? */
7081 $_def_gethostbyname2
7083 /* Extension defines */
7084 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
7085 $_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
7086 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
7087 $_def_mmx2 // only define if you have MMX2 (Athlon/PIII/4/CelII)
7088 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
7089 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
7090 $_def_altivec // only define if you have Altivec (G4)
7092 $_def_altivec_h // enables usage of altivec.h
7095 $_def_mlib // Sun mediaLib, available only on solaris
7096 $_def_vis // only define if you have VIS ( ultrasparc )
7098 /* libmpeg2 uses a different feature test macro for mediaLib */
7100 #define LIBMPEG2_MLIB 1
7104 #define SCREEN_SIZE_X 1
7105 #define SCREEN_SIZE_Y 1
7116 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
7124 $_def_directfb_version
7146 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
7147 #define X11_FULLSCREEN 1
7150 #endif /* MPLAYER_CONFIG_H */
7153 #############################################################################
7155 echo "Creating libvo/config.mak"
7156 _voobj
=`echo $_vosrc | sed -e 's/\.c/\.o/g'`
7157 cat > libvo
/config.mak
<< EOF
7158 include ../config.mak
7159 OPTIONAL_SRCS = $_vosrc
7160 OPTIONAL_OBJS = $_voobj
7163 #############################################################################
7165 echo "Creating libao2/config.mak"
7166 _aoobj
=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
7167 cat > libao
2/config.mak
<< EOF
7168 include ../config.mak
7169 OPTIONAL_SRCS = $_aosrc
7170 OPTIONAL_OBJS = $_aoobj
7173 #############################################################################
7177 Config files successfully generated by ./configure !
7179 Install prefix: $_prefix
7180 Data directory: $_datadir
7181 Config direct.: $_confdir
7183 Byte order: $_byte_order
7184 Optimizing for: $_optimizing
7187 Messages/GUI: $_language
7190 echo -n " Manual pages: $MAN_LANG"
7191 test "$LANGUAGES" = en
&& echo -n " (no localization selected, use --language=all)"
7196 Enabled optional drivers:
7197 Input: $_inputmodules
7198 Codecs: $_codecmodules
7199 Audio output: $_aomodules
7200 Video output: $_vomodules
7201 Disabled optional drivers:
7202 Input: $_noinputmodules
7203 Codecs: $_nocodecmodules
7204 Audio output: $_noaomodules
7205 Video output: $_novomodules
7207 'config.h' and 'config.mak' contain your configuration options.
7208 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7209 compile *** DO NOT REPORT BUGS if you tweak these files ***
7211 'make' will now compile MPlayer and 'make install' will install it.
7212 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7217 if test "$_mtrr" = yes ; then
7218 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/devices.html#mtrr)"
7222 if test "$_sdl" = "outdated" ; then
7224 You have an outdated version of libSDL installed (older than v1.1.7) and SDL
7225 support has therefore been disabled.
7227 Please upgrade to a more recent version (version 1.1.8 and above are known to
7228 work). You may get this library from: http://www.libsdl.org
7230 You need to rerun ./configure and recompile after updating SDL. If you are
7231 only interested in the libSDL audio drivers, then an older version might work.
7233 Use --enable-sdl to force usage of libSDL.
7239 if test "$_win32" = no
; then
7240 if test "$_win32libdir" ; then
7241 echo "Failed to find a Win32 codecs dir at $_win32libdir!"
7243 echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
7246 Create it and copy the DLL files there! You can download the codecs from our
7247 homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
7253 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7254 operating system ($system_name). You may encounter a few files that cannot
7255 be played due to missing open source video/audio codec support.
7263 Check $TMPLOG if you wonder why an autodetection failed (check whether
7264 the development headers/packages are installed).
7266 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
7270 if test "$_vidix" = no
; then
7272 You've disabled VIDIX. Although it would be better to PORT it instead.
7273 Have a look at the documentation for supported cards!
7279 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"