3 # Original version (C) 2000 Pontscho/fresh!mindworkz
4 # pontscho@makacs.poliod.hu
6 # History / Contributors: check the cvs log !
8 # Cleanups all over the place (c) 2001 pl
12 # If the option is named 'opt':
13 # _opt : should have a value in yes/no/auto
14 # _def_opt : '#define ... 1' or '#undef ...' that is: some C code
15 # _ld_opt : ' -L/path/dir -lopt ' that is: some GCC option
16 # _inc_opt : ' -I/path/dir/include '
18 # In this file, a tab is 8 chars and indentation shift is 2 characters
21 # - config files are currently:
22 # config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak
25 #############################################################################
27 # Prevent locale nonsense from breaking basic text processing utils
31 # Prefer these macros to full length text !
32 # These macros only return an error code - NO display is done
37 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra -o $TMPO $@" >> "$TMPLOG"
39 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra -o "$TMPO" "$@" >> "$TMPLOG" 2>&1
42 echo "ldd $TMPO" >> "$TMPLOG"
43 $_ldd "$TMPO" >> "$TMPLOG" 2>&1
49 compile_check
$TMPC $@
53 compile_check
$TMPCPP $@
-lstdc++
57 "$TMPO" >> "$TMPLOG" 2>&1
60 # Display error message, flushes tempfile, exit
65 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
66 echo "Check \"$TMPLOG\" if you do not understand why it failed."
70 # OS test booleans functions
72 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`"
74 linux
() { issystem
"Linux" ; return "$?" ; }
75 sunos
() { issystem
"SunOS" ; return "$?" ; }
76 hpux
() { issystem
"HP-UX" ; return "$?" ; }
77 irix
() { issystem
"IRIX" ; return "$?" ; }
78 cygwin
() { issystem
"CYGWIN" ; return "$?" ; }
79 freebsd
() { issystem
"FreeBSD" ; return "$?" ; }
80 netbsd
() { issystem
"NetBSD" ; return "$?" ; }
81 bsdos
() { issystem
"BSD/OS" ; return "$?" ; }
82 openbsd
() { issystem
"OpenBSD" ; return "$?" ; }
83 bsd
() { freebsd || netbsd || bsdos || openbsd
; return "$?" ; }
84 qnx
() { issystem
"QNX" ; return "$?" ; }
85 darwin
() { issystem
"Darwin" ; return "$?" ; }
86 gnu
() { issystem
"GNU" ; return "$?" ; }
87 mingw32
() { issystem
"MINGW32" ; return "$?" ; }
88 morphos
() { issystem
"MorphOS" ; return "$?" ; }
89 win32
() { cygwin || mingw32
; return "$?" ; }
90 beos
() { issystem
"BEOS" ; return "$?" ; }
92 # arch test boolean functions
93 # x86/x86pc is used by QNX
96 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
) return 0 ;;
103 x86_64|amd64
) return 0 ;;
122 # not boolean test: implement the posix shell "!" operator for a
124 # usage: not {command}
125 # returns exit status "success" when the execution of "command"
132 # Use this before starting a check
134 echo "============ Checking for $@ ============" >> "$TMPLOG"
135 echo ${_echo_n} "Checking for $@ ... ${_echo_c}"
138 # Use this to echo the results of a check
140 if test "$_res_comment" ; then
141 _res_comment
="($_res_comment)"
143 echo "Result is: $@ $_res_comment" >> "$TMPLOG"
144 echo "##########################################" >> "$TMPLOG"
146 echo "$@ $_res_comment"
149 #############################################################################
151 # Check how echo works in this /bin/sh
153 -n) _echo_n
= _echo_c
='\c' ;; # SysV echo
154 *) _echo_n
='-n ' _echo_c
= ;; # BSD echo
157 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"`
159 for parm
in "$@" ; do
160 if test "$parm" = "--help" ||
test "$parm" = "-help" ||
test "$parm" = "-h" ; then
163 Usage: $0 [OPTIONS]...
166 -h, --help display this help and exit
168 Installation directories:
169 --prefix=DIR use this prefix for installing mplayer [/usr/local]
170 --bindir=DIR use this prefix for installing mplayer binary
172 --datadir=DIR use this prefix for installing machine independent
173 data files (fonts, skins) [PREFIX/share/mplayer]
174 --mandir=DIR use this prefix for installing manpages [PREFIX/man]
175 --confdir=DIR use this prefix for installing configuration files
177 --libdir=DIR use this prefix for object code libraries [PREFIX/lib]
180 --disable-mencoder disable mencoder (a/v encoder) compilation [enable]
181 --enable-gui enable gmplayer compilation (GTK+ GUI) [disable]
182 --enable-old-gtk force using GTK 1.2 for GUI [disable]
183 --enable-largefiles enable support for files > 2 GBytes [disable]
184 --enable-linux-devfs set default devices to devfs ones [disable]
185 --enable-termcap use termcap database for key codes [autodetect]
186 --enable-termios use termios database for key codes [autodetect]
187 --disable-iconv do not use iconv(3) function [autodetect]
188 --disable-setlocale disable setlocale using in mplayer [autodetect]
189 --disable-langinfo do not use langinfo [autodetect]
190 --enable-lirc enable LIRC (remote control) support [autodetect]
191 --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
192 --enable-joystick enable joystick support [disable]
193 --disable-vm disable support X video mode extensions [autodetect]
194 --disable-xf86keysym disable support for 'multimedia' keys [autodetect]
195 --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
196 --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
197 --disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
198 --disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
199 --disable-edl disable EDL (edit decision list) support [enable]
200 --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
201 --disable-network disable network support (for: http/mms/rtp) [enable]
202 --enable-winsock2 enable winsock2 usage [autodetect]
203 --enable-smb enable Samba (SMB) input support [autodetect]
204 --enable-live enable LIVE555 Streaming Media support [autodetect]
205 --disable-dvdread Disable libdvdread support [autodetect]
206 --disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
207 --disable-cdparanoia Disable cdparanoia support [autodetect]
208 --disable-freetype Disable freetype2 font rendering support [autodetect]
209 --disable-fontconfig Disable fontconfig font lookup support [autodetect]
210 --disable-unrarlib Disable Unique RAR File Library [enabled]
211 --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
212 --disable-sortsub Disable subtitles sorting [enabled]
213 --enable-fribidi Enable using the FriBiDi libs [disabled]
214 --disable-enca Disable using ENCA charset oracle library [autodetect]
215 --disable-macosx Disable Mac OS X specific features [autodetect]
216 --enable-macosx-finder-support Enable Mac OS X Finder invocation parameter parsing [disabled]
217 --enable-macosx-bundle Enable Mac OS X bundle file locations [autodetect]
218 --disable-inet6 Disable IPv6 support [autodetect]
219 --disable-gethostbyname2 gethostbyname() function is not provided by the C
221 --disable-ftp Disable ftp support [enabled]
222 --disable-vstream Disable tivo vstream client support [autodetect]
223 --disable-pthreads Disable Posix threads support [autodetect]
226 --enable-gif enable gif support [autodetect]
227 --enable-png enable png input/output support [autodetect]
228 --enable-jpeg enable jpeg input/output support [autodetect]
229 --enable-liblzo enable external liblzo support [autodetect]
230 --disable-win32 disable Win32 DLL support [autodetect]
231 --disable-dshow disable Win32/DirectShow support [autodetect]
232 --disable-qtx disable Quicktime codecs [autodetect]
233 --disable-xanim disable XAnim DLL support [autodetect]
234 --disable-real disable RealPlayer DLL support [autodetect]
235 --disable-xvid disable XviD codec [autodetect]
236 --disable-x264 disable H.264 encoder [autodetect]
237 --disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
238 --enable-opendivx enable _old_ OpenDivx codec [disable]
239 --disable-libavcodec disable libavcodec [autodetect]
240 --disable-libavformat disable libavformat [autodetect]
241 --enable-libfame enable libfame realtime encoder [autodetect]
242 --disable-internal-tremor do not build internal OggVorbis support [enabled]
243 --enable-tremor-low build with lower accuracy internal tremor [disabled]
244 --enable-external-tremor build with external tremor [disabled]
245 --disable-vorbis disable OggVorbis support entirely [autodetect]
246 --enable-theora build with OggTheora support [autodetect]
247 --disable-internal-matroska disable internal Matroska support [enabled]
248 --enable-external-faad build with external FAAD2 (AAC) support [autodetect]
249 --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
250 --disable-faac disable support for FAAC (AAC encoder) [autodetect]
251 --disable-ladspa disable LADSPA plugin support [autodetect]
252 --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
253 --disable-mad disable libmad (MPEG audio) support [autodetect]
254 --disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
255 --disable-twolame disable Twolame (MPEG layer 2 audio) support in mencoder [autodetect]
256 --enable-xmms build with XMMS inputplugin support [disabled]
257 --disable-mp3lib disable builtin mp3lib [enabled]
258 --disable-liba52 disable builtin liba52 [enabled]
259 --enable-libdts enable libdts support [autodetect]
260 --disable-libmpeg2 disable builtin libmpeg2 [enabled]
261 --disable-musepack disable musepack support [autodetect]
262 --disable-amr_nb disable amr narrowband, floating point [autodetect]
263 --disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect]
264 --disable-amr_wb disable amr wideband, floating point [autodetect]
265 --disable-codec=CODEC disable specified codec
266 --enable-codec=CODEC dnable specified codec
269 --disable-vidix disable VIDIX [enable on x86 *nix]
270 --enable-gl build with OpenGL render support [autodetect]
271 --enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
272 --enable-vesa build with VESA support [autodetect]
273 --enable-svga build with SVGAlib support [autodetect]
274 --enable-sdl build with SDL render support [autodetect]
275 --enable-aa build with AAlib render support [autodetect]
276 --enable-caca build with CACA render support [autodetect]
277 --enable-ggi build with GGI render support [autodetect]
278 --enable-ggiwmh build with GGI libggiwmh extension [autodetect]
279 --enable-directx build with DirectX support [autodetect]
280 --enable-dxr2 build with DXR2 render support [autodetect]
281 --enable-dxr3 build with DXR3/H+ render support [autodetect]
282 --enable-dvb build with support for output via DVB-Card [autodetect]
283 --enable-dvbhead build with DVB support (HEAD version) [autodetect]
284 --enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
285 (check for /dev/mga_vid) [autodetect]
286 --enable-xmga build with mga_vid X Window support
287 (check for X & /dev/mga_vid) [autodetect]
288 --enable-xv build with Xv render support for X 4.x [autodetect]
289 --enable-xvmc build with XvMC acceleration for X 4.x [disable]
290 --enable-vm build with XF86VidMode support for X11 [autodetect]
291 --enable-xinerama build with Xinerama support for X11 [autodetect]
292 --enable-x11 build with X11 render support [autodetect]
293 --enable-fbdev build with FBDev render support [autodetect]
294 --enable-mlib build with MLIB support (Solaris only) [autodetect]
295 --enable-3dfx build with obsolete /dev/3dfx support [disable]
296 --enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
297 --enable-directfb build with DirectFB support [autodetect]
298 --enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
299 --enable-bl build with Blinkenlights support [disable]
300 --enable-tdfxvid build with tdfx_vid support [disable]
301 --disable-tga disable targa output support [enable]
302 --disable-pnm disable pnm output support [enable]
303 --disable-md5sum disable md5sum output support [enable]
306 --disable-alsa disable ALSA sound support [autodetect]
307 --disable-ossaudio disable OSS sound support [autodetect]
308 --disable-arts disable aRts sound support [autodetect]
309 --disable-esd disable esd sound support [autodetect]
310 --disable-polyp disable Polypaudio sound support [autodetect]
311 --disable-jack disable JACK sound support [autodetect]
312 --disable-nas disable NAS sound support [autodetect]
313 --disable-sgiaudio disable SGI sound support [autodetect]
314 --disable-sunaudio disable Sun sound support [autodetect]
315 --disable-win32waveout disable Windows waveout sound support [autodetect]
316 --disable-select disable using select() on audio device [enable]
318 Miscellaneous options:
319 --enable-runtime-cpudetection Enable runtime CPU detection [disable]
320 --enable-cross-compile Enable cross-compilation [autodetect]
321 --cc=COMPILER use this C compiler to build MPlayer [gcc]
322 --host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
323 --as=ASSEMBLER use this assembler to build MPlayer [as]
324 --target=PLATFORM target platform (i386-linux, arm-linux, etc)
325 --enable-static build a statically linked binary. Set further linking
326 options with --enable-static="-lslang -lncurses"
327 --charset convert the help messages to this charset
328 --language=list a white space or comma separated list of languages
329 for translated man pages, the first language is the
330 primary and therefore used for translated messages
331 and GUI (also the environment variable \$LINGUAS is
333 (Available: $LANGUAGES all)
334 --with-install=PATH use a custom install program (useful if your OS uses
335 a GNU-incompatible install utility by default and
336 you want to use GNU version)
337 --install-path=PATH the path to a custom install program
338 this option is obsolete and will be removed soon,
339 use --with-install instead.
342 --enable-mmx build with MMX support [autodetect]
343 --enable-mmx2 build with MMX2 support (PIII, Athlon) [autodetect]
344 --enable-3dnow build with 3DNow! support [autodetect]
345 --enable-3dnowex build with extended 3DNow! support [autodetect]
346 --enable-sse build with SSE support [autodetect]
347 --enable-sse2 build with SSE2 support [autodetect]
348 --enable-shm build with shm support [autodetect]
349 --enable-altivec build with Altivec support (PowerPC) [autodetect]
350 --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
351 --enable-big-endian Force byte order to big-endian [autodetect]
352 --enable-debug[=1-3] compile debugging information into mplayer [disable]
353 --enable-profile compile profiling information into mplayer [disable]
354 --disable-sighandler disable sighandler for crashes [enable]
355 --enable-crash-debug enable automatic gdb attach on crash [disable]
356 --enable-i18n _experimental_ gnu gettext() support [autodetect]
357 --enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
359 Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
360 --disable-gcc-checking disable gcc version checking [enable]
362 Use these options if autodetection fails (Options marked with (*) accept
363 multiple paths separated by ':'):
364 --with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
365 --with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
366 --with-x11incdir=DIR X headers in DIR (*)
367 --with-x11libdir=DIR X library files in DIR (*)
368 --with-dxr2incdir=DIR DXR2 headers in DIR (*)
369 --with-dvbincdir=DIR DVB headers in DIR (*)
370 --with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
371 --with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
372 --with-codecsdir=DIR Binary codec files in DIR
373 --with-win32libdir=DIR W*ndows DLL files in DIR
374 --with-xanimlibdir=DIR XAnim DLL files in DIR
375 --with-reallibdir=DIR RealPlayer DLL files in DIR
376 --with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
377 --with-xvidincdir=DIR XviD header in DIR (*)
378 --with-x264libdir=DIR libx264 in DIR
379 --with-x264incdir=DIR x264 header in DIR
380 --with-dtslibdir=DIR libdts library in DIR (*)
381 --with-dtsincdir=DIR libdts header in DIR (*)
382 --with-livelibdir=DIR LIVE555 Streaming Media libraries in DIR
383 --with-toolamedir=DIR path to Toolame library and include file
384 --with-xmmsplugindir=DIR XMMS plugins in DIR
385 --with-xmmslibdir=DIR libxmms.so.1 in DIR
386 --with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
387 --with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
388 --with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
389 --with-termcaplib=NAME name of library with termcap functionality
390 name should be given without leading "lib"
391 checks for "termcap" and "tinfo"
393 --with-freetype-config=PATH path to freetype-config
394 (e.g. /opt/bin/freetype-config)
395 --with-fribidi-config=PATH path to fribidi-config
396 (e.g. /opt/bin/fribidi-config)
397 --with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
398 --with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
399 --with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
401 This configure script is NOT autoconf-based, even though its output is similar.
402 It will try to autodetect all configuration options. If you --enable an option
403 it will be forcefully turned on, skipping autodetection. This can break
404 compilation, so you need to know what you are doing.
408 done # for parm in ...
411 # 1st pass checking for vital options
415 test "$CC" && _cc
="$CC"
417 _runtime_cpudetection
=no
422 _target
=`echo $ac_option | cut -d '=' -f 2`
425 _cc
=`echo $ac_option | cut -d '=' -f 2`
428 _host_cc
=`echo $ac_option | cut -d '=' -f 2`
431 _as
=`echo $ac_option | cut -d '=' -f 2`
433 --enable-gcc-checking)
436 --disable-gcc-checking)
446 _ld_static
="-static `echo $ac_option | cut -d '=' -f 2`"
448 --with-extraincdir=*)
449 _inc_extra
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
451 --with-extralibdir=*)
452 _ld_extra
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
454 --enable-runtime-cpudetection)
455 _runtime_cpudetection
=yes
457 --disable-runtime-cpudetection)
458 _runtime_cpudetection
=no
460 --enable-cross-compile)
463 --disable-cross-compile)
467 _install
=`echo $ac_option | cut -d '=' -f 2 | sed 's/\/$//'`"/install"
470 _install
=`echo $ac_option | cut -d '=' -f 2 `
475 # Determine our OS name and CPU architecture
476 if test -z "$_target" ; then
478 system_name
=`uname -s 2>&1`
479 case "$system_name" in
480 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS
)
488 [cC
][yY
][gG
][wW
][iI
][nN
]*)
498 system_name
="$system_name-UNKNOWN"
503 # host's CPU/instruction set
504 host_arch
=`uname -p 2>&1`
506 i386|sparc|ppc|alpha|arm|mips|vax
)
508 powerpc
) # Darwin returns 'powerpc'
511 *) # uname -p on Linux returns 'unknown' for the processor type,
512 # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
514 # Maybe uname -m (machine hardware name) returns something we
517 # x86/x86pc is used by QNX
518 case "`uname -m 2>&1`" in
519 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
;;
520 ia64
) host_arch
=ia64
;;
522 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
523 -z "`echo $CFLAGS | grep -- -m32`" ]; then
529 macppc|ppc|ppc64
) host_arch
=ppc
;;
530 alpha
) host_arch
=alpha
;;
531 sparc
) host_arch
=sparc
;;
532 sparc64
) host_arch
=sparc64
;;
533 parisc
*|hppa
*|
9000*) host_arch
=hppa
;;
534 arm
*) host_arch
=arm
;;
535 s390
) host_arch
=s390
;;
536 s390x
) host_arch
=s390x
;;
537 mips
*) host_arch
=mips
;;
538 vax
) host_arch
=vax
;;
539 *) host_arch
=UNKNOWN
;;
544 system_name
=`echo $_target | cut -d '-' -f 2`
545 case "`echo $system_name | tr A-Z a-z`" in
546 linux
) system_name
=Linux
;;
547 freebsd
) system_name
=FreeBSD
;;
548 netbsd
) system_name
=NetBSD
;;
549 bsd
/os
) system_name
=BSD
/OS
;;
550 openbsd
) system_name
=OpenBSD
;;
551 sunos
) system_name
=SunOS
;;
552 qnx
) system_name
=QNX
;;
553 morphos
) system_name
=MorphOS
;;
554 mingw32msvc
) system_name
=MINGW32
;;
556 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
557 host_arch
=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
560 echo "Detected operating system: $system_name"
561 echo "Detected host architecture: $host_arch"
563 # LGB: temporary files
564 for I
in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
568 TMPLOG
="configure.log"
570 TMPC
="$I/mplayer-conf-$RANDOM-$$.c"
571 TMPCPP
="$I/mplayer-conf-$RANDOM-$$.cpp"
572 TMPO
="$I/mplayer-conf-$RANDOM-$$.o"
573 TMPS
="$I/mplayer-conf-$RANDOM-$$.S"
577 # FIXME: A lot of stuff is installed under /usr/local
578 # NK: But we should never use this stuff implicitly since we call compiler
579 # from /usr we should be sure that there no effects from other compilers
580 # (libraries) which might be installed into /usr/local. Let users use this
581 # stuff explicitly as command line argument. In other words: It would be
582 # resonable to have only /usr/include or only /usr/local/include.
585 _ld_extra
="$_ld_extra -L/usr/local/lib"
586 _inc_extra
="$_inc_extra -I/usr/local/include"
590 for I
in `echo $_ld_extra | sed 's/-L//g'` ; do
591 tmp
="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
601 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
602 # if used as 'head -1' instead of 'head -n 1', but older versions don't
604 if test "`(echo line1 ; echo line2) | head -1 2>/dev/null`" = "line1" ; then
605 _head
() { head -$1 2>/dev
/null
; }
607 _head
() { head -n $1 2>/dev
/null
; }
609 if test "`(echo line1 ; echo line2) | tail -1 2>/dev/null`" = "line2" ; then
610 _tail
() { tail -$1 2>/dev
/null
; }
612 _tail
() { tail -n $1 2>/dev
/null
; }
615 # Checking CC version...
616 if test "$_skip_cc_check" != yes ; then
617 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
618 if test "`basename $_cc`" = "icc" ||
test "`basename $_cc`" = "ecc"; then
619 echocheck
"$_cc version"
621 cc_name
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
622 cc_version
=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
623 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
624 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
625 # TODO verify older icc/ecc compatibility
628 cc_version
="v. ?.??, bad"
632 cc_version
="$cc_version, ok"
636 cc_version
="$cc_version, bad"
640 echores
"$cc_version"
642 for _cc
in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc
; do
643 echocheck
"$_cc version"
645 cc_name
=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
646 cc_version
=`$_cc -dumpversion 2>&1`
647 if test "$?" -gt 0; then
648 cc_version
="not found"
652 cc_version
="v. ?.??, bad"
655 2.95.
[2-9]|
2.95.
[2-9][-.
]*|
[3-4].
*)
656 _cc_major
=`echo $cc_version | cut -d '.' -f 1`
657 _cc_minor
=`echo $cc_version | cut -d '.' -f 2`
658 _cc_mini
=`echo $cc_version | cut -d '.' -f 3`
659 cc_version
="$cc_version, ok"
666 cc_version
="$cc_version, bad"
670 echores
"$cc_version"
671 test "$cc_verc_fail" = "no" && break
674 if test "$cc_verc_fail" = yes ; then
677 *** Please downgrade/upgrade C compiler to version gcc-2.95.x or gcc-3.x! ***
679 You are not using a supported compiler. We do not have the time to make sure
680 everything works with compilers other than the ones we use. Use either the
681 same compiler as we do, or use --disable-gcc-checking but DO *NOT* REPORT BUGS
682 unless you can reproduce them after recompiling with a 2.95.x or 3.x version!
684 Note for gcc 2.96 users: Some versions of this compiler are known to miscompile
685 mplayer and lame (which is used for mencoder). If you get compile errors,
686 first upgrade to the latest 2.96 release (minimum 2.96-85) and try again.
687 If the problem still exists, try with gcc 3.x (or 2.95.x) *BEFORE* reporting
690 GCC 2.96 IS NOT AND WILL NOT BE SUPPORTED BY US !
692 *** For details please read DOCS/HTML/en/users-vs-dev.html ***
695 die
"Bad gcc version"
700 ******************************************************************************
702 Hmm. You really want to compile MPlayer with an *UNSUPPORTED* C compiler?
703 Ok. You know. Do it. Did you read DOCS/HTML/en/users-vs-dev.html???
705 DO NOT SEND BUGREPORTS OR COMPLAIN, it's *YOUR* compiler's fault!
706 Get ready for mysterious crashes, no-picture bugs, strange noises... REALLY!
707 Lame which is used by mencoder produces weird errors, too.
709 If you have any problem, install a GCC 2.95.x or 3.x version and try again.
710 If the problem _still_ exists, then read DOCS/HTML/en/bugreports.html !
712 *** DO NOT SEND BUG REPORTS OR COMPLAIN it's *YOUR* compiler's fault! ***
714 ******************************************************************************
722 test "$_host_cc" || _host_cc
=$_cc
725 echocheck
"cross compilation"
726 if test $_cross_compile = auto
; then
728 int main() { return 0; }
731 cc_check
&& "$TMPO" && _cross_compile
=no
733 echores
$_cross_compile
735 if test $_cross_compile = yes; then
743 # now that we know what compiler should be used for compilation, try to find
744 # out which assembler is used by the $_cc compiler
745 if test "$_as" = auto
; then
746 _as
=`$_cc -print-prog-name=as`
747 test -z "$_as" && _as
=as
750 # XXX: this should be ok..
752 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs
753 # FIXME: Remove the cygwin check once AMD CPUs are supported
754 if test -r /proc
/cpuinfo
&& not cygwin
; then
755 # Linux with /proc mounted, extract CPU information from it
756 _cpuinfo
="cat /proc/cpuinfo"
757 elif test -r /compat
/linux
/proc
/cpuinfo
&& not x86
; then
758 # FreeBSD with Linux emulation /proc mounted,
759 # extract CPU information from it
760 _cpuinfo
="cat /compat/linux/proc/cpuinfo"
762 # use hostinfo on Darwin
765 # all other OSes try to extract CPU information from a small helper
766 # program TOOLS/cpuinfo instead
767 $_cc -o TOOLS
/cpuinfo TOOLS
/cpuinfo.c
768 _cpuinfo
="TOOLS/cpuinfo"
773 pparam
=`$_cpuinfo | grep 'features' | cut -d ':' -f 2 | _head 1`
774 if test -z "$pparam" ; then
775 pparam
=`$_cpuinfo | grep 'flags' | cut -d ':' -f 2 | _head 1`
786 for i
in $pparam ; do
789 3dnowext
) _3dnow
=yes _3dnowex
=yes ;;
792 mtrr|k6_mtrr|cyrix_arr
) _mtrr
=yes ;;
793 xmm|sse|kni
) _sse
=yes _mmx2
=yes ;;
800 i
[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium
*|athlon
*|i586-i686
)
801 _def_arch
="#define ARCH_X86 1"
802 _target_arch
="TARGET_ARCH_X86 = yes"
804 pname
=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
805 pvendor
=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
806 pfamily
=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
807 pmodel
=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
808 pstepping
=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
812 echocheck
"CPU vendor"
813 echores
"$pvendor ($pfamily:$pmodel:$pstepping)"
821 3) proc
=i386 iproc
=386 ;;
822 4) proc
=i486 iproc
=486 ;;
823 5) iproc
=586 # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3
824 # K6 model 13 are the K6-2+ and K6-III+, only differing in cache size.
825 if test "$pmodel" -eq 9 -o "$pmodel" -eq 13; then
827 elif test "$pmodel" -ge 8; then
829 elif test "$pmodel" -ge 6; then
837 if test "$pmodel" -ge 7; then
839 elif test "$pmodel" -ge 6; then
840 # only Athlon XP supports ssem MP, Duron etc not
841 # but most of them are CPUID 666, so check if sse detected
842 # btw. there is also athlon-mp opt, but we need extended
843 # CPUID to detect if CPU is SMP capable -> athlon-mp ::atmos
844 if test "$_sse" = yes && test "$pstepping" -ge 2; then
849 elif test "$pmodel" -ge 4; then
852 proc
=athlon
# TODO: should the Duron Spitfire be considered a Thunderbird instead?
856 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
857 # caught and remedied in the optimization tests below.
861 *) proc
=athlon-xp iproc
=686 ;;
866 3) proc
=i386 iproc
=386 ;;
867 4) proc
=i486 iproc
=486 ;;
869 if test "$pmodel" -eq 4 ||
test "$pmodel" -eq 8; then
870 proc
=pentium-mmx
# 4 is desktop, 8 is mobile
876 if test "$pmodel" -ge 7; then
878 elif test "$pmodel" -ge 3; then
884 15) proc
=pentium4 iproc
=686 ;;
885 *) proc
=pentium4 iproc
=686 ;;
891 if test "$pmodel" -ge 8; then
893 elif test "$pmodel" -ge 4; then
900 # VIA C3 has SSE, but doesn't have MMX2
901 # workaround for SSE => MMX2 implication above
903 if test "$pmodel" -ge 9; then
909 *) proc
=i686 iproc
=i686
;;
914 3) proc
=i386 iproc
=386 ;;
915 4) proc
=i486 iproc
=486 ;;
916 *) proc
=i586 iproc
=586 ;;
920 proc
=i586 iproc
=586 ;;
923 # check that gcc supports our CPU, if not, fall back to earlier ones
924 # LGB: check -mcpu and -march swithing step by step with enabling
925 # to fall back till 386.
927 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
929 if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] ||
( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
935 echocheck
"GCC & CPU optimization abilities"
937 int main(void) { return 0; }
939 if test "$_runtime_cpudetection" = no
; then
940 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
941 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
943 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ||
test "$proc" = "athlon-tbird"; then
944 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon
946 if test "$proc" = "k6-3" ||
test "$proc" = "k6-2"; then
947 cc_check
-march=$proc $cpuopt=$proc || proc
=k6
949 if test "$proc" = "k6"; then
950 if not cc_check
-march=$proc $cpuopt=$proc; then
951 if cc_check
-march=i586
$cpuopt=i686
; then
958 if test "$proc" = "pentium4" ||
test "$proc" = "pentium3" ||
test "$proc" = "pentium2" ||
test "$proc" = "athlon" ||
test "$proc" = "c3-2"; then
959 cc_check
-march=$proc $cpuopt=$proc || proc
=i686
961 if test "$proc" = "i686" ||
test "$proc" = "pentium-mmx" ||
test "$proc" = "winchip-c6" ||
test "$proc" = "winchip2"; then
962 cc_check
-march=$proc $cpuopt=$proc || proc
=i586
964 if test "$proc" = "i586" ||
test "$proc" = "c3" ; then
965 cc_check
-march=$proc $cpuopt=$proc || proc
=i486
967 if test "$proc" = "i486" ; then
968 cc_check
-march=$proc $cpuopt=$proc || proc
=i386
970 if test "$proc" = "i386" ; then
971 cc_check
-march=$proc $cpuopt=$proc || proc
=error
973 if test "$proc" = "error" ; then
974 echores
"Your $_cc does not even support \"i386\" for '-march' and '$cpuopt'."
978 elif test "$proc" = "i586-i686"; then
983 _march
="-march=$proc"
984 _mcpu
="$cpuopt=$proc"
988 # i686 is probably the most common CPU - optimize for it
990 # at least i486 required, for bswap instruction
992 cc_check
$_mcpu || _mcpu
=""
993 cc_check
$_march $_mcpu || _march
=""
996 ## Gabucino : --target takes effect here (hopefully...) by overwriting
997 ## autodetected mcpu/march parameters
998 if test "$_target" ; then
999 # TODO: it may be a good idea to check GCC and fall back in all cases
1000 if test "$host_arch" = "i586-i686"; then
1001 _march
="-march=i586"
1002 _mcpu
="$cpuopt=i686"
1004 _march
="-march=$host_arch"
1005 _mcpu
="$cpuopt=$host_arch"
1013 i586|k5|k6|k6-2|k6-3|pentium|pentium-mmx
) iproc
=586 ;;
1014 i686|athlon
*|pentium
*) iproc
=686 ;;
1023 _def_arch
='#define ARCH_IA64 1'
1024 _target_arch
='TARGET_ARCH_IA64 = yes'
1033 _def_arch
='#define ARCH_X86_64 1'
1034 _target_arch
='TARGET_ARCH_X86_64 = yes'
1037 # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
1038 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
1043 # k8 cpu-type only supported in gcc >= 3.4.0, but that will be
1044 # caught and remedied in the optimization tests below.
1047 echocheck
"GCC & CPU optimization abilities"
1049 int main(void) { return 0; }
1051 # This is a stripped-down version of the i386 fallback.
1052 if test "$_runtime_cpudetection" = no
; then
1053 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
1054 cc_check
-march=$proc $cpuopt=$proc || proc
=athlon-xp
1056 # This will fail if gcc version < 3.3, which is ok because earlier
1057 # versions don't really support 64-bit on amd64.
1058 # Is this a valid assumption? -Corey
1059 if test "$proc" = "athlon-xp" ||
test "$proc" = "athlon-4" ; then
1060 cc_check
-march=$proc $cpuopt=$proc || proc
=error
1062 _march
="-march=$proc"
1063 _mcpu
="$cpuopt=$proc"
1064 if test "$proc" = "error" ; then
1065 echores
"Your $_cc does not even support \"athlon-xp\" for '-march' and '$cpuopt'."
1082 _def_arch
='#define ARCH_SPARC 1'
1083 _target_arch
='TARGET_ARCH_SPARC = yes'
1086 echocheck
"CPU type"
1088 case "`echo $karch`" in
1093 sun4u
) proc
=v9 _vis
='yes' _def_vis
='#define HAVE_VIS = yes' ;;
1106 _def_arch
='#define ARCH_SPARC 1'
1107 _target_arch
='TARGET_ARCH_SPARC = yes'
1109 _def_vis
='#define HAVE_VIS = yes'
1117 arm|armv4l|armv5tel
)
1118 _def_arch
='#define ARCH_ARMV4L 1'
1119 _target_arch
='TARGET_ARCH_ARMV4L = yes'
1128 _def_arch
='#define ARCH_POWERPC 1'
1129 _def_dcbzl
='#define NO_DCBZL 1'
1130 _target_arch
='TARGET_ARCH_POWERPC = yes'
1138 echocheck
"CPU type"
1139 if linux
&& test -n "$_cpuinfo"; then
1140 proc
=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | _head 1`
1141 if test -n "`$_cpuinfo | grep altivec`"; then
1146 proc
=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'`
1147 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
1149 elif [ "`sysctl -n hw.optional.altivec 2>/dev/null`" = 1 ]; then
1153 # only gcc 3.4 works reliably with altivec code under netbsd
1156 2*|
3.0*|
3.1*|
3.2*|
3.3*)
1159 if [ `sysctl -n machdep.altivec` -eq 1 ]; then
1165 if test "$_altivec" = yes; then
1166 echores
"$proc altivec"
1171 echocheck
"GCC & CPU optimization abilities"
1173 if test -n "$proc"; then
1175 601) _march
='-mcpu=601' _mcpu
='-mtune=601' ;;
1176 603) _march
='-mcpu=603' _mcpu
='-mtune=603' ;;
1177 603e|
603ev
) _march
='-mcpu=603e' _mcpu
='-mtune=603e' ;;
1178 604|
604e|
604r|
604ev
) _march
='-mcpu=604' _mcpu
='-mtune=604' ;;
1179 740|
740/750|
745/755) _march
='-mcpu=740' _mcpu
='-mtune=740' ;;
1180 750|
750CX
) _march
='-mcpu=750' _mcpu
='-mtune=750' ;;
1183 # gcc 3.1(.1) and up supports 7400 and 7450
1184 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" ||
test "$_cc_major" -ge "4"; then
1186 7400*|
7410*) _march
='-mcpu=7400' _mcpu
='-mtune=7400' ;;
1187 7450*|
7455*) _march
='-mcpu=7450' _mcpu
='-mtune=7450' ;;
1191 # gcc 3.2 and up supports 970
1192 if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" ||
test "$_cc_major" -ge "4"; then
1194 970*) _march
='-mcpu=970' _mcpu
='-mtune=970'
1195 _def_dcbzl
='#undef NO_DCBZL' ;;
1201 if test -n "$_mcpu"; then
1202 _optimizing
=`echo $_mcpu | cut -c 8-`
1203 echores
"$_optimizing"
1211 _def_arch
='#define ARCH_ALPHA 1'
1212 _target_arch
='TARGET_ARCH_ALPHA = yes'
1216 echocheck
"CPU type"
1219 unsigned long ver, mask;
1220 asm ("implver %0" : "=r" (ver));
1221 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
1222 printf("%ld-%x\n", ver, ~mask);
1226 $_cc -o "$TMPO" "$TMPC"
1229 0-0) proc
="ev4"; cpu_understands_mvi
="0";;
1230 1-0) proc
="ev5"; cpu_understands_mvi
="0";;
1231 1-1) proc
="ev56"; cpu_understands_mvi
="0";;
1232 1-101) proc
="pca56"; cpu_understands_mvi
="1";;
1233 2-303) proc
="ev6"; cpu_understands_mvi
="1";;
1234 2-307) proc
="ev67"; cpu_understands_mvi
="1";;
1235 2-1307) proc
="ev68"; cpu_understands_mvi
="1";;
1239 echocheck
"GCC & CPU optimization abilities"
1240 if test "$proc" = "ev68" ; then
1241 cc_check
-mcpu=$proc || proc
=ev67
1243 if test "$proc" = "ev67" ; then
1244 cc_check
-mcpu=$proc || proc
=ev6
1251 echocheck
"MVI instruction support in GCC"
1252 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1253 _def_gcc_mvi_support
="#define CAN_COMPILE_ALPHA_MVI 1"
1256 _def_gcc_mvi_support
="#undef CAN_COMPILE_ALPHA_MVI"
1257 echores
"no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1262 _def_arch
='#define ARCH_SGI_MIPS 1'
1263 _target_arch
='TARGET_ARCH_SGI_MIPS = yes'
1271 echocheck
"CPU type"
1272 proc
=`hinv -c processor | grep CPU | cut -d " " -f3`
1273 case "`echo $proc`" in
1274 R3000
) _march
='-mips1' _mcpu
='-mtune=r2000' ;;
1275 R4000
) _march
='-mips3' _mcpu
='-mtune=r4000' ;;
1276 R4400
) _march
='-mips3' _mcpu
='-mtune=r4400' ;;
1277 R4600
) _march
='-mips3' _mcpu
='-mtune=r4600' ;;
1278 R5000
) _march
='-mips4' _mcpu
='-mtune=r5000' ;;
1279 R8000|R10000|R12000|R14000|R16000
) _march
='-mips4' _mcpu
='-mtune=r8000' ;;
1287 _def_arch
='#define ARCH_PA_RISC 1'
1288 _target_arch
='TARGET_ARCH_PA_RISC = yes'
1297 _def_arch
='#define ARCH_S390 1'
1298 _target_arch
='TARGET_ARCH_S390 = yes'
1307 _def_arch
='#define ARCH_S390X 1'
1308 _target_arch
='TARGET_ARCH_S390X = yes'
1317 _def_arch
='#define ARCH_VAX 1'
1318 _target_arch
='TARGET_ARCH_VAX = yes'
1327 echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
1328 echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
1329 die
"unsupported architecture $host_arch"
1333 if test "$_runtime_cpudetection" = yes ; then
1348 if x86
&& test "$_runtime_cpudetection" = no
; then
1350 if test "$1" = yes ; then
1351 echocheck
"kernel support of $2"
1354 void catch() { exit(1); }
1356 signal(SIGILL, catch);
1357 __asm__ __volatile__ ("$3":::"memory");return(0);
1361 if cc_check
&& tmp_run
; then
1363 _optimizing
="$_optimizing $2"
1367 echo "It seems that your kernel does not correctly support $2."
1368 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
1375 extcheck
$_mmx "mmx" "emms" || _mmx
=no
1376 extcheck
$_mmx2 "mmx2" "sfence" || _mmx2
=no
1377 extcheck
$_3dnow "3dnow" "femms" || _3dnow
=no
1378 extcheck
$_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex
=no
1379 extcheck
$_sse "sse" "xorps %%xmm0, %%xmm0" || _sse
=no _gcc3_ext
="$_gcc3_ext -mno-sse"
1380 extcheck
$_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2
=no _gcc3_ext
="$_gcc3_ext -mno-sse2"
1381 echocheck
"mtrr support"
1384 if test "$_mtrr" = yes ; then
1385 _optimizing
="$_optimizing mtrr"
1388 if test "$_gcc3_ext" != ""; then
1389 # if we had to disable sse/sse2 because the active kernel does not
1390 # support this instruction set extension, we also have to tell
1391 # gcc3 to not generate sse/sse2 instructions for normal C code
1393 int main(void) { return 0; }
1395 cc_check
$_march $_gcc3_ext && _march
="$_march $_gcc3_ext"
1400 echocheck
"assembler support of -pipe option"
1402 int main(void) { return 0; }
1404 cc_check
-pipe && _pipe
="-pipe" && echores
"yes" || echores
"no"
1406 _prefix
="/usr/local"
1407 _xvmclib
="XvMCNVIDIA"
1409 # GOTCHA: the variables below defines the default behavior for autodetection
1410 # and have - unless stated otherwise - at least 2 states : yes no
1411 # If autodetection is available then the third state is: auto
1416 _libavcodecs
=`grep 'register_avcodec(&[a-z]' libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
1423 _dga
=auto
# 1 2 no auto
1425 _xvmc
=no
#auto when complete
1459 _tremor_internal
=yes
1467 _matroska_internal
=yes
1474 # dvdnav disabled, it does not work
1539 _macosx_finder_support
=no
1542 _freetypeconfig
='freetype-config'
1544 _fribidiconfig
='fribidi-config'
1547 _gethostbyname2
=auto
1553 case "$ac_option" in
1559 --enable-gcc-checking) ;;
1560 --disable-gcc-checking) ;;
1561 --enable-static*) ;;
1562 --disable-static*) ;;
1563 --with-extraincdir=*) ;;
1564 --with-extralibdir=*) ;;
1565 --enable-runtime-cpudetection) ;;
1566 --disable-runtime-cpudetection) ;;
1567 --enable-cross-compile) ;;
1568 --disable-cross-compile) ;;
1569 --install-path=*) ;;
1570 --with-install=*) ;;
1573 --enable-mencoder) _mencoder
=yes ;;
1574 --disable-mencoder) _mencoder
=no
;;
1575 --enable-i18n) _i18n
=yes ;;
1576 --disable-i18n) _i18n
=no
;;
1577 --enable-dynamic-plugins) _dynamic_plugins
=yes ;;
1578 --disable-dynamic-plugins) _dynamic_plugins
=no
;;
1579 --enable-x11) _x11
=yes ;;
1580 --disable-x11) _x11
=no
;;
1581 --enable-xv) _xv
=yes ;;
1582 --disable-xv) _xv
=no
;;
1583 --enable-xvmc) _xvmc
=yes ;;
1584 --disable-xvmc) _xvmc
=no
;;
1585 --enable-sdl) _sdl
=yes ;;
1586 --disable-sdl) _sdl
=no
;;
1587 --enable-directx) _directx
=yes ;;
1588 --disable-directx) _directx
=no
;;
1589 --enable-win32waveout) _win32waveout
=yes ;;
1590 --disable-win32waveout) _win32waveout
=no
;;
1591 --enable-nas) _nas
=yes ;;
1592 --disable-nas) _nas
=no
;;
1593 --enable-png) _png
=yes ;;
1594 --disable-png) _png
=no
;;
1595 --enable-jpeg) _jpg
=yes ;;
1596 --disable-jpeg) _jpg
=no
;;
1597 --enable-pnm) _pnm
=yes ;;
1598 --disable-pnm) _pnm
=no
;;
1599 --enable-md5sum) _md5sum
=yes ;;
1600 --disable-md5sum) _md5sum
=no
;;
1601 --enable-gif) _gif
=yes ;;
1602 --disable-gif) _gif
=no
;;
1603 --enable-gl) _gl
=yes ;;
1604 --disable-gl) _gl
=no
;;
1605 --enable-ggi) _ggi
=yes ;;
1606 --disable-ggi) _ggi
=no
;;
1607 --enable-ggiwmh) _ggiwmh
=yes ;;
1608 --disable-ggiwmh) _ggiwmh
=no
;;
1609 --enable-aa) _aa
=yes ;;
1610 --disable-aa) _aa
=no
;;
1611 --enable-caca) _caca
=yes ;;
1612 --disable-caca) _caca
=no
;;
1613 --enable-svga) _svga
=yes ;;
1614 --disable-svga) _svga
=no
;;
1615 --enable-vesa) _vesa
=yes ;;
1616 --disable-vesa) _vesa
=no
;;
1617 --enable-fbdev) _fbdev
=yes ;;
1618 --disable-fbdev) _fbdev
=no
;;
1619 --enable-dvb) _dvb
=yes ;;
1620 --disable-dvb) _dvb
=no
;;
1621 --enable-dvbhead) _dvbhead
=yes ;;
1622 --disable-dvbhead) _dvbhead
=no
;;
1623 --enable-dxr2) _dxr2
=yes ;;
1624 --disable-dxr2) _dxr2
=no
;;
1625 --enable-dxr3) _dxr3
=yes ;;
1626 --disable-dxr3) _dxr3
=no
;;
1627 --enable-iconv) _iconv
=yes ;;
1628 --disable-iconv) _iconv
=no
;;
1629 --enable-langinfo) _langinfo
=yes ;;
1630 --disable-langinfo) _langinfo
=no
;;
1631 --enable-rtc) _rtc
=yes ;;
1632 --disable-rtc) _rtc
=no
;;
1633 --enable-mp1e) _mp1e
=yes ;;
1634 --disable-mp1e) _mp1e
=no
;;
1635 --enable-libdv) _libdv
=yes ;;
1636 --disable-libdv) _libdv
=no
;;
1637 --enable-ossaudio) _ossaudio
=yes ;;
1638 --disable-ossaudio) _ossaudio
=no
;;
1639 --enable-arts) _arts
=yes ;;
1640 --disable-arts) _arts
=no
;;
1641 --enable-esd) _esd
=yes ;;
1642 --disable-esd) _esd
=no
;;
1643 --enable-polyp) _polyp
=yes ;;
1644 --disable-polyp) _polyp
=no
;;
1645 --enable-jack) _jack
=yes ;;
1646 --disable-jack) _jack
=no
;;
1647 --enable-mad) _mad
=yes ;;
1648 --disable-mad) _mad
=no
;;
1649 --disable-toolame) _toolame
=no
;;
1650 --disable-twolame) _twolame
=no
;;
1651 --enable-liblzo) _liblzo
=yes ;;
1652 --disable-liblzo) _liblzo
=no
;;
1653 --enable-vorbis) _vorbis
=yes ;;
1654 --disable-vorbis) _vorbis
=no
;;
1655 --enable-internal-tremor) _tremor_internal
=yes ;;
1656 --disable-internal-tremor) _tremor_internal
=no
;;
1657 --enable-tremor-low) _tremor_low
=yes ;;
1658 --disable-tremor-low) _tremor_low
=no
;;
1659 --enable-external-tremor) _tremor
=yes ;;
1660 --disable-external-tremor) _tremor
=no
;;
1661 --enable-theora) _theora
=yes ;;
1662 --disable-theora) _theora
=no
;;
1663 --enable-mp3lib) _mp3lib
=yes ;;
1664 --disable-mp3lib) _mp3lib
=no
;;
1665 --enable-liba52) _liba52
=yes ;;
1666 --disable-liba52) _liba52
=no
;;
1667 --enable-libdts) _libdts
=yes ;;
1668 --disable-libdts) _libdts
=no
;;
1669 --enable-libmpeg2) _libmpeg2
=yes ;;
1670 --disable-libmpeg2) _libmpeg2
=no
;;
1671 --enable-musepack) _musepack
=yes ;;
1672 --disable-musepack) _musepack
=no
;;
1673 --enable-internal-matroska) _matroska_internal
=yes ;;
1674 --disable-internal-matroska) _matroska_internal
=no
;;
1675 --enable-internal-faad) _faad_internal
=yes _faad_external
=no
;;
1676 --disable-internal-faad) _faad_internal
=no
;;
1677 --enable-external-faad) _faad_external
=yes _faad_internal
=no
;;
1678 --disable-external-faad) _faad_external
=no
;;
1679 --enable-faac) _faac
=yes ;;
1680 --disable-faac) _faac
=no
;;
1681 --enable-ladspa) _ladspa
=yes ;;
1682 --disable-ladspa) _ladspa
=no
;;
1683 --enable-xmms) _xmms
=yes ;;
1684 --disable-xmms) _xmms
=no
;;
1685 --enable-dvdread) _dvdread
=yes ;;
1686 --disable-dvdread) _dvdread
=no
;;
1687 --enable-mpdvdkit) _dvdkit
=yes ;;
1688 --disable-mpdvdkit) _dvdkit
=no
;;
1689 # dvdnav disabled, it does not work
1690 # --enable-dvdnav) _dvdnav=yes ;;
1691 # --disable-dvdnav) _dvdnav=no ;;
1692 --enable-xanim) _xanim
=yes ;;
1693 --disable-xanim) _xanim
=no
;;
1694 --enable-real) _real
=yes ;;
1695 --disable-real) _real
=no
;;
1696 --enable-live) _live
=yes ;;
1697 --disable-live) _live
=no
;;
1698 --enable-xinerama) _xinerama
=yes ;;
1699 --disable-xinerama) _xinerama
=no
;;
1700 --enable-mga) _mga
=yes ;;
1701 --disable-mga) _mga
=no
;;
1702 --enable-xmga) _xmga
=yes ;;
1703 --disable-xmga) _xmga
=no
;;
1704 --enable-vm) _vm
=yes ;;
1705 --disable-vm) _vm
=no
;;
1706 --enable-xf86keysym) _xf86keysym
=yes ;;
1707 --disable-xf86keysym) _xf86keysym
=no
;;
1708 --enable-mlib) _mlib
=yes ;;
1709 --disable-mlib) _mlib
=no
;;
1710 --enable-sunaudio) _sunaudio
=yes ;;
1711 --disable-sunaudio) _sunaudio
=no
;;
1712 --enable-sgiaudio) _sgiaudio
=yes ;;
1713 --disable-sgiaudio) _sgiaudio
=no
;;
1714 --enable-alsa) _alsa
=yes ;;
1715 --disable-alsa) _alsa
=no
;;
1716 --enable-tv) _tv
=yes ;;
1717 --disable-tv) _tv
=no
;;
1718 --enable-edl) _edl
=yes ;;
1719 --disable-edl) _edl
=no
;;
1720 --enable-tv-bsdbt848) _tv_bsdbt848
=yes ;;
1721 --disable-tv-bsdbt848) _tv_bsdbt848
=no
;;
1722 --enable-tv-v4l) _tv_v4l
=yes ;;
1723 --disable-tv-v4l) _tv_v4l
=no
;;
1724 --enable-tv-v4l2) _tv_v4l2
=yes ;;
1725 --disable-tv-v4l2) _tv_v4l2
=no
;;
1726 --enable-fastmemcpy) _fastmemcpy
=yes ;;
1727 --disable-fastmemcpy) _fastmemcpy
=no
;;
1728 --enable-network) _network
=yes ;;
1729 --disable-network) _network
=no
;;
1730 --enable-winsock2) _winsock2
=yes ;;
1731 --disable-winsock2) _winsock2
=no
;;
1732 --enable-smb) _smbsupport
=yes ;;
1733 --disable-smb) _smbsupport
=no
;;
1734 --enable-vidix) _vidix
=yes ;;
1735 --disable-vidix) _vidix
=no
;;
1736 --enable-joystick) _joystick
=yes ;;
1737 --disable-joystick) _joystick
=no
;;
1738 --enable-xvid) _xvid
=yes ;;
1739 --disable-xvid) _xvid
=no
;;
1740 --enable-x264) _x264
=yes ;;
1741 --disable-x264) _x264
=no
;;
1742 --enable-divx4linux) _divx4linux
=yes ;;
1743 --disable-divx4linux) _divx4linux
=no
;;
1744 --enable-opendivx) _opendivx
=yes ;;
1745 --disable-opendivx) _opendivx
=no
;;
1746 --enable-libavcodec) _libavcodec
=yes ;;
1747 --disable-libavcodec) _libavcodec
=no
;;
1748 --enable-amr_nb) _amr_nb
=yes ;;
1749 --disable-amr_nb) _amr_nb
=no
;;
1750 --enable-amr_nb-fixed) _amr_nb_fixed
=yes ;;
1751 --disable-amr_nb-fixed) _amr_nb_fixed
=no
;;
1752 --enable-amr_wb) _amr_wb
=yes ;;
1753 --disable-amr_wb) _amr_wb
=no
;;
1754 --enable-codec=*) _libavcodecs
="$_libavcodecs `echo $ac_option | cut -d '=' -f 2`" ;;
1755 --disable-codec=*) _libavcodecs
=`echo $_libavcodecs | sed "s/\`echo $ac_option | cut
-d '=' -f 2\
`//g"` ;;
1756 --enable-libavformat) _libavformat
=yes;;
1757 --disable-libavformat) _libavformat
=no
;;
1758 --enable-libfame) _fame
=yes ;;
1759 --disable-libfame) _fame
=no
;;
1760 --enable-lirc) _lirc
=yes ;;
1761 --disable-lirc) _lirc
=no
;;
1762 --enable-lircc) _lircc
=yes ;;
1763 --disable-lircc) _lircc
=no
;;
1764 --enable-gui) _gui
=yes ;;
1765 --disable-gui) _gui
=no
;;
1766 --enable-old-gtk) _gtk1
=yes ;;
1767 --enable-termcap) _termcap
=yes ;;
1768 --disable-termcap) _termcap
=no
;;
1769 --enable-termios) _termios
=yes ;;
1770 --disable-termios) _termios
=no
;;
1771 --enable-3dfx) _3dfx
=yes ;;
1772 --disable-3dfx) _3dfx
=no
;;
1773 --enable-tdfxfb) _tdfxfb
=yes ;;
1774 --disable-tdfxvid) _tdfxvid
=no
;;
1775 --enable-tdfxvid) _tdfxvid
=yes ;;
1776 --disable-tga) _tga
=no
;;
1777 --enable-tga) _tga
=yes ;;
1778 --disable-tdfxfb) _tdfxfb
=no
;;
1779 --enable-directfb) _directfb
=yes ;;
1780 --disable-directfb) _directfb
=no
;;
1781 --enable-zr) _zr
=yes ;;
1782 --disable-zr) _zr
=no
;;
1783 --enable-bl) _bl
=yes ;;
1784 --disable-bl) _bl
=no
;;
1785 --enable-mtrr) _mtrr
=yes ;;
1786 --disable-mtrr) _mtrr
=no
;;
1787 --enable-largefiles) _largefiles
=yes ;;
1788 --disable-largefiles) _largefiles
=no
;;
1789 --enable-shm) _shm
=yes ;;
1790 --disable-shm) _shm
=no
;;
1791 --enable-select) _select
=yes ;;
1792 --disable-select) _select
=no
;;
1793 --enable-linux-devfs) _linux_devfs
=yes ;;
1794 --disable-linux-devfs) _linux_devfs
=no
;;
1795 --enable-cdparanoia) _cdparanoia
=yes ;;
1796 --disable-cdparanoia) _cdparanoia
=no
;;
1797 --enable-big-endian) _big_endian
=yes ;;
1798 --disable-big-endian) _big_endian
=no
;;
1799 --enable-freetype) _freetype
=yes ;;
1800 --disable-freetype) _freetype
=no
;;
1801 --enable-fontconfig) _fontconfig
=yes ;;
1802 --disable-fontconfig) _fontconfig
=no
;;
1803 --enable-unrarlib) _unrarlib
=yes ;;
1804 --disable-unrarlib) _unrarlib
=no
;;
1805 --enable-ftp) _ftp
=yes ;;
1806 --disable-ftp) _ftp
=no
;;
1807 --enable-vstream) _vstream
=yes ;;
1808 --disable-vstream) _vstream
=no
;;
1809 --enable-pthreads) _pthreads
=yes ;;
1810 --disable-pthreads) _pthreads
=no
;;
1812 --enable-fribidi) _fribidi
=yes ;;
1813 --disable-fribidi) _fribidi
=no
;;
1815 --enable-enca) _enca
=yes ;;
1816 --disable-enca) _enca
=no
;;
1818 --enable-inet6) _inet6
=yes ;;
1819 --disable-inet6) _inet6
=no
;;
1821 --enable-gethostbyname2) _gethostbyname2
=yes ;;
1822 --disable-gethostbyname2) _gethostbyname2
=no
;;
1824 --enable-dga) _dga
=auto
;; # as we don't know if it's 1 or 2
1825 --enable-dga=*) _dga
=`echo $ac_option | cut -d '=' -f 2` ;;
1826 --disable-dga) _dga
=no
;;
1828 --enable-menu) _menu
=yes ;;
1829 --disable-menu) _menu
=no
;;
1831 --enable-qtx) _qtx
=yes ;;
1832 --disable-qtx) _qtx
=no
;;
1834 --enable-macosx) _macosx
=yes ;;
1835 --disable-macosx) _macosx
=no
;;
1836 --enable-macosx-finder-support) _macosx_finder_support
=yes ;;
1837 --disable-macosx-finder-support) _macosx_finder_support
=no
;;
1838 --enable-macosx-bundle) _macosx_bundle
=yes;;
1839 --disable-macosx-bundle) _macosx_bundle
=no
;;
1841 --enable-sortsub) _sortsub
=yes ;;
1842 --disable-sortsub) _sortsub
=no
;;
1845 _charset
=`echo $ac_option | cut -d '=' -f 2`
1848 _language
=`echo $ac_option | cut -d '=' -f 2`
1850 # dvdnav disabled, it does not work
1851 # --with-libdvdnav=*)
1852 # _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
1857 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1858 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1859 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1861 --with-win32libdir=*)
1862 _win32libdir
=`echo $ac_option | cut -d '=' -f 2`
1865 --with-xanimlibdir=*)
1866 _xanimlibdir
=`echo $ac_option | cut -d '=' -f 2`
1869 --with-reallibdir=*)
1870 _reallibdir
=`echo $ac_option | cut -d '=' -f 2`
1873 --with-livelibdir=*)
1874 _livelibdir
=`echo $ac_option | cut -d '=' -f 2`
1876 --with-toolamedir=*)
1877 _toolamedir
=`echo $ac_option | cut -d '=' -f 2`
1880 _mlibdir
=`echo $ac_option | cut -d '=' -f 2`
1884 --with-xmmslibdir=*)
1885 _xmmslibdir
=`echo $ac_option | cut -d '=' -f 2`
1888 --with-xmmsplugindir=*)
1889 _xmmsplugindir
=`echo $ac_option | cut -d '=' -f 2`
1902 _debug
=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2`
1907 --enable-crash-debug)
1910 --disable-crash-debug)
1913 --enable-sighandler)
1916 --disable-sighandler)
1920 --enable-sse) _sse
=yes ;;
1921 --disable-sse) _sse
=no
;;
1922 --enable-sse2) _sse2
=yes ;;
1923 --disable-sse2) _sse2
=no
;;
1924 --enable-mmx2) _mmx2
=yes ;;
1925 --disable-mmx2) _mmx2
=no
;;
1926 --enable-3dnow) _3dnow
=yes ;;
1927 --disable-3dnow) _3dnow
=no _3dnowex
=no
;;
1928 --enable-3dnowex) _3dnow
=yes _3dnowex
=yes ;;
1929 --disable-3dnowex) _3dnowex
=no
;;
1930 --enable-altivec) _altivec
=yes ;;
1931 --disable-altivec) _altivec
=no
;;
1932 --enable-mmx) _mmx
=yes ;;
1933 --disable-mmx) # 3Dnow! and MMX2 require MMX
1934 _3dnow
=no _3dnowex
=no _mmx
=no _mmx2
=no
;;
1936 --enable-win32) _win32
=yes ;;
1937 --disable-win32) _win32
=no _dshow
=no
;;
1938 --enable-dshow) _win32
=yes _dshow
=yes ;;
1939 --disable-dshow) _dshow
=no
;;
1942 _inc_x11
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1945 _x11_paths
=`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1947 --with-dxr2incdir=*)
1948 _inc_dxr2
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1951 _xvmclib
=`echo $ac_option | cut -d '=' -f 2`
1954 _inc_dvb
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1956 --with-xvidlibdir=*)
1957 _ld_xvid
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1959 --with-xvidincdir=*)
1960 _inc_xvid
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1963 _ld_libdts
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1966 _inc_libdts
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1968 --with-x264libdir=*)
1969 _ld_x264
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1971 --with-x264incdir=*)
1972 _inc_x264
=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
1974 --with-sdl-config=*)
1975 _sdlconfig
=`echo $ac_option | cut -d '=' -f 2`
1977 --with-freetype-config=*)
1978 _freetypeconfig
=`echo $ac_option | cut -d '=' -f 2`
1980 --with-fribidi-config=*)
1981 _fribidiconfig
=`echo $ac_option | cut -d '=' -f 2`
1983 --with-gtk-config=*)
1984 _gtkconfig
=`echo $ac_option | cut -d '=' -f 2`
1986 --with-glib-config=*)
1987 _glibconfig
=`echo $ac_option | cut -d '=' -f 2`
1989 # dvdnav disabled, it does not work
1990 # --with-dvdnav-config=*)
1991 # _dvdnavconfig=`echo $ac_option | cut -d '=' -f 2`
1994 _ld_mad
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
1996 --with-cdparanoiaincdir=*)
1997 _inc_cdparanoia
=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
1999 --with-cdparanoialibdir=*)
2000 _ld_cdparanoia
=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
2002 --with-termcaplib=*)
2003 _ld_termcap
=-l`echo $ac_option | cut -d '=' -f 2`
2007 _prefix
=`echo $ac_option | cut -d '=' -f 2`
2010 _bindir
=`echo $ac_option | cut -d '=' -f 2`
2013 _datadir
=`echo $ac_option | cut -d '=' -f 2`
2016 _mandir
=`echo $ac_option | cut -d '=' -f 2`
2019 _confdir
=`echo $ac_option | cut -d '=' -f 2`
2022 _libdir
=`echo $ac_option | cut -d '=' -f 2`
2026 echo "Unknown parameter: $ac_option"
2033 # Atmos: moved this here, to be correct, if --prefix is specified
2034 test -z "$_bindir" && _bindir
="$_prefix/bin"
2035 test -z "$_datadir" && _datadir
="$_prefix/share/mplayer"
2036 test -z "$_mandir" && _mandir
="$_prefix/man"
2037 test -z "$_confdir" && _confdir
="$_prefix/etc/mplayer"
2038 test -z "$_libdir" && _libdir
="$_prefix/lib"
2039 test -z "$_mlibdir" && _mlibdir
="$MLIBHOME"
2042 # Checking assembler (_as) compatibility...
2043 # Added workaround for older as that reads from stdin by default - atmos
2044 as_version
=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'`
2045 echocheck
"assembler ($_as $as_version)"
2047 _pref_as_version
='2.9.1'
2049 if test "$_mmx" = yes ; then
2050 echo 'emms' >> $TMPS
2052 if test "$_3dnow" = yes ; then
2053 _pref_as_version
='2.10.1'
2054 echo 'femms' >> $TMPS
2056 if test "$_3dnowex" = yes ; then
2057 _pref_as_version
='2.10.1'
2058 echo 'pswapd %mm0, %mm0' >> $TMPS
2060 if test "$_mmx2" = yes ; then
2061 _pref_as_version
='2.10.1'
2062 echo 'movntq %mm0, (%eax)' >> $TMPS
2064 if test "$_sse" = yes ; then
2065 _pref_as_version
='2.10.1'
2066 echo 'xorps %xmm0, %xmm0' >> $TMPS
2068 #if test "$_sse2" = yes ; then
2069 # _pref_as_version='2.11'
2070 # echo 'xorpd %xmm0, %xmm0' >> $TMPS
2072 $_as $TMPS -o $TMPO > /dev
/null
2>&1 || as_verc_fail
=yes
2074 if test "$as_verc_fail" != yes ; then
2078 echo "Upgrade binutils to ${_pref_as_version} ..."
2079 die
"obsolete binutils version"
2085 # check if altivec is supported by the compiler, and how to enable it
2087 _altivec_gcc_flags
=''
2089 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2090 echocheck
"GCC altivec support"
2098 FSF_flags
='-maltivec -mabi=altivec'
2099 Darwin_flags
='-faltivec -D__APPLE_ALTIVEC__'
2101 # check for Darwin-style flags first, since
2102 # gcc-3.3 (August Update from Apple) on MacOS 10.2.8
2103 # accepts but ignores FSF-style flags...
2105 if test -z "$p"; then
2106 cc_check
$Darwin_flags && p
='Darwin'
2108 if test -z "$p"; then
2109 cc_check
$FSF_flags && p
='FSF'
2113 FSF
) _altivec_gcc_flags
="$FSF_flags" _altivec
=yes ;;
2114 Darwin
) _altivec_gcc_flags
="$Darwin_flags" _altivec
=yes ;;
2118 if test -z "$p"; then
2121 p
="$p-style ($_altivec_gcc_flags)"
2127 # check if <altivec.h> should be included
2129 _def_altivec_h
='#undef HAVE_ALTIVEC_H'
2131 if test "$_altivec" = yes ; then
2132 echocheck
"altivec.h"
2134 #include <altivec.h>
2135 int main(void) { return 0; }
2138 cc_check
$_altivec_gcc_flags && _have_altivec_h
=yes
2139 if test "$_have_altivec_h" = yes ; then
2140 _def_altivec_h
='#define HAVE_ALTIVEC_H 1'
2142 echores
"$_have_altivec_h"
2145 # disable runtime cpudetection if
2146 # - we cannot generate altivec code
2147 # - altivec is disabled by the user
2149 if test "$_runtime_cpudetection" = yes -a "$_altivec" = no
; then
2150 _runtime_cpudetection
=no
2153 # show that we are optimizing for altivec (if enabled and supported)
2155 if test "$_runtime_cpudetection" = no
-a "$_altivec" = yes ; then
2156 _optimizing
="$_optimizing altivec"
2159 # if altivec is enabled, make sure the correct flags turn up in CFLAGS
2161 if test "$_altivec" = yes ; then
2162 _mcpu
="$_mcpu $_altivec_gcc_flags"
2165 # setup _def_altivec correctly
2167 if test "$_altivec" = yes ; then
2168 _def_altivec
='#define HAVE_ALTIVEC 1'
2170 _def_altivec
='#undef HAVE_ALTIVEC'
2174 _def_mmx
='#undef HAVE_MMX'
2175 test "$_mmx" = yes && _def_mmx
='#define HAVE_MMX 1'
2176 _def_mmx2
='#undef HAVE_MMX2'
2177 test "$_mmx2" = yes && _def_mmx2
='#define HAVE_MMX2 1'
2178 _def_3dnow
='#undef HAVE_3DNOW'
2179 test "$_3dnow" = yes && _def_3dnow
='#define HAVE_3DNOW 1'
2180 _def_3dnowex
='#undef HAVE_3DNOWEX'
2181 test "$_3dnowex" = yes && _def_3dnowex
='#define HAVE_3DNOWEX 1'
2182 _def_sse
='#undef HAVE_SSE'
2183 test "$_sse" = yes && _def_sse
='#define HAVE_SSE 1'
2184 _def_sse2
='#undef HAVE_SSE2'
2185 test "$_sse2" = yes && _def_sse2
='#define HAVE_SSE2 1'
2187 # Checking kernel version...
2188 if x86
&& linux
; then
2190 kernel_version
=`uname -r 2>&1`
2191 echocheck
"$system_name kernel version"
2192 case "$kernel_version" in
2193 '') kernel_version
="?.??"; _k_verc_fail
=yes;;
2194 [0-1].
[0-9].
[0-9]*|
2.
[0-3].
[0-9]*)
2195 _k_verc_problem
=yes;;
2197 if test "$_k_verc_problem" = yes && test "$_sse" = yes ; then
2200 if test "$_k_verc_fail" ; then
2201 echores
"$kernel_version, fail"
2202 echo "WARNING! If you want to run MPlayer on this system, get prepared for problems!"
2203 echo "2.2.x has limited SSE support. Upgrade the kernel or use --disable-sse if you"
2204 echo "experience crashes. MPlayer tries to autodetect if your kernel correctly"
2205 echo "supports SSE, but you have been warned! If you are using a kernel older than"
2206 echo "2.2.x you must upgrade it to get SSE support!"
2207 # die "Your kernel is too old for this CPU." # works fine on some 2.2.x so don't die (later check will test)
2209 echores
"$kernel_version, ok"
2213 if test "$_vidix" = auto
; then
2215 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
2217 x86_64
&& _vidix
=yes
2218 ppc
&& linux
&& _vidix
=yes
2219 alpha
&& linux
&& _vidix
=yes
2225 echocheck
"mplayer binary name"
2228 _prg_mencoder
="mencoder.exe"
2231 _prg_mencoder
="mencoder"
2236 # On QNX we must link to libph - Gabucino
2238 _ld_arch
="$_ld_arch -lph"
2241 # checking for a working awk, I'm using mawk first, because it's fastest - atmos
2243 if test "$_vidix" = yes ; then
2246 for _awk
in mawk gawk nawk
awk; do
2247 if ( $_awk 'BEGIN{testme();}function testme(){print"";}' ) >> "$TMPLOG" 2>&1; then
2252 test "$_awk_verc_fail" = yes && _awk
=no
2254 if test "$_awk_verc_fail" = yes; then
2255 echo "VIDIX needs awk, but no working implementation was found!"
2256 echo "Try the GNU version, which can be downloaded from:"
2257 echo "ftp://ftp.gnu.org/gnu/gawk/"
2258 echo "If you don't need VIDIX, you can use configure --disable-vidix instead."
2263 # If IRIX we must use ar instead of ranlib (not present on IRIX systems)
2270 ######################
2271 # MAIN TESTS GO HERE #
2272 ######################
2275 echocheck
"extra headers"
2276 if test "$_inc_extra" ; then
2277 echores
"$_inc_extra"
2283 echocheck
"extra libs"
2284 if test "$_ld_extra" ; then
2285 echores
"$_ld_extra"
2292 int main(void) { return 0; }
2294 if cc_check
-lposix ; then
2295 _ld_arch
="$_ld_arch -lposix"
2303 int main(void) { return 0; }
2305 if cc_check
-lm ; then
2313 # Checking for localization ...
2314 # CSAK EGY MARADHAT - A HEGYLAKO
2316 if test "$_i18n" != no
; then
2318 #include <libintl.h>
2319 int main(void) { gettext("test"); return 0; }
2323 if test "$_i18n" = auto
; then
2324 cc_check
&& _i18n
=yes
2326 for i18n_lib
in "" "-lintl"; do
2327 cc_check
$i18n_lib && _i18n
=yes && _i18n_libs
=$i18n_lib && break
2331 if test "$_i18n" = yes ; then
2332 _def_i18n
='#define USE_I18N 1'
2334 _def_i18n
='#undef USE_I18N'
2336 if test "$_i18n_libs" ; then
2337 _res_comment
="using $_i18n_libs"
2342 echocheck
"langinfo"
2343 if test "$_langinfo" = auto
; then
2345 #include <langinfo.h>
2346 int main(void) { nl_langinfo(CODESET); return 0; }
2349 cc_check
&& _langinfo
=yes
2351 if test "$_langinfo" = yes ; then
2352 _def_langinfo
='#define USE_LANGINFO 1'
2354 _def_langinfo
='#undef USE_LANGINFO'
2356 echores
"$_langinfo"
2359 echocheck
"language"
2360 test -z "$_language" && _language
=$LINGUAS
2361 _language
=`echo $_language | sed 's/,/ /g'`
2362 echo $_language |
grep all
> /dev
/null || LANGUAGES
="$_language en"
2363 for lang
in $_language ; do
2364 test "$lang" = all
&& lang
=en
2365 if test -f "help/help_mp-${lang}.h" ; then
2369 echo -n "$lang not found, "
2370 _language
=`echo $_language | sed "s/$lang *//"`
2373 test -z "$_language" && _language
=en
2374 _mp_help
="help/help_mp-${_language}.h"
2375 test -f $_mp_help || die
"$_mp_help not found"
2376 for lang
in $LANGUAGES ; do
2377 if test -f "DOCS/man/$lang/mplayer.1" ; then
2378 MAN_LANG
="$MAN_LANG $lang"
2381 _doc_lang
=$_language
2382 test -d DOCS
/xml
/$_doc_lang || _doc_lang
=en
2383 echores
"using $_language (man pages: $MAN_LANG)"
2386 echocheck
"enable sighandler"
2387 if test "$_sighandler" = yes ; then
2388 _def_sighandler
='#define ENABLE_SIGHANDLER 1'
2390 _def_sighandler
='#undef ENABLE_SIGHANDLER'
2392 echores
"$_sighandler"
2394 echocheck
"runtime cpudetection"
2395 if test "$_runtime_cpudetection" = yes ; then
2396 _optimizing
="Runtime CPU-Detection enabled"
2397 _def_runtime_cpudetection
='#define RUNTIME_CPUDETECT 1'
2399 _def_runtime_cpudetection
='#undef RUNTIME_CPUDETECT'
2401 echores
"$_runtime_cpudetection"
2404 echocheck
"restrict keyword"
2405 for restrict_keyword
in restrict __restrict __restrict__
; do
2406 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC
2408 _def_restrict_keyword
=$restrict_keyword
2412 if [ -n "$_def_restrict_keyword" ]; then
2413 echores
"$_def_restrict_keyword"
2417 # Avoid infinite recursion loop ("#define restrict restrict")
2418 if [ "$_def_restrict_keyword" != "restrict" ]; then
2419 _def_restrict_keyword
="#define restrict $_def_restrict_keyword"
2421 _def_restrict_keyword
=""
2425 echocheck
"__builtin_expect"
2426 # GCC branch prediction hint
2429 a = __builtin_expect (a, 10);
2430 return a == 10 ? 0 : 1;
2432 int main() { return foo(10) && foo(0); }
2435 cc_check
&& _builtin_expect
=yes
2436 if test "$_builtin_expect" = yes ; then
2437 _def_builtin_expect
='#define HAVE_BUILTIN_EXPECT 1'
2439 _def_builtin_expect
='#undef HAVE_BUILTIN_EXPECT'
2441 echores
"$_builtin_expect"
2447 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
2450 cc_check
-lkstat && _kstat
=yes
2451 if test "$_kstat" = yes ; then
2452 _def_kstat
="#define HAVE_LIBKSTAT 1"
2453 _ld_arch
="-lkstat $_ld_arch"
2455 _def_kstat
="#undef HAVE_LIBKSTAT"
2461 # required for nanosleep on some systems
2464 int main(void) { (void) nanosleep(0, 0); return 0; }
2467 cc_check
-lposix4 && _posix4
=yes
2468 if test "$_posix4" = yes ; then
2469 _ld_arch
="-lposix4 $_ld_arch"
2476 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
2479 cc_check
-D_GNU_SOURCE $_ld_lm && _lrintf
=yes
2480 if test "$_lrintf" = yes ; then
2481 _def_lrintf
="#define HAVE_LRINTF 1"
2483 _def_lrintf
="#undef HAVE_LRINTF"
2490 int main(void) { (void) round(0.0); return 0; }
2493 cc_check
$_ld_lm && _round
=yes
2494 if test "$_round" = yes ; then
2495 _def_round
="#define HAVE_ROUND 1"
2497 _def_round
="#undef HAVE_ROUND"
2501 echocheck
"nanosleep"
2502 # also check for nanosleep
2505 int main(void) { (void) nanosleep(0, 0); return 0; }
2508 cc_check
$_ld_arch && _nanosleep
=yes
2509 if test "$_nanosleep" = yes ; then
2510 _def_nanosleep
='#define HAVE_NANOSLEEP 1'
2512 _def_nanosleep
='#undef HAVE_NANOSLEEP'
2514 echores
"$_nanosleep"
2518 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2519 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2522 #include <sys/socket.h>
2523 int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
2525 for _ld_tmp
in "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
2526 cc_check
$_ld_tmp && _ld_sock
="$_ld_tmp" && break
2528 if test $_winsock2 = auto
&& not cygwin
; then
2531 #include <winsock2.h>
2532 int main(void) { (void) gethostbyname(0); return 0; }
2534 cc_check
-lws2_32 && _ld_sock
="-lws2_32" && _winsock2
=yes
2536 if test "$_ld_sock" ; then
2537 echores
"yes (using $_ld_sock)"
2543 if test $_winsock2 = yes ; then
2545 _def_winsock2
='#define HAVE_WINSOCK2 1'
2547 _def_winsock2
='#undef HAVE_WINSOCK2'
2552 echocheck
"inet_pton()"
2554 #include <sys/types.h>
2555 #include <sys/socket.h>
2556 #include <arpa/inet.h>
2557 int main(void) { (void) inet_pton(0, 0, 0); return 0; }
2559 if test "$_winsock2" = yes ; then
2560 echores
"not needed (using winsock2 functions)"
2561 elif cc_check
$_ld_sock ; then
2562 # NOTE: Linux has libresolv but does not need it
2564 echores
"yes (using $_ld_sock)"
2565 elif cc_check
$_ld_sock -lresolv ; then
2566 # NOTE: needed for SunOS at least
2567 _ld_sock
="$_ld_sock -lresolv"
2568 echores
"yes (using $_ld_sock)"
2570 echores
"no (=> i'll try inet_aton next)"
2572 echocheck
"inet_aton()"
2574 #include <sys/types.h>
2575 #include <sys/socket.h>
2576 #include <arpa/inet.h>
2577 int main(void) { (void) inet_aton(0, 0); return 0; }
2580 if cc_check
$_ld_sock ; then
2581 # NOTE: Linux has libresolv but does not need it
2583 echores
"yes (using $_ld_sock)"
2584 elif cc_check
$_ld_sock -lresolv ; then
2585 # NOTE: needed for SunOS at least
2586 _ld_sock
="$_ld_sock -lresolv"
2587 echores
"yes (using $_ld_sock)"
2591 echores
"no (=> network support disabled)"
2595 _def_use_aton
='#undef USE_ATON'
2596 if test "$_use_aton" != no
; then
2597 _def_use_aton
='#define USE_ATON 1'
2601 echocheck
"inttypes.h (required)"
2603 #include <inttypes.h>
2604 int main(void) { return 0; }
2607 cc_check
&& _inttypes
=yes
2608 if test "$_inttypes" = yes ; then
2613 echocheck
"bitypes.h (inttypes.h predecessor)"
2615 #include <sys/bitypes.h>
2616 int main(void) { return 0; }
2619 cc_check
&& _inttypes
=yes
2620 if test "$_inttypes" = yes ; then
2621 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."
2623 die
"Cannot find header either inttypes.h or bitypes.h (see DOCS/HTML/$_doc_lang/faq.html)."
2626 echores
"$_inttypes"
2629 echocheck
"int_fastXY_t in inttypes.h"
2631 #include <inttypes.h>
2633 volatile int_fast16_t v= 0;
2637 cc_check
&& _fast_inttypes
=yes
2638 if test "$_fast_inttypes" = yes ; then
2642 _def_fast_inttypes
='
2643 typedef signed char int_fast8_t;
2644 typedef signed int int_fast16_t;
2645 typedef signed int int_fast32_t;
2646 typedef unsigned char uint_fast8_t;
2647 typedef unsigned int uint_fast16_t;
2648 typedef unsigned int uint_fast32_t;'
2650 echores
"$_fast_inttypes"
2653 echocheck
"word size"
2654 _mp_wordsize
="#undef MP_WORDSIZE"
2657 #include <sys/types.h>
2658 int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
2660 cc_check
&& _wordsize
=`$TMPO` && _mp_wordsize
="#define MP_WORDSIZE $_wordsize"
2661 echores
"$_wordsize"
2664 echocheck
"stddef.h"
2667 int main(void) { return 0; }
2670 cc_check
&& _stddef
=yes
2671 if test "$_stddef" = yes ; then
2672 _def_stddef
='#define HAVE_STDDEF_H 1'
2674 _def_stddef
='#undef HAVE_STDDEF_H'
2679 echocheck
"malloc.h"
2682 int main(void) { (void) malloc(0); return 0; }
2685 cc_check
&& _malloc
=yes
2686 if test "$_malloc" = yes ; then
2687 _def_malloc
='#define HAVE_MALLOC_H 1'
2689 _def_malloc
='#undef HAVE_MALLOC_H'
2691 # malloc.h emits a warning in FreeBSD and OpenBSD
2692 freebsd || openbsd
&& _def_malloc
='#undef HAVE_MALLOC_H'
2696 echocheck
"memalign()"
2697 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2700 int main (void) { (void) memalign(64, sizeof(char)); return 0; }
2703 cc_check
&& _memalign
=yes
2704 if test "$_memalign" = yes ; then
2705 _def_memalign
='#define HAVE_MEMALIGN 1'
2707 _def_memalign
='#undef HAVE_MEMALIGN'
2709 echores
"$_memalign"
2712 echocheck
"alloca.h"
2715 int main(void) { (void) alloca(0); return 0; }
2718 cc_check
&& _alloca
=yes
2720 _def_alloca
='#define HAVE_ALLOCA_H 1'
2722 _def_alloca
='#undef HAVE_ALLOCA_H'
2729 #include <sys/types.h>
2730 #include <sys/mman.h>
2731 int main(void) { (void) mmap(0, 0, 0, 0, 0, 0); return 0; }
2734 cc_check
&& _mman
=yes
2735 if test "$_mman" = yes ; then
2736 _def_mman
='#define HAVE_SYS_MMAN_H 1'
2738 _def_mman
='#undef HAVE_SYS_MMAN_H'
2743 #include <sys/types.h>
2744 #include <sys/mman.h>
2745 int main(void) { void *p = MAP_FAILED; return 0; }
2747 _mman_has_map_failed
=no
2748 cc_check
&& _mman_has_map_failed
=yes
2749 if test "$_mman_has_map_failed" = yes ; then
2750 _def_mman_has_map_failed
=''
2752 _def_mman_has_map_failed
='#define MAP_FAILED ((void *) -1)'
2755 echocheck
"dynamic loader"
2758 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; }
2761 for _ld_tmp
in "" "-ldl" ; do
2762 cc_check
$_ld_tmp && _ld_dl
="$_ld_tmp" && _dl
=yes && break
2764 if test "$_dl" = yes ; then
2765 _def_dl
='#define HAVE_LIBDL 1'
2767 _def_dl
='#undef HAVE_LIBDL'
2772 echocheck
"dynamic a/v plugins support"
2773 if test "$_dl" = no
; then
2776 if test "$_dynamic_plugins" = yes ; then
2777 _def_dynamic_plugins
='#define DYNAMIC_PLUGINS 1'
2779 _def_dynamic_plugins
='#undef DYNAMIC_PLUGINS'
2781 echores
"$_dynamic_plugins"
2784 #echocheck "dynamic linking"
2785 # FIXME !! make this dynamic detection work and modify at the end (search _ld_dl_dynamic)
2786 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
2788 #int main(void) { return 0; }
2790 #if cc_check -rdynamic ; then
2791 # _ld_dl_dynamic='-rdynamic'
2792 #elif cc_check -Bdynamic ; then
2793 # _ld_dl_dynamic='-Bdynamic'
2794 #elif cc_check ; then
2797 #echores "using $_ld_dl_dynamic"
2799 _def_threads
='#undef HAVE_THREADS'
2802 if test "$_pthreads" != no
; then
2804 #include <pthread.h>
2805 void* func(void *arg) { return arg; }
2806 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
2810 for _ld_tmp
in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
2811 # for crosscompilation, we cannot execute the program, be happy if we can link statically
2812 cc_check
$_ld_tmp && (tmp_run ||
test "$_ld_static") && _ld_pthread
="$_ld_tmp" && _pthreads
=yes && break
2816 if test "$_pthreads" = yes ; then
2817 echores
"yes (using $_ld_pthread)"
2819 _def_pthreads
='#define HAVE_PTHREADS 1'
2820 _def_threads
='#define HAVE_THREADS 1'
2822 echores
"no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled)"
2824 _def_pthreads
='#undef HAVE_PTHREADS'
2825 _nas
=no
; _tv_v4l
=no
; _macosx
=no
2826 if not mingw32
; then
2833 if test "$_iconv" = auto
; then
2834 _iconv_tmp
='#include <iconv.h>'
2840 #define INBUFSIZE 1024
2841 #define OUTBUFSIZE 4096
2843 char inbuffer[INBUFSIZE];
2844 char outbuffer[OUTBUFSIZE];
2849 char *tocode="UTF-8";
2850 char *fromcode="cp1250";
2851 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) {
2852 while ((numread = read (0, inbuffer, INBUFSIZE))) {
2853 char *iptr=inbuffer;
2854 char *optr=outbuffer;
2855 size_t inleft=numread;
2856 size_t outleft=OUTBUFSIZE;
2857 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
2859 write (1, outbuffer, OUTBUFSIZE - outleft);
2862 if (iconv_close(icdsc) == -1)
2868 for _ld_tmp
in "" "-liconv" "-liconv $_ld_dl" ; do
2869 cc_check
$_ld_lm $_ld_tmp && _ld_iconv
="$_ld_tmp" && _iconv
=yes && break
2872 if test "$_iconv" = yes ; then
2873 _def_iconv
='#define USE_ICONV 1'
2875 _def_iconv
='#undef USE_ICONV'
2880 echocheck
"sys/soundcard.h"
2882 #include <sys/soundcard.h>
2883 int main(void) { return 0; }
2886 cc_check
&& _sys_soundcard
=yes
2887 if test "$_sys_soundcard" = yes ; then
2888 _def_sys_soundcard
='#define HAVE_SYS_SOUNDCARD_H 1'
2889 _inc_soundcard
='#include <sys/soundcard.h>'
2891 _def_sys_soundcard
='#undef HAVE_SYS_SOUNDCARD_H'
2893 echores
"$_sys_soundcard"
2895 if test "$_sys_soundcard" != yes ; then
2896 echocheck
"soundcard.h"
2898 #include <soundcard.h>
2899 int main(void) { return 0; }
2902 cc_check
&& _soundcard
=yes
2903 if linux ||
test "$_ossaudio" != no
; then
2904 # use soundcard.h on Linux, or when OSS support is enabled
2905 echores
"$_soundcard"
2907 # we don't want to use soundcard.h on non-Linux if OSS support not enabled!
2908 echores
"$_soundcard, but ignored!"
2911 if test "$_soundcard" = yes ; then
2912 _def_soundcard
='#define HAVE_SOUNDCARD_H 1'
2913 _inc_soundcard
='#include <soundcard.h>'
2915 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2918 _def_soundcard
='#undef HAVE_SOUNDCARD_H'
2922 echocheck
"sys/dvdio.h"
2925 #include <sys/dvdio.h>
2926 int main(void) { return 0; }
2929 cc_check
&& _dvdio
=yes
2930 if test "$_dvdio" = yes ; then
2931 _def_dvdio
='#define DVD_STRUCT_IN_SYS_DVDIO_H 1'
2933 _def_dvdio
='#undef DVD_STRUCT_IN_SYS_DVDIO_H'
2938 echocheck
"sys/cdio.h"
2941 #include <sys/cdio.h>
2942 int main(void) { return 0; }
2945 cc_check
&& _cdio
=yes
2946 if test "$_cdio" = yes ; then
2947 _def_cdio
='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
2949 _def_cdio
='#undef DVD_STRUCT_IN_SYS_CDIO_H'
2954 echocheck
"linux/cdrom.h"
2956 #include <sys/types.h>
2957 #include <linux/cdrom.h>
2958 int main(void) { return 0; }
2961 cc_check
&& _cdrom
=yes
2962 if test "$_cdrom" = yes ; then
2963 _def_cdrom
='#define DVD_STRUCT_IN_LINUX_CDROM_H 1'
2965 _def_cdrom
='#undef DVD_STRUCT_IN_LINUX_CDROM_H'
2973 int main(void) { return 0; }
2976 cc_check
&& _dvd
=yes
2977 if test "$_dvd" = yes ; then
2978 _def_dvd
='#define DVD_STRUCT_IN_DVD_H 1'
2980 _def_dvd
='#undef DVD_STRUCT_IN_DVD_H'
2985 echocheck
"BSDI dvd.h"
2988 int main(void) { return 0; }
2991 cc_check
&& _bsdi_dvd
=yes
2992 if test "$_bsdi_dvd" = yes ; then
2993 _def_bsdi_dvd
='#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1'
2995 _def_bsdi_dvd
='#undef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H'
2997 echores
"$_bsdi_dvd"
3000 echocheck
"HPUX SCSI header"
3002 #include <sys/scsi.h>
3003 int main(void) { return 0; }
3006 cc_check
&& _hpux_scsi_h
=yes
3007 if test "$_hpux_scsi_h" = yes ; then
3008 _def_hpux_scsi_h
='#define HPUX_SCTL_IO 1'
3010 _def_hpux_scsi_h
='#undef HPUX_SCTL_IO'
3012 echores
"$_hpux_scsi_h"
3015 echocheck
"userspace SCSI headers (Solaris)"
3017 # include <unistd.h>
3018 # include <stropts.h>
3019 # include <sys/scsi/scsi_types.h>
3020 # include <sys/scsi/impl/uscsi.h>
3021 int main(void) { return 0; }
3024 cc_check
&& _sol_scsi_h
=yes
3025 if test "$_sol_scsi_h" = yes ; then
3026 _def_sol_scsi_h
='#define SOLARIS_USCSI 1'
3028 _def_sol_scsi_h
='#undef SOLARIS_USCSI'
3030 echores
"$_sol_scsi_h"
3034 if test "$_termcap" = auto
; then
3036 int main(void) { return 0; }
3039 for _ld_tmp
in "-ltermcap" "-ltinfo" ; do
3040 cc_check
$_ld_tmp && _ld_termcap
="$_ld_tmp" && _termcap
=yes && break
3043 if test "$_termcap" = yes ; then
3044 _def_termcap
='#define USE_TERMCAP 1'
3045 _res_comment
="using $_ld_termcap"
3047 _def_termcap
='#undef USE_TERMCAP'
3053 if test "$_termios" = auto
; then
3055 #include <sys/termios.h>
3056 int main(void) { return 0; }
3059 cc_check
&& _termios
=yes
3060 _def_termios_h_name
='sys/termios.h'
3063 if test "$_termios" = auto
; then
3065 #include <termios.h>
3066 int main(void) { return 0; }
3069 cc_check
&& _termios
=yes
3070 _def_termios_h_name
='termios.h'
3073 if test "$_termios" = yes ; then
3074 _def_termios
='#define HAVE_TERMIOS 1'
3075 _def_termios_h
='#undef HAVE_TERMIOS_H'
3076 _def_termios_sys_h
='#undef HAVE_SYS_TERMIOS_H'
3078 if test "$_def_termios_h_name" = 'sys/termios.h' ; then
3079 _def_termios_sys_h
='#define HAVE_SYS_TERMIOS_H 1'
3080 elif test "$_def_termios_h_name" = 'termios.h' ; then
3081 _def_termios_h
='#define HAVE_TERMIOS_H 1'
3083 _res_comment
="using $_def_termios_h_name"
3085 _def_termios
='#undef HAVE_TERMIOS'
3086 _def_termios_h_name
=''
3093 if test "$_shm" = auto
; then
3095 #include <sys/types.h>
3096 #include <sys/shm.h>
3097 int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return 0; }
3100 cc_check
&& _shm
=yes
3102 if test "$_shm" = yes ; then
3103 _def_shm
='#define HAVE_SHM 1'
3105 _def_shm
='#undef HAVE_SHM'
3110 # XXX: FIXME, add runtime checking
3111 echocheck
"linux devfs"
3112 echores
"$_linux_devfs"
3115 echocheck
"scandir()"
3117 int main (void) { scandir("", 0, 0, 0); alphasort(0, 0); return 0; }
3120 cc_check
&& _scandir
=yes
3121 if test "$_scandir" = yes ; then
3122 _def_scandir
='#define HAVE_SCANDIR 1'
3124 _def_scandir
='#undef HAVE_SCANDIR'
3129 echocheck
"strsep()"
3132 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3135 cc_check
&& _strsep
=yes
3136 if test "$_strsep" = yes ; then
3137 _def_strsep
='#define HAVE_STRSEP 1'
3139 _def_strsep
='#undef HAVE_STRSEP'
3143 echocheck
"strlcpy()"
3146 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcpy(t, s, sizeof( t )); return 0; }
3149 cc_check
&& _strlcpy
=yes
3150 if test "$_strlcpy" = yes ; then
3151 _def_strlcpy
='#define HAVE_STRLCPY 1'
3153 _def_strlcpy
='#undef HAVE_STRLCPY'
3157 echocheck
"strlcat()"
3160 int main (void) { char *s = "Hello, world!", t[20]; (void) strlcat(t, s, sizeof( t )); return 0; }
3163 cc_check
&& _strlcat
=yes
3164 if test "$_strlcat" = yes ; then
3165 _def_strlcat
='#define HAVE_STRLCAT 1'
3167 _def_strlcat
='#undef HAVE_STRLCAT'
3171 echocheck
"fseeko()"
3174 int main (void) { int i; i = fseeko(stdin, 0, 0); return 0; }
3177 cc_check
&& _fseeko
=yes
3178 if test "$_fseeko" = yes ; then
3179 _def_fseeko
='#define HAVE_FSEEKO 1'
3181 _def_fseeko
='#undef HAVE_FSEEKO'
3185 echocheck
"localtime_r()"
3188 int main( void ) { localtime_r(NULL, NULL); }
3191 cc_check
&& _localtime_r
=yes
3192 if test "$_localtime_r" = yes ; then
3193 _def_localtime_r
='#define HAVE_LOCALTIME_R 1'
3195 _def_localtime_r
='#undef HAVE_LOCALTIME_R'
3197 echores
"$_localtime_r"
3199 echocheck
"vsscanf()"
3202 int main(void) { vsscanf(0, 0, 0); return 0; }
3205 cc_check
&& _vsscanf
=yes
3206 if test "$_vsscanf" = yes ; then
3207 _def_vsscanf
='#define HAVE_VSSCANF 1'
3209 _def_vsscanf
='#undef HAVE_VSSCANF'
3217 int main(void) { swab(0, 0, 0); return 0; }
3220 cc_check
&& _swab
=yes
3221 if test "$_swab" = yes ; then
3222 _def_swab
='#define HAVE_SWAB 1'
3224 _def_swab
='#undef HAVE_SWAB'
3228 echocheck
"posix select()"
3232 #include <sys/types.h>
3234 #include <sys/time.h>
3236 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
3239 cc_check
&& _posix_select
=yes
3240 if test "$_posix_select" = no
; then
3241 _def_no_posix_select
='#define HAVE_NO_POSIX_SELECT 1'
3243 _def_no_posix_select
='#undef HAVE_NO_POSIX_SELECT'
3245 echores
"$_posix_select"
3248 echocheck
"gettimeofday()"
3251 #include <sys/time.h>
3252 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; }
3255 cc_check
&& _gettimeofday
=yes
3256 if test "$_gettimeofday" = yes ; then
3257 _def_gettimeofday
='#define HAVE_GETTIMEOFDAY 1'
3259 _def_gettimeofday
='#undef HAVE_GETTIMEOFDAY'
3261 echores
"$_gettimeofday"
3268 int main(void) { glob_t gg; glob("filename",0,NULL,&gg); return 0; }
3271 cc_check
&& _glob
=yes
3272 if test "$_glob" = yes ; then
3273 _def_glob
='#define HAVE_GLOB 1'
3275 _def_glob
='#undef HAVE_GLOB'
3280 echocheck
"sys/sysinfo.h"
3282 #include <sys/sysinfo.h>
3284 struct sysinfo s_info;
3290 cc_check
&& _sys_sysinfo
=yes
3291 if test "$_sys_sysinfo" = yes ; then
3292 _def_sys_sysinfo
='#define HAVE_SYS_SYSINFO_H 1'
3293 _inc_sysinfo
='#include <sys/sysinfo.h>'
3295 _def_sys_sysinfo
='#undef HAVE_SYS_SYSINFO_H'
3297 echores
"$_sys_sysinfo"
3300 echocheck
"Mac OS X APIs"
3301 if test "$_macosx" = auto
&& darwin
; then
3302 productName
=`/usr/bin/sw_vers -productName`
3303 if test "$productName" = "Mac OS X" ; then
3307 _def_macosx
='#undef MACOSX'
3308 _noaomodules
="macosx $_noaomodules"
3309 _novomodules
="quartz $_novomodules"
3312 if test "$_macosx" = yes ; then
3314 #include <Carbon/Carbon.h>
3315 #include <QuickTime/QuickTime.h>
3316 #include <CoreAudio/CoreAudio.h>
3320 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
3323 if cc_check
-framework Carbon
-framework QuickTime
-framework CoreAudio
; then
3325 _macosx_frameworks
="-framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox"
3326 _def_macosx
='#define MACOSX 1'
3327 _aosrc
="$_aosrc ao_macosx.c"
3328 _aomodules
="macosx $_aomodules"
3329 _vosrc
="$_vosrc vo_quartz.c"
3330 _vomodules
="quartz $_vomodules"
3333 _def_macosx
='#undef MACOSX'
3334 _noaomodules
="macosx $_noaomodules"
3335 _novomodules
="quartz $_novomodules"
3338 #include <Carbon/Carbon.h>
3339 #include <QuartzCore/CoreVideo.h>
3342 if cc_check
-framework Carbon
-framework QuartzCore
-framework OpenGL
; then
3343 _vosrc
="$_vosrc vo_macosx.m"
3344 _vomodules
="macosx $_vomodules"
3345 _macosx_frameworks
="$_macosx_frameworks -framework Cocoa -framework QuartzCore -framework OpenGL"
3346 _def_macosx_corevideo
='#define MACOSX_COREVIDEO 1'
3347 _macosx_corevideo
=yes
3349 _novomodules
="macosx $_novomodules"
3350 _def_macosx_corevideo
='#undef MACOSX_COREVIDEO'
3351 _macosx_corevideo
=no
3356 echocheck
"Mac OS X Finder Support"
3357 if test "$_macosx_finder_support" = auto
; then
3358 _macosx_finder_support
=$_macosx
3360 if test "$_macosx_finder_support" = yes; then
3361 _def_macosx_finder_support
='#define MACOSX_FINDER_SUPPORT 1'
3362 _macosx_finder_support
=yes
3364 _def_macosx_finder_support
='#undef MACOSX_FINDER_SUPPORT'
3365 _macosx_finder_support
=no
3367 echores
"$_macosx_finder_support"
3369 echocheck
"Mac OS X Bundle file locations"
3370 if test "$_macosx_bundle" = auto
; then
3371 _macosx_bundle
=$_macosx_finder_support
3373 if test "$_macosx_bundle" = yes; then
3374 _def_macosx_bundle
='#define MACOSX_BUNDLE 1'
3376 _def_macosx_bundle
='#undef MACOSX_BUNDLE'
3379 echores
"$_macosx_bundle"
3381 echocheck
"Samba support (libsmbclient)"
3382 if test "$_smbsupport" = yes; then
3383 _ld_smb
="-lsmbclient"
3385 if test "$_smbsupport" = auto
; then
3388 #include <libsmbclient.h>
3389 int main(void) { smbc_opendir("smb://"); return 0; }
3391 for _ld_tmp
in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do
3392 cc_check
$_ld_tmp && _ld_smb
="$_ld_tmp" && _smbsupport
=yes && break
3396 if test "$_smbsupport" = yes; then
3397 _def_smbsupport
="#define LIBSMBCLIENT"
3398 _inputmodules
="smb $_inputmodules"
3400 _def_smbsupport
="#undef LIBSMBCLIENT"
3401 _noinputmodules
="smb $_noinputmodules"
3403 echores
"$_smbsupport"
3412 if test "$_3dfx" = yes ; then
3413 _def_3dfx
='#define HAVE_3DFX 1'
3414 _vosrc
="$_vosrc vo_3dfx.c"
3415 _vomodules
="3dfx $_vomodules"
3417 _def_3dfx
='#undef HAVE_3DFX'
3418 _novomodules
="3dfx $_novomodules"
3424 if test "$_tdfxfb" = yes ; then
3425 _def_tdfxfb
='#define HAVE_TDFXFB 1'
3426 _vosrc
="$_vosrc vo_tdfxfb.c"
3427 _vomodules
="tdfxfb $_vomodules"
3429 _def_tdfxfb
='#undef HAVE_TDFXFB'
3430 _novomodules
="tdfxfb $_novomodules"
3435 if test "$_tdfxvid" = yes ; then
3436 _def_tdfxvid
='#define HAVE_TDFX_VID 1'
3437 _vosrc
="$_vosrc vo_tdfx_vid.c"
3438 _vomodules
="tdfx_vid $_vomodules"
3440 _def_tdfxvid
='#undef HAVE_TDFX_VID'
3441 _novomodules
="tdfx_vid $_novomodules"
3446 if test "$_tga" = yes ; then
3447 _def_tga
='#define HAVE_TGA 1'
3448 _vosrc
="$_vosrc vo_tga.c"
3449 _vomodules
="tga $_vomodules"
3451 _def_tga
='#undef HAVE_TGA'
3452 _novomodules
="tga $_novomodules"
3456 echocheck
"DirectFB headers presence"
3457 if test -z "$_inc_directfb" ; then
3458 for I
in /usr
/include
/usr
/local
/include
$_inc_extra; do
3459 if test -d "$I/directfb" && test -f "$I/directfb/directfb.h" ; then
3460 _inc_directfb
="-I$I/directfb"
3461 echores
"yes (using $_inc_directfb)"
3464 if test -d "$I" && test -f "$I/directfb.h" ; then
3465 _inc_directfb
="-I$I"
3466 echores
"yes (using $_inc_directfb)"
3470 if test -z "$_inc_directfb" ; then
3475 echores
"yes (using $_inc_directfb)"
3477 if test "$_inc_directfb" = "-I/usr/include" ; then
3481 echocheck
"DirectFB"
3482 if test "$_directfb" = auto
; then
3485 #include <directfb.h>
3486 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
3488 linux
&& test -c /dev
/fb0
&& cc_check
$_inc_directfb -ldirectfb && _directfb
=yes
3491 if test "$_directfb" = yes; then
3493 #include <directfb_version.h>
3495 dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MICRO_VERSION
3498 if $_cc -E $TMPC $_inc_directfb > "$TMPO"; then
3499 _directfb_version
=`sed -n 's/^dfb_ver[^1-9]*\(.*\)/\1/p' "$TMPO" | tr -d '() '`
3500 _def_directfb_version
="#define DIRECTFBVERSION $_directfb_version"
3501 if test "$_directfb_version" -ge 913; then
3502 _res_comment
="$_directfb_version"
3504 _def_directfb_version
='#undef DIRECTFBVERSION'
3506 _res_comment
="version >=0.9.13 required"
3510 _res_comment
="failed to get version"
3513 echores
"$_directfb"
3515 if test "$_directfb" = yes ; then
3516 _def_directfb
='#define HAVE_DIRECTFB 1'
3517 if test "$_directfb_version" -ge 913; then
3518 _vosrc
="$_vosrc vo_directfb2.c"
3519 _vomodules
="directfb $_vomodules"
3520 _ld_directfb
='-ldirectfb'
3523 if test "$_directfb_version" -ge 915; then
3524 _vosrc
="$_vosrc vo_dfbmga.c"
3525 _vomodules
="dfbmga $_vomodules"
3528 _def_directfb
='#undef HAVE_DIRECTFB'
3529 _novomodules
="directfb $_novomodules"
3534 echocheck
"X11 headers presence"
3535 if test -z "$_inc_x11" ; then
3536 for I
in /usr
/X11
/include
/usr
/X11R
6/include
/usr
/include
/X11R6
/usr
/include
/usr
/openwin
/include
; do
3537 if test -d "$I/X11" && test -f "$I/X11/Xlib.h" ; then
3539 echores
"yes (using $I)"
3543 if test -z "$_inc_x11" ; then
3545 echores
"not found (check if the dev(el) packages are installed)"
3548 echores
"yes (using $_inc_x11)"
3550 if test "$_inc_x11" = "-I/usr/include" ; then
3556 if test "$_x11" != no
; then
3558 #include <X11/Xlib.h>
3559 #include <X11/Xutil.h>
3560 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
3562 if test -z "$_x11_paths" ; then
3563 _x11_paths
="/usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib"
3565 for I
in $_x11_paths ; do
3566 _ld_x11
="-L$I -lXext -lX11 $_ld_sock $_ld_pthread"
3568 _ld_x11
="$_ld_x11 -Wl,-R$I"
3570 if test -d "$I" && cc_check
$_inc_x11 $_ld_x11 ; then
3576 if test "$_x11" = yes ; then
3577 _def_x11
='#define HAVE_X11 1'
3578 _vosrc
="$_vosrc x11_common.c vo_x11.c vo_xover.c"
3579 _vomodules
="x11 xover $_vomodules"
3580 _res_comment
="using $I"
3583 _def_x11
='#undef HAVE_X11'
3586 _novomodules
="x11 $_novomodules"
3587 _res_comment
="check if the dev(el) packages are installed"
3595 if test "$_x11" = yes ; then
3597 #include <X11/Xmd.h>
3598 #include <X11/Xlib.h>
3599 #include <X11/Xutil.h>
3600 #include <X11/Xatom.h>
3601 #include <X11/extensions/dpms.h>
3603 (void) DPMSQueryExtension(0, 0, 0);
3606 cc_check
$_inc_x11 -lXdpms $_ld_x11 && _xdpms3
=yes
3608 #include <X11/Xlib.h>
3609 #include <X11/extensions/dpms.h>
3611 (void) DPMSQueryExtension(0, 0, 0);
3614 cc_check
$_inc_x11 $_ld_x11 && _xdpms4
=yes
3616 if test "$_xdpms4" = yes ; then
3617 _def_xdpms
='#define HAVE_XDPMS 1'
3618 echores
"yes (using Xdpms 4)"
3619 elif test "$_xdpms3" = yes ; then
3620 _def_xdpms
='#define HAVE_XDPMS 1'
3621 _ld_x11
="-lXdpms $_ld_x11"
3622 echores
"yes (using Xdpms 3)"
3624 _def_xdpms
='#undef HAVE_XDPMS'
3630 if test "$_x11" = yes && test "$_xv" != no
; then
3632 #include <X11/Xlib.h>
3633 #include <X11/extensions/Xvlib.h>
3635 (void) XvGetPortAttribute(0, 0, 0, 0);
3636 (void) XvQueryPortAttributes(0, 0, 0);
3640 cc_check
$_inc_x11 -lXv $_ld_x11 && _xv
=yes
3644 if test "$_xv" = yes ; then
3645 _def_xv
='#define HAVE_XV 1'
3647 _vosrc
="$_vosrc vo_xv.c"
3648 _vomodules
="xv $_vomodules"
3650 _def_xv
='#undef HAVE_XV'
3651 _novomodules
="xv $_novomodules"
3657 if test "$_x11" = yes && test "$_xv" = yes && test "$_xvmc" != no
; then
3660 #include <X11/Xlib.h>
3661 #include <X11/extensions/Xvlib.h>
3662 #include <X11/extensions/XvMClib.h>
3664 (void) XvMCQueryExtension(0,0,0);
3665 (void) XvMCCreateContext(0,0,0,0,0,0,0);
3668 cc_check
$_inc_x11 -lXvMC -l$_xvmclib $_ld_xv $_ld_x11 && _xvmc
=yes
3670 if test "$_xvmc" = yes ; then
3671 _def_xvmc
='#define HAVE_XVMC 1'
3672 _ld_xvmc
="-lXvMC -l$_xvmclib"
3673 _vosrc
="$_vosrc vo_xvmc.c"
3674 _vomodules
="xvmc $_vomodules"
3676 _def_xvmc
='#undef HAVE_XVMC'
3677 _novomodules
="xvmc $_novomodules"
3682 echocheck
"Xinerama"
3683 if test "$_x11" = yes && test "$_xinerama" != no
; then
3685 #include <X11/Xlib.h>
3686 #include <X11/extensions/Xinerama.h>
3687 int main(void) { (void) XineramaIsActive(0); return 0; }
3690 cc_check
$_inc_x11 -lXinerama $_ld_x11 && _xinerama
=yes
3694 if test "$_xinerama" = yes ; then
3695 _def_xinerama
='#define HAVE_XINERAMA 1'
3696 _ld_xinerama
='-lXinerama'
3698 _def_xinerama
='#undef HAVE_XINERAMA'
3700 echores
"$_xinerama"
3703 # Note: the -lXxf86vm library is the VideoMode extension and though it's not
3704 # needed for DGA, AFAIK every distribution packages together with DGA stuffs
3705 # named 'X extensions' or something similar.
3706 # This check may be useful for future mplayer versions (to change resolution)
3707 # If you run into problems, remove '-lXxf86vm'.
3709 if test "$_x11" = yes && test "$_vm" = auto
; then
3711 #include <X11/Xlib.h>
3712 #include <X11/extensions/xf86vmode.h>
3713 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
3716 cc_check
$_inc_x11 -lXxf86vm $_ld_x11 && _vm
=yes
3718 if test "$_vm" = yes ; then
3719 _def_vm
='#define HAVE_XF86VM 1'
3722 _def_vm
='#undef HAVE_XF86VM'
3726 # Check for the presence of special keycodes, like audio control buttons
3727 # that XFree86 might have. Used to be bundled with the xf86vm check, but
3728 # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
3729 # have these new keycodes.
3730 echocheck
"XF86keysym"
3731 if test "$_xf86keysym" = auto
; then
3733 if test "$_x11" = yes ; then
3735 #include <X11/Xlib.h>
3736 #include <X11/XF86keysym.h>
3737 int main(void) { return XF86XK_AudioPause; }
3739 cc_check
$_inc_x11 $_ld_x11 && _xf86keysym
=yes
3742 if test "$_xf86keysym" = yes ; then
3743 _def_xf86keysym
='#define HAVE_XF86XK 1'
3745 _def_xf86keysym
='#undef HAVE_XF86XK'
3747 echores
"$_xf86keysym"
3750 if test "$_x11" = no
; then
3753 # Version 2 is preferred to version 1 if available
3754 if test "$_dga" = auto
; then
3756 #include <X11/Xlib.h>
3757 #include <X11/extensions/xf86dga.h>
3758 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
3761 cc_check
$_inc_x11 -lXxf86dga -lXxf86vm $_ld_x11 && _dga
=1
3764 #include <X11/Xlib.h>
3765 #include <X11/extensions/xf86dga.h>
3766 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
3768 cc_check
$_inc_x11 -lXxf86dga $_ld_x11 && _dga
=2
3771 _def_dga
='#undef HAVE_DGA'
3772 _def_dga2
='#undef HAVE_DGA2'
3773 if test "$_dga" = 1 ; then
3774 _def_dga
='#define HAVE_DGA 1'
3775 _ld_dga
='-lXxf86dga'
3776 _vosrc
="$_vosrc vo_dga.c"
3777 _vomodules
="dga $_vomodules"
3778 echores
"yes (using DGA 1.0)"
3779 elif test "$_dga" = 2 ; then
3780 _def_dga
='#define HAVE_DGA 1'
3781 _def_dga2
='#define HAVE_DGA2 1'
3782 _ld_dga
='-lXxf86dga'
3783 _vosrc
="$_vosrc vo_dga.c"
3784 _vomodules
="dga $_vomodules"
3785 echores
"yes (using DGA 2.0)"
3786 elif test "$_dga" = no
; then
3788 _novomodules
="dga $_novomodules"
3790 die
"DGA version must be 1 or 2"
3795 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
3796 if (test "$_x11" = yes || win32
) && test "$_gl" != no
; then
3799 int main(void) { return 0; }
3802 if cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3804 _ld_gl
="-lGL $_ld_dl"
3805 elif cc_check
$_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3807 _ld_gl
="-lGL $_ld_pthread $_ld_dl"
3808 elif cc_check
-lopengl32 ; then
3811 _ld_gl
="-lopengl32 -lgdi32"
3816 if test "$_gl" = yes ; then
3817 _def_gl
='#define HAVE_GL 1'
3818 _vosrc
="$_vosrc vo_gl.c vo_gl2.c gl_common.c"
3819 if test "$_gl_win32" = yes ; then
3820 _def_gl_win32
='#define GL_WIN32 1'
3821 _vosrc
="$_vosrc w32_common.c"
3822 _res_comment
="win32 version"
3824 _vomodules
="opengl $_vomodules"
3826 _def_gl
='#undef HAVE_GL'
3827 _def_gl_win32
='#undef GL_WIN32'
3828 _novomodules
="opengl $_novomodules"
3833 echocheck
"/dev/mga_vid"
3834 if test "$_mga" = auto
; then
3836 test -c /dev
/mga_vid
&& _mga
=yes
3838 if test "$_mga" = yes ; then
3839 _def_mga
='#define HAVE_MGA 1'
3840 _vosrc
="$_vosrc vo_mga.c"
3841 _vomodules
="mga $_vomodules"
3843 _def_mga
='#undef HAVE_MGA'
3844 _novomodules
="mga $_novomodules"
3849 # echocheck "syncfb"
3851 # test "$_mga" = yes && _syncfb=yes
3852 # if test "$_syncfb" = yes ; then
3853 # _def_syncfb='#define HAVE_SYNCFB 1'
3854 # _vosrc="$_vosrc vo_syncfb.c"
3856 # _def_syncfb='#undef HAVE_SYNCFB'
3858 # echores "$_syncfb"
3862 if test "$_xmga" = auto
; then
3864 test "$_x11" = yes && test "$_mga" = yes && _xmga
=yes
3866 if test "$_xmga" = yes ; then
3867 _def_xmga
='#define HAVE_XMGA 1'
3868 _vosrc
="$_vosrc vo_xmga.c"
3869 _vomodules
="xmga $_vomodules"
3871 _def_xmga
='#undef HAVE_XMGA'
3872 _novomodules
="xmga $_novomodules"
3878 if test "$_ggi" = auto
; then
3880 #include <ggi/ggi.h>
3881 int main(void) { return 0; }
3884 cc_check
-lggi && _ggi
=yes
3886 if test "$_ggi" = yes ; then
3887 _def_ggi
='#define HAVE_GGI 1'
3889 _vosrc
="$_vosrc vo_ggi.c"
3890 _vomodules
="ggi $_vomodules"
3892 _def_ggi
='#undef HAVE_GGI'
3893 _novomodules
="ggi $_novomodules"
3897 echocheck
"GGI extension: libggiwmh"
3898 if test "$_ggiwmh" = auto
; then
3901 #include <ggi/ggi.h>
3902 #include <ggi/wmh.h>
3903 int main(void) { return 0; }
3905 cc_check
-lggi -lggiwmh && _ggiwmh
=yes
3907 # needed to get right output on obscure combination
3908 # like --disable-ggi --enable-ggiwmh
3909 if test "$_ggi" = yes && test "$_ggiwmh" = yes ; then
3910 _def_ggiwmh
='#define HAVE_GGIWMH 1'
3911 _ld_ggi
="$_ld_ggi -lggiwmh"
3914 _def_ggiwmh
='#undef HAVE_GGIWMH'
3920 if test "$_aa" = auto
; then
3923 extern struct aa_hardware_params aa_defparams;
3924 extern struct aa_renderparams aa_defrenderparams;
3928 (void) aa_init(0, 0, 0);
3929 c = aa_autoinit(&aa_defparams);
3930 p = aa_getrenderparams();
3931 aa_autoinitkbd(c,0);
3935 for _ld_tmp
in "-laa" "$_ld_x11 -laa" ; do
3936 cc_check
$_ld_tmp && _ld_aa
=$_ld_tmp && _aa
=yes && break
3939 if test "$_aa" = yes ; then
3940 _def_aa
='#define HAVE_AA 1'
3942 _ld_aa
=`aalib-config --libs | cut -d " " -f 2,5,6`
3944 _vosrc
="$_vosrc vo_aa.c"
3945 _vomodules
="aa $_vomodules"
3947 _def_aa
='#undef HAVE_AA'
3948 _novomodules
="aa $_novomodules"
3954 if test "$_caca" = auto
; then
3956 if ( caca-config
--version ) >> "$TMPLOG" 2>&1 ; then
3959 int main(void) { (void) caca_init(); return 0; }
3961 cc_check
`caca-config --libs` && _caca
=yes
3964 if test "$_caca" = yes ; then
3965 _def_caca
='#define HAVE_CACA 1'
3966 _inc_caca
=`caca-config --cflags`
3967 _ld_caca
=`caca-config --libs`
3968 _vosrc
="$_vosrc vo_caca.c"
3969 _vomodules
="caca $_vomodules"
3971 _def_caca
='#undef HAVE_CACA'
3972 _novomodules
="caca $_novomodules"
3978 if test "$_svga" = auto
; then
3981 int main(void) { return 0; }
3984 cc_check
-lvga $_ld_lm && _svga
=yes
3986 if test "$_svga" = yes ; then
3987 _def_svga
='#define HAVE_SVGALIB 1'
3989 _vosrc
="$_vosrc vo_svga.c"
3990 _vomodules
="svga $_vomodules"
3992 _def_svga
='#undef HAVE_SVGALIB'
3993 _novomodules
="svga $_novomodules"
3999 if test "$_fbdev" = auto
; then
4001 linux
&& test -c /dev
/fb0
&& _fbdev
=yes
4003 if test "$_fbdev" = yes ; then
4004 _def_fbdev
='#define HAVE_FBDEV 1'
4005 _vosrc
="$_vosrc vo_fbdev.c vo_fbdev2.c"
4006 _vomodules
="fbdev $_vomodules"
4008 _def_fbdev
='#undef HAVE_FBDEV'
4009 _novomodules
="fbdev $_novomodules"
4016 if test "$_dvb" != no
; then
4019 #include <sys/poll.h>
4020 #include <sys/ioctl.h>
4025 #include <ost/dmx.h>
4026 #include <ost/frontend.h>
4027 #include <ost/sec.h>
4028 #include <ost/video.h>
4029 #include <ost/audio.h>
4030 int main(void) {return 0;}
4035 for I
in "$_inc_dvb" "-I/usr/src/DVB/ost/include" ; do
4036 if cc_check
"$I" ; then
4039 _res_comment
="using $_inc_dvb"
4043 test "$_dvb" = no
&& _res_comment
="specify path to DVB/ost/include with --with-dvbincdir=DIR"
4047 if test "$_dvb" = yes ; then
4048 _def_dvb
='#define HAVE_DVB 1'
4049 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4050 _aomodules
="mpegpes(dvb) $_aomodules"
4051 _vomodules
="mpegpes(dvb) $_vomodules"
4053 if test "$_dvbhead" != no
; then
4054 echocheck
"DVB HEAD"
4055 if test "$_dvbhead" != no
; then
4059 #include <sys/poll.h>
4060 #include <sys/ioctl.h>
4065 #include <linux/dvb/dmx.h>
4066 #include <linux/dvb/frontend.h>
4067 #include <linux/dvb/video.h>
4068 #include <linux/dvb/audio.h>
4069 int main(void) {return 0;}
4074 for I
in "$_inc_dvb" "-I/usr/src/DVB/include" ; do
4075 if cc_check
"$I" ; then
4078 _res_comment
="using $_inc_dvb"
4082 test "$_dvbhead" = no
&& _res_comment
="specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR"
4086 if test "$_dvbhead" = yes ; then
4087 _def_dvb
='#define HAVE_DVB_HEAD 1'
4088 _def_dvb_in
='#define HAS_DVBIN_SUPPORT 1'
4089 _aomodules
="mpegpes(dvb) $_aomodules"
4090 _vomodules
="mpegpes(dvb) $_vomodules"
4093 if test "$_dvbhead" = no
&& test "$_dvb" = no
; then
4094 _def_dvb
='#undef HAVE_DVB'
4095 _def_dvb_in
='#undef HAS_DVBIN_SUPPORT '
4096 _aomodules
="mpegpes(file) $_aomodules"
4097 _vomodules
="mpegpes(file) $_vomodules"
4100 if test "$_dvb" = yes ||
test "$_dvbhead" = yes ; then
4102 _inputmodules
="dvb $_inputmodules"
4105 _noinputmodules
="dvb $_noinputmodules"
4108 echocheck
"PNG support"
4109 if test "$_png" = auto
; then
4112 # Don't check for -lpng on irix since it has its own libpng
4113 # incompatible with the GNU libpng
4114 _res_comment
="disabled on irix (not GNU libpng)"
4120 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4121 printf("libpng: %s\n", png_libpng_ver);
4122 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
4125 if cc_check
-lpng -lz $_ld_lm ; then
4129 _res_comment
="mismatch of library and header versions"
4135 if test "$_png" = yes ; then
4136 _def_png
='#define HAVE_PNG 1'
4138 _vosrc
="$_vosrc vo_png.c"
4139 _vomodules
="png $_vomodules"
4142 _def_png
='#undef HAVE_PNG'
4143 _novomodules
="png $_novomodules"
4147 echocheck
"JPEG support"
4148 if test "$_jpg" = auto
; then
4155 #include <jpeglib.h>
4160 if cc_check
-ljpeg $_ld_lm ; then
4168 if test "$_jpg" = yes ; then
4169 _def_jpg
='#define HAVE_JPEG 1'
4170 _vosrc
="$_vosrc vo_jpeg.c"
4171 _vomodules
="jpeg $_vomodules"
4175 _def_jpg
='#undef HAVE_JPEG'
4176 _novomodules
="jpeg $_novomodules"
4182 echocheck
"PNM support"
4183 if test "$_pnm" = yes; then
4184 _def_pnm
="#define HAVE_PNM"
4185 _vosrc
="$_vosrc vo_pnm.c"
4186 _vomodules
="pnm $_vomodules"
4188 _def_pnm
="#undef HAVE_PNM"
4189 _novomodules
="pnm $_novomodules"
4195 echocheck
"md5sum support"
4196 if test "$_md5sum" = yes; then
4197 _def_md5sum
="#define HAVE_MD5SUM"
4198 _vosrc
="$_vosrc vo_md5sum.c md5sum.c"
4199 _vomodules
="md5sum $_vomodules"
4201 _def_md5sum
="#undef HAVE_MD5SUM"
4202 _novomodules
="md5sum $_novomodules"
4208 echocheck
"GIF support"
4209 # This is to appease people who want to force gif support.
4210 # If it is forced to yes, then we still do checks to determine
4211 # which gif library to use.
4212 if test "$_gif" = yes ; then
4217 if test "$_gif" = auto
; then
4220 #include <gif_lib.h>
4225 for _ld_tmp
in "-lungif" "-lungif $_ld_x11" "-lgif" "-lgif $_ld_x11" ; do
4226 cc_check
$_ld_tmp && tmp_run
&& _ld_gif
="$_ld_tmp" && _gif
=yes && break
4230 # If no library was found, and the user wants support forced,
4231 # then we force it on with libgif, as this is the safest
4232 # assumption IMHO. (libungif & libregif both create symbolic
4233 # links to libgif. We also assume that no x11 support is needed,
4234 # because if you are forcing this, then you _should_ know what
4235 # you are doing. [ Besides, package maintainers should never
4236 # have compiled x11 deps into libungif in the first place. ] )
4239 if test "$_force_gif" = yes && test "$_gif" = no
; then
4244 if test "$_gif" = yes ; then
4245 _def_gif
='#define HAVE_GIF 1'
4246 _vosrc
="$_vosrc vo_gif89a.c"
4247 _codecmodules
="gif $_codecmodules"
4248 _vomodules
="gif89a $_vomodules"
4250 _gif
="yes (old version, some encoding functions disabled)"
4251 _def_gif_4
='#undef HAVE_GIF_4'
4255 #include <gif_lib.h>
4256 void catch() { exit(1); }
4258 signal(SIGSEGV, catch); // catch segfault
4259 printf("EGifPutExtensionFirst is at address %p\n", EGifPutExtensionFirst);
4260 EGifSetGifVersion("89a"); // this will segfault a buggy gif lib.
4264 if cc_check
"$_ld_gif" && tmp_run
; then
4265 _def_gif_4
='#define HAVE_GIF_4 1'
4269 _def_gif
='#undef HAVE_GIF'
4270 _def_gif_4
='#undef HAVE_GIF_4'
4271 _novomodules
="gif89a $_novomodules"
4272 _nocodecmodules
="gif $_nocodecmodules"
4278 case "$_gif" in yes*)
4279 echocheck
"broken giflib workaround"
4280 _def_gif_tvt_hack
='#define HAVE_GIF_TVT_HACK 1'
4283 #include <gif_lib.h>
4286 printf("UserData is at address %p\n", gif.UserData);
4290 if cc_check
"$_ld_gif" && tmp_run
; then
4291 _def_gif_tvt_hack
='#undef HAVE_GIF_TVT_HACK'
4300 echocheck
"VESA support"
4301 if test "$_vesa" = auto
; then
4304 int main(void) { vbeVersion(); return 0; }
4307 cc_check
-lvbe -llrmi && _vesa
=yes
4309 if test "$_vesa" = yes ; then
4310 _def_vesa
='#define HAVE_VESA 1'
4311 _ld_vesa
="-lvbe -llrmi"
4312 _vosrc
="$_vosrc vo_vesa.c vesa_lvo.c gtf.c"
4313 _vomodules
="vesa $_vomodules"
4315 _def_vesa
='#undef HAVE_VESA'
4316 _novomodules
="vesa $_novomodules"
4326 if test -z "$_sdlconfig" ; then
4327 if ( sdl-config
--version ) >>"$TMPLOG" 2>&1 ; then
4328 _sdlconfig
="sdl-config"
4329 elif ( sdl11-config
--version ) >>"$TMPLOG" 2>&1 ; then
4330 _sdlconfig
="sdl11-config"
4335 if test "$_sdl" = auto ||
test "$_sdl" = yes ; then
4338 int main(int argc, char *argv[]) { return 0; }
4341 if "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then
4342 if cc_check
`$_sdlconfig --cflags` `$_sdlconfig --libs` >>"$TMPLOG" 2>&1 ; then
4343 _sdlversion
=`$_sdlconfig --version | sed 's/[^0-9]//g'`
4344 if test "$_sdlversion" -gt 116 ; then
4345 if test "$_sdlversion" -lt 121 ; then
4346 _def_sdlbuggy
='#define BUGGY_SDL'
4348 _def_sdlbuggy
='#undef BUGGY_SDL'
4352 _res_comment
=outdated
4357 if test "$_sdl" = yes ; then
4358 _def_sdl
='#define HAVE_SDL 1'
4360 _ld_sdl
=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
4361 _inc_sdl
=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
4363 _ld_sdl
=`$_sdlconfig --libs | sed s/-mwindows//`
4364 _inc_sdl
=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
4366 _ld_sdl
=`$_sdlconfig --libs`
4367 _inc_sdl
=`$_sdlconfig --cflags`
4369 _vosrc
="$_vosrc vo_sdl.c"
4370 _vomodules
="sdl $_vomodules"
4371 _aosrc
="$_aosrc ao_sdl.c"
4372 _aomodules
="sdl $_aomodules"
4373 _res_comment
="using $_sdlconfig"
4375 _def_sdl
='#undef HAVE_SDL'
4376 _novomodules
="sdl $_novomodules"
4377 _noaomodules
="sdl $_noaomodules"
4381 echocheck
"Windows waveout"
4382 if test "$_win32waveout" = auto
; then
4384 #include <windows.h>
4385 #include <mmsystem.h>
4386 int main(void) { return 0; }
4389 cc_check
-lwinmm && _win32waveout
=yes
4391 if test "$_win32waveout" = yes ; then
4392 _def_win32waveout
='#define HAVE_WIN32WAVEOUT 1'
4393 _ld_win32libs
="-lwinmm $_ld_win32libs"
4394 _aosrc
="$_aosrc ao_win32.c"
4395 _aomodules
="win32 $_aomodules"
4397 _def_win32waveout
='#undef HAVE_WIN32WAVEOUT'
4398 _noaomodules
="win32 $_noaomodules"
4400 echores
"$_win32waveout"
4403 if test "$_directx" = auto
; then
4405 #include <windows.h>
4408 int main(void) { return 0; }
4411 cc_check
-lgdi32 && _directx
=yes
4413 if test "$_directx" = yes ; then
4414 _def_directx
='#define HAVE_DIRECTX 1'
4415 _ld_win32libs
="-lgdi32 $_ld_win32libs"
4416 _vosrc
="$_vosrc vo_directx.c"
4417 _vomodules
="directx $_vomodules"
4418 _aosrc
="$_aosrc ao_dsound.c"
4419 _aomodules
="dsound $_aomodules"
4421 _def_directx
='#undef HAVE_DIRECTX'
4422 _novomodules
="directx $_novomodules"
4423 _noaomodules
="dsound $_noaomodules"
4428 if test "$_nas" = auto
; then
4430 #include <audio/audiolib.h>
4431 int main(void) { return 0; }
4434 cc_check
-laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas
=yes
4436 if test "$_nas" = yes ; then
4437 _def_nas
='#define HAVE_NAS 1'
4438 _ld_nas
="-laudio -lXt $_ld_x11"
4439 _aosrc
="$_aosrc ao_nas.c"
4440 _aomodules
="nas $_aomodules"
4442 _noaomodules
="nas $_noaomodules"
4443 _def_nas
='#undef HAVE_NAS'
4448 if test "$_dxr2" = auto
; then
4451 #include <dxr2ioctl.h>
4452 int main(void) { return 0; }
4454 for _inc_dxr2
in "$_inc_dxr2" \
4455 "-I/usr/local/include/dxr2" \
4456 "-I/usr/include/dxr2"; do
4457 cc_check
$_inc_dxr2 && _dxr2
=yes && break
4460 if test "$_dxr2" = yes; then
4461 _def_dxr2
='#define HAVE_DXR2 1'
4462 _vosrc
="$_vosrc vo_dxr2.c"
4463 _aosrc
="$_aosrc ao_dxr2.c"
4464 _aomodules
="dxr2 $_aomodules"
4465 _vomodules
="dxr2 $_vomodules"
4466 _res_comment
="using $_inc_dxr2"
4468 _def_dxr2
='#undef HAVE_DXR2'
4469 _noaomodules
="dxr2 $_noaomodules"
4470 _novomodules
="dxr2 $_novomodules"
4476 if test "$_dxr3" = auto
; then
4478 #include <linux/em8300.h>
4479 int main(void) { return 0; }
4482 cc_check
&& _dxr3
=yes
4484 if test "$_dxr3" = yes ; then
4485 _def_dxr3
='#define HAVE_DXR3 1'
4486 _vosrc
="$_vosrc vo_dxr3.c"
4487 _vomodules
="dxr3 $_vomodules"
4489 _def_dxr3
='#undef HAVE_DXR3'
4490 _novomodules
="dxr3 $_novomodules"
4491 if test "$_mp1e" = auto
; then
4492 # we don't need mp1e
4499 if test "$_mmx" = no
; then
4500 # mp1e REQUIRES mmx!
4503 if test "$_mp1e" != no
; then
4505 _def_mp1e
='#define USE_MP1E'
4506 _ld_mp1e
='libmp1e/libmp1e.a'
4507 _dep_mp1e
='libmp1e/libmp1e.a'
4510 _def_mp1e
='#undef USE_MP1E'
4518 if test "$_fame" = auto
; then
4520 test "$_dxr2" = yes && _fame
=auto
4521 test "$_dxr3" = yes && _fame
=auto
4522 test "$_dvb" = yes && _fame
=auto
4524 if test "$_fame" = auto
; then
4526 if test -d libfame
&& test -f libfame
/fame.h
; then
4527 # disable fame on cygwin as no sense to port - atmos
4530 _res_comment
="no fame dir"
4535 _def_fame
='#undef USE_LIBFAME'
4536 if test "$_fame" = yes ; then
4537 _def_fame
='#define USE_LIBFAME 1'
4538 _ld_fame
='libfame/libfame.a'
4547 echocheck
"OSS Audio"
4548 if test "$_ossaudio" = auto
; then
4550 #include <sys/ioctl.h>
4552 int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
4555 cc_check
&& _ossaudio
=yes
4557 if test "$_ossaudio" = yes ; then
4558 _def_ossaudio
='#define USE_OSS_AUDIO 1'
4559 _aosrc
="$_aosrc ao_oss.c"
4560 _aomodules
="oss $_aomodules"
4561 if test "$_linux_devfs" = yes; then
4562 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound/dsp"'
4563 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/sound/mixer"'
4566 #include <sys/ioctl.h>
4568 #ifdef OPEN_SOUND_SYSTEM
4569 int main(void) { return 0; }
4571 #error Not the real thing
4575 cc_check
&& _real_ossaudio
=yes
4576 if test "$_real_ossaudio" = yes; then
4577 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4578 elif netbsd || openbsd
; then
4579 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/sound"'
4580 _ld_arch
="$_ld_arch -lossaudio"
4582 _def_ossaudio_devdsp
='#define PATH_DEV_DSP "/dev/dsp"'
4584 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER "/dev/mixer"'
4587 _def_ossaudio
='#undef USE_OSS_AUDIO'
4588 _def_ossaudio_devdsp
='#define PATH_DEV_DSP ""'
4589 _def_ossaudio_devmixer
='#define PATH_DEV_MIXER ""'
4590 _noaomodules
="oss $_noaomodules"
4592 echores
"$_ossaudio"
4596 if test "$_arts" = auto
; then
4598 if ( artsc-config
--version ) >> "$TMPLOG" 2>&1 ; then
4602 int main(void) { return 0; }
4604 cc_check
`artsc-config --libs` `artsc-config --cflags` && tmp_run
&& _arts
=yes
4609 if test "$_arts" = yes ; then
4610 _def_arts
='#define USE_ARTS 1'
4611 _aosrc
="$_aosrc ao_arts.c"
4612 _aomodules
="arts $_aomodules"
4613 _ld_arts
=`artsc-config --libs`
4614 _inc_arts
=`artsc-config --cflags`
4616 _noaomodules
="arts $_noaomodules"
4622 if test "$_esd" = auto
; then
4624 if ( esd-config
--version ) >> "$TMPLOG" 2>&1 ; then
4628 int main(void) { return 0; }
4630 cc_check
`esd-config --libs` `esd-config --cflags` && tmp_run
&& _esd
=yes
4636 if test "$_esd" = yes ; then
4637 _def_esd
='#define USE_ESD 1'
4638 _aosrc
="$_aosrc ao_esd.c"
4639 _aomodules
="esd $_aomodules"
4640 _ld_esd
=`esd-config --libs`
4641 _inc_esd
=`esd-config --cflags`
4643 echocheck
"esd_get_latency()"
4646 int main(void) { return esd_get_latency(0); }
4648 cc_check
`esd-config --libs` `esd-config --cflags` && _esd_latency
=yes && _def_esd_latency
='#define HAVE_ESD_LATENCY'
4649 echores
"$_esd_latency"
4651 _def_esd
='#undef USE_ESD'
4652 _def_esd_latency
='#undef HAVE_ESD_LATENCY'
4653 _noaomodules
="esd $_noaomodules"
4657 if test "$_polyp" = auto
; then
4659 if ( pkg-config
--exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ) >> "$TMPLOG" 2>&1 ; then
4662 #include <polyp/polyplib.h>
4663 #include <polyp/mainloop.h>
4664 #include <polyp/polyplib-error.h>
4665 int main(void) { return 0; }
4667 cc_check
`pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run
&& _polyp
=yes
4673 if test "$_polyp" = yes ; then
4674 _def_polyp
='#define USE_POLYP 1'
4675 _aosrc
="$_aosrc ao_polyp.c"
4676 _aomodules
="polyp $_aomodules"
4677 _ld_polyp
=`pkg-config --libs polyplib polyplib-error polyplib-mainloop`
4678 _inc_polyp
=`pkg-config --cflags polyplib polyplib-error polyplib-mainloop`
4680 _def_polyp
='#undef USE_POLYP'
4681 _noaomodules
="polyp $_noaomodules"
4686 if test "$_jack" = auto
; then
4690 #include <jack/jack.h>
4691 int main(void) { jack_client_new("test"); return 0; }
4693 if cc_check
-ljack ; then
4695 elif cc_check
`pkg-config --libs --cflags --silence-errors jack` ; then
4696 _ld_jack
="`pkg-config --libs jack`"
4697 _inc_jack
="`pkg-config --cflags jack`"
4703 if test "$_jack" = yes ; then
4704 _def_jack
='#define USE_JACK 1'
4705 _aosrc
="$_aosrc ao_jack.c"
4706 _aomodules
="jack $_aomodules"
4708 _noaomodules
="jack $_noaomodules"
4713 echocheck
"ALSA audio"
4714 if test "$_alsa" != no
; then
4717 #include <sys/asoundlib.h>
4718 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
4719 #error "alsa version != 0.5.x"
4721 int main(void) { return 0; }
4723 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.5.x'
4726 #include <sys/asoundlib.h>
4727 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
4728 #error "alsa version != 0.9.x"
4730 int main(void) { return 0; }
4732 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-sys'
4734 #include <alsa/asoundlib.h>
4735 #if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
4736 #error "alsa version != 0.9.x"
4738 int main(void) { return 0; }
4740 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='0.9.x-alsa'
4743 #include <sys/asoundlib.h>
4744 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
4745 #error "alsa version != 1.0.x"
4747 int main(void) { return 0; }
4749 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-sys'
4751 #include <alsa/asoundlib.h>
4752 #if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
4753 #error "alsa version != 1.0.x"
4755 int main(void) { return 0; }
4757 cc_check
-lasound $_ld_dl $_ld_pthread && _alsaver
='1.0.x-alsa'
4759 _def_alsa5
='#undef HAVE_ALSA5'
4760 _def_alsa9
='#undef HAVE_ALSA9'
4761 _def_alsa1x
='#undef HAVE_ALSA1X'
4762 _def_sys_asoundlib_h
='#undef HAVE_SYS_ASOUNDLIB_H'
4763 _def_alsa_asoundlib_h
='#undef HAVE_ALSA_ASOUNDLIB_H'
4764 if test "$_alsaver" ; then
4766 if test "$_alsaver" = '0.5.x' ; then
4767 _aosrc
="$_aosrc ao_alsa5.c"
4768 _aomodules
="alsa5 $_aomodules"
4769 _def_alsa5
='#define HAVE_ALSA5 1'
4770 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4771 _res_comment
="using alsa 0.5.x and sys/asoundlib.h"
4772 elif test "$_alsaver" = '0.9.x-sys' ; then
4773 _aosrc
="$_aosrc ao_alsa.c"
4774 _aomodules
="alsa $_aomodules"
4775 _def_alsa9
='#define HAVE_ALSA9 1'
4776 _def_sys_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4777 _res_comment
="using alsa 0.9.x and sys/asoundlib.h"
4778 elif test "$_alsaver" = '0.9.x-alsa' ; then
4779 _aosrc
="$_aosrc ao_alsa.c"
4780 _aomodules
="alsa $_aomodules"
4781 _def_alsa9
='#define HAVE_ALSA9 1'
4782 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4783 _res_comment
="using alsa 0.9.x and alsa/asoundlib.h"
4784 elif test "$_alsaver" = '1.0.x-sys' ; then
4785 _aosrc
="$_aosrc ao_alsa.c"
4786 _aomodules
="alsa $_aomodules"
4787 _def_alsa1x
="#define HAVE_ALSA1X 1"
4788 _def_alsa_asoundlib_h
='#define HAVE_SYS_ASOUNDLIB_H 1'
4789 _res_comment
="using alsa 1.0.x and sys/asoundlib.h"
4790 elif test "$_alsaver" = '1.0.x-alsa' ; then
4791 _aosrc
="$_aosrc ao_alsa.c"
4792 _aomodules
="alsa $_aomodules"
4793 _def_alsa1x
="#define HAVE_ALSA1X 1"
4794 _def_alsa_asoundlib_h
='#define HAVE_ALSA_ASOUNDLIB_H 1'
4795 _res_comment
="using alsa 1.0.x and alsa/asoundlib.h"
4798 _res_comment
="unknown version"
4800 _ld_alsa
="-lasound $_ld_dl $_ld_pthread"
4802 _noaomodules
="alsa $_noaomodules"
4807 echocheck
"Sun audio"
4808 if test "$_sunaudio" = auto
; then
4810 #include <sys/types.h>
4811 #include <sys/audioio.h>
4812 int main(void) { audio_info_t info; AUDIO_INITINFO(&info); return 0; }
4815 cc_check
&& _sunaudio
=yes
4817 if test "$_sunaudio" = yes ; then
4818 _def_sunaudio
='#define USE_SUN_AUDIO 1'
4819 _aosrc
="$_aosrc ao_sun.c"
4820 _aomodules
="sun $_aomodules"
4822 _def_sunaudio
='#undef USE_SUN_AUDIO'
4823 _noaomodules
="sun $_noaomodules"
4825 echores
"$_sunaudio"
4828 echocheck
"Sun mediaLib"
4829 if test "$_mlib" = auto
; then
4831 test -z "$_mlibdir" && _mlibdir
=/opt
/SUNWmlib
4834 int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
4836 cc_check
-I${_mlibdir}/include
-L${_mlibdir}/lib
-lmlib && _mlib
=yes
4838 if test "$_mlib" = yes ; then
4839 _def_mlib
='#define HAVE_MLIB 1'
4840 _inc_mlib
=" -I${_mlibdir}/include "
4841 _ld_mlib
=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib "
4843 _def_mlib
='#undef HAVE_MLIB'
4848 echocheck
"SGI audio"
4849 if test "$_sgiaudio" = auto
; then
4850 # check for SGI audio
4852 #include <dmedia/audio.h>
4853 int main(void) { return 0; }
4856 cc_check
&& _sgiaudio
=yes
4858 if test "$_sgiaudio" = "yes" ; then
4859 _def_sgiaudio
='#define USE_SGI_AUDIO 1'
4860 _ld_sgiaudio
='-laudio'
4861 _aosrc
="$_aosrc ao_sgi.c"
4862 _aomodules
="sgi $_aomodules"
4864 _def_sgiaudio
='#undef USE_SGI_AUDIO'
4865 _noaomodules
="sgi $_noaomodules"
4867 echores
"$_sgiaudio"
4870 echocheck
"VCD support"
4871 if linux || bsdos || freebsd || netbsd || sunos || darwin
; then
4872 _inputmodules
="vcd $_inputmodules"
4873 _def_vcd
='#define HAVE_VCD 1'
4876 _def_vcd
='#undef HAVE_VCD'
4877 _noinputmodules
="vcd $_noinputmodules"
4878 echores
"not supported on this OS"
4881 echocheck
"DVD support (libmpdvdkit)"
4882 if test "$_dvdkit" = auto
; then
4884 if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux
; then
4885 test -f "./libmpdvdkit2/Makefile" && _dvdkit
=yes
4886 test -f "./libmpdvdkit/Makefile" && _dvdkit
=yes
4889 if test "$_dvdkit" = yes ; then
4890 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
4891 if test -f "./libmpdvdkit2/Makefile" ; then
4892 _inputmodules
="mpdvdkit2 $_inputmodules"
4893 _dvdread
=libmpdvdkit2
4897 _inputmodules
="mpdvdkit $_inputmodules"
4898 _dvdread
=libmpdvdkit
4901 _noinputmodules
="mpdvdkit $_noinputmodules"
4903 _def_dvd_linux
='#undef HAVE_LINUX_DVD_STRUCT'
4904 _def_dvd_bsd
='#undef HAVE_BSD_DVD_STRUCT'
4905 _dev_dvd_openbsd
='#undef HAVE_OPENBSD_DVD_STRUCT'
4906 _def_dvd_darwin
='#undef DARWIN_DVD_IOCTL'
4907 if linux || netbsd || openbsd || bsdos
; then
4908 _def_dvd_linux
='#define HAVE_LINUX_DVD_STRUCT 1'
4910 _dev_dvd_openbsd
='#define HAVE_OPENBSD_DVD_STRUCT 1'
4914 _def_dvd_bsd
='#define HAVE_BSD_DVD_STRUCT 1'
4917 _def_dvd_darwin
='#define DARWIN_DVD_IOCTL'
4922 _noinputmodules
="mpdvdkit $_noinputmodules"
4924 if test "$_dvdkit" = yes ||
test "$_dvdkit2" = yes; then
4930 echocheck
"DVD support (libdvdread)"
4931 if test "$_dvdread" = auto
; then
4933 #include <inttypes.h>
4934 #include <dvdread/dvd_reader.h>
4935 #include <dvdread/ifo_types.h>
4936 #include <dvdread/ifo_read.h>
4937 #include <dvdread/nav_read.h>
4938 int main(void) { return 0; }
4941 if test "$_dl" = yes; then
4943 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
4947 _def_mpdvdkit
="#undef USE_MPDVDKIT"
4951 _def_dvdread
='#define USE_DVDREAD 1'
4952 _ld_dvdread
='-ldvdread'
4953 _inputmodules
="dvdread $_inputmodules"
4957 _def_dvdread
='#undef USE_DVDREAD'
4958 _noinputmodules
="dvdread $_noinputmodules"
4963 _def_dvdread
='#define USE_DVDREAD 1'
4964 _ld_dvdread
='-Llibmpdvdkit -lmpdvdkit'
4965 _noinputmodules
="dvdread $_noinputmodules"
4966 _def_mpdvdkit
="#define USE_MPDVDKIT 1"
4967 echores
"disabled by libmpdvdkit"
4971 _def_dvdread
='#define USE_DVDREAD 1'
4972 _ld_dvdread
='-Llibmpdvdkit2 -lmpdvdkit'
4973 _noinputmodules
="dvdread $_noinputmodules"
4974 _def_mpdvdkit
="#define USE_MPDVDKIT 2"
4975 echores
"disabled by libmpdvdkit2"
4979 # dvdnav disabled, it does not work
4980 # echocheck "DVD support (libdvdnav)"
4981 # if test "$_dvdnav" = yes ; then
4983 # #include <dvdnav.h>
4984 # int main(void) { dvdnav_t *dvd=0; return 0; }
4987 # test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
4988 # if test -z "$_dvdnavconfig" ; then
4989 # if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
4990 # _dvdnavconfig="dvdnav-config"
4993 # test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
4995 # test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
4996 # cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes
4998 # if test "$_dvdnav" = yes ; then
5000 # _def_dvdnav='#define USE_DVDNAV 1'
5001 # if test -n "$_legal_dvdnavdir" ; then
5002 # _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
5003 # elif test -n "$_dvdnavconfig" ; then
5004 # _ld_css="$_ld_css `$_dvdnavconfig --libs`"
5006 # _ld_css="$_ld_css -ldvdnav"
5008 # if test -n "$_dvdnavconfig" ; then
5009 # _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
5010 # _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
5012 # if test -n "$_dvdnavdir" ; then
5013 # _inc_extra="$_inc_extra -I$_dvdnavdir"
5015 # _inputmodules="dvdnav $_inputmodules"
5018 # _def_dvdnav='#undef USE_DVDNAV'
5019 # _noinputmodules="dvdnav $_noinputmodules"
5023 echocheck
"cdparanoia"
5024 if test "$_cdparanoia" = auto
; then
5026 #include <cdda_interface.h>
5027 #include <cdda_paranoia.h>
5028 // This need a better test. How ?
5029 int main(void) { return 1; }
5032 for _inc_tmp
in "$_inc_cdparanoia" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5033 cc_check
$_inc_tmp $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm && _inc_cdparanoia
="$_inc_tmp" && _cdparanoia
=yes && break
5036 if test "$_cdparanoia" = yes ; then
5037 _def_cdparanoia
='#define HAVE_CDDA'
5038 _inputmodules
="cdda $_inputmodules"
5039 _ld_cdparanoia
="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
5040 openbsd
&& _ld_cdparanoia
="$_ld_cdparanoia -lutil"
5042 _def_cdparanoia
='#undef HAVE_CDDA'
5043 _noinputmodules
="cdda $_noinputmodules"
5045 echores
"$_cdparanoia"
5048 echocheck
"freetype >= 2.0.9"
5050 # freetype depends on iconv
5051 if test "$_iconv" = no
; then
5053 _res_comment
="iconv support needed"
5056 if test "$_freetype" = auto
; then
5057 if ( $_freetypeconfig --version ) >/dev
/null
2>&1 ; then
5060 #include <ft2build.h>
5061 #include FT_FREETYPE_H
5062 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5063 #error "Need FreeType 2.0.9 or newer"
5068 FT_Int major=-1,minor=-1,patch=-1;
5069 int err=FT_Init_FreeType(&library);
5071 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5074 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5075 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5076 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5077 (int)major,(int)minor,(int)patch );
5078 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){
5079 printf("Library and header version mismatch! Fix it in your distribution!\n");
5086 cc_check
`$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run
&& _freetype
=yes
5091 if test "$_freetype" = yes ; then
5092 _def_freetype
='#define HAVE_FREETYPE'
5093 _inc_freetype
=`$_freetypeconfig --cflags`
5094 _ld_freetype
=`$_freetypeconfig --libs`
5096 _def_freetype
='#undef HAVE_FREETYPE'
5098 echores
"$_freetype"
5100 if test "$_freetype" = no
; then
5102 _res_comment
="freetype support needed"
5104 echocheck
"fontconfig"
5105 if test "$_fontconfig" = auto
; then
5108 #include <fontconfig/fontconfig.h>
5113 printf("Couldn't initialize fontconfig lib\n");
5121 if cc_check
-lfontconfig ; then
5122 _ld_fontconfig
="-lfontconfig"
5123 elif cc_check
`pkg-config --cflags --libs fontconfig` ; then
5124 _inc_fontconfig
=`pkg-config --cflags fontconfig`
5125 _ld_fontconfig
=`pkg-config --libs fontconfig`
5130 if test "$_fontconfig" = yes ; then
5131 _def_fontconfig
='#define HAVE_FONTCONFIG'
5133 _def_fontconfig
='#undef HAVE_FONTCONFIG'
5135 echores
"$_fontconfig"
5137 echocheck
"fribidi with charsets"
5138 if test "$_fribidi" = yes ; then
5139 if ( $_fribidiconfig --version ) >/dev
/null
2>&1 ; then
5142 /* workaround for fribidi 0.10.4 and below */
5143 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5144 #include <fribidi/fribidi.h>
5147 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5148 printf("Fribidi headers are not consistents with the library!\n");
5155 cc_check
`$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run
&& _fribidi
=yes
5160 if test "$_fribidi" = yes ; then
5161 _def_fribidi
='#define USE_FRIBIDI'
5162 _inc_fribidi
=`$_fribidiconfig --cflags`
5163 _ld_fribidi
=`$_fribidiconfig --libs`
5165 _def_fribidi
='#undef USE_FRIBIDI'
5171 if test "$_enca" = auto
; then
5178 langs = enca_get_languages(&langcnt);
5183 cc_check
-lenca $_ld_lm && _enca
=yes
5185 if test "$_enca" = yes ; then
5186 _def_enca
='#define HAVE_ENCA 1'
5189 _def_enca
='#undef HAVE_ENCA'
5197 int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
5200 cc_check
-lz && _zlib
=yes
5201 if test "$_zlib" = yes ; then
5202 _def_zlib
='#define HAVE_ZLIB 1'
5205 _def_zlib
='#undef HAVE_ZLIB'
5211 if test "$_rtc" = auto
; then
5213 #include <sys/ioctl.h>
5215 #include <linux/rtc.h>
5218 #define RTC_PIE_ON RTCIO_PIE_ON
5220 int main(void) { return RTC_PIE_ON; }
5223 cc_check
&& _rtc
=yes
5225 if test "$_rtc" = yes ; then
5226 _def_rtc
='#define HAVE_RTC 1'
5228 _def_rtc
='#undef HAVE_RTC'
5233 echocheck
"external liblzo support"
5234 if test "$_liblzo" = auto
; then
5238 int main(void) { lzo_init();return 0; }
5240 cc_check
-llzo && _liblzo
=yes
5242 if test "$_liblzo" = yes ; then
5243 _def_liblzo
='#define USE_LIBLZO 1'
5245 _codecmodules
="liblzo $_codecmodules"
5247 _def_liblzo
='#undef USE_LIBLZO'
5248 _nocodecmodules
="liblzo $_nocodecmodules"
5253 echocheck
"mad support"
5254 if test "$_mad" = auto
; then
5258 int main(void) { return 0; }
5260 cc_check
$_madlibdir -lmad && _mad
=yes
5262 if test "$_mad" = yes ; then
5263 _def_mad
='#define USE_LIBMAD 1'
5265 _codecmodules
="libmad $_codecmodules"
5267 _def_mad
='#undef USE_LIBMAD'
5268 _nocodecmodules
="libmad $_nocodecmodules"
5273 if test "$_toolame" = auto
; then
5275 #include <toolame.h>
5276 int main(void) { toolame_init(); return 0; }
5279 _toolame_extraflags
=""
5280 _toolame_lib
="-ltoolame"
5281 if test -n "$_toolamedir"; then
5282 _toolame_extraflags
="-I$_toolamedir -L$_toolamedir"
5284 cc_check
$_toolame_extraflags $_toolame_lib $_ld_lm && _toolame
=yes
5286 if test "$_toolame" = yes ; then
5287 _def_toolame
='#define HAVE_TOOLAME 1'
5288 _codecmodules
="$_codecmodules toolame"
5290 _def_toolame
='#undef HAVE_TOOLAME'
5292 _nocodecmodules
="toolame $_nocodecmodules"
5294 if test "$_toolamedir" ; then
5295 _res_comment
="using $_toolamedir"
5300 if test "$_twolame" = auto
; then
5302 #include <twolame.h>
5303 int main(void) { twolame_init(); return 0; }
5306 _twolame_lib
="-ltwolame"
5307 cc_check
$_twolame_lib $_ld_lm && _twolame
=yes
5309 if test "$_twolame" = yes ; then
5310 _def_twolame
='#define HAVE_TWOLAME 1'
5311 _codecmodules
="$_codecmodules twolame"
5313 _def_twolame
='#undef HAVE_TWOLAME'
5315 _nocodecmodules
="twolame $_nocodecmodules"
5319 echocheck
"OggVorbis support"
5320 if test "$_tremor_internal" = yes; then
5322 elif test "$_vorbis" = auto
; then
5325 #include <vorbis/codec.h>
5326 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
5328 cc_check
-lvorbis -logg $_ld_lm && _vorbis
=yes
5330 if test "$_vorbis" = yes ; then
5331 _def_vorbis
='#define HAVE_OGGVORBIS 1'
5332 if test "$_tremor_internal" = yes ; then
5333 # do not set _ld_vorbis as it is resolved separately
5334 # mp3lame support for vorbis is deprecated so don't care
5335 _def_tremor
='#define TREMOR 1'
5336 if test "$_tremor_low" = yes ; then
5337 _tremor_flags
='-D_LOW_ACCURACY_'
5341 _codecmodules
="tremor(internal) $_codecmodules"
5342 elif test "$_tremor" = yes ; then
5343 _def_tremor
='#define TREMOR 1'
5344 _ld_vorbis
='-lvorbisidec'
5345 _codecmodules
="tremor $_codecmodules"
5347 _def_tremor
='#undef TREMOR'
5348 _ld_vorbis
='-lvorbis -logg'
5349 _codecmodules
="libvorbis $_codecmodules"
5352 _def_vorbis
='#undef HAVE_OGGVORBIS'
5353 _def_tremor
='#undef TREMOR'
5354 _nocodecmodules
="libvorbis $_nocodecmodules"
5356 if test "$_vorbis" = yes -a "$_tremor_internal" = yes -a "$_tremor_low" = yes ; then
5357 _res_comment
="internal low accuracy Tremor"
5358 elif test "$_vorbis" = yes -a "$_tremor_internal" = yes ; then
5359 _res_comment
="internal Tremor"
5360 elif test "$_vorbis" = yes -a "$_tremor" = yes ; then
5361 _res_comment
="Tremor"
5365 echocheck
"OggTheora support"
5366 if test "$_theora" = auto
; then
5368 if ( pkg-config
--exists 'theora' ) >> "$TMPLOG" 2>&1 ; then
5370 #include <theora/theora.h>
5374 /* theora is in flux, make sure that all interface routines and
5375 * datatypes exist and work the way we expect it, so we don't break
5385 theora_info_init (&inf);
5386 theora_comment_init (&tc);
5390 /* we don't want to execute this kind of nonsense; just for making sure
5391 * that compilation works... */
5392 memset(&op, 0, sizeof(op));
5393 r = theora_decode_header (&inf, &tc, &op);
5394 r = theora_decode_init (&st, &inf);
5395 t = theora_granule_time (&st, op.granulepos);
5396 r = theora_decode_packetin (&st, &op);
5397 r = theora_decode_YUVout (&st, &yuv);
5403 cc_check
`pkg-config --libs --cflags theora` && _theora
=yes
5406 if test "$_theora" = yes ; then
5407 _def_theora
='#define HAVE_OGGTHEORA 1'
5408 _codecmodules
="libtheora $_codecmodules"
5409 _ld_theora
=`pkg-config --libs --cflags theora`
5411 _def_theora
='#undef HAVE_OGGTHEORA'
5412 _nocodecmodules
="libtheora $_nocodecmodules"
5416 echocheck
"mp3lib support"
5417 if test "$_mp3lib" = yes ; then
5418 _def_mp3lib
='#define USE_MP3LIB 1'
5419 _codecmodules
="mp3lib $_codecmodules"
5421 _def_mp3lib
='#undef USE_MP3LIB'
5422 _nocodecmodules
="mp3lib $_nocodecmodules"
5426 echocheck
"liba52 support"
5427 if test "$_liba52" = yes ; then
5428 _def_liba52
='#define USE_LIBA52 1'
5429 _codecmodules
="liba52 $_codecmodules"
5431 _def_liba52
='#undef USE_LIBA52'
5432 _nocodecmodules
="liba52 $_nocodecmodules"
5436 echocheck
"libdts support"
5437 if test "$_libdts" = auto
; then
5440 #include <inttypes.h>
5442 int main(void) { dts_init (0); return 0; }
5444 cc_check
$_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts
=yes
5446 if test "$_libdts" = yes ; then
5447 _def_libdts
='#define CONFIG_DTS 1'
5448 _ld_libdts
="$_ld_libdts -ldts"
5449 _codecmodules
="libdts $_codecmodules"
5451 _def_libdts
='#undef CONFIG_DTS'
5452 _nocodecmodules
="libdts $_nocodecmodules"
5456 echocheck
"libmpeg2 support"
5457 if test "$_libmpeg2" = yes ; then
5458 _def_libmpeg2
='#define USE_LIBMPEG2 1'
5459 _codecmodules
="libmpeg2 $_codecmodules"
5461 _def_libmpeg2
='#undef USE_LIBMPEG2'
5462 _nocodecmodules
="libmpeg2 $_nocodecmodules"
5464 echores
"$_libmpeg2"
5466 echocheck
"libmpcdec (musepack, version >= 1.2.1 required)"
5467 if test "$_musepack" = auto
; then
5470 #include <mpcdec/mpcdec.h>
5472 mpc_streaminfo info;
5473 mpc_decoder decoder;
5474 mpc_decoder_set_streaminfo(&decoder, &info);
5475 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
5478 cc_check
-lmpcdec $_ld_lm && _musepack
=yes
5480 if test "$_musepack" = yes ; then
5481 _def_musepack
='#define HAVE_MUSEPACK 1'
5482 _ld_musepack
='-lmpcdec'
5483 _codecmodules
="musepack $_codecmodules"
5485 _def_musepack
='#undef HAVE_MUSEPACK'
5486 _nocodecmodules
="musepack $_nocodecmodules"
5488 echores
"$_musepack"
5491 echocheck
"Matroska support"
5492 if test "$_matroska_internal" = yes ; then
5493 _inputmodules
="matroska $_inputmodules"
5494 _def_matroska
='#define HAVE_MATROSKA 1'
5496 _noinputmodules
="matroska $_noinputmodules"
5497 _def_matroska
='#undef HAVE_MATROSKA'
5499 echores
"$_matroska_internal"
5501 echocheck
"FAAC (AAC encoder) support"
5502 if test "$_faac" = auto
; then
5504 #include <inttypes.h>
5506 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
5509 for _ld_tmp
in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
5510 cc_check
-c -O4 $_ld_tmp $_ld_lm && _ld_faac
="$_ld_tmp" && _faac
=yes && break
5513 if test "$_faac" = yes ; then
5514 _def_faac
="#define HAVE_FAAC 1"
5515 _codecmodules
="faac $_codecmodules"
5517 _def_faac
="#undef HAVE_FAAC"
5518 _nocodecmodules
="faac $_nocodecmodules"
5522 echocheck
"internal FAAD2 (AAC) support"
5523 _inc_faad
="-I`pwd`/libfaad2"
5524 if test "$_faad_internal" = auto
; then
5525 # the faad check needs a config.h file
5526 if not
test -f "config.h" ; then
5527 cat > config.h
<< EOF
5528 /* C99 lrintf function available */
5532 # internal faad: check if our dear gcc is able to compile it...
5533 cp "`pwd`/libfaad2/cfft.c" $TMPC
5534 if ( cc_check
-c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer -D_GNU_SOURCE $_inc_faad ); then
5537 _faad_internal
="no (broken gcc)"
5540 if test "$_faad_internal" = yes ; then
5541 _def_faad_internal
="#define USE_INTERNAL_FAAD 1"
5544 _def_faad_internal
="#undef USE_INTERNAL_FAAD"
5547 echores
"$_faad_internal"
5550 echocheck
"external FAAD2 (AAC) support"
5551 if test "$_faad_external" != no
; then
5553 _inc_faad
="$_inc_extra"
5554 # external faad: check if it's really faad2 :)
5555 if test "$_faad_external" = auto
; then
5559 #ifndef FAAD_MIN_STREAMSIZE
5560 #error Too old version
5562 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
5564 cc_check
$_inc_faad $_ld_faad $_ld_lm && _faad_external
=yes
5567 echores
"$_faad_external"
5569 if test "$_faad_external" = yes; then
5570 _def_faad
='#define HAVE_FAAD 1'
5571 _codecmodules
="faad2(external) $_codecmodules"
5572 elif test "$_faad_internal" = yes; then
5573 _def_faad
='#define HAVE_FAAD 1'
5574 _codecmodules
="faad2(internal) $_codecmodules"
5576 _def_faad
='#undef HAVE_FAAD'
5577 _nocodecmodules
="faad2 $_nocodecmodules"
5582 echocheck
"LADSPA plugin support"
5583 if test "$_ladspa" = auto
; then
5588 const LADSPA_Descriptor *ld = NULL;
5593 cc_check
&& _ladspa
=yes
5595 if test "$_ladspa" = yes; then
5596 _def_ladspa
="#define HAVE_LADSPA"
5597 _afsrc
="$_afsrc af_ladspa.c"
5598 _afmodules
="ladspa $_afmodules"
5600 _def_ladspa
="#undef HAVE_LADSPA"
5601 _noafmodules
="ladspa $_noafmodules"
5606 if test "$_win32" = auto
; then
5610 _win32
=no
# x86 arch only
5614 if test "$_win32" != no
; then
5615 if test -z "$_win32libdir" ; then
5616 for I
in "$_libdir/codecs" "$_libdir/win32" /usr
/local
/lib
/codecs
/usr
/lib
/codecs
/usr
/local
/lib
/win32
/usr
/lib
/win32
; do
5617 if test -d "$I" ; then
5625 echocheck
"Win32 codec DLL support"
5626 if test "$_win32" = auto
; then
5628 test -n "$_win32libdir" && _win32
=yes
5630 if test "$_win32" = yes ; then
5631 _def_win32
='#define USE_WIN32DLL 1'
5632 _res_comment
="using $_win32libdir"
5634 _def_win32
='#undef USE_WIN32DLL'
5635 _nocodecmodules
="win32 $_nocodecmodules"
5640 if test "$_win32" != no
; then
5641 _def_win32_loader
='#undef WIN32_LOADER'
5642 echocheck
"Win32 loader support"
5643 _ld_win32
='loader/libloader.a'
5644 _dep_win32
='loader/libloader.a'
5645 _codecmodules
="win32 $_codecmodules"
5647 x86
&& _ld_win32
="$_ld_win32 -li386"
5650 _def_win32_loader
='#define WIN32_LOADER 1'
5653 _ld_win32libs
="$_ld_win32libs -ladvapi32 -lole32"
5654 echores
"no (using native windows)"
5658 echocheck
"DirectShow"
5661 if test "$_dshow" != no
; then
5663 # check if compiler supports C++ and C++-libs are installed correctly
5664 cat > "$TMPCPP" << EOF
5668 public: int myreturn(void);
5670 int myclass::myreturn(void) { ret = 0; return ret ; }
5671 int main(void) { myclass myobject; return myobject.myreturn(); }
5673 if cxx_check
&& tmp_run
; then
5675 echores
"yes (C++ is ok)"
5680 Your C++ runtime environment is broken.
5682 Hints: Does $_cc support C++? Do you have you a C++ compiler installed?
5683 Are the C++ libraries correctly installed?
5684 Check for libstdc++ and in (/etc/)ld.so.conf.
5686 If you do not need DirectShow support, you can also use:
5687 ./configure --disable-dshow <your-normal-configure-options>
5688 to disable building the C++ based DirectShow code.
5691 die
"$_cc's C++ is broken"
5699 if test "$_dshow" = yes ; then
5700 _def_dshow
='#define USE_DIRECTSHOW 1'
5701 _ld_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5702 _dep_dshow
='loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a'
5703 _codecmodules
="dshow/dmo $_codecmodules"
5705 _def_dshow
='#undef USE_DIRECTSHOW'
5706 _nocodecmodules
="dshow/dmo $_nocodecmodules"
5710 echocheck
"XAnim DLL"
5711 if test "$_xanim" = auto
; then
5713 _res_comment
="dynamic loader support needed"
5714 if test "$_dl" = yes ; then
5715 _res_comment
="no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html"
5716 if test -z "$_xanimlibdir" ; then
5717 for I
in "$_libdir/codecs" /usr
/local
/lib
/xanim
/mods
/usr
/lib
/xanim
/mods
/usr
/lib
/xanim
$XANIM_MOD_DIR ; do
5718 if test -d "$I" ; then
5724 test "$_xanimlibdir" && _xanim
=yes
5727 if test "$_xanim" = yes ; then
5728 _def_xanim
='#define USE_XANIM 1'
5729 _def_xanim_path
="#define XACODEC_PATH \"$_xanimlibdir\""
5730 _codecmodules
="xanim $_codecmodules"
5731 _res_comment
="using $_xanimlibdir"
5733 _def_xanim
='#undef USE_XANIM'
5734 _def_xanim_path
='#undef XACODEC_PATH'
5735 _nocodecmodules
="xanim $_nocodecmodules"
5739 echocheck
"RealPlayer DLL"
5740 if test "$_real" = auto
; then
5742 _res_comment
="dynamic loader support needed"
5743 if test "$_dl" = yes ||
test "$_win32" = yes ; then
5744 # if test "$_dl" = yes ; then
5745 _res_comment
="tested only on Linux/FreeBSD/NetBSD/Cygwin/MinGW/Darwin"
5746 if linux || freebsd || netbsd || win32 || darwin
; then
5747 _res_comment
="no suitable directory found - see DOCS/HTML/$_doc_lang/codecs.html"
5748 if test -z "$_reallibdir" ; then
5749 for I
in "$_libdir/codecs" "$_libdir/real" /usr
/lib
/real \
5750 /usr
/lib
/RealPlayer
{9,8,}/Codecs
/usr
/local
/RealPlayer
{9,8,}/Codecs \
5751 /usr
/local
/lib
/RealPlayer
{9,8,}/Codecs
/opt
/RealPlayer
{9,8,}/{Real
/,}Codecs \
5752 {~
,}/Applications
/RealOne\ Player.app
/Contents
/MacOS
/Library
/Codecs \
5754 if test -d "$I" ; then
5760 test "$_reallibdir" && _real
=yes
5764 if test "$_real" = yes ; then
5765 _def_real
='#define USE_REALCODECS 1'
5766 _def_real_path
="#define REALCODEC_PATH \"$_reallibdir\""
5767 _codecmodules
="real $_codecmodules"
5768 _res_comment
="using $_reallibdir"
5770 _def_real
='#undef USE_REALCODECS'
5771 _def_real_path
="#undef REALCODEC_PATH"
5772 _nocodecmodules
="real $_nocodecmodules"
5777 echocheck
"LIVE555 Streaming Media libraries"
5778 if test "$_live" = auto
&& test "$_network" = yes ; then
5779 cat > $TMPCPP << EOF
5780 #include <liveMedia.hh>
5781 #if (LIVEMEDIA_LIBRARY_VERSION_INT < 1090195200)
5782 #error Please upgrade to version 2004.07.19 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/>
5788 for I
in "$_livelibdir" "$_libdir/live" "/usr/lib/live" "/usr/local/live" "/usr/local/lib/live" ; do
5789 cxx_check
-I$I/liveMedia
/include
-I$I/UsageEnvironment
/include
-I$I/groupsock
/include
&& _livelibdir
=$I && _live
=yes && break
5791 if test "$_live" != yes ; then
5792 if cxx_check
-I/usr
/include
/liveMedia
-I/usr
/include
/UsageEnvironment
-I/usr
/include
/groupsock
; then
5797 if test "$_live" = yes && test "$_network" = yes ; then
5798 echores
"yes (using $_livelibdir)"
5799 _def_live
='#define STREAMING_LIVE555 1'
5800 _live_libs_def
="# LIVE555 Streaming Media libraries:
5801 LIVE_LIB_DIR = $_livelibdir
5802 LIVE_LIBS = \$(LIVE_LIB_DIR)/liveMedia/libliveMedia.a
5803 LIVE_LIBS += \$(LIVE_LIB_DIR)/groupsock/libgroupsock.a
5804 LIVE_LIBS += \$(LIVE_LIB_DIR)/UsageEnvironment/libUsageEnvironment.a
5805 LIVE_LIBS += \$(LIVE_LIB_DIR)/BasicUsageEnvironment/libBasicUsageEnvironment.a
5806 LIVE_LIBS += -lstdc++
5807 LIVE_INCLUDES = -I\$(LIVE_LIB_DIR)/liveMedia/include
5808 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/UsageEnvironment/include
5809 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/BasicUsageEnvironment/include
5810 LIVE_INCLUDES += -I\$(LIVE_LIB_DIR)/groupsock/include"
5811 _ld_live
='$(LIVE_LIBS)'
5812 _inputmodules
="live555 $_inputmodules"
5813 elif test "$_live_dist" = yes && test "$_network" = yes ; then
5814 echores
"yes (using distribution version)"
5816 _def_live
='#define STREAMING_LIVE555 1'
5817 _live_libs_def
="# LIVE555 Streaming Media libraries:
5818 LIVE_LIB_DIR = $_livelibdir
5819 LIVE_LIBS = -lliveMedia
5820 LIVE_LIBS += -lgroupsock
5821 LIVE_LIBS += -lUsageEnvironment
5822 LIVE_LIBS += -lBasicUsageEnvironment
5823 LIVE_LIBS += -lstdc++
5824 LIVE_INCLUDES = -I/usr/include/liveMedia
5825 LIVE_INCLUDES += -I/usr/include/UsageEnvironment
5826 LIVE_INCLUDES += -I/usr/include/BasicUsageEnvironment
5827 LIVE_INCLUDES += -I/usr/include/groupsock"
5828 _ld_live
='$(LIVE_LIBS)'
5829 _inputmodules
="live555 $_inputmodules"
5832 _def_live
='#undef STREAMING_LIVE555'
5833 _noinputmodules
="live555 $_noinputmodules"
5836 echocheck
"FFmpeg libavutil (static)"
5837 if test -d libavutil
; then
5842 echores
"$_libavutil"
5844 echocheck
"FFmpeg libavcodec (static)"
5845 if test "$_libavcodec" = auto
; then
5846 # Note: static linking is preferred to dynamic linking
5848 _res_comment
="see DOCS/HTML/$_doc_lang/codecs.html"
5849 if test -d libavcodec
&& test -f libavcodec
/utils.c
; then
5850 _res_comment
="old ffmpeg version, use CVS !"
5851 if grep avcodec_find_encoder_by_name libavcodec
/utils.c
> /dev
/null
2>&1 ; then
5852 # check if libavutil is a required
5854 #include "libavcodec/avcodec.h"
5855 #if LIBAVCODEC_BUILD >= 3211265
5856 #error We need libavutil!
5858 int main(void) { return 0; }
5861 if cc_check
-I.
-I.
/libavutil
; then
5862 _libavutil_required
="no"
5864 _libavutil_required
="yes"
5866 _res_comment
="libavutil availability does not fit libavcodec version"
5867 if test "$_libavutil_required" = "$_libavutil"; then
5874 echores
"$_libavcodec"
5876 echocheck
"FFmpeg libavformat (static)"
5877 if test "$_libavformat" = auto
; then
5878 # Note: static linking is preferred to dynamic linking
5880 if test -d libavformat
&& test -f libavformat
/utils.c
; then
5884 echores
"$_libavformat"
5886 _def_haveffpostprocess
='no'
5887 if test -d libavcodec
&& test -f libavcodec
/libpostproc
/postprocess.h
; then
5888 _def_haveffpostprocess
='yes'
5891 if test "$_libavcodec" != yes ; then
5892 echocheck
"FFmpeg libavcodec (dynamic)"
5893 if test "$_libavcodecso" = auto
; then
5895 _res_comment
="libavcodec.so is broken/obsolete"
5896 # FIXME : check for avcodec_find_encoder_by_name() for mencoder
5898 #define FF_POSTPROCESS 1
5899 #include <ffmpeg/avcodec.h>
5901 avcodec_find_encoder_by_name("");
5905 if cc_check
-lavcodec $_ld_lm ; then
5907 _res_comment
="using libavcodec.so, but static libavcodec is recommended"
5910 echores
"$_libavcodecso"
5913 _def_libavcodec
='#undef USE_LIBAVCODEC'
5914 _def_libavcodecso
='#undef USE_LIBAVCODEC_SO'
5915 _def_ffpostprocess
='#undef FF_POSTPROCESS'
5916 if test "$_libavcodec" = yes ; then
5917 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5918 _ld_libavcodec
='libavcodec/libavcodec.a'
5919 _dep_libavcodec
='libavcodec/libavcodec.a'
5920 _def_ffpostprocess
='#define FF_POSTPROCESS 1'
5921 _codecmodules
="libavcodec $_codecmodules"
5922 if test "$_libavutil" = yes; then
5923 _ld_libavutil
='libavutil/libavutil.a'
5924 _dep_libavutil
='libavutil/libavutil.a'
5926 elif test "$_libavcodecso" = yes ; then
5927 _def_libavcodec
='#define USE_LIBAVCODEC 1'
5928 _def_libavcodecso
='#define USE_LIBAVCODEC_SO 1'
5929 _ld_libavcodec
='-lavcodec'
5930 _codecmodules
="libavcodec.so $_codecmodules"
5932 _nocodecmodules
="libavcodec $_nocodecmodules"
5935 _def_libavformat
='#undef USE_LIBAVFORMAT'
5936 _def_libavformat_win32
='#undef CONFIG_WIN32'
5937 if test "$_libavformat" = yes ; then
5938 _def_libavformat
='#define USE_LIBAVFORMAT 1'
5939 _ld_libavformat
='libavformat/libavformat.a'
5940 _dep_libavformat
='libavformat/libavformat.a'
5942 _def_libavformat_win32
='#define CONFIG_WIN32 1'
5946 echocheck
"amr narrowband"
5947 if test "$_amr_nb" = auto
; then
5949 if test -f libavcodec
/amr_float
/sp_dec.c
; then
5950 if test "$_libavcodec" = yes ; then
5953 _res_comment
="libavcodec (static) is required by amr_nb, sorry"
5957 if test "$_amr_nb" = yes ; then
5958 _def_amr_nb
='#define AMR_NB 1'
5960 _def_amr_nb
='#undef AMR_NB'
5962 echores
"$_amr_nb $_echomsg"
5964 echocheck
"amr narrowband, fixed point"
5965 if test "$_amr_nb_fixed" = auto
; then
5967 if test -f libavcodec
/amr
/dtx_dec.c
; then
5968 if test "$_libavcodec" = yes ; then
5969 if test "$_amr_nb" = no
; then
5972 _res_comment
="disabled by amr_nb"
5975 _res_comment
="libavcodec (static) is required by amr_nb-fixed, sorry"
5979 if test "$_amr_nb_fixed" = yes ; then
5980 _def_amr_nb
='#define AMR_NB 1'
5981 _def_amr_nb_fixed
='#define AMR_NB_FIXED 1'
5984 _def_amr_nb_fixed
='#undef AMR_NB_FIXED'
5986 echores
"$_amr_nb_fixed"
5988 if test "$_amr_nb" = yes ; then
5989 _codecmodules
="amr_nb $_codecmodules"
5991 _nocodecmodules
="amr_nb $_nocodecmodules"
5994 echocheck
"amr wideband"
5995 if test "$_amr_wb" = auto
; then
5997 if test -f libavcodec
/amrwb_float
/dec_dtx.c
; then
5998 if test "$_libavcodec" = yes ; then
6001 _res_comment
="libavcodec (static) is required by amr_wb, sorry"
6005 if test "$_amr_wb" = yes ; then
6006 _def_amr_wb
='#define AMR_WB 1'
6007 _codecmodules
="amr_wb $_codecmodules"
6009 _def_amr_wb
='#undef AMR_WB'
6010 _nocodecmodules
="amr_wb $_nocodecmodules"
6014 echocheck
"libdv-0.9.5+"
6015 if test "$_libdv" = auto
; then
6018 #include <libdv/dv.h>
6019 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
6021 cc_check
-ldv $_ld_lm && _libdv
=yes
6023 if test "$_libdv" = yes ; then
6024 _def_libdv
='#define HAVE_LIBDV095 1'
6026 _codecmodules
="libdv $_codecmodules"
6028 _def_libdv
='#undef HAVE_LIBDV095'
6029 _nocodecmodules
="libdv $_nocodecmodules"
6034 if test "$_zr" = auto
; then
6035 #36067's seem to identify themselves as 36057PQC's, so the line
6036 #below should work for 36067's and 36057's.
6037 if grep -e "Multimedia video controller: Zoran Corporation ZR36057" /proc
/pci
> /dev
/null
2>&1; then
6043 if test "$_zr" = yes ; then
6044 if test "$_libavcodec" = yes ; then
6045 _def_zr
='#define HAVE_ZR 1'
6046 _vosrc
="$_vosrc vo_zr2.c vo_zr.c jpeg_enc.c"
6047 _vomodules
="zr zr2 $_vomodules"
6049 _res_comment
="libavcodec (static) is required by zr, sorry"
6050 _novomodules
="zr $_novomodules"
6051 _def_zr
='#undef HAVE_ZR'
6054 _def_zr
='#undef HAVE_ZR'
6055 _novomodules
="zr zr2 $_novomodules"
6060 if test "$_bl" = yes ; then
6061 _def_bl
='#define HAVE_BL 1'
6062 _vosrc
="$_vosrc vo_bl.c"
6063 _vomodules
="bl $_vomodules"
6065 _def_bl
='#undef HAVE_BL'
6066 _novomodules
="bl $_novomodules"
6073 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
6075 _ld_xvid
="$_ld_xvid -lxvidcore"
6076 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid $_ld_lm ; then
6078 _def_xvid3
='#define HAVE_XVID3 1'
6079 _def_xvid4
='#undef HAVE_XVID4'
6080 _codecmodules
="xvid $_codecmodules"
6084 int main(void) { xvid_global(0, 0, 0, 0); return 0; }
6086 if test "$_xvid" != no
&& cc_check
$_inc_xvid $_ld_xvid $_ld_lm ; then
6088 _def_xvid3
='#undef HAVE_XVID3'
6089 _def_xvid4
='#define HAVE_XVID4 1'
6090 _codecmodules
="xvid $_codecmodules"
6094 _def_xvid3
='#undef HAVE_XVID3'
6095 _def_xvid4
='#undef HAVE_XVID4'
6096 _nocodecmodules
="xvid $_nocodecmodules"
6102 _def_decore_xvid
='#undef DECORE_XVID'
6103 _def_encore_xvid
='#undef ENCORE_XVID'
6104 if test "$_xvid" = yes ; then
6105 echocheck
"DivX4 compatibility in XviD"
6108 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
6110 cc_check
$_ld_lm "$_ld_xvid" && _xvidcompat
=yes
6111 echores
"$_xvidcompat"
6116 #include <inttypes.h>
6119 #error We do not support old versions of x264. Get the latest from SVN.
6121 int main(void) { x264_encoder_open((void*)0); return 0; }
6123 _ld_x264
="$_ld_x264 -lx264 $_ld_pthread"
6124 if test "$_x264" != no
&& \
6125 ( cc_check
$_inc_x264 $_ld_x264 $_ld_lm || \
6126 ( test "$_x11" = yes && cc_check
$_inc_x264 $_inc_x11 $_ld_x264 $_ld_x11 $_ld_lm )) ; \
6129 _def_x264
='#define HAVE_X264 1'
6130 _codecmodules
="x264 $_codecmodules"
6134 _def_x264
='#undef HAVE_X264'
6135 _nocodecmodules
="x264 $_nocodecmodules"
6139 echocheck
"DivX4linux/DivX5linux/OpenDivX decore"
6140 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
6143 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
6145 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
6147 _ld_decore
='-ldivxdecore'
6148 _def_decore
='#define NEW_DECORE 1'
6149 _def_divx
='#define USE_DIVX'
6150 _def_divx5
='#undef DECORE_DIVX5'
6151 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6152 _codecmodules
="divx4linux $_codecmodules"
6153 echores
"DivX4linux (with libdivxdecore.so)"
6155 # if test "$_divx4linux" != no ; then
6157 # OdivxPP disabled because of:
6158 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
6161 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
6163 if test "$_divx4linux" != no
&& cc_check
$_ld_lm -ldivxdecore ; then
6165 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
6166 _ld_decore
='-ldivxdecore'
6167 _def_decore
='#define NEW_DECORE 1'
6168 _def_divx
='#define USE_DIVX'
6169 _def_divx5
='#define DECORE_DIVX5 1'
6170 # _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
6171 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6172 _codecmodules
="divx5linux $_codecmodules"
6173 _nocodecmodules
="divx4linux $_nocodecmodules"
6174 echores
"DivX5linux (with libdivxdecore.so)"
6175 elif test "$_opendivx" != no
; then
6177 _ld_decore
='opendivx/libdecore.a'
6178 _def_decore
='#undef NEW_DECORE'
6179 _def_divx
='#define USE_DIVX'
6180 _def_divx5
='#undef DECORE_DIVX5'
6181 _def_odivx_postprocess
='#define HAVE_ODIVX_POSTPROCESS 1'
6182 _codecmodules
="opendivx $_codecmodules"
6183 _nocodecmodules
="divx5linux $_nocodecmodules"
6185 elif test "$_xvidcompat" = yes ; then
6188 _def_decore
='#define NEW_DECORE 1'
6189 _def_divx
='#define USE_DIVX 1'
6190 _def_divx5
='#undef DECORE_DIVX5'
6191 _def_decore_xvid
='#define DECORE_XVID 1'
6192 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6193 _nocodecmodules
="opendivx divx5linux divx4linux $_nocodecmodules"
6194 echores
"XviD compat."
6198 _def_decore
='#undef NEW_DECORE'
6199 _def_divx
='#undef USE_DIVX'
6200 _def_divx5
='#undef DECORE_DIVX5'
6201 _def_odivx_postprocess
='#undef HAVE_ODIVX_POSTPROCESS'
6202 _nocodecmodules
="opendivx $_nocodecmodules"
6208 # mencoder requires (optional) those libs: libmp3lame and divx4linux encore
6209 if test "$_mencoder" != no
; then
6211 echocheck
"libmp3lame (for mencoder)"
6213 _def_mp3lame_preset
='#undef HAVE_MP3LAME_PRESET'
6214 _def_mp3lame_preset_medium
='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6216 #include <lame/lame.h>
6217 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; }
6219 # Note: libmp3lame usually depends on vorbis
6220 cc_check
-lmp3lame $_ld_vorbis $_ld_lm && tmp_run
&& _mp3lame
=yes
6221 if test "$_mp3lame" = yes ; then
6222 _def_mp3lame
="#define HAVE_MP3LAME"
6223 _ld_mp3lame
="-lmp3lame $_ld_vorbis"
6225 #include <lame/lame.h>
6226 int main(void) { int p = STANDARD_FAST; return 0; }
6228 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset
="#define HAVE_MP3LAME_PRESET"
6230 #include <lame/lame.h>
6231 int main(void) { int p = MEDIUM_FAST; return 0; }
6233 cc_check
$_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium
="#define HAVE_MP3LAME_PRESET_MEDIUM"
6235 _def_mp3lame
='#undef HAVE_MP3LAME'
6240 echocheck
"DivX4linux encore (for mencoder)"
6242 #include <encore2.h>
6243 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
6245 if test "$_divx4linux" != no
&& cc_check
-ldivxencore $_ld_lm ; then
6246 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6247 _ld_encore
='-ldivxencore'
6248 echores
"DivX4linux (with libdivxencore.so)"
6249 elif test "$_xvidcompat" = yes ; then
6250 _def_encore
='#define HAVE_DIVX4ENCORE 1'
6252 _def_encore_xvid
='#define ENCORE_XVID 1'
6253 echores
"XviD compat."
6255 _def_encore
='#undef HAVE_DIVX4ENCORE'
6261 echocheck
"mencoder"
6262 _mencoder_flag
='#undef HAVE_MENCODER'
6263 if test "$_mencoder" = yes ; then
6264 _mencoder_flag
='#define HAVE_MENCODER'
6266 echores
"$_mencoder"
6268 echocheck
"fastmemcpy"
6269 # fastmemcpy check is done earlier with tests of CPU & binutils features
6270 if test "$_fastmemcpy" = yes ; then
6271 _def_fastmemcpy
='#define USE_FASTMEMCPY 1'
6273 _def_fastmemcpy
='#undef USE_FASTMEMCPY'
6275 echores
"$_fastmemcpy"
6277 echocheck
"UniquE RAR File Library"
6278 if test "$_unrarlib" = yes ; then
6279 _def_unrarlib
='#define USE_UNRARLIB 1'
6281 _def_unrarlib
='#undef USE_UNRARLIB'
6283 echores
"$_unrarlib"
6285 echocheck
"TV interface"
6286 if test "$_tv" = yes ; then
6287 _def_tv
='#define USE_TV 1'
6288 _inputmodules
="tv $_inputmodules"
6290 _noinputmodules
="tv $_noinputmodules"
6291 _def_tv
='#undef USE_TV'
6295 echocheck
"EDL support"
6296 if test "$_edl" = yes ; then
6297 _def_edl
='#define USE_EDL'
6298 _inputmodules
="edl $_inputmodules"
6300 _noinputmodules
="edl $_noinputmodules"
6301 _def_edl
='#undef USE_EDL'
6305 echocheck
"*BSD BrookTree 848 TV interface"
6306 if test "$_tv_bsdbt848" = auto
; then
6308 if test "$_tv" = yes ; then
6310 #include <sys/types.h>
6311 #if defined(__NetBSD__)
6312 #include <dev/ic/bt8xx.h>
6314 #include <machine/ioctl_bt848.h>
6316 int main(void) { return 0; }
6318 cc_check
&& _tv_bsdbt848
=yes
6321 if test "$_tv_bsdbt848" = yes ; then
6322 _def_tv_bsdbt848
='#define HAVE_TV_BSDBT848 1'
6323 _inputmodules
="tv-bsdbt848 $_inputmodules"
6325 _def_tv_bsdbt848
='#undef HAVE_TV_BSDBT848'
6326 _noinputmodules
="tv-bsdbt848 $_noinputmodules"
6328 echores
"$_tv_bsdbt848"
6330 echocheck
"Video 4 Linux TV interface"
6331 if test "$_tv_v4l" = auto
; then
6333 if test "$_tv" = yes && linux
; then
6336 #include <linux/videodev.h>
6337 int main(void) { return 0; }
6339 cc_check
&& _tv_v4l
=yes
6342 if test "$_tv_v4l" = yes ; then
6343 _def_tv_v4l
='#define HAVE_TV_V4L 1'
6344 _inputmodules
="tv-v4l $_inputmodules"
6346 _noinputmodules
="tv-v4l $_noinputmodules"
6347 _def_tv_v4l
='#undef HAVE_TV_V4L'
6352 echocheck
"Video 4 Linux 2 TV interface"
6353 if test "$_tv_v4l2" = auto
; then
6355 if test "$_tv" = yes && linux
; then
6358 #include <linux/types.h>
6359 #include <linux/videodev2.h>
6360 int main(void) { return 0; }
6362 cc_check
&& _tv_v4l2
=yes
6365 if test "$_tv_v4l2" = yes ; then
6366 _def_tv_v4l2
='#define HAVE_TV_V4L2 1'
6367 _inputmodules
="tv-v4l2 $_inputmodules"
6369 _noinputmodules
="tv-v4l2 $_noinputmodules"
6370 _def_tv_v4l2
='#undef HAVE_TV_V4L2'
6375 echocheck
"audio select()"
6376 if test "$_select" = no
; then
6377 _def_select
='#undef HAVE_AUDIO_SELECT'
6378 elif test "$_select" = yes ; then
6379 _def_select
='#define HAVE_AUDIO_SELECT 1'
6385 # FIXME network check
6386 if test "$_network" != no
; then
6387 _def_network
='#define MPLAYER_NETWORK 1'
6388 _ld_network
="$_ld_sock"
6389 _inputmodules
="network $_inputmodules"
6391 _noinputmodules
="network $_noinputmodules"
6392 _def_network
='#undef MPLAYER_NETWORK'
6398 if not beos
&& test "$_ftp" != no
; then
6399 _def_ftp
='#define HAVE_FTP 1'
6400 _inputmodules
="ftp $_inputmodules"
6402 _noinputmodules
="ftp $_noinputmodules"
6403 _def_ftp
='#undef HAVE_FTP'
6407 echocheck
"vstream client"
6408 if test "$_vstream" = auto
; then
6411 #include <vstream-client.h>
6412 void vstream_error(const char *format, ... ) {}
6413 int main(void) { vstream_start(); return 0; }
6415 cc_check
-lvstream-client && _vstream
=yes
6417 if test "$_vstream" = yes ; then
6418 _def_vstream
='#define HAVE_VSTREAM 1'
6419 _inputmodules
="vstream $_inputmodules"
6420 _ld_vstream
='-lvstream-client'
6422 _noinputmodules
="vstream $_noinputmodules"
6423 _def_vstream
='#undef HAVE_VSTREAM'
6428 echocheck
"byte order"
6429 if test "$_big_endian" = auto
; then
6431 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
6432 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
6434 char* s = (char*)ascii_name;
6439 if strings $TMPO |
grep -l MPlayerBigEndian
>/dev
/null
; then
6445 echo -n "failed to autodetect byte order, defaulting to "
6448 if test "$_big_endian" = yes ; then
6449 _byte_order
='big-endian'
6450 _def_words_endian
='#define WORDS_BIGENDIAN 1'
6452 _byte_order
='little-endian'
6453 _def_words_endian
='#undef WORDS_BIGENDIAN'
6455 echores
"$_byte_order"
6457 echocheck
"OSD menu"
6458 if test "$_menu" = yes ; then
6459 _def_menu
='#define HAVE_MENU 1'
6461 _def_menu
='#undef HAVE_MENU'
6465 # Check to see if they want QTX codecs enabled
6466 echocheck
"QTX codecs"
6467 if test "$_qtx" = auto
; then
6470 if test "$_qtx" = yes ; then
6471 _def_qtx
='#define USE_QTX_CODECS 1'
6472 _codecmodules
="qtx $_codecmodules"
6474 _def_qtx
='#undef USE_QTX_CODECS'
6475 _nocodecmodules
="qtx $_nocodecmodules"
6480 echocheck
"Subtitles sorting"
6481 if test "$_sortsub" = yes ; then
6482 _def_sortsub
='#define USE_SORTSUB 1'
6484 _def_sortsub
='#undef USE_SORTSUB'
6489 echocheck
"XMMS inputplugin support"
6490 if test "$_xmms" = yes ; then
6492 if ( xmms-config
--version ) >/dev
/null
2>&1 ; then
6493 if test -z "$_xmmsplugindir" ; then
6494 _xmmsplugindir
=`xmms-config --input-plugin-dir`
6496 if test -z "$_xmmslibdir" ; then
6497 _xmmslibdir
=`xmms-config --exec-prefix`/lib
6500 if test -z "$_xmmsplugindir" ; then
6501 _xmmsplugindir
=/usr
/lib
/xmms
/Input
6503 if test -z "$_xmmslibdir" ; then
6504 _xmmslibdir
=/usr
/lib
6508 _def_xmms
='#define HAVE_XMMS 1'
6510 _xmms_lib
="${_xmmslibdir}/libxmms.dylib"
6512 _xmms_lib
="${_xmmslibdir}/libxmms.so.1 -export-dynamic"
6515 _def_xmms
='#undef HAVE_XMMS'
6520 if test "$_inet6" = auto
; then
6522 #include <sys/types.h>
6523 #include <sys/socket.h>
6524 int main(void) { socket(AF_INET6, SOCK_STREAM, AF_INET6); }
6531 if test "$_inet6" = yes ; then
6532 _def_inet6
='#define HAVE_AF_INET6 1'
6534 _def_inet6
='#undef HAVE_AF_INET6'
6539 echocheck
"gethostbyname2"
6540 if test "$_gethostbyname2" = auto
; then
6542 #include <sys/types.h>
6543 #include <sys/socket.h>
6545 int main(void) { gethostbyname2("", AF_INET); }
6553 if test "$_gethostbyname2" = yes ; then
6554 _def_gethostbyname2
='#define HAVE_GETHOSTBYNAME2 1'
6556 _def_gethostbyname2
='#undef HAVE_GETHOSTBYNAME2'
6558 echores
"$_gethostbyname2"
6560 # --------------- GUI specific tests begin -------------------
6563 if test "$_gui" = yes ; then
6565 # Required libraries
6566 test "$_png" != yes && die
"PNG support required for GUI compilation, please install libpng and libpng-dev packages."
6567 test "$_x11" != yes && die
"X11 support required for GUI compilation"
6569 echocheck
"XShape extension"
6571 if test "$_x11" = yes ; then
6573 #include <X11/Xlib.h>
6574 #include <X11/Xproto.h>
6575 #include <X11/Xutil.h>
6576 #include <X11/extensions/shape.h>
6579 char *name = ":0.0";
6582 int eventbase, errorbase;
6583 if (getenv("DISPLAY"))
6584 name=getenv("DISPLAY");
6585 wsDisplay=XOpenDisplay(name);
6586 if (!XShapeQueryExtension(wsDisplay,&eventbase,&errorbase))
6588 XCloseDisplay(wsDisplay);
6592 cc_check
$_inc_x11 $_ld_x11 && _xshape
=yes
6594 if test "$_xshape" = yes ; then
6595 _def_xshape
='#define HAVE_XSHAPE 1'
6597 die
"The GUI requires the X11 extension XShape (which was not found)."
6602 if test "$_gtk1" = no
; then
6604 echocheck
"GTK+ version"
6606 if pkg-config gtk
+-2.0
--exists ; then
6607 _gtk
=`pkg-config gtk+-2.0 --modversion 2>/dev/null`
6608 _inc_gtk
=`pkg-config gtk+-2.0 --cflags 2>/dev/null`
6609 _ld_gtk
=`pkg-config gtk+-2.0 --libs 2>/dev/null`
6613 if pkg-config glib-2.0
--exists ; then
6614 echocheck
"glib version"
6615 _glib
=`pkg-config glib-2.0 --modversion 2>/dev/null`
6616 _inc_glib
=`pkg-config glib-2.0 --cflags 2>/dev/null`
6617 _ld_glib
=`pkg-config glib-2.0 --libs 2>/dev/null`
6620 _def_gui
='#define HAVE_NEW_GUI 1'
6621 _def_gtk2_gui
='#define HAVE_GTK2_GUI 1'
6622 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6625 echo "GLIB-2 devel packages were not found, trying GTK 1.2"
6628 echo "GTK-2 devel packages were not found, trying GTK 1.2"
6633 if test "$_gtk1" = yes ; then
6634 # Check for old GTK (1.2.x)
6635 echocheck
"GTK version"
6636 if test -z "$_gtkconfig" ; then
6637 if ( gtk-config
--version ) >/dev
/null
2>&1 ; then
6638 _gtkconfig
="gtk-config"
6639 elif ( gtk12-config
--version ) >/dev
/null
2>&1 ; then
6640 _gtkconfig
="gtk12-config"
6642 die
"The GUI requires GTK devel packages (which were not found)."
6645 _gtk
=`$_gtkconfig --version 2>&1`
6646 _inc_gtk
=`$_gtkconfig --cflags 2>&1`
6647 _ld_gtk
=`$_gtkconfig --libs 2>&1`
6648 echores
"$_gtk (using $_gtkconfig)"
6651 echocheck
"glib version"
6652 if test -z "$_glibconfig" ; then
6653 if ( glib-config
--version ) >/dev
/null
2>&1 ; then
6654 _glibconfig
="glib-config"
6655 elif ( glib12-config
--version ) >/dev
/null
2>&1 ; then
6656 _glibconfig
="glib12-config"
6658 die
"The GUI requires GLib devel packages (which were not found)"
6661 _glib
=`$_glibconfig --version 2>&1`
6662 _inc_glib
=`$_glibconfig --cflags 2>&1`
6663 _ld_glib
=`$_glibconfig --libs 2>&1`
6664 echores
"$_glib (using $_glibconfig)"
6666 _def_gui
='#define HAVE_NEW_GUI 1'
6667 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
6668 _ld_gui
='$(GTKLIB) $(GLIBLIB)'
6671 echo "Creating Gui/config.mak"
6672 cat > Gui
/config.mak
<< EOF
6673 # -------- Generated by configure -----------
6677 GLIBINC = $_inc_glib
6678 GLIBLIBS = $_ld_glib
6683 _def_gui
='#undef HAVE_NEW_GUI'
6684 _def_gtk2_gui
='#undef HAVE_GTK2_GUI'
6686 # --------------- GUI specific tests end -------------------
6690 #############################################################################
6692 # Checking for CFLAGS
6694 if test "$_profile" != "" ||
test "$_debug" != "" ; then
6695 CFLAGS
="-W -Wall -O2 $_march $_mcpu $_debug $_profile"
6696 if test "$_cc_major" -ge "3" ; then
6697 CFLAGS
=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
6700 elif test -z "$CFLAGS" ; then
6701 CFLAGS
="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6702 # always compile with '-g' if .developer:
6703 if test -f ".developer" ; then
6705 if test "$_crash_debug" = auto
&& not mingw32
; then
6714 echocheck
"automatic gdb attach"
6715 if test "$_crash_debug" = yes ; then
6716 _def_crash_debug
='#define CRASH_DEBUG 1'
6718 _def_crash_debug
='#undef CRASH_DEBUG'
6721 echores
"$_crash_debug"
6724 CFLAGS
="$CFLAGS -mdynamic-no-pic -falign-loops=16 -DSYS_DARWIN"
6725 if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
6726 CFLAGS
="$CFLAGS -no-cpp-precomp"
6729 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
6730 test "$_altivec" = yes && CFLAGS
="$CFLAGS -DCONFIG_DARWIN"
6733 # use flag for HPUX missing setenv()
6734 CFLAGS
="$CFLAGS -DHPUX"
6738 CFLAGS
="$CFLAGS -D_REENTRANT"
6740 # FIXME bsd needs this so maybe other OS'es
6741 CFLAGS
="$CFLAGS -D_THREAD_SAFE"
6743 # 64 bit file offsets?
6744 if test "$_largefiles" = yes || freebsd
; then
6745 CFLAGS
="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
6746 if test "$_dvdread" = yes ; then
6747 # dvdread support requires this (for off64_t)
6748 CFLAGS
="$CFLAGS -D_LARGEFILE64_SOURCE"
6752 echocheck
"compiler support for -fno-PIC"
6755 int main(void) { return 0; }
6757 if cc_check
-fno-PIC ; then
6758 CFLAGS
="-fno-PIC $CFLAGS"
6764 echores
"only used for x86"
6767 echocheck
"compiler support for noexecstack"
6769 int main(void) { return 0; }
6771 if cc_check
-Wl,-z,noexecstack
; then
6772 _ld_extra
="-Wl,-z,noexecstack $_ld_extra"
6778 echocheck
"ftello()"
6779 # if we don't have ftello use the osdep/ compatibility module
6782 #include <sys/types.h>
6783 int main (void) { ftello(stdin); return 0; }
6786 cc_check
&& _ftello
=yes
6787 if test "$_ftello" = yes ; then
6788 _def_ftello
='#define HAVE_FTELLO 1'
6790 _def_ftello
='#undef HAVE_FTELLO'
6794 # Determine OS dependent libs
6796 _def_confwin32
='#define WIN32'
6797 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
6798 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
6799 CFLAGS
="$CFLAGS -D__CYGWIN__"
6803 _confwin32
='TARGET_WIN32 = yes'
6805 _confwin32
='TARGET_WIN32 = no'
6808 # Dynamic linking flags
6809 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
6811 bsd
&& _ld_dl_dynamic
='-rdynamic'
6812 if test "$_real" = yes ||
test "$_xanim" = yes && not win32
&& not qnx
; then
6813 _ld_dl_dynamic
='-rdynamic'
6816 _ld_arch
="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
6817 bsdos
&& _ld_arch
="$_ld_arch -ldvd"
6819 x86
&& _ld_arch
="$_ld_arch -li386"
6822 _def_debug
='#undef MP_DEBUG'
6823 test "$_debug" != "" && _def_debug
='#define MP_DEBUG 1'
6825 _def_linux
='#undef TARGET_LINUX'
6826 linux
&& _def_linux
='#define TARGET_LINUX 1'
6828 # TODO cleanup the VIDIX stuff here
6829 _def_vidix
='#define CONFIG_VIDIX 1'
6830 test "$_vidix" = no
&& _def_vidix
='#undef CONFIG_VIDIX'
6831 if test "$_vidix" = yes; then
6832 _vosrc
="$_vosrc vo_cvidix.c"
6833 _vomodules
="cvidix $_vomodules"
6835 _novomodules
="cvidix $_novomodules"
6837 if test "$_vidix" = yes && win32
; then
6838 _vosrc
="$_vosrc vo_winvidix.c"
6839 _vomodules
="winvidix $_vomodules"
6840 _ld_win32libs
="-lgdi32 $_ld_win32libs"
6842 _novomodules
="winvidix $_novomodules"
6844 if test "$_vidix" = yes && test "$_x11" = yes; then
6845 _vosrc
="$_vosrc vo_xvidix.c"
6846 _vomodules
="xvidix $_vomodules"
6848 _novomodules
="xvidix $_novomodules"
6850 echo Checking
for VIDIX ...
"$_vidix"
6852 _def_joystick
='#undef HAVE_JOYSTICK'
6853 if test "$_joystick" = yes ; then
6855 # TODO add some check
6856 _def_joystick
='#define HAVE_JOYSTICK 1'
6858 _joystick
="no (unsupported under $system_name)"
6861 echo Checking
for joystick ...
"$_joystick"
6864 if test "$_lirc" = auto
; then
6866 if test -c /dev
/lirc
-o -c /dev
/lirc
/0 ; then
6868 #include <lirc/lirc_client.h>
6869 int main(void) { return 0; }
6871 cc_check
-llirc_client && _lirc
=yes
6874 if test "$_lirc" = yes ; then
6875 _def_lirc
='#define HAVE_LIRC 1'
6876 _ld_lirc
='-llirc_client'
6878 _def_lirc
='#undef HAVE_LIRC'
6883 if test "$_lircc" = auto
; then
6886 #include <lirc/lircc.h>
6887 int main(void) { return 0; }
6889 cc_check
-llircc && _lircc
=yes
6891 if test "$_lircc" = yes ; then
6892 _def_lircc
='#define HAVE_LIRCC 1'
6895 _def_lircc
='#undef HAVE_LIRCC'
6899 #############################################################################
6900 echo "Creating config.mak"
6901 cat > config.mak
<< EOF
6902 # -------- Generated by configure -----------
6905 MAN_LANG = $MAN_LANG
6906 TARGET_OS = $system_name
6908 prefix = \$(DESTDIR)$_prefix
6909 BINDIR = \$(DESTDIR)$_bindir
6910 DATADIR = \$(DESTDIR)$_datadir
6911 MANDIR = \$(DESTDIR)$_mandir
6912 CONFDIR = \$(DESTDIR)$_confdir
6913 LIBDIR = \$(DESTDIR)$_libdir
6914 # FFmpeg uses libdir instead of LIBDIR
6922 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
6923 EXTRA_INC = $_inc_extra
6924 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
6925 STRIPBINARIES = $_stripbinaries
6927 HELP_FILE = $_mp_help
6930 PRG_MENCODER = $_prg_mencoder
6934 MPLAYER_NETWORK = $_network
6935 STREAMING_LIVE555 = $_live
6936 MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network
6940 CONFIG_MP3LAME = $_mp3lame
6942 I18NLIBS = $_i18n_libs
6943 MATROSKA = $_matroska_internal
6945 OPENDIVX = $_opendivx
6949 LIBMPEG2 = $_libmpeg2
6950 TREMOR = $_tremor_internal
6951 TREMOR_FLAGS = $_tremor_flags
6953 MUSEPACK = $_musepack
6955 UNRARLIB = $_unrarlib
6956 HAVE_FFPOSTPROCESS = $_def_haveffpostprocess
6961 EXTRA_LIB = $_ld_extra
6962 Z_LIB = $_ld_static $_ld_zlib
6964 WIN32_LIB = $_ld_win32libs
6965 STATIC_LIB = $_ld_static
6966 ENCA_LIB = $_ld_enca
6967 HAVE_PTHREADS = $_pthreads
6973 HAVE_XVMC_ACCEL = $_xvmc
6983 X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
6985 MLIB_LIB = $_ld_mlib
6986 MLIB_INC = $_inc_mlib
6987 DXR2_INC = $_inc_dxr2
6993 SVGA_LIB = $_ld_svga
6994 VESA_LIB = $_ld_vesa
6996 CACA_INC = $_inc_caca
6997 CACA_LIB = $_ld_caca
7000 ALSA_LIB = $_ld_alsa
7002 ARTS_LIB = $_ld_arts
7003 ARTS_INC = $_inc_arts
7006 POLYP_LIB = $_ld_polyp
7007 POLYP_INC = $_inc_polyp
7008 JACK_LIB = $_ld_jack
7009 JACK_INC = $_inc_jack
7010 SGIAUDIO_LIB = $_ld_sgiaudio
7012 # input/demuxer/codecs
7013 TERMCAP_LIB = $_ld_termcap
7014 LIRC_LIB = $_ld_lirc
7015 LIRCC_LIB = $_ld_lircc
7016 DVDREAD_LIB = $_ld_dvdread
7021 W32_DEP = $_dep_win32
7022 W32_LIB = $_ld_win32
7023 DS_DEP = $_dep_dshow
7025 AV_DEP = $_dep_libavutil $_dep_libavcodec $_dep_libavformat
7026 AV_LIB = $_ld_libavformat $_ld_libavcodec $_ld_libavutil
7027 CONFIG_LIBAVUTIL = $_libavutil
7028 CONFIG_LIBAVCODEC = $_libavcodec
7029 CONFIG_LIBAVCODECSO = $_libavcodecso
7030 CONFIG_LIBAVFORMAT = $_libavformat
7033 FAME_LIB = $_ld_fame
7034 MP1E_DEP = $_dep_mp1e
7035 MP1E_LIB = $_ld_mp1e
7036 ARCH_LIB = $_ld_arch $_ld_iconv
7038 XVID_INC = $_inc_xvid
7039 XVID_LIB = $_ld_xvid
7041 X264_INC = $_inc_x264
7042 X264_LIB = $_ld_x264
7043 CONFIG_DTS = $_libdts
7044 DTS_INC = $_inc_libdts
7045 DTS_LIB = $_ld_libdts
7046 DECORE_LIB = $_ld_decore $_ld_mp3lame
7047 MENCODER = $_mencoder
7048 ENCORE_LIB = $_ld_encore $_ld_mp3lame
7049 DIRECTFB_INC = $_inc_directfb
7050 DIRECTFB_LIB = $_ld_directfb
7051 CDPARANOIA_INC = $_inc_cdparanoia
7052 CDPARANOIA_LIB = $_ld_cdparanoia
7053 FREETYPE_INC = $_inc_freetype
7054 FREETYPE_LIB = $_ld_freetype
7055 FONTCONFIG_INC = $_inc_fontconfig
7056 FONTCONFIG_LIB = $_ld_fontconfig
7057 FRIBIDI_INC = $_inc_fribidi
7058 FRIBIDI_LIB = $_ld_fribidi
7059 LIBLZO_LIB= $_ld_liblzo
7061 VORBIS_LIB = $_ld_vorbis $_ld_libdv
7062 THEORA_LIB = $_ld_theora
7063 FAAD_LIB = $_ld_faad
7064 INTERNAL_FAAD = $_faad_internal
7065 SMBSUPPORT_LIB = $_ld_smb
7066 XMMS_PLUGINS = $_xmms
7067 XMMS_LIB = $_xmms_lib
7069 MACOSX_FINDER_SUPPORT = $_macosx_finder_support
7070 MACOSX_BUNDLE = $_macosx_bundle
7071 MACOSX_FRAMEWORKS = $_macosx_frameworks
7072 MACOSX_COREVIDEO = $_macosx_corevideo
7074 TOOLAME_EXTRAFLAGS=$_toolame_extraflags
7075 TOOLAME_LIB=$_toolame_lib
7077 TWOLAME_LIB=$_twolame_lib
7078 MUSEPACK_LIB = $_ld_musepack
7082 AMR_NB_FIXED=$_amr_nb_fixed
7084 `echo $_libavcodecs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'`
7087 # --- Some stuff for autoconfigure ----
7092 TARGET_MMX2 = $_mmx2
7093 TARGET_3DNOW = $_3dnow
7094 TARGET_3DNOWEX = $_3dnowex
7096 TARGET_ALTIVEC = $_altivec
7101 GTKLIB = $_ld_static $_ld_gtk
7102 GLIBLIB = $_ld_static $_ld_glib
7103 GTK_LIBS = $_ld_static $_ld_gui
7109 #############################################################################
7110 echo "Creating config.h"
7111 cat > config.h
<< EOF
7112 /* -------- This file has been automatically generated by configure ---------
7113 Note: Any changes in it will be lost when you run configure again. */
7115 /* Protect against multiple inclusion */
7116 #ifndef MPLAYER_CONFIG_H
7117 #define MPLAYER_CONFIG_H 1
7119 /* use GNU internationalization */
7122 /* Runtime CPU detection */
7123 $_def_runtime_cpudetection
7125 /* Dynamic a/v plugins */
7126 $_def_dynamic_plugins
7128 /* "restrict" keyword */
7129 $_def_restrict_keyword
7131 /* __builtin_expect branch prediction hint */
7132 $_def_builtin_expect
7133 #ifdef HAVE_BUILTIN_EXPECT
7134 #define likely(x) __builtin_expect ((x) != 0, 1)
7135 #define unlikely(x) __builtin_expect ((x) != 0, 0)
7137 #define likely(x) (x)
7138 #define unlikely(x) (x)
7141 /* attribute(used) as needed by some compilers */
7142 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
7143 # define attribute_used __attribute__((used))
7145 # define attribute_used
7148 #define PREFIX "$_prefix"
7153 /* enable/disable SIGHANDLER */
7156 /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
7159 /* Toggles debugging informations */
7162 /* Toggles colorized output */
7163 //#define MSG_USE_COLORS 1
7165 /* Indicates that Ogle's libdvdread is available for DVD playback */
7168 /* Indicates that dvdread is from libmpdvdkit */
7171 /* Additional options for libmpdvdkit*/
7185 /* Common data directory (for fonts, etc) */
7186 #define MPLAYER_DATADIR "$_datadir"
7187 #define MPLAYER_CONFDIR "$_confdir"
7188 #define MPLAYER_LIBDIR "$_libdir"
7190 /* Define this to compile stream-caching support, it can be enabled via
7191 -cache <kilobytes> */
7192 #define USE_STREAM_CACHE 1
7194 /* Define to include support for XviD/Divx4Linux/OpenDivx */
7197 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */
7198 /* You have to change DECORE_LIBS in config.mak, too! */
7201 /* Define if you are using DivX5Linux Decore library */
7204 /* Define if you are using XviD library */
7210 /* Define if you are using the X.264 library */
7213 /* Define to include support for libdv-0.9.5 */
7216 /* If build mencoder */
7219 /* Indicates if XviD/Divx4linux encore is available
7220 Note: for mencoder */
7223 /* Indicates if libmp3lame is available
7224 Note: for mencoder */
7226 $_def_mp3lame_preset
7227 $_def_mp3lame_preset_medium
7229 /* Define libmp1e for realtime mpeg encoding (for DXR3 and DVB cards) */
7232 /* Define this to enable avg. byte/sec-based AVI sync method by default:
7233 (use -bps or -nobps commandline option for run-time method selection)
7234 -bps gives better sync for vbr mp3 audio, it is now default */
7235 #define AVI_SYNC_BPS 1
7237 /* Undefine this if you do not want to select mono audio (left or right)
7238 with a stereo MPEG layer 2/3 audio stream. The command line option
7239 -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
7240 right-only), with 0 being the default.
7242 #define USE_FAKE_MONO 1
7244 /* Undefine this if your sound card driver has no working select().
7245 If you have kernel Oops, player hangups, or just no audio, you should
7246 try to recompile MPlayer with this option disabled! */
7249 /* define this to use iconv(3) function to codepage conversions */
7252 /* define this to use nl_langinfo function */
7255 /* define this to use RTC (/dev/rtc) for video timers */
7258 /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
7259 #define MAX_OUTBURST 65536
7261 /* set up audio OUTBURST. Do not change this! */
7262 #define OUTBURST 512
7264 /* Define this if your system has the header file for the OSS sound interface */
7267 /* Define this if your system has the header file for the OSS sound interface
7268 * in /usr/include */
7271 /* Define this if your system has the sysinfo header */
7274 /* Define this if your system has ftello() */
7278 /* Need these for FILE and off_t an config.h is usually before other includes*/
7280 #include <sys/types.h>
7281 off_t ftello(FILE *);
7284 /* Define this if your system has the "malloc.h" header file */
7287 /* memalign is mapped to malloc if unsupported */
7289 #ifndef HAVE_MEMALIGN
7290 # define memalign(a,b) malloc(b)
7291 #define MEMALIGN_HACK 1
7294 /* Define this if your system has the "alloca.h" header file */
7297 /* Define this if your system has the "sys/mman.h" header file */
7299 $_def_mman_has_map_failed
7301 /* Define this if you have the elf dynamic linker -ldl library */
7304 /* Define this if you have the kstat kernel statistics library */
7307 /* Define this if you have zlib */
7310 #define CONFIG_ZLIB 1
7313 /* Define this if you have shm support */
7316 /* Define this if your system has scandir & alphasort */
7319 /* Define this if your system has strsep */
7322 /* Define this if your system has strlcpy */
7324 #ifndef HAVE_STRLCPY
7325 unsigned int strlcpy (char *dest, const char *src, unsigned int size);
7328 /* Define this if your system has strlcat */
7330 #ifndef HAVE_STRLCAT
7331 unsigned int strlcat (char *dest, const char *src, unsigned int size);
7334 /* Define this if your system has fseeko */
7337 /* Need these for FILE and off_t an config.h is usually before other includes*/
7339 #include <sys/types.h>
7340 int fseeko(FILE *, off_t, int);
7345 /* Define this if your system has vsscanf */
7348 /* Define this if your system has swab */
7351 /* Define this if your system has no posix select */
7352 $_def_no_posix_select
7354 /* Define this if your system has gettimeofday */
7357 /* Define this if your system has glob */
7360 /* Define this if your system has pthreads */
7363 /* Define this if you enabled thread support for libavcodec */
7366 /* LIRC (remote control, see www.lirc.org) support: */
7370 * LIRCCD (LIRC client daemon)
7371 * See http://www.dolda2000.cjb.net/~fredrik/lirccd/
7375 /* DVD navigation support using libdvdnav */
7377 $_def_dvdnav_version
7379 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
7380 #define MPEG12_POSTPROC 1
7382 /* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
7385 /* Define to include support for OpenDivx postprocessing */
7386 $_def_odivx_postprocess
7388 /* Win32 DLL support */
7390 #define WIN32_PATH "$_win32libdir"
7392 /* DirectShow support */
7395 /* Mac OS X specific features */
7397 $_def_macosx_finder_support
7399 $_def_macosx_corevideo
7401 /* Build our Win32-loader */
7404 /* ffmpeg's libavcodec support (requires libavcodec source) */
7408 /* ffmpeg's libavformat support (requires libavformat source) */
7410 $_def_libavformat_win32
7412 /* Use libavcodec's decoders */
7413 #define CONFIG_DECODERS 1
7414 /* Use libavcodec's encoders */
7415 #define CONFIG_ENCODERS 1
7417 /* Use libavformat's demuxers */
7418 #define CONFIG_DEMUXERS 1
7419 /* Use libavformat's muxers */
7420 #define CONFIG_MUXERS 1
7422 #define CONFIG_MPEGAUDIO_HP 1
7424 #define CONFIG_GPL 1
7426 /* Use amr codecs from libavcodec (requires amr sources) */
7431 /* Use specific codecs from libavcodec */
7432 `echo $_libavcodecs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
7434 /* Use codec libs included in mplayer CVS / source dist: */
7440 /* Use libfame encoder filter */
7443 /* XAnim DLL support */
7445 /* Default search path */
7448 /* RealPlayer DLL support */
7450 /* Default search path */
7453 /* LIVE555 Streaming Media library support */
7456 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
7459 /* Use unrarlib for Vobsubs */
7462 /* gui support, please do not edit this option */
7466 /* Audio output drivers */
7468 $_def_ossaudio_devdsp
7469 $_def_ossaudio_devmixer
7478 $_def_sys_asoundlib_h
7479 $_def_alsa_asoundlib_h
7485 /* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */
7487 #undef FAST_OSD_TABLE
7489 /* Enable TV Interface support */
7492 /* Enable EDL support */
7495 /* Enable Video 4 Linux TV interface support */
7498 /* Enable Video 4 Linux 2 TV interface support */
7501 /* Enable *BSD BrookTree TV interface support */
7504 /* Define if your processor stores words with the most significant
7505 byte first (like Motorola and SPARC, unlike Intel and VAX). */
7510 /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not
7511 have the instruction. */
7514 /* libmpeg2 wants ARCH_PPC and the rest of mplayer use ARCH_POWERPC,
7515 * define ARCH_PPC if ARCH_POWERPC is set to cope with that.
7521 /* the same issue as with ARCH_POWERPC but with ffmpeg/libavcodec */
7526 /* only gcc3 can compile mvi instructions */
7527 $_def_gcc_mvi_support
7529 /* Define this for Cygwin build for win32 */
7532 /* Define this to any prefered value from 386 up to infinity with step 100 */
7533 #define __CPU__ $iproc
7542 #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
7543 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7545 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7546 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7547 #elif defined(WIN32)
7548 #define DEFAULT_CDROM_DEVICE "D:"
7549 #define DEFAULT_DVD_DEVICE "D:"
7550 #elif defined(SYS_DARWIN)
7551 #define DEFAULT_CDROM_DEVICE "/dev/disk1"
7552 #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
7553 #elif defined(__OpenBSD__)
7554 #define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
7555 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7556 #elif defined(__FreeBSD__)
7557 #define DEFAULT_CDROM_DEVICE "/dev/acd0"
7558 #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
7560 #define DEFAULT_CDROM_DEVICE "/dev/cdrom"
7561 #define DEFAULT_DVD_DEVICE "/dev/dvd"
7565 /*----------------------------------------------------------------------------
7567 ** NOTE: Instead of modifying these definitions here, use the
7568 ** --enable/--disable options of the ./configure script!
7569 ** See ./configure --help for details.
7571 *---------------------------------------------------------------------------*/
7573 /* C99 lrintf function available */
7576 /* round function is available */
7579 /* yes, we have inttypes.h */
7580 #define HAVE_INTTYPES_H 1
7582 /* int_fastXY_t emulation */
7585 /* nanosleep support */
7591 /* termcap flag for getch2.c */
7594 /* termios flag for getch2.c */
7599 /* enable PNG support */
7602 /* enable JPEG support */
7605 /* enable PNM support */
7608 /* enable md5sum support */
7611 /* enable GIF support */
7616 /* enable FreeType support */
7619 /* enable Fontconfig support */
7622 /* enable FriBiDi usage */
7625 /* enable ENCA usage */
7628 /* liblzo support */
7631 /* libmad support */
7634 /* enable OggVorbis support */
7637 /* enable Tremor as vorbis decoder */
7640 /* enable musepack support */
7643 /* enable OggTheora support */
7646 /* enable Matroska support */
7649 /* enable FAAD (AAC) support */
7653 /* enable FAAC (AAC encoder) support */
7656 /* enable LADSPA plugin support */
7659 /* enable network */
7662 /* enable ftp support */
7665 /* enable vstream support */
7668 /* enable winsock2 instead of Unix functions*/
7671 /* define this to use inet_aton() instead of inet_pton() */
7674 /* enables / disables cdparanoia support */
7677 /* enables / disables VIDIX usage */
7680 /* enables / disables new input joystick support */
7683 /* enables / disables QTX codecs */
7686 /* enables / disables osd menu */
7689 /* enables / disables subtitles sorting */
7692 /* XMMS input plugin support */
7694 #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
7696 /* enables inet6 support */
7699 /* do we have gethostbyname2? */
7700 $_def_gethostbyname2
7702 /* Extension defines */
7703 $_def_3dnow // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
7704 $_def_3dnowex // only define if you have 3DNOWEX (AMD Athlon, etc.)
7705 $_def_mmx // only define if you have MMX (newer x86 chips, not P54C/PPro)
7706 $_def_mmx2 // only define if you have MMX2 (Athlon/PIII/4/CelII)
7707 $_def_sse // only define if you have SSE (Intel Pentium III/4 or Celeron II)
7708 $_def_sse2 // only define if you have SSE2 (Intel Pentium 4)
7709 $_def_altivec // only define if you have Altivec (G4)
7711 $_def_altivec_h // enables usage of altivec.h
7714 $_def_mlib // Sun mediaLib, available only on solaris
7715 $_def_vis // only define if you have VIS ( ultrasparc )
7717 /* libmpeg2 uses a different feature test macro for mediaLib */
7719 #define LIBMPEG2_MLIB 1
7723 #define SCREEN_SIZE_X 1
7724 #define SCREEN_SIZE_Y 1
7736 /* defined for SDLlib with keyrepeat bugs (before 1.2.1) */
7745 $_def_directfb_version
7768 #if defined(HAVE_GL) || defined(HAVE_X11) || defined(HAVE_XV)
7769 #define X11_FULLSCREEN 1
7772 #endif /* MPLAYER_CONFIG_H */
7775 #############################################################################
7777 echo "Creating libvo/config.mak"
7778 _voobj
=`echo $_vosrc | sed -e 's/\.c/\.o/g;s/\.m/\.o/g'`
7779 cat > libvo
/config.mak
<< EOF
7780 include ../config.mak
7781 OPTIONAL_SRCS = $_vosrc
7782 OPTIONAL_OBJS = $_voobj
7785 #############################################################################
7787 echo "Creating libao2/config.mak"
7788 _aoobj
=`echo $_aosrc | sed -e 's/\.c/\.o/g'`
7789 cat > libao
2/config.mak
<< EOF
7790 include ../config.mak
7791 OPTIONAL_SRCS = $_aosrc
7792 OPTIONAL_OBJS = $_aoobj
7795 #############################################################################
7797 echo "Creating libaf/config.mak"
7798 _afobj
=`echo $_afsrc | sed -e 's/\.c/\.o/g'`
7799 cat > libaf
/config.mak
<< EOF
7800 include ../config.mak
7801 OPTIONAL_SRCS = $_afsrc
7802 OPTIONAL_OBJS = $_afobj
7805 #############################################################################
7809 Config files successfully generated by ./configure !
7811 Install prefix: $_prefix
7812 Data directory: $_datadir
7813 Config direct.: $_confdir
7815 Byte order: $_byte_order
7816 Optimizing for: $_optimizing
7819 Messages/GUI: $_language
7822 echo -n " Manual pages: $MAN_LANG"
7823 test "$LANGUAGES" = en
&& echo -n " (no localization selected, use --language=all)"
7828 Enabled optional drivers:
7829 Input: $_inputmodules
7830 Codecs: $_codecmodules
7831 Audio output: $_aomodules
7832 Video output: $_vomodules
7833 Audio filters: $_afmodules
7834 Disabled optional drivers:
7835 Input: $_noinputmodules
7836 Codecs: $_nocodecmodules
7837 Audio output: $_noaomodules
7838 Video output: $_novomodules
7839 Audio filters: $_noafmodules
7841 'config.h' and 'config.mak' contain your configuration options.
7842 Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
7843 compile *** DO NOT REPORT BUGS if you tweak these files ***
7845 'make' will now compile MPlayer and 'make install' will install it.
7846 Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.
7851 if test "$_mtrr" = yes ; then
7852 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)"
7856 if test "$_sdl" = "outdated" ; then
7858 You have an outdated version of libSDL installed (older than v1.1.7) and SDL
7859 support has therefore been disabled.
7861 Please upgrade to a more recent version (version 1.1.8 and above are known to
7862 work). You may get this library from: http://www.libsdl.org
7864 You need to rerun ./configure and recompile after updating SDL. If you are
7865 only interested in the libSDL audio drivers, then an older version might work.
7867 Use --enable-sdl to force usage of libSDL.
7873 if test "$_win32" = no
; then
7874 if test "$_win32libdir" ; then
7875 echo "Failed to find a Win32 codecs dir at $_win32libdir!"
7877 echo "Failed to find a Win32 codecs directory! (default: /usr/local/lib/codecs/)"
7880 Create it and copy the DLL files there! You can download the codecs from our
7881 homepage at http://www.mplayerhq.hu/MPlayer/releases/codecs/
7887 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your
7888 operating system ($system_name). You may encounter a few files that cannot
7889 be played due to missing open source video/audio codec support.
7897 Check $TMPLOG if you wonder why an autodetection failed (check whether
7898 the development headers/packages are installed).
7899 Do not report compilation errors if you used any of the --enable-* options
7900 (except --enable-gui and maybe --enable-debug).
7902 If you suspect a bug, please read DOCS/HTML/$_doc_lang/bugreports.html.
7906 if test "$_vidix" = no
; then
7908 You've disabled VIDIX. Although it would be better to PORT it instead.
7909 Have a look at the documentation for supported cards!
7914 if test "$_warn_CFLAGS" = yes; then
7917 MPlayer compilation will use the CFLAGS set by you, but:
7919 *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** ***
7921 It is strongly recommended to let MPlayer choose the correct CFLAGS!
7922 To do so, execute 'CFLAGS= ./configure <options>'
7928 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"